Jump to content

3 way switches?


Recommended Posts

Hi there,

 

Don't know if this might be a bug or not, so I'm asking here just in case it's me being dumb (as it happened a few times before).

 

Are the "3 way switches" working as they should? I mean, there are a couple bindings that I think are supposed to work with the warthog throttle, like:

 

Speed Brake switch - RETRACT/OFF: this one works as expected; I mapped it to the fwd position of the warthog speek brake. So as long as the button is "pressed" the aibrake retracts, and if I return the speed brake to the middle position (no button pressed) the airbrake simply stops wherever it is.

 

Exterior Lights Switch - ON/OFF: this one I assumed was the same, and mapped it to the warthog exterior lights switch fwd. But it simply works as a regular button; meaning it will toggle exterior lights every time I move it fwd, instead of keeping the lights on until I return it to the middle position. It's not a big deal, since I ended up binding the lights on and lights off to fwd/aft...but it sounds like it's not right:

 

Master Arm Switch - ARM/SAFE: this one is the same; I tried to bind it to any of the warthog's switches, asuming I'd go ARM when the switch is fwd (button pressed) and back to SAFE when siwtching it aft (no button press). But again, it just works as a regular toggle, so I need to flick the switch twice if I want to go from ARM to SAFE or vice-versa.

 

Any hints?

Link to comment
Share on other sites

Most buttons on the warthog throttle actually only have 1 button. Putting a switch up pushes a button and putting it down releases it. Until they add A-10 kind of hotas support to the module you have to do it manually from the joystick config file. Basically it makes a keybind that does 1 thing when you push a button, and another thing when you release it. Heres some examples of mine.

 

 

 

Also required if you want to bind catapult launch "U" button to a joystick. And theres also 2 commands to hold finger lift up all the time.

 

 

 

 

