Access to E: vars using Vars API does not work for WASM gauge. fsVarsEnvironmentVarGet gives garbage data. This completely breaks our aircraft.
Repro steps:
Try to read value of environment variables from WASM using public API.
Attachments:
In an example below “Is in RTC” is 1 (even though the sim is not in RTC), “Is Aircraft” is 1 (even though I’m in Avatar) and simrate is 0 (impossible). “Camera state”, which is A:var, not E:var, works correctly.
Also one gauge update roughly every second shows some simvars at zero, while “E:Simulation Rate” jumps to impossible value.
There is indeed an issue with the access to Environment Var. The fix I’m working on should correct the issue for all environment variables.
Sorry for the inconvenience
Unfortunately 1.6.7 broke something else in our other aircraft that did not use E: vars at all. But that’s an issue for another topic once I find the time to investigate it.