Skip to content

Commit ba71446

Browse files
authored
Merge pull request #99 from makermelissa/master
Fixed autowrite not resetting when error
2 parents 9d6e085 + 330742a commit ba71446

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

adafruit_ht16k33/segments.py

100644100755
+2
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ def _number(self, number: Union[int, float], decimal: int = 0) -> str:
238238
dot = stnum.find(".")
239239

240240
if (len(stnum) > 5) or ((len(stnum) > 4) and (dot < 0)):
241+
self._auto_write = auto_write
241242
raise ValueError(
242243
"Input overflow - {0} is too large for the display!".format(number)
243244
)
@@ -262,6 +263,7 @@ def _number(self, number: Union[int, float], decimal: int = 0) -> str:
262263
txt = stnum[:places]
263264

264265
if len(txt) > 5:
266+
self._auto_write = auto_write
265267
raise ValueError("Output string ('{0}') is too long!".format(txt))
266268

267269
self._text(txt)

0 commit comments

Comments
 (0)