Jump to content

Covered toggle switch where cover can trigger event?


Elphaba

Recommended Posts

I'm looking to learn to make my first button box, and I'm trying to make an F14 front panel.

 

Does anyone know of a covered toggle switch like the master arm of the F14, wherein lifting or closing the cover of the physical switch can be detected as an event so that you can trigger a keypress?

Link to comment
Share on other sites

You could do what I did and use a ON OFF (ON) toggle switch.

 

So it's momentary one way.

 

The cover will hold the momentary end closed, and when you lift the toggle it will naturally centre into the off position, and you tell DCS that's the lift toggle command.

 

You won't even notice any diffence to a normal on off toggle.

 

Sent from my SM-G975F using Tapatalk

Link to comment
Share on other sites

There's a workaround that lets you use regular toggles and covers without additional hardware.

 

If you only care about the state of the switch in DCS and not the cover itself, you can do a digital read of your physical switch state and send instructions for both cover and switch actuation in sequence. you need to monitor in-game cover and switch states to sequence and trigger the open/close and toggle events. DCS-BIOS lets you do both.

 

I use the trick for the covered Hornet fire push buttons and it works great. Same logic in some form would apply for covered toggle switches.

Link to comment
Share on other sites

If you only care about the state of the switch in DCS and not the cover itself, you can do a digital read of your physical switch state and send instructions for both cover and switch actuation in sequence.

 

With a little LUA-edit you'll even have the covers staying in sync.

At least it is possible for the F18. Maybe the F14 can be 'tricked' the same way?

https://forums.eagle.ru/showpost.php?p=4168935&postcount=655

Link to comment
Share on other sites

  • 1 year later...
On 9/15/2020 at 11:01 AM, romeokilo said:

You could do what I did and use a ON OFF (ON) toggle switch.

 

So it's momentary one way.

 

The cover will hold the momentary end closed, and when you lift the toggle it will naturally centre into the off position, and you tell DCS that's the lift toggle command.

 

You won't even notice any diffence to a normal on off toggle.

 

Sent from my SM-G975F using Tapatalk

Hi

 

yeah, that occurred to me too, but it rids you of the down position, which in the F14 is the sim/training mode. 
 

somehow, just like on the ACM toggle, they have a ‘button event’ just for opening the cover. 

Link to comment
Share on other sites

Yes I tried the Romeokilo way for the SPIN switch on the hornet

defineToggleSwitch("SPIN_RECOVERY_COVER", 2, 3008, 139, "Map Gain/Spin Recovery Panel", "Spin Recovery Switch Cover, OPEN/CLOSE")

The issue was that switched worked in reverse, ie when the switch was  in the centre position, the action sent to DCS was to close the cover and when the momentary was pushed (ie i closed the guard) DCS opened the cover!

Any way to reverse the function?

 

Win11 64bit, AMD Ryzen 58003DX, GeForce 3070 8GB, 2TB SSD, 64GB DDR4 RAM at 3200MHz _ full 1:1 FA-18C Cockpit https://www.youtube.com/@TheHornetProject

Link to comment
Share on other sites

On 6/16/2022 at 11:08 AM, Sting57 said:

Hey mate that is the fp fork.

DcsBios::SwitchWithCover2Pos pltLaunchbarAbort("PLT_LAUNCHBAR_ABORT", "PLT_LAUNCHBAR_ABORT_COVER", 6);

The two labels within the brackets come from the two separate switch and cover controls in the control reference.

And this is the invert:
DcsBios::Switch2Pos switch2PosExample("AHCP_TGP", 1, TRUE); // Inverted standard switch

The "TRUE" might need to be "true".


Edited by No1sonuk
Link to comment
Share on other sites

  • 2 weeks later...
Found this in my "ideas" folder.  I can't remember where I got it.
The pin is a button that activates when the cover is opened.
q3QaIi7.jpg.f5a0773f91900bab0f3aefa41ead6c17.jpg
That's mine it's a fridge door switch, here's the link to my thread
https://forum.dcs.world/topic/247738-vr-desk-mounted-crap-cat/



Sent from my Samsung Chromebook Plus using Tapatalk

  • Thanks 1

F-14B, F-16, F-18C, A-10C, F-5E, F-86, FC3, BF-109, FW-190, P-51, Spitfire, UH-1,AJS-37 Viggen, MIG-15, MIG-19, MIG-21, AV-8B Harrier, P-47D

Persian Gulf, Caucuses, NTTR, Normandy, The Channel, Syria

Combined Arms, WWII Assets,Super Carrier

TM Warthog, Virpil VFX,BuddyFox UFC, Saitek Pro Flight quadrant & Switch Panel, Odyssey+ VR, Jet Pad w/ SSA, Voice Attack w/Viacom Pro

GeForce RTX2080TI OC, Intel Core i7-7700K 4.5Ghz, 64GB DDR4, Dedicated 1TB SSD

Link to comment
Share on other sites

  • Recently Browsing   0 members

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