PatrikE wrote:If you adjust the MSP length you need more intelligence on the reciever side.
isn't that the reason for sending the headSerialReply(18);?
The gui expects a preset length and will go nuts if there's missing data.
The easiest way is to send fixed values for unused values.
sure
A alternative is to use a MSP_INIT at the connection who informs the gui what to expect.
In same manner as the checkBoxes.
that information is already being sent at beginning of MSP response via headSerialReply(xx), so nothing needs to be invented here.
It is something that was left undefined when setting up the NewMSProtocol - has an MSP a predefined length every gui can trust ( then headSerialReply() is superfluous; - or is the length determined at runtime depending on available sensors etc. and thus some trailing values could be omitted and the headSerialReply() be adapted on the fly.
Another undefined behaviour is whether all predefined MSPs must be implemented in an MWC or can MWC reply safely saying 'unknown MSP'? Probably only for some MSPs; which?