Jump to content

How to set up toggle switches (a tutorial)


Recommended Posts

Sorry, I guess you are referring to the "Caution Light Panel". I wouldn't worry about that too much. The Flight manual states on page that the warning light will go ON if the gear is down and Anti-Skid is disengaged, then says "No function". So it's probably not a high priority for the programmers.

  • 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

@icemaker: I can reproduce the anti-skid warning on the ground before takeoff.

But not if I run a Landing instant action. Test:

- Switch anti-skid OFF from my button box

- Lower landing gear --> anti-skid warning goes ON

- Switch anti-skid ON from my button box --> anti-skid warning goes OFF

 

This makes sense to me as the anti-skid function is relevant for the landing process - not for takeoff.

 

The flight manual should be updated as the warning light does function.

  • 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

  • 1 month later...

Not exactly a key-binding issue, but the Hornet auto-start sequence can be customized by altering the macro-sequencies.lua file in Cockpit\Scripts. During the sequence the cockpit mirrors are toggled on. I wish to add a line to the macro to toggle them off, but so far, no joy. A typical auto-start command looks like this:

 

push_start_command(dt,	{device = devices.OXYGEN_INTERFACE,	action = oxygen_commands.OBOGS_ControlSw,	value = 1.0})

 

dt is simply a defined delay time in sec. Defaut.lua key assignment command is thus:

 

{combos = {{key = 'M',	reformers = {'RWin'}}},	down = iCommandToggleMirrors, name = _('Toggle Mirrors'), category = _('View Cockpit')},

 

I can not find a device name for the mirrors, but have tried several variation of this line:

push_start_command(dt,	{action = CommandToggleMirrors})

 

Looks like this SHOULD be simple. Any suggestions?

Link to comment
Share on other sites

I do not see where in the sequence the mirrors are toggled ON. A search does not show any line with "Mirrors" in it.

The mirrors command is one of these "iCommand..." that are not associated with any device. So I'm not sure that you can toggle the mirrors in the macro sequence.

But I notice in your line that you misspelled the command. I should be "iCommandToggleMirrors"; you omitted the "i" at the beginning.

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 omitted on purpose for this trial. I noticed none of these commands included the "i". I have successfully customized the auto-start sequence to a considerable extent. Mirrors ON command must be hard-coded into one of the earlier commands. Interesting challenge, especially no device name anywhere I could find.

Link to comment
Share on other sites

  • 3 weeks later...

This my first try at this.  I have the switch working but it does the opposite.  Up is down and down is up.  This is in the F-16

 

{    down = control_commands.StoresConfig_ITER, up = control_commands.StoresConfig_ITER,    cockpit_device_id = devices.CONTROL_INTERFACE,    value_down =  -1.0,            name = _('ALT STORES CONFIG Switch - CAT I/CAT III'),    category = {_('Left Auxiliary Console')}},

 

Any help would be appreciated

 

I got it figured out. 


Edited by GrumpyOleManFtw
  • Like 1
Link to comment
Share on other sites

This my first try at this.  I have the switch working but it does the opposite.  Up is down and down is up.  This is in the F-16
 
{    down = control_commands.StoresConfig_ITER, up = control_commands.StoresConfig_ITER,    cockpit_device_id = devices.CONTROL_INTERFACE,    value_down =  -1.0,            name = _('ALT STORES CONFIG Switch - CAT I/CAT III'),    category = {_('Left Auxiliary Console')}},
 
Any help would be appreciated
 
I got it figured out. 
What was the change?

Sent from my MAR-LX1A using Tapatalk

Link to comment
Share on other sites

  • 1 month later...

F16 NWS switch...

 

I am used to the F18 NWS button which is HELD for operation. I want to map the F16 the same as it seems to be a latch On then latch again OFF type. The F16 default lua looks like it should work just like the F18...?? Why the difference and what to do?

 

F18: {    down = hotas_commands.STICK_UNDESIGNATE,            up = hotas_commands.STICK_UNDESIGNATE,                cockpit_device_id = devices.HOTAS,    value_down =  1.0,        value_up = 0.0,    name = _('Undesignate/Nose Wheel Steer Switch'),                        category = {_('Stick'), _('HOTAS')}}, 

 

F16: {    down = hotas_commands.STICK_NWS_AR_DISC_MSL_STEP,    up = hotas_commands.STICK_NWS_AR_DISC_MSL_STEP,    cockpit_device_id = devices.HOTAS,    value_down =  1.0,    value_up = 0.0,    name = _('NWS A/R DISC MSL STEP Button'),                category = {_('Stick'), _('HOTAS')}},

