]> sigrok.org Git - libsigrok.git/commitdiff
Fix RadioShack 22-812 DMM incorrect readings.
authorScott Allen <redacted>
Sat, 19 Sep 2015 01:42:24 +0000 (21:42 -0400)
committerUwe Hermann <redacted>
Mon, 21 Sep 2015 10:47:15 +0000 (12:47 +0200)
The wrong byte was being used to test for the nano indicator.

This resulted in reported resistance and capacitance readings being off
by orders of magnitude.

This fixes bug #657.

src/dmm/rs9lcd.c

index 7db3d8a7b6f9c4f964a27e83ebdff55f9e994a3b..1f86d8859b29ebcdac5c1afe39787f79e02e3339 100644 (file)
@@ -287,7 +287,7 @@ static double lcd_to_double(const struct rs9lcd_packet *rs_packet, int type)
                rawval *= -1;
 
        /* See if we need to multiply our raw value by anything. */
-       if (rs_packet->indicatrix1 & IND2_NANO)
+       if (rs_packet->indicatrix2 & IND2_NANO)
                rawval *= 1E-9;
        else if (rs_packet->indicatrix2 & IND2_MICRO)
                rawval *= 1E-6;