summaryrefslogtreecommitdiff
path: root/decoders/adxl345
diff options
context:
space:
mode:
authorTeo Perisanu <Teo.Perisanu@analog.com>2020-05-05 12:46:34 +0300
committerUwe Hermann <uwe@hermann-uwe.de>2020-05-21 16:43:09 +0200
commit1bfb520c95f4bd617c804960435b3f95907bf065 (patch)
treea8ecb675a8f9b9b5e34595af7c57c92ee9ba8301 /decoders/adxl345
parent5b6fb5aee2237543fd9f26085d0ffa3631c6cb02 (diff)
downloadlibsigrokdecode-1bfb520c95f4bd617c804960435b3f95907bf065.tar.gz
libsigrokdecode-1bfb520c95f4bd617c804960435b3f95907bf065.zip
adxl345: Update register meaning for 0x21, 0x22, 0x23 regs.
On the Data row, the content of the single-byte registers is decoded as follows: '<Meaning> <Value> <Unit>'. Initially, the meaning for these registers was misplaced. This commit updates these meanings as they really are. Signed-off-by: Teo Perisanu <Teo.Perisanu@analog.com>
Diffstat (limited to 'decoders/adxl345')
-rw-r--r--decoders/adxl345/pd.py9
1 files changed, 4 insertions, 5 deletions
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)