summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2013-09-15 16:33:32 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2013-09-15 16:36:33 +0200
commit54f1b2b7a7933d87151a8af5cab53bcd1e75fe4c (patch)
tree6dcb681d00a58ee613aa57c45d2a25600a749687 /decoders
parent8a18c4e7629ca748c3975116255a0374cfb0a9e7 (diff)
downloadlibsigrokdecode-54f1b2b7a7933d87151a8af5cab53bcd1e75fe4c.tar.gz
libsigrokdecode-54f1b2b7a7933d87151a8af5cab53bcd1e75fe4c.zip
dcf77: Drop PON pin handling.
The PON pin is specific to the Pollin "DCF1 module", but has nothing to do with DCF77 itself. Thus, drop it from this PD. It can be part of another stacked PD if needed. This fixes bug #153.
Diffstat (limited to 'decoders')
-rw-r--r--decoders/dcf77/pd.py27
1 files changed, 2 insertions, 25 deletions
diff --git a/decoders/dcf77/pd.py b/decoders/dcf77/pd.py
index 978b961..7218e7e 100644
--- a/decoders/dcf77/pd.py
+++ b/decoders/dcf77/pd.py
@@ -39,9 +39,7 @@ class Decoder(srd.Decoder):
probes = [
{'id': 'data', 'name': 'DATA', 'desc': 'DATA line'},
]
- optional_probes = [
- {'id': 'pon', 'name': 'PON', 'desc': 'Power on'},
- ]
+ optional_probes = []
options = {}
annotations = [
['start_of_minute', 'Start of minute'],
@@ -70,7 +68,6 @@ class Decoder(srd.Decoder):
self.state = 'WAIT FOR RISING EDGE'
self.oldpins = None
self.oldval = None
- self.oldpon = None
self.samplenum = 0
self.bit_start = 0
self.bit_start_old = 0
@@ -222,27 +219,7 @@ class Decoder(srd.Decoder):
# Ignore identical samples early on (for performance reasons).
if self.oldpins == pins:
continue
- self.oldpins, (val, pon) = pins, pins
-
- # Always remember the old PON state.
- if self.oldpon != pon:
- self.oldpon = pon
-
- # Warn if PON goes low.
- if self.oldpon == 1 and pon == 0:
- self.pon_ss = self.samplenum
- self.put(self.samplenum, self.samplenum, self.out_ann,
- [1, ['Warning: PON goes low, DCF77 reception '
- 'no longer possible']])
- elif self.oldpon == 0 and pon == 1:
- self.put(self.samplenum, self.samplenum, self.out_ann,
- [0, ['PON goes high, DCF77 reception now possible']])
- self.put(self.pon_ss, self.samplenum, self.out_ann,
- [1, ['Warning: PON low, DCF77 reception disabled']])
-
- # Ignore samples where PON == 0, they can't contain DCF77 signals.
- if pon == 0:
- continue
+ self.oldpins, (val,) = pins, pins
if self.state == 'WAIT FOR RISING EDGE':
# Wait until the next rising edge occurs.