Occulus Rift i7-7700 3.6Ghz 16GB Ram 1080Ti 11GB SSDx2

Link to comment
Share on other sites

I suspect it's modelled as in the real thing. And it's used for different functions, not just NWS. And if you modify the command that might not work well with the other functions. Not a good candidate for customizing.

  • 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 weeks later...
On 6/11/2021 at 6:08 AM, Habu_69 said:

i omitted on purpose for this trial. I noticed none of these commands included the "i". I have successfully customized the auto-start sequence to a considerable extent. Mirrors ON command must be hard-coded into one of the earlier commands. Interesting challenge, especially no device name anywhere I could find.

Mirrors on or off by default is set in the main DCS settings window, and it's global, effects all aircraft.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
F16 NWS switch...
 
I am used to the F18 NWS button which is HELD for operation. I want to map the F16 the same as it seems to be a latch On then latch again OFF type. The F16 default lua looks like it should work just like the F18...?? Why the difference and what to do?
 
F18: {    down = hotas_commands.STICK_UNDESIGNATE,            up = hotas_commands.STICK_UNDESIGNATE,                cockpit_device_id = devices.HOTAS,    value_down =  1.0,        value_up = 0.0,    name = _('Undesignate/Nose Wheel Steer Switch'),                        category = {_('Stick'), _('HOTAS')}}, 
 
F16: {    down = hotas_commands.STICK_NWS_AR_DISC_MSL_STEP,    up = hotas_commands.STICK_NWS_AR_DISC_MSL_STEP,    cockpit_device_id = devices.HOTAS,    value_down =  1.0,    value_up = 0.0,    name = _('NWS A/R DISC MSL STEP Button'),                category = {_('Stick'), _('HOTAS')}},
Bad idea. It is also used for missile stepping.
  • Like 1

My controls & seat

 

Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat)

Stick grips:

Thrustmaster Warthog

Thrustmaster Cougar (x2)

Thrustmaster F-16 FLCS

BRD KG13

 

Standby controls:

BRD-M2 Mi-8 Pedals (Ruddermaster controller)

BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller)

Thrustmaster Cougar Throttle

Pilot seat

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Hey guys, first time at this and I'm running into some trouble. I'm trying to create a command for an on-off-on toggle to select flap position in the F-18. The commands appear in the adjust controls menu and i can bind them, but they do nothing. Code below. Any help is very appreciated, Thanks.

 

{   down = ctrl_commands.Flapsw, cockpit_device_id = devices.CONTROL_INTERFACE,  value_down =  1.0, value_up = 0.0,   name = _('FLP AUTO up HALF mid'), category = {_('Left Vertical Panel')}},
{   down = ctrl_commands.Flapsw, cockpit_device_id = devices.CONTROL_INTERFACE,  value_down = -1.0, value_up = 0.0,   name = _('FLP FULL down HALF mid'), category = {_('Left Vertical Panel')}},
 

Callsign: "Milkman"

I7-8700k@4.8--Corsair H115i pro--EVGA FTW3 1080ti--GB Aorus Z370--256GB M.2 SSD--16GB ram--Win10--1000wGold Rate PSU--CV1 Rift--TIR5--X55 HOTAS--TM pedals--TM MFDs--Custom UFC

Link to comment
Share on other sites

whoops, I forgot to add the up command too, so this is what i currently have that still is in-game, can be assigned, but does nothing.

 

{   down = ctrl_commands.Flapsw, up = ctrl_commands.Flapsw, cockpit_device_id = devices.CONTROL_INTERFACE,  value_down =  1.0, value_up = 0.0,   name = _('FLP AUTO up HALF mid'), category = {_('Left Vertical Panel')}},
{   down = ctrl_commands.Flapsw, up = ctrl_commands.Flapsw, cockpit_device_id = devices.CONTROL_INTERFACE,  value_down = -1.0, value_up = 0.0,   name = _('FLP FULL down HALF mid'), category = {_('Left Vertical Panel')}},

Callsign: "Milkman"

I7-8700k@4.8--Corsair H115i pro--EVGA FTW3 1080ti--GB Aorus Z370--256GB M.2 SSD--16GB ram--Win10--1000wGold Rate PSU--CV1 Rift--TIR5--X55 HOTAS--TM pedals--TM MFDs--Custom UFC

Link to comment
Share on other sites

48 minutes ago, colyoap said:

whoops, I forgot to add the up command too, so this is what i currently have that still is in-game, can be assigned, but does nothing.

 

