From 21ecba6fc3c16ee24531e9680dd317b5a5bc01ce Mon Sep 17 00:00:00 2001 From: "Dave Walker (Daviey)" Date: Thu, 17 Sep 2020 21:47:29 +0100 Subject: [PATCH 1/2] Removed artifical limiting of 7x4 display (LOL) I needed more LOL'ing in my life, and a 7x4 segment display can help with this. However, adafruit_ht16k33 filters this out for the 7x4 display which makes me super sad :cry:. This change allows the use of both upper and lower case L's and O's. (also, matrix.py and segments.py had the eXecutable bit set, which has been dropped) Fixes: adafruit/Adafruit_CircuitPython_HT16K33#79 Signed-off-by: Dave Walker (Daviey) --- adafruit_ht16k33/matrix.py | 0 adafruit_ht16k33/segments.py | 6 ++++++ 2 files changed, 6 insertions(+) mode change 100755 => 100644 adafruit_ht16k33/matrix.py mode change 100755 => 100644 adafruit_ht16k33/segments.py diff --git a/adafruit_ht16k33/matrix.py b/adafruit_ht16k33/matrix.py old mode 100755 new mode 100644 diff --git a/adafruit_ht16k33/segments.py b/adafruit_ht16k33/segments.py old mode 100755 new mode 100644 index 0f7aff7..3933455 --- a/adafruit_ht16k33/segments.py +++ b/adafruit_ht16k33/segments.py @@ -373,6 +373,12 @@ def _put(self, char, index=0): elif char == ";": self._set_buffer(4, 0x00) return + elif char in "lL": + self._set_buffer(index, 0b00111000) + return + elif char in "oO": + self._set_buffer(index, 0b00111111) + return else: return self._set_buffer(index, NUMBERS[character]) From 7877f37257fbdc8a3a90cc8d010c389c57c12634 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sun, 26 Dec 2021 20:01:13 -0600 Subject: [PATCH 2/2] merge main. allow return statements --- adafruit_ht16k33/segments.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adafruit_ht16k33/segments.py b/adafruit_ht16k33/segments.py index a6ec80c..fe2d3db 100644 --- a/adafruit_ht16k33/segments.py +++ b/adafruit_ht16k33/segments.py @@ -340,6 +340,7 @@ def _push(self, char: str): def _put(self, char: str, index: int = 0): """Put a character at the specified place.""" + # pylint: disable=too-many-return-statements if not 0 <= index <= 3: return char = char.lower()