Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Dear Pete,

If I have a momentary switch (pushbutton) and press it the button flag changes from 0 to 1. Does it change back to 0 the next time the button is pressed or on the release of the first press?

Thank you,

Philip

Posted

If I have a momentary switch (pushbutton) and press it the button flag changes from 0 to 1. Does it change back to 0 the next time the button is pressed or on the release of the first press?

As documented, the button flags are toggled each time the associated button goes from "off" to "on". That's why they are useful as latches for momentary buttons. They wouldn't be needed for self-latching (toggle) switches, and would be useless for momentary buttons if they toggled when the buttons went from "on" to "off" as well, wouldn't they? You'd simply use the button state not the flag.

Regards

Pete

Please sign in to comment

You will be able to leave a comment after signing in



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.