Np, I also want a single firmware and have some questions about the code.
At glance it i guess it works like this:
Gimx queries the serial port and the firmware replies with a define. It switches the define and sets the values .vid .pid which are made static with values from defines. It then uses this for selecting usb passthru / emu and package the data according to the format/protocol. Is this close to correct, and would you solve autodetecting the .vid .pid aso after the firmware respone and then use a switch, #if or some selector to populate with correct values.
Like:
1. Hey firmware, what are you?
- Firmware: Im 0x9
2. Allrighty then, let's see if I got any of your arms in my pocket. Yah, a left arm version 2 was attached to my left jacketarm. I'll write that on my hand to remember.
3. Hey boss, you want to controll your puppet with this move?
4. Im looking at my note and will format your command using 0x9 which is ConsoleX_PAD pretending it's my left arm version 2 named left jacketarm if your puppet asks who is commanding. (We don't want to expose ourselves).
This was fun writing.