Jump to content
Sign in to follow this  
9GTurn

Switch Toggle Functions

Recommended Posts

Hi,

Sorry to ask this but I've been racking my brains to think why there is a need for this feature.  What is the point of a keybinding to toggle a function, like anti-ice or fuel pumps etc.

I ask because I'm trying to build a button box and the switching how I see it, is on / off with the switch  on causing an action and off cancelling the action.  When I assign it to toggle. ie. anti ice, the switch commands the anti ice on but then toggles this on/off rapidly.  So to my question why and what function does "toggle" a keybinding do or necessary for.

Thanks for you help in advance.


Ollie G

System: 8700K O/C@ 5.0Ghz, Asus ROG Strix Z370F MoBo, H100i v2, Gigabyte 1070 XTreme Gaming Edition, 500Gb NuMe (OS), 500 Gb (XP) & 1Tb Samsung 850 SSD (P3D), 4Tb WD HDD as library, Rift S & Touch, Honeycomb Yoke, Saitek throttles and TM TPR rudder pedals

Flight Sims: Xplane & P3D v4.5 HF2 - Orbx Global, Vector, Europe LC & Others, REX TD & SC Enhanced, AS, ASCA, Chaseplane, UK2000 Scenery, FSFX stuff and lots, lots more!

Share this post


Link to post
Share on other sites
10 hours ago, 9GTurn said:

Hi,

Sorry to ask this but I've been racking my brains to think why there is a need for this feature.  What is the point of a keybinding to toggle a function, like anti-ice or fuel pumps etc.

I ask because I'm trying to build a button box and the switching how I see it, is on / off with the switch  on causing an action and off cancelling the action.  When I assign it to toggle. ie. anti ice, the switch commands the anti ice on but then toggles this on/off rapidly.  So to my question why and what function does "toggle" a keybinding do or necessary for.

Thanks for you help in advance.

I have a switch panel from Desktop Aviator. When you flip a toggle switch it sends a pulse. When you flip it to the other position it sends the same pulse. The only way it works is by using the toggle functions. 


Eddie
KABQ

Share this post


Link to post
Share on other sites

As pointed out a lot of controllers send pulses or use binary encoders.

However the other reason for it is if you want to assign it to a button.  For example I have spoilers assigned to a joystick button for when I fly the Mooney. I can tap the button to deploy them and tap it again to retract them.

Share this post


Link to post
Share on other sites

A lot of the MSFS functions have 3 keybinds: off, on, and toggle. Think of the "toggle" keybind being used with a momentary push button. Press once and it changes the state of the keybind to the opposite of whatever the current state is. This is how Glenn is using a push button for his spoilers keybind.

As mentioned, some toggle switches (not to be confused with "toggle" keybind), are what are called "double throw" or "on-on". In other words, both sides of the switch throw a pulse. This is an ideal switch for keybind "on" for one side, and keybind "off" on the other side. This is how the panel Haskell has is working.

A lot of toggle switches are what are called "single throw" or "on-off". With these switches, only one side of the switch throws a pulse. These type are a bit harder to configure for "on-off" keybind as the "off" state has to be assumed. Most flight sims, like MSFS and DCS, don't have this capability out of the box. Some programming is required. 

If you purchase FSUIPC or Axes&Ohs, the single throw toggle switch can be easily programmed for a true "on-off" functionality. 

Hope this helps. 

Here is a quick tutorial: Understanding Toggle Switches (wiringdepot.com)

Edited by yurei

Share this post


Link to post
Share on other sites

 I am building a leonardo (joystick config) based panel, equipped with spst toggle switches.  They way I configured the switch detection in the leo is on change of state it sends a joystick button, say BUTTON8 for ON state and BUTTON9 for OFF state, with the assumption I could use the ON/OFF binding in MSFS rather than the toggle binding (to be more realistic).  I tried this in practice with the landing lights and all worked out well.   BUT some lights do not function correctly.  When binding to NAV or BEACON light, I set the bindings up ok, but they do not work in practice (tried a couple different planes in case that was a factor).  I can bind those switches to toggle binding and all is well, as long as I throw the switch each time to change the state (as Yurie was driving at in post above).  Also to check  my code and hardware, I remapped (binding) those same physical switches to other functions like the landing lights and master power and all worked fine.  Still have some more checking, but was mining avsim to see if anyone else had run into this issue, in case its msfs and not my setup.  For now, I will keep beating my setup.

 

Share this post


Link to post
Share on other sites

As yurei said above, MSFS does not play well with ON/OFF toggle switches. I have had success with FSUIPC to program toggle switches and MSFS normal binding to program the momentary push buttons on the HOTAS.

@Rotten88Scoundrel, Have you tried using MobiFlight on the Leonardo?   


John
My first SIM was a Link Trainer. My last was a T-6 II
 

Share this post


Link to post
Share on other sites
On 1/29/2021 at 12:01 AM, Glenn Fitzpatrick said:

For example I have spoilers assigned to a joystick button for when I fly the Mooney. I can tap the button to deploy them and tap it again to retract them.

I wish there was a way to do that with cowl flaps. Button for open and button for closed. I’ve assigned a flap lever to the function on my bravo throttle, but that only works for single engine aircraft. 

Share this post


Link to post
Share on other sites

no, have not tried mobiflight.  There was some reason, but I cannot remember it.  I have only found the toggle issue with NAV LIGHT, BEACON LIGHT, and TAXI LIGHT, so I will deal with that (perhaps order some momentary toggles).   Also noted that landing gear has only a toggle function  built in...so sad.  But have toggles working fine on pitot, master, Landing lights.  So far I have everything else working to date on my panel mock up (using Bits and Droids connecter to read MSFS setting for indicators).  More to implement but just a repeat of same.  Some stuff, like the flaps, brakes, flashlight, pitch, etc  I prefer on my stick,

Share this post


Link to post
Share on other sites

I noticed yesterday when I was setting up one of my panels for for Cessna sim that the avionics master switches are not available as toggle switch. So my switch kept cycling on and off... grrr

Anyone solve this without FSUIPC or another 3rd party add-on or do I need to request a toggle be added to Asobo?

I may just bite the bullet and get FUSIPC anyway because my go-flight model is dead right now and I can't get FS2020 to configure my flaps axis switch properly with the correct flap position...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...