-
Notifications
You must be signed in to change notification settings - Fork 37
Description
In LogMsgGroup, a set of format characters specify the data format (e.g. 'b' = int8, 'I' = uint32, etc.). We have an "otherwise" case in our switch statement set to warn if a (future) log character is presently unsupported by Ardupilog. At present, the warning message suggests we'll capture the data as uint8, but we don't.
I'm not sure this is the best behavior, anyways. Since data types are of different lengths, if we default to some length and it's wrong, we'll corrupt the remainder of the LogMsgGroup data.
Furthermore, in the formatLength function, we threw an error if we didn't know the type... so I dunno if we would even get to this point in the code.
I think the very best design would implement a "known character types" table, and then replace the switch statements with some sort of "lookup from character types table" functionality. That would put all our character-types information in a single spot. Does this sound like a good design to you?
In the meantime, I'm happy to leave this open as a low-priority issue on GitHub.