From 93dd1225b285cdddaf9fc7f0bfa9cd6848595585 Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Wed, 13 Jan 2021 19:51:52 +0100 Subject: seven_segment: document segment layout for awareness during maintenance Add a comment to the table which maps LED segment combinations to their textual presentation. Mention the table's sort order for awareness, and provide column captions as well as a segment layout illustration to simplify maintenance. The LED segment layout comment was Submitted-by: Ben Gardiner --- decoders/seven_segment/pd.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'decoders') diff --git a/decoders/seven_segment/pd.py b/decoders/seven_segment/pd.py index d090cff..5708fd5 100644 --- a/decoders/seven_segment/pd.py +++ b/decoders/seven_segment/pd.py @@ -22,6 +22,18 @@ import sigrokdecode as srd class ChannelError(Exception): pass +# This table is sorted by ASCII code numbers, with the exception +# of letters having their upper/lower case ignored. +# +# Traditional LED segment names and layout: +# +# A +# F B +# G +# E C +# D +# +# A B C D E F G digits = { (0, 0, 0, 0, 0, 0, 0): ' ', (0, 1, 0, 0, 0, 1, 0): '"', -- cgit v1.2.3-70-g09d2