{   down = ctrl_commands.Flapsw, up = ctrl_commands.Flapsw, cockpit_device_id = devices.CONTROL_INTERFACE,  value_down =  1.0, value_up = 0.0,   name = _('FLP AUTO up HALF mid'), category = {_('Left Vertical Panel')}},
{   down = ctrl_commands.Flapsw, up = ctrl_commands.Flapsw, cockpit_device_id = devices.CONTROL_INTERFACE,  value_down = -1.0, value_up = 0.0,   name = _('FLP FULL down HALF mid'), category = {_('Left Vertical Panel')}},

What HOTAS are you using?  Don't the built in "FLAP Switch - AUTO/HALF" and "FLAP Switch - FULL/HALF" work for you?

Link to comment
Share on other sites

I concur with @rob10. Looks like you are trying to re-invent the wheel.

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

🤦‍♂️🤦‍♂️ wow, in my excitement to put to use what i've learned form LeCuvier's post I never thought to look and see if it was already in-game under 'special for joystick'.. thank you gentleman... 😅

  • Like 1

Callsign: "Milkman"

I7-8700k@4.8--Corsair H115i pro--EVGA FTW3 1080ti--GB Aorus Z370--256GB M.2 SSD--16GB ram--Win10--1000wGold Rate PSU--CV1 Rift--TIR5--X55 HOTAS--TM pedals--TM MFDs--Custom UFC

Link to comment
Share on other sites

7 hours ago, colyoap said:

🤦‍♂️🤦‍♂️ wow, in my excitement to put to use what i've learned form LeCuvier's post I never thought to look and see if it was already in-game under 'special for joystick'.. thank you gentleman... 😅

🙂 -- the Flaps for the F-18 have a bunch of binding options which makes missing those 2 pretty easy.  That's why I mentioned them.

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
On 5/7/2021 at 7:31 PM, GaryR said:

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

This is not yet implemented in all toggle switches within DCS right?

Link to comment
Share on other sites

58 minutes ago, Apar said:

This is not yet implemented in all toggle switches within DCS right?

If you are referring to @GaryR's statement: this is not implemented in DCS World, and I do not know that they have any intention to implement it. So we are obliged to either accept the software as is, or edit the .lua files.

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

3 hours ago, LeCuvier said:

If you are referring to @GaryR's statement: this is not implemented in DCS World, and I do not know that they have any intention to implement it. So we are obliged to either accept the software as is, or edit the .lua files.

There is some toggle switches that has some feature like FLAPS  AUTO/HALF FULL/HALF. But not to all tho not sure why they did not do it for the rest of the witches.

  • Like 1
Link to comment
Share on other sites

47 minutes ago, Apar said:

There is some toggle switches that has some feature like FLAPS  AUTO/HALF FULL/HALF. But not to all tho not sure why they did not do it for the rest of the witches.

 

For me, the easiest solution for the TM Warthog HOTAS in DCS was to run the Target Script that enables DX1-DX128 on the Throttle. Then I simply assign every switch position on the throttle in DCS controls setup, save the setup for each plane, and this is not effected by their countless (appreciated!) updates. TARGET is only working on the Throttle, the stick and rudders are not effected by this script and are assigned normally. This has worked flawlessly for me for quite a while now despite the many TARGET horror stories out there..

 

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 552.12 driver / 3 Samsung LC32G53TQWUXEN 32" 7680x1440 at 144Hz  / Win11 Pro Ver.  23H2 - Build 22631.3447 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

  • 3 weeks later...

There is a tutorial document. I'm not smart enough to teach LUA editing by video 🙂

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

  • 4 weeks later...
2016/8/1 PM8点56分,LeCuvier说:

Document How to Modify Control Binding Files

 

There is a lot of posts with questions about the subject "how to achieve 2-position or 3-position control with 1 resp. 2 switches". And a lot of people waste their time explaining the same things over and again, albeit not always at the level of detail that might be required. I have done a few modifications in the last few months and I have documented what I learned. I'm posting this document for use by anybody who might benefit.

I'll be happy to receive suggestions for improvement or additional items.

Edited 05-MAY-2017:

- added definitions on switch types

- added example for "Using a Maintained ON/OFF switch for an ON/OFF toggle (KA-50)"

- some clean-up

Edited 18-FEB-2018:

- added method and examples for KA-50 (using info from clickabledata.lua, devices.lua and command_defs.lua)

 

How to Edit Control Binding Files.pdf 459.69KB · 1,836次下载

 

thanks for your great work

Link to comment
Share on other sites

  • Recently Browsing   0 members

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