From: Uwe Hermann Date: Thu, 9 Apr 2020 21:51:16 +0000 (+0200) Subject: center-3xx: Fix incorrect values due to endianness issue. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f0aec556058d3121585211d8526a0b4cc617684a;p=libsigrok.git center-3xx: Fix incorrect values due to endianness issue. Replace RL16S with RB16S, the values are big-endian. This is related to the recently-fixed bug #1463. --- diff --git a/src/hardware/center-3xx/protocol.c b/src/hardware/center-3xx/protocol.c index 196e29de..35fe1553 100644 --- a/src/hardware/center-3xx/protocol.c +++ b/src/hardware/center-3xx/protocol.c @@ -89,7 +89,7 @@ static int packet_parse(const uint8_t *buf, int idx, struct center_info *info) /* Byte 7+8/9+10/11+12/13+14: channel T1/T2/T3/T4 temperature. */ for (i = 0; i < NUM_CHANNELS; i++) { - temp_i16 = RL16S(&buf[7 + 2 * i]); + temp_i16 = RB16S(&buf[7 + 2 * i]); info->temp[i] = (float)temp_i16; }