]> sigrok.org Git - libsigrokdecode.git/commitdiff
adxl345: Fix incorrect rate value in handle_reg_0x2c().
authorUwe Hermann <redacted>
Sat, 11 Apr 2020 12:50:56 +0000 (14:50 +0200)
committerUwe Hermann <redacted>
Sat, 11 Apr 2020 12:51:57 +0000 (14:51 +0200)
decoders/adxl345/pd.py

index 4902dc5048d9bde54e52e0b05b33912e4103a1d8..bc442bac4b67e026e12971d5090dc202a34cff08 100644 (file)
@@ -246,7 +246,7 @@ class Decoder(srd.Decoder):
         bits_values = self.interpret_bits(data, bits)
 
         start_index, stop_index = 0, 3
-        rate = self.get_decimal_number(bits_values, start_index, start_index)
+        rate = self.get_decimal_number(bits_values, start_index, stop_index)
         self.putbs([Ann.REG_DATA, ['%f' % rate_code[rate]]], stop_index, start_index)
 
     def handle_reg_0x2d(self, data):