From: Gerhard Sittig Date: Fri, 22 Dec 2017 02:51:20 +0000 (+0100) Subject: ade77xx: rename reset() helper method X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1f953c5d37d9251f11e16c452c6456b221d142ab;p=libsigrokdecode.git 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. --- 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()