Ah, so now I understand why you referred to the first field in Incoming[0] before the strcpy. I was wondering why you did that.
Aliases are nice because I can give the elements a meaningful name instead of MsgData[x], and I don't have to move fields about.
I won't be moving 80 bytes anyways. This was just a test to use your module along with all those characters on my LCD.
I'll probably have a short layout, so I can "most likely" still use your module as you intended:
1 byte, destination PIC ID (%11xxxxxx)
1 byte, field ID (%1xxxxxxx)
1 word, field value
1 byte, return code
1 word, CRC (just sum of 5 bytes)
(return code might even be placed in the field value on reply and use only 4 bytes)
At least now I know that I can slide 3 slide pots at the same time as fast as I can and not lose data, even if the ADC increments grow larger (I wasn't sure before these ADCin tests). The real test will be making sure it reaches MSFS properly via USB - that's where I worry. I know USB can pile up messages in a queue, I just don't want to have to do that in my programs as well.
I still have to see if I can turn 2 encoders quickly at the same time to simulate a pilot and copilot each turning encoders. I want to make sure two people can share the panels, like when one changes radio frequency while the other changes heading.
The harder part will be flying the same plane over LAN or internet. Having two sets of my panels being used at the same time is an unknown for now (the game supports shared cockpit).



Reply With Quote

Bookmarks