Open stefanor opened 1 year ago
It probably makes sense to just keep the bit-level unpacking in parse and move all the unit-conversion to the Data class.
I kept stumbling over bugs in the parsing logic so I rewrote it here: https://github.com/j9brown/victron-ble/commit/43c172ab51e965dce2f75a38649298c46c0bf7ff
I was looking at adding proper support for all the NA values (from #17), but quickly got stuck, because we're inconsistent in where we transform data. Some is done in the parse function, and some in the Data class.
It would make sense to do it all in one place, so that we can check for special flag values there.