From d56c2aaa589a5cfda7fa62245b81d0857481ffee Mon Sep 17 00:00:00 2001 From: wkuranowski Date: Tue, 31 Jan 2023 01:13:12 +0100 Subject: [PATCH] Fix incorrect handling of the "-" character on 7x4 segments --- 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 5e7864b..8033996 100755 --- a/adafruit_ht16k33/segments.py +++ b/adafruit_ht16k33/segments.py @@ -158,6 +158,7 @@ 0x40, # - 0x6E, # y 0x40, # - + 0x40, # - ) @@ -461,7 +462,7 @@ def _put(self, char: str, index: int = 0) -> None: if char in "abcdefghijklmnopqrstuvwxy": character = ord(char) - 97 + 10 elif char == "-": - character = 16 + character = 36 elif char in "0123456789": character = ord(char) - 48 elif char == " ":