harf4ng Posted October 9, 2021 Posted October 9, 2021 Hi, In the default.lua of my Huey I have this line : {down = device_commands.Button_12,cockpit_device_id = devices.INTERCOM, value_down = 1.0, name = _('Intercom Mode Selector (rotary)'), category = _("Intercom Control Panel")}, So I can assign that to a button, and when I click on the button it increases the rotary and then go back to the first after it cycled all the values. I would like to change that, so when I click on a button it increases the value, and when I click on another button, it decreases the value. Is it possible and how? Also, I have that in the same file : {down = device_commands.Button_8,cockpit_device_id = devices.INTERCOM, value_down = 0.2, name = _('Intercom Mode 1'), category = _("Intercom Control Panel")}, {down = device_commands.Button_8,cockpit_device_id = devices.INTERCOM, value_down = 0.3, name = _('Intercom Mode 2'), category = _("Intercom Control Panel")}, {down = device_commands.Button_8,cockpit_device_id = devices.INTERCOM, value_down = 0.4, name = _('Intercom Mode 3'), category = _("Intercom Control Panel")}, I would like to use a three position switch to do that. This three position switch uses a button for two of the positions, and no button for the third position. So I would like when I have the switch forward it does intercom 1, switch backward intercom 3, and switch neutral, intercom 2. Is it possible and how ? Thanks Favorite modules : Huey, F-86F, F14 and P-51D Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.
No1sonuk Posted October 9, 2021 Posted October 9, 2021 If those options are available as separate button press inputs, you might be able to use something like JoyToKey software to interpret the 2 buttons as three. I'm not sure if Joytokey can do that, but there may be something like it available.
No1sonuk Posted October 9, 2021 Posted October 9, 2021 Also, have you looked at the A-10's flaps switch assignment? I think that works as you want.
harf4ng Posted October 12, 2021 Author Posted October 12, 2021 Where can I find that? Also, if DCS writes "rotary" for the command, doesn't it mean that the software is able to send "up" and "down" commands, so we can really bind a hardware rotary to this command? So maybe this means I can edit the default lua profile to replace this rotary stuff with two commands, one to send the up command, the other one to send the down command? Though this means I should find out what commands I should send... Thanks Favorite modules : Huey, F-86F, F14 and P-51D Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.
No1sonuk Posted October 12, 2021 Posted October 12, 2021 On the A-10, the 3-way flaps switch activates "toggle flaps up" when pushed forward and "toggle flaps dn" when pushed back, but doesn't trigger anything when moved to the centre position. HOWEVER, in-game, the centre position gives a partial flaps deployment, so there must be something that detects an absence of the other two position button presses.
Munkwolf Posted October 12, 2021 Posted October 12, 2021 (edited) On 10/9/2021 at 6:58 AM, harf4ng said: I would like to change that, so when I click on a button it increases the value, and when I click on another button, it decreases the value. Is it possible and how? It really depends on how the module is wired for that control. Sometimes the iterator/rotary controls support +1/-1 for increase/decrease, sometimes they don't. I can't remember if I checked whether a negative value works for the intercom when I did an update for the Huey keybinds. If it's wired up for it, it'd be a matter of passing -1 for the value, like: {down = device_commands.Button_12,cockpit_device_id = devices.INTERCOM, value_down = -1.0, name = _('Intercom Mode Selector (rotary decrease)'), category = _("Intercom Control Panel")}, That may or may not work, it depends on whether the logic in the DLL for the Huey is coded to care about +/- instead of always just incrementing regardless of the value. There may also be a different device_command for the decrement, usually findable in the cockpit LUA's (command_defs and clickabledata), but that isn't the standard pattern vs having one command that accepts values that are +/- for increase/decrease. On 10/9/2021 at 6:58 AM, harf4ng said: I would like to use a three position switch to do that. This three position switch uses a button for two of the positions, and no button for the third position. So I would like when I have the switch forward it does intercom 1, switch backward intercom 3, and switch neutral, intercom 2. That one is a bit easier. I didn't include any 'else' versions in the keybinds project for that since it's a 6 position dial. You're looking to add an "up" command/value pair, like: {cockpit_device_id = devices.INTERCOM, down = device_commands.Button_8, up = device_commands.Button_8, value_down = 0.2, value_up = 0.3, name = _('Intercom Mode 1 else 2 (2-way Switch)'), category = {_('Intercom Control Panel'), _('Custom')}}, {cockpit_device_id = devices.INTERCOM, down = device_commands.Button_8, up = device_commands.Button_8, value_down = 0.4, value_up = 0.3, name = _('Intercom Mode 3 else 2 (2-way Switch)'), category = {_('Intercom Control Panel'), _('Custom')}}, Edited October 12, 2021 by Munkwolf
harf4ng Posted October 15, 2021 Author Posted October 15, 2021 Thanks for the info. Seems we can do things very in depth with DCS, when we know how to do that. Favorite modules : Huey, F-86F, F14 and P-51D Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.
Recommended Posts