Jump to content
The simFlight Network Forums

Button Flag Question


Recommended Posts

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

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.