Jyge Posted August 30, 2019 Share Posted August 30, 2019 I tried following in default.lua for having dedicated switch positions: --Modded {combos = {{key = 'A', reformers = {'RCtl'}}}, down = device_commands.Button_7, cockpit_device_id = devices.RADAR_ALTIMETER, value_down = 1.0, name = _('Radar Altimeter On'), category = _('Modded')}, {combos = {{key = 'A', reformers = {'RShift','RCtl'}}}, down = device_commands.Button_7, cockpit_device_id = devices.RADAR_ALTIMETER, value_down = 0.0, name = _('Radar Altimeter Off'), category = _('Modded')}, {combos = {{key = 'G', reformers = {'RCtl'}}}, down = device_commands.Button_14, cockpit_device_id = devices.ENGINE_INTERFACE, value_down = 1.0, name = _('Governor Emer'), category = _('Modded')}, {combos = {{key = 'G', reformers = {'RShift','RCtl'}}}, down = device_commands.Button_14, cockpit_device_id = devices.ENGINE_INTERFACE, value_down = 0.0, name = _('Governor Auto'), category = _('Modded')}, {combos = {{key = 'B', reformers = {'RAlt'}}}, down = device_commands.Button_1, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 0.0, name = _('Battery Switch On'), category = _('Modded')}, {combos = {{key = 'B', reformers = {'RShift','RAlt'}}}, down = device_commands.Button_1, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 1.0, name = _('Battery Switch Off'), category = _('Modded')}, Unfortunately only battery on/off works and I just can not figure out why. Any ideas? The relevant parts in the clickabledata.lua are elements["RADAR-ALT-PTR"] = default_2_position_tumb(_("Radar Altimeter Power Switch, ON/OFF"), devices.RADAR_ALTIMETER, device_commands.Button_7, 449) elements["GOV-PTR"] = default_2_position_tumb(_("Governor Switch, EMER/AUTO") , devices.ENGINE_INTERFACE, device_commands.Button_14, 85) elements["BAT-SWITCHER-PTR"] = default_2_position_tumb(_("Battery Switch, ON/OFF"), devices.ELEC_INTERFACE, device_commands.Button_1, 219) [/code] Link to comment Share on other sites More sharing options...
LeCuvier Posted August 30, 2019 Share Posted August 30, 2019 Hi Jyge, I don't have the Huey module and therefore cannot try anything. Question: Do the new commands you have created appear when you go to Options/Controls? Assuming the answer is Yes: Do any of the commands for Radar and Governor work? Normally I would try using value_down = -1.0 instead of value_down = 0.0. But if the command with value_down = 1.0 doesn't work either then that might not lead to the solution. In some modules you have to use numerical ID's for cockpit_device_id (found in devices.lua), and also for the commands. In that case quite often you have to add 3000 to the button number. So instead of using "device_commands.Button_7" you would use "3007" (look at command_defs.lua). I suppose you have edited the default.lua under the folder "keyboard". I would like to look at the one under "joystick" if you could post it. LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5 Link to comment Share on other sites More sharing options...
Jyge Posted August 30, 2019 Author Share Posted August 30, 2019 I think I must have had something double. I removed the default keypresses here and left the following: --Modded {down = device_commands.Button_7, cockpit_device_id = devices.RADAR_ALTIMETER, value_down = 1.0, name = _('Radar Altimeter On'), category = _('Modded')}, {down = device_commands.Button_7, cockpit_device_id = devices.RADAR_ALTIMETER, value_down = 0.0, name = _('Radar Altimeter Off'), category = _('Modded')}, {down = device_commands.Button_14, cockpit_device_id = devices.ENGINE_INTERFACE, value_down = 1.0, name = _('Governor Emer'), category = _('Modded')}, {down = device_commands.Button_14, cockpit_device_id = devices.ENGINE_INTERFACE, value_down = 0.0, name = _('Governor Auto'), category = _('Modded')}, {combos = {{key = 'B', reformers = {'RAlt'}}}, down = device_commands.Button_1, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 0.0, name = _('Battery Switch On'), category = _('Modded')}, {combos = {{key = 'B', reformers = {'RShift','RAlt'}}}, down = device_commands.Button_1, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 1.0, This I could map and it worked so, it was on those default assignments. Link to comment Share on other sites More sharing options...
Recommended Posts