Jump to content

How to set up toggle switches (a tutorial)


Recommended Posts

7 minutes ago, Bbow said:

Do you think that this problem could be fixed by editing the clickabledata.lua file?

I don't think so. I suspect that this control is not well-implemented. It's strange even when activated with the mouse.

  • Thanks 1

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

On 3/14/2021 at 10:47 AM, LeCuvier said:

I don't think so. I suspect that this control is not well-implemented. It's strange even when activated with the mouse.

I was thinking of changing the default_axis_cycle to a normal pushbutton function, and changing the part  "380, 0, 0.01, false)" to end with false, true.   Do you know if editing the lua is going to create a lot of problems or is it just like editing the joystick/keyboard lua? 

 

EDIT: tried it...and the effect was that I could not rotate the dial with the mouse in the cockpit. 


Edited by Bbow
Link to comment
Share on other sites

3 hours ago, RedeyeStorm said:

I have an issue. I setup a command but it is only a selectable option for my Flight Quadrant and not for my Warthog throttle or stick? Where should I look for a solution?

Not sure what your issue is, you don't even tell us which aircraft this is for, but let me guess:
Did you create a binding by adding a line in "default.lua"? If your aircraft has files like "Throttle - HOTAS Warthog.lua" and "Joystick - HOTAS Warthog.lua"then bindings defined in "default.lua" are not available for your Warthog throttle or stick. You need to add the line of code into "Throttle - HOTAS Warthog.lua" or "Joystick - HOTAS Warthog.lua" depending on where you want to use 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

21 hours ago, LeCuvier said:

Not sure what your issue is, you don't even tell us which aircraft this is for, but let me guess:
Did you create a binding by adding a line in "default.lua"? If your aircraft has files like "Throttle - HOTAS Warthog.lua" and "Joystick - HOTAS Warthog.lua"then bindings defined in "default.lua" are not available for your Warthog throttle or stick. You need to add the line of code into "Throttle - HOTAS Warthog.lua" or "Joystick - HOTAS Warthog.lua" depending on where you want to use it.

 

Hoi LeCuvier,

 

Didn't mention the plane because I assumed the problem wasn't so much with the plane but more my own inaptitude. Which you confirmed because I was indeed trying to modify the Default.lua.

Link to comment
Share on other sites

  • 2 weeks later...

AJS37: Is it possible, via editing the controls lua files, to add a binding the devs did not build in? Im wanting to use a rotary encoder on my custom button box to map to the bomb separation dial in the Viggen. (Weapon interval selector mode knob - Siktningvaljare) At the moment it only responds to mouse clicks and there is no description for it in the settings/controls. 

Link to comment
Share on other sites

1 hour ago, Sprool said:

AJS37: Is it possible, via editing the controls lua files, to add a binding the devs did not build in? Im wanting to use a rotary encoder on my custom button box to map to the bomb separation dial in the Viggen. (Weapon interval selector mode knob - Siktningvaljare) At the moment it only responds to mouse clicks and there is no description for it in the settings/controls. 

I tried ages ago to add a pair of commands for turning the knob CW/CCW one notch at a time. Not feasible. You need an 11-position rotary switch. Ridiculous.

  • Like 1

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

Thanks for the reply, its frustrating as all the other important rotary knobs are mappable (CW/CCW) and mapped to my rotary encoders, I understand Heatblur were asked to implement this in September 2018 so maybe one christmas in the distant future my dream will become a reality.

  • Like 1
Link to comment
Share on other sites

Hi all,

 

I need some help with setting up some controls for the F-18C with my warthog throttle. I am using the DX hack to allow each switch position its own DX assignment which works well for everything that has an 'on' and an 'off' command in DCS. I am trying to get my APU start/off switch on the controller to handle the APU on/off in game. I have followed instructions listed in this thread and entered this into the default.lua for the f18c.

 

{    down = engines_commands.APU_ControlSw, up = engines_commands.APU_ControlSw,  cockpit_device_id = devices.ENGINES_INTERFACE,  value_down =  1.0,   name = _('APU Control Switch - ON'),  category = {_('Left Console')}},
{    down = engines_commands.APU_ControlSw,  up = engines_commands.APU_ControlSw,  cockpit_device_id = devices.ENGINES_INTERFACE, value_down =  0.0,  name = _('APU Control Switch - OFF'), category = {_('Left Console')}},

 

