From 1bfb520c95f4bd617c804960435b3f95907bf065 Mon Sep 17 00:00:00 2001 From: Teo Perisanu Date: Tue, 5 May 2020 12:46:34 +0300 Subject: adxl345: Update register meaning for 0x21, 0x22, 0x23 regs. On the Data row, the content of the single-byte registers is decoded as follows: ' '. Initially, the meaning for these registers was misplaced. This commit updates these meanings as they really are. Signed-off-by: Teo Perisanu --- decoders/adxl345/pd.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'decoders/adxl345') diff --git a/decoders/adxl345/pd.py b/decoders/adxl345/pd.py index bc442ba..2d53e4c 100644 --- a/decoders/adxl345/pd.py +++ b/decoders/adxl345/pd.py @@ -174,20 +174,19 @@ class Decoder(srd.Decoder): self.handle_reg_with_scaling_factor(data, 15.6, 'OFSZ', 'g', None) def handle_reg_0x21(self, data): - self.handle_reg_with_scaling_factor(data, 0.625, 'Time', 's', + self.handle_reg_with_scaling_factor(data, 0.625, 'Duration', 's', error_messages['dis_single_double']) def handle_reg_0x22(self, data): - self.handle_reg_with_scaling_factor(data, 1.25, 'Latent', 's', + self.handle_reg_with_scaling_factor(data, 1.25, 'Latency', 's', error_messages['dis_double']) def handle_reg_0x23(self, data): - self.handle_reg_with_scaling_factor(data, 1.25, 'Latent', 's', + self.handle_reg_with_scaling_factor(data, 1.25, 'Window', 's', error_messages['dis_double']) def handle_reg_0x24(self, data): - self.handle_reg_with_scaling_factor(data, 62.5, 'Latent', 's', - error_messages['undesirable']) + self.handle_reg_0x1d(data) def handle_reg_0x25(self, data): self.handle_reg_0x1d(data) -- cgit v1.2.3-70-g09d2