Hello,
it would be nice to have following events in the simulator:
- FLIGHT_DIRECTOR_OFF
- FLIGHT_DIRECTOR_ON
- FLIGHT_DIRECTOR_SET
The reason is simple: Since WASM modules are running in a separate thread in MSFS 2024, the good old “if (!simvar) trigger_key_event(KEY_TOGGLE_FLIGHT_DIRECTOR,0)” (or its newer equivalent using Vars and Events API) is not 100% safe anymore. I experienced several cases where the simvar wasn’t yet updated after the previous trigger_key_event() which resulted in two toggle calls in a row (OFF → ON → OFF).
While I found a workaround using a counter between two trigger_key_event calls, a FLIGHT_DIRECTOR_SET/_ON/_OFF event would be helpful here.
Thank you for considering.
Hans