The two options come up in DCS and I've assigned them correctly. When cold and dark, the switch works perfectly. However once I have started the engines the switch gets out of sync. Ie. Switch to off and in game is off, then to start (on) nothing happens. Then back to off and it goes to on and stays out of sync. That's the part that confuses me. 

 

under clickable data the apu switch is listed as follows.

 

elements["pnt_375"] = default_button2(_("APU Control Switch, ON/OFF"), devices.ENGINES_INTERFACE, engines_commands.APU_ControlSw,    375)

 

I'm not sure how to incorporate this into my previous and if that would make any difference?

 

Cheers

I5 2500k@4.4ghz, GTX980 OC, 16gb Gskill 12800 DDR3 ram, ssd. Thrustmaster warthog, CH pedals. Track ir 4p

Link to comment
Share on other sites

Looks like you are trying to re-invent the wheel.

There is a binding for the TM WH "APU START" switch: Look for the command "APU Control Sw (special) - ON/OFF" in the category "Special for joystick"!

It works correctly with the APU START switch on the throttle. Note however that the switch in the Hornet cockpit is electrically held in the ON position and automatically returns to OFF one minute after the second generator comes online. At this point your APU START switch is inevitably still in the START position and you should switch it to OFF so it's in sync.

Subsequently, even with the engines running, you can still switch the APU ON and OFF with your switch.

  • Like 1

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

I will try that option, for me it didn't seem to make any difference. Perhaps it's because I am running the do mod so the off and start have different dx buttons?

 

I5 2500k@4.4ghz, GTX980 OC, 16gb Gskill 12800 DDR3 ram, ssd. Thrustmaster warthog, CH pedals. Track ir 4p

Link to comment
Share on other sites

If you need to split it into 2 separate commands try this pair of lines:

{down = engines_commands.APU_ControlSw_TM_WARTHOG, cockpit_device_id = devices.ENGINES_INTERFACE, value_down =  1.0, name = _('APU Control Sw (special) - ON'),    category = {_('Special For Joystick'), _('Left Console')}},
{down = engines_commands.APU_ControlSw_TM_WARTHOG, cockpit_device_id = devices.ENGINES_INTERFACE, value_down =  0.0, name = _('APU Control Sw (special) - OFF'), category = {_('Special For Joystick'), _('Left Console')}},

 

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

Guys, is there a link to a basic tutorial for doing this? In BMS we have Alt Launcher to make it super-simple to assign a "Release" to a DX switch so, for instance, I have the Warthog Throttle top right switch set to UP for DX17 (CAT I) and DOWN (CAT III) to "DX17 Release". That's all I really need, the simplest way to have DCS recognize the "OFF" position for each switch that does not have a specific DX press assigned to it. I did see a reference to a Post# for this but I do not see post #'s on this forum (tried a couple browsers). Have Notepad ++, know where the files are (xx\OpenBeta\Mods\aircraft\F16-C\Input\F-16C\joystick\default.lua), just a bit lost on proper procedure to get what I want on the Warthog Throttle switches that do not have a DX assignment for every position..


Edited by GaryR
  • Like 1

Asus Z790-PLUS D4, Corsair 1000X PS / Intel i9-13900KF @5.8Gz - Corsair H150i Liquid CPU cooler, 64GB Corsair Vengeance DDR4 @3192mhz / 2TB M.2 NvMe Boot Drive (DCS World Beta installed here), 1TB M.2 Data drive, 1TB WD SATA drive, Zotac Gaming GeForce RTX 4090 Trinity 24GB - Nvidia 551.76 driver / 3 Samsung LC32G53TQWUXEN 32" 7680x1440 at 144Hz  / Win11 Pro Ver.  23H2 - Build 22631.3374 TIR 5, TM Warthog HOTAS\VirPil stick base, MFG V3 Crosswind Pedals, TM MFDs  on 2 8" Lilliputs/ Simgears ICP / Varjo Aero VR

Link to comment
Share on other sites

I posted a tutorial on 1-AUG-20156. I used to remember the post # but unfortunately we lost that reference with the new forum technology.

I see it on page 9 of this thread:

https://forums.eagle.ru/topic/74195-how-to-set-up-toggle-switches-a-tutorial/page/9/#elControls_2914585_menu

  • Thanks 1

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

6 minutes ago, LeCuvier said:

I posted a tutorial on 1-AUG-20156. I used to remember the post # but unfortunately we lost that reference with the new forum technology.

I see it on page 9 of this thread:

https://forums.eagle.ru/topic/74195-how-to-set-up-toggle-switches-a-tutorial/page/9/#elControls_2914585_menu

 

