diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2017-12-22 03:51:20 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-12-22 12:18:13 +0100 |
commit | 1f953c5d37d9251f11e16c452c6456b221d142ab (patch) | |
tree | c0da6e825ed9959dce0fdac376ecea2fb4890351 /decoders | |
parent | 0777df7434749962ca28fb66081cdacf24a16772 (diff) | |
download | libsigrokdecode-1f953c5d37d9251f11e16c452c6456b221d142ab.tar.gz libsigrokdecode-1f953c5d37d9251f11e16c452c6456b221d142ab.zip |
ade77xx: rename reset() helper method
The ade77xx decoder implements a reset() method which clears internally
accumulated data during decoding. Rename the method before all decoders
will grow a new reset() method that will be used for a different purpose.
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/ade77xx/pd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/ade77xx/pd.py b/decoders/ade77xx/pd.py index 2871025..32a431b 100644 --- a/decoders/ade77xx/pd.py +++ b/decoders/ade77xx/pd.py @@ -45,13 +45,13 @@ class Decoder(srd.Decoder): ('warnings', 'Warnings', (2,)), ) - def reset(self): + def reset_data(self): self.expected = 0 self.mosi_bytes, self.miso_bytes = [], [] def __init__(self): self.ss_cmd, self.es_cmd = 0, 0 - self.reset() + self.reset_data() def start(self): self.out_ann = self.register(srd.OUTPUT_ANN) @@ -77,7 +77,7 @@ class Decoder(srd.Decoder): idx = 1 if write else 0 self.putx([idx, ['%s: %s' % (rblob[0], "SHORT")]]) self.put_warn([self.ss_cmd, es], "Short transfer!") - self.reset() + self.reset_data() return # Don't care about anything else. @@ -124,4 +124,4 @@ class Decoder(srd.Decoder): else: self.putx([0, ['%s: %#x' % (rblob[0], vali)]]) - self.reset() + self.reset_data() |