I like your led redraw function. I was previously updating one display per loop. This is much better. I am putting all the led status displays on it also.
I am only using one comm port. Decided against the complexity of an i2c pair. But I kept the i2c pins free just in case.
I thought I wouldn’t need any more than 50 Simvars or Simevents. Currently I have about 60 SimEvents and 40 sim vars.
I still think it was a good idea to reduce the size of serialport transfers and make them all the same size. That may be where the lag is coming from if you percieve a difference between different connector retrieve functions. If all the connector functions transferred the same size data, they should behave the same.
Although not implemented yet fully, my idea to solve the issue of latency would be to have the app keep stats on which simvars are being used and to unsubscribe those that have not been requested by the arduino after a certain amount of time and to resubscribe them if there are a minimum number of requests initiated. That way, the arduino controls the app settings. However this only solves the latency between simconnect and the app.
I am building the Cessna 152 Autopilot functionality. Only have ARM and BARO left . Need to put in a way to adjust ADF and put functions in the nav/gps and rotary switch.
You can go as complex as you want when you are the one coding. I have one button which I configured to display both nav radios on the top 4 panels. Then press the button again and it changes to the OBS1 and OBS2 readings which I can change with the encoder.
The LED lights in the switches are in the display loop constantly checking if the game changed the status of AP, HDG, NAV, APR and turn on/off accordingly.
If I engage ALT, then it toggles VS and it displays altitude lock and vertical speed set in the AP both of which I can change with an encoder and with two buttons ( cause on the actual AP, there is an up and down button for changing values for vs).
I implemented the nav and com radio swaps using the encoder switch.
On the last row, I can modify the transponder value by using the encoder at the same level which if the switch is pressed will cycle throughout the 4 digits which can be modified.
Maybe by the weekend I can fly a plane. Perhaps I will have SimVoice tell me when I am at '1 20, 15, 5 feet retard ’ before landing. Oh and I have all three Microsoft Voices available for selection: David, Hazel and Zira.
Actually did a short test flight. Awesome!. Things were fast. Only thing i did not like is the Propwash encoder requiring two detents to effect.
I will have to see if Form1 is going to run stable for a few hours.
Just for kicks, below 2000 feet, simvoice is warning that I might crash if i don’t climb up.
Chris