Intro
I’m building my own airbus A320 cockpit, using the FBW A32NX. To proof that I’m serious ( ), below is a picture of my fully functional FCU.
I created my own tool using SimConnect and WASM. You can read all about it here. So I do have some experience, but still don’t know everything.
So far, I only used A-vars (SimVars), L-vars (through WASM) and K-vars (both native events via SimConnect as FBW-events through WASM).
Now I’m developing the MCDU. The design is ready, as you can see here.
Now the question
To be able to control the buttons of the MCDU, I have to use H-Events, which is completely new for me. Example: “H:A320_Neo_CDU_1_BTN_DIR” will simulate pressing the “DIR” button on the MCDU.
My tool allows me to “register” variable (A, L and K), but also allows me to register variables that are handed over to the WASM module and use the “execute_calculator_code” directly (I call them “X-vars”). By this method, I can execute them without a problem. In my WASM code, this is then translated as:
execute_calculator_code(1 (>H:A320_Neo_CDU_1_BTN_DIR))
I probably don’t need to provide a parameter “1”, but my X-var implementation always takes a parameter, hence I use this “1”.
So far so good - it works as a charm.
But I wonder if there is a way to do this without using execute_calculator_code. For the L-Vars, I make use of the Gauge API “set_named_variable_value” and “get_named_variable_value”, which is faster than using execute_calculator_code. For K-Events, I use the SimConnect method “MapClientEventToSimEvent”. But can I do something similar for H-Events? I googled for hours, but as usual with SimConnect, there is not much useful documentation available.
Or is the execute_calculator_code the only way to deal with H-Events?