Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Clarify MSB / LSB for RAWv2 #29

Description

@tomgidden

Implementing RAWv2 is made a bit more complicated by not specifying whether the 16-bit values are most-significant-bit or least-significant-bit.

For that matter, it'd help if the data field descriptions referred to the bytes in the input data rather than just 0x01c3 being +2.255ºC, for example.

So, maybe some code such as ( buf[1] << 8 | buf[2] ) * 0.005 * ( buf[1] > 0x7f ? -1 : 1 )

For the split battery data, the clarification of "13th byte and three most-significant bits of 14th byte", and/or some code as above would be useful.

The values can be deduced by working through the Test Vectors later on in the document, but it's not as simple as it could be.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions