37 uint16_t temp_raw = (temp_bytes[1] & 0x80) >> 7;
38 temp_raw = temp_raw | (temp_bytes[0] << 1);
41 if (temp_raw & 0x0100)
43 temp_raw = temp_raw | 0xfe00;
45 int16_t temp =
static_cast<int16_t
>(temp_raw);
48 <<
"raw bytes: 0x" << std::hex << (uint)temp_bytes[0] <<
", 0x" << (uint)temp_bytes[1]
49 <<
", combined word: 0x" << temp_raw
50 <<
", temp [C]: " << temp*0.5;