From: Gerhard Sittig Date: Wed, 13 Jan 2021 18:51:52 +0000 (+0100) Subject: seven_segment: document segment layout for awareness during maintenance X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=93dd1225b285cdddaf9fc7f0bfa9cd6848595585;p=libsigrokdecode.git 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 --- 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): '"',