Perfect, thank you LeCuvier! This is the document I was hoping for!


Edited by GaryR
  • Like 1

Asus Z790-PLUS D4, Corsair 1000X PS / Intel i9-13900KF @5.8Gz - Corsair H150i Liquid CPU cooler, 64GB Corsair Vengeance DDR4 @3192mhz / 2TB M.2 NvMe Boot Drive (DCS World Beta installed here), 1TB M.2 Data drive, 1TB WD SATA drive, Zotac Gaming GeForce RTX 4090 Trinity 24GB - Nvidia 551.76 driver / 3 Samsung LC32G53TQWUXEN 32" 7680x1440 at 144Hz  / Win11 Pro Ver.  23H2 - Build 22631.3374 TIR 5, TM Warthog HOTAS\VirPil stick base, MFG V3 Crosswind Pedals, TM MFDs  on 2 8" Lilliputs/ Simgears ICP / Varjo Aero VR

Link to comment
Share on other sites

  • 4 weeks later...
{down = 3029, pressed = 3029, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button ON'), category = _('Landing gear panel')},
{down = 3028, pressed = 3028, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button OFF'), category = _('Landing gear panel')},

I tried this lines in my default.lua on the A-10CII but the anti-skid switch moves ingame but has no effect, i need to click on cockpit switch to remove the anti-skid warning!

Any clues?

  • Like 1
Link to comment
Share on other sites

Why cant they just come up with a simple "Release" function like (the other F16 sim) Alt Launcher? Even works for 3 position switches. Push "Press" and push the switch to it's DX button press position (let's say Brake ON), that's programmed. Press "Release" and hit that same switch and now assign that to Anti-Skid. Do the same for the lower switch position to set brakes OFF, release is Anti-Skid. Effortless and works perfectly.. here is what it looks like in AL..   

 

Alt Launcher.jpg

  • Like 2

Asus Z790-PLUS D4, Corsair 1000X PS / Intel i9-13900KF @5.8Gz - Corsair H150i Liquid CPU cooler, 64GB Corsair Vengeance DDR4 @3192mhz / 2TB M.2 NvMe Boot Drive (DCS World Beta installed here), 1TB M.2 Data drive, 1TB WD SATA drive, Zotac Gaming GeForce RTX 4090 Trinity 24GB - Nvidia 551.76 driver / 3 Samsung LC32G53TQWUXEN 32" 7680x1440 at 144Hz  / Win11 Pro Ver.  23H2 - Build 22631.3374 TIR 5, TM Warthog HOTAS\VirPil stick base, MFG V3 Crosswind Pedals, TM MFDs  on 2 8" Lilliputs/ Simgears ICP / Varjo Aero VR

Link to comment
Share on other sites

16 hours ago, icemaker said:

{down = 3029, pressed = 3029, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button ON'), category = _('Landing gear panel')},
{down = 3028, pressed = 3028, cockpit_device_id = 38, value_down = 1.0, value_pressed = 0.0, name = _('Anti-Skid Button OFF'), category = _('Landing gear panel')},

I tried this lines in my default.lua on the A-10CII but the anti-skid switch moves ingame but has no effect, i need to click on cockpit switch to remove the anti-skid warning!

Any clues?

Can you describe the scenario where you get the anti-skid warning? I tested this morning and it worked fine. When I set the switch to ON I could land without problems, and when it was OFF the landing was a disaster.

  • Like 1

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

2 hours ago, LeCuvier said:

Can you describe the scenario where you get the anti-skid warning? I tested this morning and it worked fine. When I set the switch to ON I could land without problems, and when it was OFF the landing was a disaster.

i launch the quick mission syria - takeoff, i switch on my throttle to Off, antiskid warning appears i switch back to on. The switch moves in cockpit but the antiskid warning still lit.

Link to comment
Share on other sites

Strange! I never see this message. Note: I fly in Open Beta all the time. The real test though is whether the anti-skid is active. It should prevent you from pirouetting when you brake brutally after touchdown.

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

44 minutes ago, LeCuvier said:

Strange! I never see this message. Note: I fly in Open Beta all the time. The real test though is whether the anti-skid is active. It should prevent you from pirouetting when you brake brutally after touchdown.

Do you use a button for ON and another for OFF?

Link to comment
Share on other sites

3 hours ago, icemaker said:

Do you use a button for ON and another for OFF?

I have two versions. One uses 2 pushbuttons, and the other uses a single maintained ON/OFF switch. Both work without any antiskid warning. In fact, I have never seen the anti-skid warning.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...