Jump to content
The simFlight Network Forums

toggling a three state switch using offsets and FSUIPC


Recommended Posts

Hi!

I am not sure if this is the proper forum to ask, but I will give it a try.

I am building a simple desktop simpit with a bunch of switches. I am also using Doug Dawsons gauge for using offsets to trigger custom variables with FSUIPC. It works great on most gauges that have "off/on" positions. However, with the gauge below, I have three positions. I would like to be able to toggle it between these positions using two keys.



(L:UMFSW_II, enum)













(A:Circuit general panel on, bool) (L:UMFSW_II, enum)  && if{ 1 (>L:UMF_II, bool) } els{ 0 (>L:UMF_II, bool) }




(L:UMF_II, bool) (L:UMFSW_II, enum) + 2 == if{ 1 (>L:AC_Res, bool) } els{ 0 (>L:AC_Res, bool) }




(L:UMF_I, bool) (L:AC_Res, bool) + 1 >= if{ 1 (>L:AC_Bus, bool) } els{ 0 (>L:AC_Bus, bool) }





(L:UMFSW_II, enum) -- d -1 < if{ -1 } (>L:UMFSW_II, enum)



(L:UMFSW_II, enum) ++ d 1 > if{ 1 } (>L:UMFSW_II, enum)



I have little experience in XML/Gauge coding, so it is a bit difficult to interpret the syntax of the gauge so this is why I am posting this here. Can anyone help me and explain how to solve this? Do I need to modify the gauge or should I modify fsuipc.ini file and let each offset toggle multiple variables?

If the second option is correct, which variables should be toggled for the three states?

Thanks!

Roger

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.