From 486b19ce017c6663be6574dacd0c823304903bca Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 13 Oct 2014 17:05:07 +0200 Subject: All PDs: More consistent names for ss/es variables. Use self.ss/self.es, or if there's a need to differentiate them a bit more, use self.ss_/self.es_ consistently. Also, drop some unused variables. --- decoders/rtc8564/pd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'decoders/rtc8564/pd.py') diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py index e95ff10..24a68fb 100644 --- a/decoders/rtc8564/pd.py +++ b/decoders/rtc8564/pd.py @@ -189,7 +189,7 @@ class Decoder(srd.Decoder): if cmd != 'START': return self.state = 'GET SLAVE ADDR' - self.block_start_sample = ss + self.ss_block = ss elif self.state == 'GET SLAVE ADDR': # Wait for an address write operation. # TODO: We should only handle packets to the RTC slave (0xa2/0xa3). @@ -220,7 +220,7 @@ class Decoder(srd.Decoder): # TODO: Handle read/write of only parts of these items. d = '%02d.%02d.%02d %02d:%02d:%02d' % (self.days, self.months, self.years, self.hours, self.minutes, self.seconds) - self.put(self.block_start_sample, es, self.out_ann, + self.put(self.ss_block, es, self.out_ann, [9, ['Write date/time: %s' % d, 'Write: %s' % d, 'W: %s' % d]]) self.state = 'IDLE' @@ -246,7 +246,7 @@ class Decoder(srd.Decoder): elif cmd == 'STOP': d = '%02d.%02d.%02d %02d:%02d:%02d' % (self.days, self.months, self.years, self.hours, self.minutes, self.seconds) - self.put(self.block_start_sample, es, self.out_ann, + self.put(self.ss_block, es, self.out_ann, [10, ['Read date/time: %s' % d, 'Read: %s' % d, 'R: %s' % d]]) self.state = 'IDLE' -- cgit v1.2.3-70-g09d2