From 826981ac5a2105c7231aeb5e5e523cd37ce72edd Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 26 May 2020 20:57:50 +0200 Subject: ntf905: Add/rename required self.reset() method. --- decoders/nrf905/pd.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'decoders/nrf905') diff --git a/decoders/nrf905/pd.py b/decoders/nrf905/pd.py index 4771314..076fbed 100644 --- a/decoders/nrf905/pd.py +++ b/decoders/nrf905/pd.py @@ -111,14 +111,14 @@ class Decoder(srd.Decoder): ('warnings', 'Warnings', (ann_warn,)) ) - def reset_data(self): - self.mosi_bytes, self.miso_bytes = [], [] - self.cmd_samples = {'ss': 0, 'es': 0} - def __init__(self): self.ss_cmd, self.es_cmd = 0, 0 self.cs_asserted = False - self.reset_data() + self.reset() + + def reset(self): + self.mosi_bytes, self.miso_bytes = [], [] + self.cmd_samples = {'ss': 0, 'es': 0} def start(self): self.out_ann = self.register(srd.OUTPUT_ANN) @@ -338,7 +338,7 @@ class Decoder(srd.Decoder): self.set_cs_status(ss, False) if len(self.mosi_bytes): self.process_cmd() - self.reset_data() + self.reset() elif ptype == 'DATA': # Ignore traffic if CS is not asserted. -- cgit v1.2.3-70-g09d2