From de67faa7e329baf68cc749454cdcc6af84822487 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 5 Feb 2019 22:05:58 -0800 Subject: [PATCH 1/2] Fixed Spaces showing as Zero on 7-Segment Display --- adafruit_ht16k33/segments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_ht16k33/segments.py b/adafruit_ht16k33/segments.py index 0d2fc45..6f9a976 100755 --- a/adafruit_ht16k33/segments.py +++ b/adafruit_ht16k33/segments.py @@ -250,7 +250,8 @@ def _put(self, char, index=0): elif char in '0123456789': character = ord(char) - 48 elif char == ' ': - character = 0x00 + self._set_buffer(index, 0x00) + return elif char == ':': self._set_buffer(4, 0x02) return From 4a8c856d06f2f6df375a9ef2c9e614b581afe61c Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 5 Feb 2019 22:17:11 -0800 Subject: [PATCH 2/2] Fixed example names per Kattni's request --- docs/examples.rst | 12 ++++++++---- ...{bicolor24.py => ht16k33_bicolor24_simpletest.py} | 0 examples/{matrix.py => ht16k33_matrix_simpletest.py} | 0 .../{segments.py => ht16k33_segments_simpletest.py} | 0 4 files changed, 8 insertions(+), 4 deletions(-) rename examples/{bicolor24.py => ht16k33_bicolor24_simpletest.py} (100%) rename examples/{matrix.py => ht16k33_matrix_simpletest.py} (100%) rename examples/{segments.py => ht16k33_segments_simpletest.py} (100%) diff --git a/docs/examples.rst b/docs/examples.rst index ab9c3a8..6744dae 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -3,10 +3,14 @@ Simple test Ensure your device works with this simple test. -.. literalinclude:: ../examples/matrix.py - :caption: examples/matrix.py +.. literalinclude:: ../examples/ht16k33_matrix_simpletest.py + :caption: examples/ht16k33_matrix_simpletest.py :linenos: -.. literalinclude:: ../examples/segments.py - :caption: examples/segments.py +.. literalinclude:: ../examples/ht16k33_segments_simpletest.py + :caption: examples/ht16k33_segments_simpletest.py + :linenos: + +.. literalinclude:: ../examples/ht16k33_bicolor24_simpletest.py + :caption: examples/ht16k33_bicolor24_simpletest.py :linenos: diff --git a/examples/bicolor24.py b/examples/ht16k33_bicolor24_simpletest.py similarity index 100% rename from examples/bicolor24.py rename to examples/ht16k33_bicolor24_simpletest.py diff --git a/examples/matrix.py b/examples/ht16k33_matrix_simpletest.py similarity index 100% rename from examples/matrix.py rename to examples/ht16k33_matrix_simpletest.py diff --git a/examples/segments.py b/examples/ht16k33_segments_simpletest.py similarity index 100% rename from examples/segments.py rename to examples/ht16k33_segments_simpletest.py