]> sigrok.org Git - libsigrok.git/commitdiff
center-3xx: Fix incorrect values due to endianness issue.
authorUwe Hermann <redacted>
Thu, 9 Apr 2020 21:51:16 +0000 (23:51 +0200)
committerUwe Hermann <redacted>
Thu, 9 Apr 2020 21:51:16 +0000 (23:51 +0200)
Replace RL16S with RB16S, the values are big-endian.

This is related to the recently-fixed bug #1463.

src/hardware/center-3xx/protocol.c

index 196e29de076dc7f96d31b40b736eacdff945498d..35fe15538642ee71fa43372d92ca0f07d11bf2ed 100644 (file)
@@ -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;
        }