From: Scott Allen Date: Sat, 19 Sep 2015 01:42:24 +0000 (-0400) Subject: Fix RadioShack 22-812 DMM incorrect readings. X-Git-Tag: libsigrok-0.4.0~259 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6703bb2983deb65a3ce162acbae251ee487fb6af;p=libsigrok.git Fix RadioShack 22-812 DMM incorrect readings. 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. --- diff --git a/src/dmm/rs9lcd.c b/src/dmm/rs9lcd.c index 7db3d8a7..1f86d885 100644 --- a/src/dmm/rs9lcd.c +++ b/src/dmm/rs9lcd.c @@ -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;