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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

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