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/ds1307/pd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'decoders/ds1307') diff --git a/decoders/ds1307/pd.py b/decoders/ds1307/pd.py index 800f7a0..b784b6d 100644 --- a/decoders/ds1307/pd.py +++ b/decoders/ds1307/pd.py @@ -184,7 +184,7 @@ class Decoder(srd.Decoder): d = '%s, %02d.%02d.%4d %02d:%02d:%02d' % ( days_of_week[self.days - 1], self.date, self.months, self.years, self.hours, self.minutes, self.seconds) - self.put(self.block_start_sample, self.es, self.out_ann, + self.put(self.ss_block, self.es, self.out_ann, [cls, ['%s date/time: %s' % (rw, d)]]) def handle_reg(self, b): @@ -200,7 +200,7 @@ class Decoder(srd.Decoder): def is_correct_chip(self, addr): if addr == DS1307_I2C_ADDRESS: return True - self.put(self.block_start_sample, self.es, self.out_ann, + self.put(self.ss_block, self.es, self.out_ann, [28, ['Ignoring non-DS1307 data (slave 0x%02X)' % addr]]) return False @@ -222,7 +222,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. if cmd != 'ADDRESS WRITE': -- cgit v1.2.3-70-g09d2