summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2021-01-13 19:51:52 +0100
committerGerhard Sittig <gerhard.sittig@gmx.net>2021-01-13 20:20:34 +0100
commit93dd1225b285cdddaf9fc7f0bfa9cd6848595585 (patch)
tree905244607b38de92cfa4b170364bdb2aff51e4ac /decoders
parent853653aa7bf59ee570a36b4e15211d5a653c1b95 (diff)
downloadlibsigrokdecode-93dd1225b285cdddaf9fc7f0bfa9cd6848595585.tar.gz
libsigrokdecode-93dd1225b285cdddaf9fc7f0bfa9cd6848595585.zip
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 <ben.l.gardiner@gmail.com>
Diffstat (limited to 'decoders')
-rw-r--r--decoders/seven_segment/pd.py12
1 files changed, 12 insertions, 0 deletions
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): '"',