Hi Paul,
Firstly thank you for all the documentation and work you have put in along side all the other contributors of FSUIPC and the WAPI. I'm hoping to gain some insight on the information below.
A bit of backstory before I get to the main talking points:
I am trying to create my own C# application to work in conjunction with my hardware for my company. Where the use of Arduino based microcontrollers or my own custom microcontrollers send serial data via USB to the PC and C# program which in tern translates that into events or appropriate code to be sent to flight simulator. I have completed the program for X-Plane but now moving on to MSFS2020 there are many more hurdles to overcome. I am hoping to use my C# program in conjunction with your WASM module and FSUIPC to achieve all the functionality needed for various avionics units.
From what I can work out some functionality for certain things in FS2020 are achieved via the use of WASM modules, LVars and HVars. I believe are the ones in particular that I would be interested in given my software only needs to send events to the simulator for avionics. GNS530/430, GTN750,650 G1000, G3000 etc.
So my question is how/what is the best way to send this information to the flight simulator. is Calculator code the best way to send not only standard events but also L/Hvars? or as mentioned by John in this thread is the use of Presets the better option.
As for presets, how are they supposed to be typed into the C# code or is there a txt file that needs to be placed somewhere specific and then references in C#?
in VS2022 I have so far been able to connect to FSUIPC and send basic events to the simulator such as turning avionics on and off. selecting the GPS drives nav1. But no matter how hard I try I cannot figure out how to use calculator code nor presets. How is this sent to the simulator and could you please give me a C# example of this? I have been through your example code but still have come up at a loss. sorry!
Any help would be greatly appreciated.
Thanks - Brandon