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
372 stars 68 forks source link

Add math operations to values #199

Closed nzeppos closed 3 years ago

nzeppos commented 3 years ago

An example would be FUEL_TANK_LEFT_MAIN_QUANTITY. Simconnect fuel quantities are generally defined as gallons, but it would be nice to be able to do some adhoc math in "Display value" field, so that we could convert them on the fly to lbs, kgs etc.

So instead of putting FUEL_TANK_LEFT_MAIN_QUANTITY in "Display value", we could put FUEL_TANK_LEFT_MAIN_QUANTITY*6.7 (or similar)

nguyenquyhy commented 3 years ago

Why bother when you can just type in the unit 😁

nzeppos commented 3 years ago

Ah, I had forgotten about that. I now recall that I had tried a few combinations such as lb, pound, etc but none of them worked. I'll take a look at the code and re-try it asap, thanks!

nguyenquyhy commented 3 years ago

You can try the ones in https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Simulation_Variable_Units.htm. Maybe you can't translate from volume to weight. I am not very sure.

nguyenquyhy commented 3 years ago

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