summaryrefslogtreecommitdiff
path: root/decoders/signature
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2019-11-28 20:52:20 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2019-11-28 20:52:38 +0100
commit540c0552f71dc2ce74a07aacf5f8f6b8fa568790 (patch)
treebefd154ba99fc4be470ac25b517875a35b124728 /decoders/signature
parent201ad73b706f6beaef0d782bbf3c353073442d8d (diff)
downloadlibsigrokdecode-540c0552f71dc2ce74a07aacf5f8f6b8fa568790.tar.gz
libsigrokdecode-540c0552f71dc2ce74a07aacf5f8f6b8fa568790.zip
signature: Use more human-readable option values.
Diffstat (limited to 'decoders/signature')
-rw-r--r--decoders/signature/pd.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/decoders/signature/pd.py b/decoders/signature/pd.py
index 797a004..f5183c0 100644
--- a/decoders/signature/pd.py
+++ b/decoders/signature/pd.py
@@ -58,11 +58,11 @@ class Decoder(srd.Decoder):
)
options = (
{'id': 'start_edge', 'desc': 'START edge polarity',
- 'default': 'r', 'values': ('r', 'f')},
+ 'default': 'rising', 'values': ('rising', 'falling')},
{'id': 'stop_edge', 'desc': 'STOP edge polarity',
- 'default': 'r', 'values': ('r', 'f')},
+ 'default': 'rising', 'values': ('rising', 'falling')},
{'id': 'clk_edge', 'desc': 'CLOCK edge polarity',
- 'default': 'f', 'values': ('r', 'f')},
+ 'default': 'falling', 'values': ('rising', 'falling')},
{'id': 'annbits', 'desc': 'Enable bit level annotations',
'default': 'no', 'values': ('yes', 'no')},
)
@@ -99,8 +99,8 @@ class Decoder(srd.Decoder):
def decode(self):
opt = self.options
- start_edge_mode_rising = opt['start_edge'] == 'r'
- stop_edge_mode_rising = opt['stop_edge'] == 'r'
+ start_edge_mode_rising = opt['start_edge'] == 'rising'
+ stop_edge_mode_rising = opt['stop_edge'] == 'rising'
annbits = opt['annbits'] == 'yes'
gate_is_open = False
sample_start = None