nguyenquyhy / Flight-Tracker-StreamDeck

A Stream Deck plugin to interact with Microsoft Flight Simulation
https://flightsim.to/file/3178/flight-tracker-streamdeck-plugin
GNU General Public License v3.0
373 stars 68 forks source link

Using a simulation variable to modify an event button #223

Closed schuey97 closed 3 years ago

schuey97 commented 3 years ago

Is it possible to use a value from a variable retrieved by the sim to modify how a toggle button will perform?

For example. Currently able to work the pushback with event "TOGGLE_PUSHBACK" and stop the pushback with "TUG_DISABLE". However when wanting to setup a button to perform a pushback left or right using KEY_TUG_HEADING, this appears to require the current heading of the aircraft subtracting a 32bit integer which represents 0-360 degrees.

So I'm guessing a toggle button would need to be set with a toggle event "KEY_TUG_HEADING", then the ability to pass a parameter {SIM Variable: PLANE HEADING DEGREES MAGNETIC} - (4294967295 / 8) to perform a 45 degree angle turn from the current heading.

I know there are other programs out there to perform this task, just thought it would be handy to have it possible in one place as I can already start/stop the pushback.

If not possible, all good :)

nguyenquyhy commented 3 years ago

Right now you can put a variable as the parameter of a toggle event, but no maths is supported yet.

nguyenquyhy commented 3 years ago

I'll close this and will track in another issue #224.