diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2017-12-22 03:54:21 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-12-22 12:18:13 +0100 |
commit | 89256c6c76610756974d9f15d78288900e517b97 (patch) | |
tree | c90b427587462b9f28e71bce1cb15b616d56c10d /decoders/mrf24j40/pd.py | |
parent | 1f953c5d37d9251f11e16c452c6456b221d142ab (diff) | |
download | libsigrokdecode-89256c6c76610756974d9f15d78288900e517b97.tar.gz libsigrokdecode-89256c6c76610756974d9f15d78288900e517b97.zip |
mrf24j40: rename reset() helper method
The mrf24j40 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/mrf24j40/pd.py')
-rw-r--r-- | decoders/mrf24j40/pd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/mrf24j40/pd.py b/decoders/mrf24j40/pd.py index a91e765..e195b18 100644 --- a/decoders/mrf24j40/pd.py +++ b/decoders/mrf24j40/pd.py @@ -56,7 +56,7 @@ class Decoder(srd.Decoder): def putw(self, pos, msg): self.put(pos[0], pos[1], self.out_ann, [4, [msg]]) - def reset(self): + def reset_data(self): self.mosi_bytes = [] self.miso_bytes = [] @@ -103,7 +103,7 @@ class Decoder(srd.Decoder): if cs_old is not None and cs_old == 0 and cs_new == 1: if len(self.mosi_bytes) not in (0, 2, 3): self.putw([self.ss_cmd, es], 'Misplaced CS!') - self.reset() + self.reset_data() return # Don't care about anything else. @@ -126,8 +126,8 @@ class Decoder(srd.Decoder): if len(self.mosi_bytes) == 3: self.es_cmd = es self.handle_long() - self.reset() + self.reset_data() else: self.es_cmd = es self.handle_short() - self.reset() + self.reset_data() |