{ down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, name = _('Landing Gear Control Handle - UP/DOWN Warthog'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = gear_commands.HookHandle, up = gear_commands.HookHandle, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 0.0, value_up = 1.0, name = _('Arresting Hook Handle - UP/DOWN Warthog'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = hotas_commands.THROTTLE_LEFT_FINGERLIFT_EXT, up = hotas_commands.THROTTLE_LEFT_FINGERLIFT_EXT, cockpit_device_id = devices.HOTAS, value_down = 0.0, value_up = 1.0, name = _('Throttle Finger Lift (Left) - UP/DOWN Reversed'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = hotas_commands.THROTTLE_RIGHT_FINGERLIFT_EXT, up = hotas_commands.THROTTLE_RIGHT_FINGERLIFT_EXT, cockpit_device_id = devices.HOTAS, value_down = 0.0, value_up = 1.0, name = _('Throttle Finger Lift (Right) - UP/DOWN Reversed'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = gear_commands.AntiSkidSw, up = gear_commands.AntiSkidSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Anti Skid Switch - ON/OFF Warthog'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = SMS_commands.MasterArmSw, up = SMS_commands.MasterArmSw, cockpit_device_id = devices.SMS, value_down = 1.0, value_up = 0.0, name = _('Master Arm Switch - ARM/SAFE Warthog'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = HUD_commands.HUD_AltitudeSw, up = HUD_commands.HUD_AltitudeSw, cockpit_device_id = devices.HUD, value_down = 1.0, value_up = 0.0, name = _('Altitude Switch - RDR/BARO Warthog'), category = {_('Special Toggle'), _('Special For Joystick')}},

{ down = iCommandPlaneShipTakeOff, name = _('Catapult - Warthog'), category = {_('Special Toggle'), _('Special For Joystick')}},

 

Fighting for peace is like screwing for virginity.

Link to comment
Share on other sites

3 way switches?

 

I know; that’s why I assumed those bindingd would work (the speed brake does).

 

I’m refereing to the bindingd that specifically mention 2 states, like “Master Arm Switch - ARM/SAFE”. There are other simple bindings like “Master Arm Switch - ARM”. So I assumed the first one was meant to be used with warthog-like switches (ARM/SAFE would set master arm on as long as the button is pressed).


Edited by derodo
Link to comment
Share on other sites

2 and 3 pos switches

 

Hi,

 

For my Warthog throttle and USB GPwiz40 based panels I am attempting to program some additional 2 and 3 position bindings not covered by the initial default.lau for the hornet.

 

I can cut and paste the master arm switch to be up is armed and off is safe, however when trying the same for landing gear, it doesn't seem to do the same thing.

 

Could anyone please fell in the blanks in my knowledge and code possibly.

 

Note, I have simply cut and pasted code from within the default.lua for the hornet where I thought it would work... one does work, the other does not.

 

Many thanks

 

Edit 1.

figured out how to get undercarriage working now, not sure of the efficiency of my code hacks ???

 

 

 

 

----------------------------------------------

-- Added

{ down = SMS_commands.MasterArmSw, up = SMS_commands.MasterArmSw, cockpit_device_id = devices.SMS, value_down = 1.0, value_up = 0.0, name = _('Master Arm - ARM or OFF'), category = {_('Special for Panels'), _('Master Arm Panel')}},

 

-- non working code

{ down = iCommandPlaneGearDown, up = iCommandPlaneGearUp, value_down = 1.0, value_up = 0.0, name = _('Landing Gear Control Handle - UP'), category = {_('Special for panel')}},

 

-- working code though is it optimal

{ down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Landing Gear Control Handle - UP'), category = {_('Special for panel')}},

 

 

----------------------------------------------

 


Edited by Von Thrud
reviewed code in spoiler

System: I7 7700K - Delidded. TT Cooler. 32GB 3000hz Ram, Gigabyte Aorus Ext 1080TI, SSD's, Corsair Gold 850W PSU, Philips 4K 40inch 60hz monitor, Dell 22inch Touch + Helios, Rift S, VKB MCG PRO, TM TPR pedals, TM Warthog throttle with slew mod and twist repair

Link to comment
Share on other sites

switch support

 

Also for those that have not seen it, scroll down to the

 

special for joystick

 

bindings section in the controls.

 

ED has awesomely started the hotas and cockpit support already for us.

System: I7 7700K - Delidded. TT Cooler. 32GB 3000hz Ram, Gigabyte Aorus Ext 1080TI, SSD's, Corsair Gold 850W PSU, Philips 4K 40inch 60hz monitor, Dell 22inch Touch + Helios, Rift S, VKB MCG PRO, TM TPR pedals, TM Warthog throttle with slew mod and twist repair

Link to comment
Share on other sites

You’re right. There’s a “Special for Joystick” section with quite a lot of switches for warthog-like mappings that are working just fine (like the “Probe Control Switch - EXTEND/RETRACT” or the “Speed Brake Switch - EXTEND/RETRACT”).

 

But unfortunately, the “Master Arm Switch - ARM/SAFE” it’s not there. I think it will eventually be as ED continues with the development; it seems it’s just been misplaced and is still not working correctly.

 

I hope that is the case...

 

 

 

 

Enviado desde mi iPhone utilizando Tapatalk

Link to comment
Share on other sites

Just cut and paste my master arm and landing gear code above into your default.lua back it up first. I then bind the rearmost switches on my warthog throtle to gear and master. Which is the same as 2hat i have done for harrier. Works great

System: I7 7700K - Delidded. TT Cooler. 32GB 3000hz Ram, Gigabyte Aorus Ext 1080TI, SSD's, Corsair Gold 850W PSU, Philips 4K 40inch 60hz monitor, Dell 22inch Touch + Helios, Rift S, VKB MCG PRO, TM TPR pedals, TM Warthog throttle with slew mod and twist repair

Link to comment
Share on other sites

Using the same general concept as posted above, I'm able to make toggle switches for several things including Master ARM/Safe, ALT Baro/RDR, Antiskid on/off, Ext lights, Formation/Position lights, etc for my Warthog throttle. Yes, it's pretty much the same as how you would do it for the Harrier.

 

The only thing that works by default for me is the 3-way Flap switch. Not sure why the 2-way switches are not fully implemented by ED, it is fairly simple to do.

PC: 5800X3D/4090, 11700K/3090, 9900K/2080Ti.

Joystick bases: TMW, VPC WarBRD, MT50CM2, VKB GFII, FSSB R3L

Joystick grips: TM (Warthog, F/A-18C), Realsimulator (F-16SGRH, F-18CGRH), VKB (Kosmosima LH, MCG, MCG Pro), VPC MongoosT50-CM2

Throttles: TMW, Winwing Super Taurus, Logitech Throttle Quadrant, Realsimulator Throttle (soon)

VR: HTC Vive/Pro, Oculus Rift/Quest 2, Valve Index, Varjo Aero, https://forum.dcs.world/topic/300065-varjo-aero-general-guide-for-new-owners/

Link to comment
Share on other sites

  • 1 year later...

Hi guys. Sorry to revive a two year old thread but I think it might be better than creating a new one. I've finally decided to tackle this problem with my Warthog HOTAS and I was wondering what's the easiest way of going about it (making 2 and 3 way switches work the way they should).

 

Thanks!

Link to comment
Share on other sites

"The way they should" is the tricky bit. Are you using dual pole or a true three pole switch?

 

 

If three pole set up the .lua with individual controls for each position. Otherwise use on/off combinations.

 

 

I don't think I made a ton of sense there, but being more specific runs into the potential of overstating the obvious.

Link to comment
Share on other sites

"The way they should" is the tricky bit. Are you using dual pole or a true three pole switch?

 

 

If three pole set up the .lua with individual controls for each position. Otherwise use on/off combinations.

 

 

I don't think I made a ton of sense there, but being more specific runs into the potential of overstating the obvious.

 

Thanks for the quick reply and for trying to help. I guess I should give you an example of what I'm looking for: for example, the bottom and rightmost switch on the HOTAS is a 3 way switch that I'd like to assign the following 3 functions: AA master mode when switching up, AG master mode when switching down, and nav master mode in the middle position. I have no idea how to do this. I know it can't be done via DCS assigmnments menu. I've no idea what a lua file is or does, but I can certainly search for documentation if you tell me this is the only way to do it. I'm guessing if I can learn how to setup one of the switches, the others will be easy enough. Thanks

Link to comment
Share on other sites

Thanks for the quick reply and for trying to help. I guess I should give you an example of what I'm looking for: for example, the bottom and rightmost switch on the HOTAS is a 3 way switch that I'd like to assign the following 3 functions: AA master mode when switching up, AG master mode when switching down, and nav master mode in the middle position. I have no idea how to do this. I know it can't be done via DCS assigmnments menu. I've no idea what a lua file is or does, but I can certainly search for documentation if you tell me this is the only way to do it. I'm guessing if I can learn how to setup one of the switches, the others will be easy enough. Thanks

 

 

I tried that once with a true 3 position switch and found out there's no control for 'Nav Mode'. Bummer.

 

 

Up would be AA/OFF, down would be AG/OFF. I happen to have one of those switches, and can poke around at this if I get a chance. SimPit Buttkicker should arrive today, so I might get busy, but I'll give it a shot :thumbup:

Link to comment
Share on other sites

Guys, I have looked at the commands for A/A and A/G mode in the "default.lua" file. Each of the commands requires a contact close/open cycle to set the mode and then the same again to reset the mode. There is no possibility to emulate this with the kind of 3-position switch we have on the Warthog throttle. You can of course bind the two commands to two of the switches in a hat; but I don't think that's what you are after.

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, I have looked at the commands for A/A and A/G mode in the "default.lua" file. Each of the commands requires a contact close/open cycle to set the mode and then the same again to reset the mode. There is no possibility to emulate this with the kind of 3-position switch we have on the Warthog throttle. You can of course bind the two commands to two of the switches in a hat; but I don't think that's what you are after.

 

Thanks for looking into it... I'll find another use for the 3-way switch. Perhaps the cms switch...

Link to comment
Share on other sites

Thanks for looking into it... I'll find another use for the 3-way switch. Perhaps the cms switch...

I use it for the Dispenser switch (Bypass/ON and OFF/ON) with the middle position for ON. (category "Special For Joystick")


Edited by LeCuvier

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...

Hello

 

I'm about to finish my little home pit. And I'm quite annoyed by 3 way switches.

Could anybody show me an example of what we need to write in the lua for theses switches ?

I guess that it could be something like : if UP then A, if not then B ; if DOWN then C, if not then B.

 

Sorry if I'm not clear, I'm French...

 

Thanks a lot


Edited by xTCEAx Rafale
Link to comment
Share on other sites

Hello

 

I'm about to finish my little home pit. And I'm quite annoyed by 3 wat switches.

Could anybody show me an example of what we need to write in the lua for theses switches ?

I guess that it could be something like : if UP then A, if not then B ; if DOWN then C, if not then B.

 

Sorry if I'm not clear, I'm French...

 

Thanks a lot

 

 

Your English is way better than my French, so you win there!

 

 

A lot depends on your switch. Does DCS see three positions, or only two?

 

 

To give an example of a two-way switch with three positions and the flap switch you can make up auto/half and down full/half, so moving the switch up puts you in auto flap, returning to center sets it to half. Down is full, return to center is back to half.

 

 

If it's a true three position up is auto, middle is half, and down is full.

Link to comment
Share on other sites

Thanks a lot.

 

Unfortunately my switch is a real on-off-off on-off-on, so Dcs sees it as a 2 positions.

 

I even try to bend the metalic parts inside to convert it as a on-on-on, but it didn't worked. So my last chance is dealing it with lua.

 

I first worked on the Probe extend/retract/emerg extend.

 

And I can't use the two extend/retract and emerg extend/retract functions because they're only available with game controllers, and my sim pit is built with Pokeys cards, which workzed like keyboards and not like controllers.

 

I'm lost...


Edited by xTCEAx Rafale
Link to comment
Share on other sites

Thanks a lot.

 

Unfortunately my switch is a real on-off-off, so Dcs sees it as a 2 positions.

 

I even try to bend the metalic parts inside to convert it as a on-on-on, but it didn't worked. So my last chance is dealing it with lua.

 

I first worked on the Probe extend/retract/emerg extend.

 

And I can't use the two extend/retract and emerg extend/retract functions because they're only available with game controllers, and my sim pit is built with Pokeys cards, which workzed like keyboards and not like controllers.

 

I'm lost...

 

 

It's probably on-off-on; if you're seeing on-off-off it might be wired wrong. Can you send a picture of the bottom of the switch? Visuals are priceless :)

Link to comment
Share on other sites

Sorry dude, my switches are dpdt on-off-on (my phone changed my answer), as you've guessed it.

 

So I have a total of 6 "pins"

 

I tried this method today but it didn't worked :

https://www.dropbox.com/s/gq6qeck3yijvxxi/DIY%20ON-ON-ON%20Switch.pdf?dl=0

 

So I guess my last chance is modifying lua.

 

 

If you have a multimeter you can test continuity, but most DPDT switches don't work quite that way. I have quite a few 3PST switches and that's exactly how they work.

 

 

So what you have are two SPDT switches tied together. You can probably edit the lua to get the job done...which specific control are you trying to get working?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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