From: Uwe Hermann Date: Tue, 26 May 2020 18:57:50 +0000 (+0200) Subject: ntf905: Add/rename required self.reset() method. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=826981ac5a2105c7231aeb5e5e523cd37ce72edd;p=libsigrokdecode.git ntf905: Add/rename required self.reset() method. --- 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.