diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2013-03-12 15:12:09 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2013-03-12 15:12:09 +0100 |
commit | 8b97d010eff4f87732c9a82e3f8c9e624295f4ff (patch) | |
tree | 0de892d2bc7e76c5f5cba612b22161bc92f400fd /decoders/ds1307/pd.py | |
parent | 3bf689988fc1e8db9cb3997039b06f683c413fc1 (diff) | |
download | libsigrokdecode-8b97d010eff4f87732c9a82e3f8c9e624295f4ff.tar.gz libsigrokdecode-8b97d010eff4f87732c9a82e3f8c9e624295f4ff.zip |
ds1307: Fix date/day-of-week printing.
Diffstat (limited to 'decoders/ds1307/pd.py')
-rw-r--r-- | decoders/ds1307/pd.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/decoders/ds1307/pd.py b/decoders/ds1307/pd.py index 273226c..527ea96 100644 --- a/decoders/ds1307/pd.py +++ b/decoders/ds1307/pd.py @@ -141,9 +141,9 @@ class Decoder(srd.Decoder): # TODO: Check for NACK! elif cmd == 'STOP': # TODO: Handle read/write of only parts of these items. - d = '%02d.%02d.%02d %02d:%02d:%02d' % (self.days, self.date, - self.months, self.years, self.hours, self.minutes, - self.seconds) + d = '%s, %02d.%02d.%02d %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, es, self.out_ann, [0, ['Written date/time: %s' % d]]) self.state = 'IDLE' @@ -164,9 +164,9 @@ class Decoder(srd.Decoder): self.reg += 1 # TODO: Check for NACK! elif cmd == 'STOP': - d = '%02d.%02d.%02d.%02d %02d:%02d:%02d' % (self.days, - self.date, self.months, self.years, self.hours, - self.minutes, self.seconds) + d = '%s, %02d.%02d.%02d %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, es, self.out_ann, [0, ['Read date/time: %s' % d]]) self.state = 'IDLE' |