Convenient CONTROLS additions (rotaries and toggles) - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 07-16-2019, 02:45 PM   #1
-0303-
Member
 
Join Date: Dec 2018
Posts: 140
Default Convenient CONTROLS additions (rotaries and toggles)

Just going through the switches to start it up.
(Bolded is verbatim as spelled)

Accum switch --------------(add toggle on/off)
Shunt switch ---------------(add toggle on/off)
Radio switch ---------------(add toggle on/off)
Fuel valve ------------------(add toggle open/close)
Primary fuel Pump --------(add toggle lock/close) wording says open/close, but better wording would be lock/unlock or screw/unscrew maybe
Primary fuel Switch -------(add rotary) or maybe CW CCW
Ignition switch -------------(add rotary) or maybe CW CCW (just rotary not CW CCW is good enough for the P-51 magnets)
-0303- is offline   Reply With Quote
Old 07-17-2019, 03:51 PM   #2
zaelu
Veteran
 
zaelu's Avatar
 
Join Date: Sep 2005
Location: Nice, France
Posts: 3,935
Default

Gear direction lever needs commands too
__________________

I5 4670k, 16GB, GTX1070, G940HOTAS extremely modded with Bodnar0836X and a wooden case (really!)
zaelu is offline   Reply With Quote
Old 07-19-2019, 06:12 PM   #3
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,466
Default

Here are some additions to the "default.lua" I use:
Code:
{down = 3026, up = 3026, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, value_up = 0, name = _('Accum switch 2-Poa ON/OFF'), category = _('Systems')},
{down = 3022, up = 3022, cockpit_device_id  = devices.MOTOR_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Ignition switch 2-Pos BOTH/OFF'), category = _('Engine Control')},
{down = 3062, up = 3062, cockpit_device_id  = devices.MOTOR_SYSTEM, value_down = 1, value_up = 0, name = _('Fuel valve 2-Pos OPEN/CLOSE'), category = _('Fuel System Controls')},
{down = 3027, up = 3027, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, value_up = 0, name = _('Shunt switch 2-Pos ON/OFF'), category = _('Systems')},
{down = 3028, up = 3028, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, value_up = 0, name = _('Radio switch 2-Pos ON/OFF'), category = _('Systems')},
{down = 3024, up = 3024, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, value_up = 0, name = _('Pitot heating switch 2-Pos ON/OFF'), category = _('Systems')},
{down = 3025, up = 3025, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, value_up = 0, name = _('Nav light switch 2-Pos ON/OFF'), category = _('Systems')},
{down = 3046, up = 3046, cockpit_device_id  = devices.MOTOR_SYSTEM, value_up = 1, value_down = 0, name = _('Supercharger switch 2-Pos HIGH/LOW'), category = _('Engine Control')},
{down = 3069, up = 3069, cockpit_device_id  = devices.COMMON_SYSTEM, value_down = 1, value_up = 0, name = _('Mech sight 2-Pos ON/OFF'), category = _('Weapons')},
{down = 3700, up = 3700, cockpit_device_id  = devices.COMMON_SYSTEM, value_down = 1, value_up = 0, name = _('Sight filter 2-Pos ON/OFF'), category = _('Weapons')},
{down = 3003, up = 3003, cockpit_device_id  = devices.OXYGEN_SYSTEM, value_down = -1, value_up = 1, name = _('Oxygen shutoff valve 2-Pos OPEN/CLOSE'), category = _('Systems')},
__________________
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
LeCuvier is offline   Reply With Quote
Old 07-21-2019, 01:21 PM   #4
-0303-
Member
 
Join Date: Dec 2018
Posts: 140
Default

These work for the joystick. I tried to apply them to the keyboard. I understand one edits one file for the joystick and another file for the keyboard:
Code:
C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\I-16\Input\I-16\joystick\default.lua
C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\I-16\Input\I-16\keyboard\default.lua
(For Accum Switch) I tried the to add this line (the one that works for the joystick) to the keyboard file:
Code:
{down = 3026, up = 3026, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, value_up = 0, name = _('Accum switch 2-Pos ON/OFF'), category = _('Systems')},
This works except it flips randomly 1x or 2x (ie back again) when pushed.

~
There is one ready made 'toggle' and that is the "Mixture Control (rotary)". It's just 2 positions so I would rather call it a toggle than a "rotary" but never mind that.

Stripped of key assignment (Combos...) it looks like this:
Code:
{down = 3004, cockpit_device_id  = devices.MOTOR_SYSTEM, value_down = 1, name = _('Mixture control (rotary)'), category = _('Engine Control')},
So I tried copying this but changing it to "Accum..." instead. Ie I changed 3004 to 3026 and changed name and category. Like this:

Code:
{down = 3026, cockpit_device_id  = devices.ELECTRIC_SYSTEM, value_down = 1, name = _('Accum switch 2-Pos ON/OFF'), category = _('Systems')},
I added that to keyboard file. This doesn't even show up in the "ADJUST CONTROLS" menu.

Looking at the original "Mixture Control" code, noting that there is no "Mixture On" or "Mixture Off" calls and that it is only given argument "value_down" and not given any "value_up", makes me think the toggle functionality for "Mixture Control" is hidden inside the call to "devices.ELECTRIC_SYSTEM" and therefore this toggling only works for "Mixture control (rotary)".

Last edited by -0303-; 07-21-2019 at 03:45 PM.
-0303- is offline   Reply With Quote
Old 07-21-2019, 05:28 PM   #5
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,466
Default

The commands I added mostly have "...2-Pos..." in their names. They are meant to be used with Maintained ON/OFF switches. They do one thing when the contact closes ("down") and another thing when the contact opens ("up").
They cannot work with the keyboard. For use with the keyboard each of them needs to be divided into 2 separate commands.
__________________
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
LeCuvier is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:42 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.