From 35b380b1156434b73d4a976c68f5ab3604c8510a Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 15 Jul 2014 22:49:43 +0200 Subject: All PDs: Minor whitespace and consistency fixes. - No newlines at the end of files. - No trailing ';' characters. - Comparison with None: Use 'is None' or 'is not None'. - Comparison with True/False: Use 'if cond:' or 'if not cond:'. - Various minor whitespace fixes. --- decoders/ds1307/__init__.py | 1 - decoders/ds1307/pd.py | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'decoders/ds1307') diff --git a/decoders/ds1307/__init__.py b/decoders/ds1307/__init__.py index 5bc28c3..70980a6 100644 --- a/decoders/ds1307/__init__.py +++ b/decoders/ds1307/__init__.py @@ -24,4 +24,3 @@ real-time clock (RTC) specific registers and commands. ''' from .pd import * - diff --git a/decoders/ds1307/pd.py b/decoders/ds1307/pd.py index 1a49f9a..77effbf 100644 --- a/decoders/ds1307/pd.py +++ b/decoders/ds1307/pd.py @@ -1,6 +1,6 @@ ## ## This file is part of the libsigrokdecode project. -## +## ## Copyright (C) 2012 Uwe Hermann ## Copyright (C) 2013 Matt Ranostay ## @@ -81,7 +81,7 @@ class Decoder(srd.Decoder): self.putx([0, ['Day of Week: %s' % days_of_week[self.days - 1]]]) def handle_reg_0x04(self, b): # Date - self.date = bcd2int(b & 0x3f) + self.date = bcd2int(b & 0x3f) self.putx([0, ['Days: %d' % self.date]]) def handle_reg_0x05(self, b): # Month @@ -89,7 +89,7 @@ class Decoder(srd.Decoder): self.putx([0, ['Months: %d' % self.months]]) def handle_reg_0x06(self, b): # Year - self.years = bcd2int(b & 0xff) + 2000; + self.years = bcd2int(b & 0xff) + 2000 self.putx([0, ['Years: %d' % self.years]]) def handle_reg_0x07(self, b): # Control Register @@ -164,4 +164,3 @@ class Decoder(srd.Decoder): self.state = 'IDLE' else: pass # TODO? - -- cgit v1.2.3-70-g09d2