bugfix or introducing a bug? hopefully we did mean to read 16 bits not 12 bits?
This commit is contained in:
parent
da316e5753
commit
f511e50ea8
|
@ -53,7 +53,7 @@ static expected<uint16_t> look_up_vss_can_id(can_vss_nbc_e type) {
|
||||||
|
|
||||||
static int getTwoBytesLsb(const CANRxFrame& frame, int index) {
|
static int getTwoBytesLsb(const CANRxFrame& frame, int index) {
|
||||||
uint8_t low = frame.data8[index];
|
uint8_t low = frame.data8[index];
|
||||||
uint8_t high = frame.data8[index + 1] & 0x0F;
|
uint8_t high = frame.data8[index + 1] & 0xFF;
|
||||||
return low | (high << 8);
|
return low | (high << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue