As I reverse engineer the protocol I’ve encountered some messages that are a challenge decoding the response asynchronously. The Pi Python provides no guidance. (Phrased politely because IMO it ignores the problem.)
Two of them are:
get_battery_voltage_in_volts - 3 calibration voltages get_current_sense_amplifier_current - 2 motors
The problem is this additional information is not returned in the response. Without that information you can’t tell the current for left vs right motors, for example.
My kludge is to keep my sequence numbers > 0x80 and putting this additional value in the sequence field. The response processing adjusts based on the received sequence number.
I suggest the API should be adjusted to include this additional information as the first byte in the data.