Skip to content

Commit 3f204cb

Browse files
author
Melissa LeBlanc-Williams
committed
Fixed text flickering as well
1 parent e0c52f1 commit 3f204cb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

adafruit_ht16k33/segments.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ def print(self, value):
160160

161161
def __setitem__(self, key, value):
162162
self._put(value, key)
163+
if self._auto_write:
164+
self.show()
163165

164166
def scroll(self, count=1):
165167
"""Scroll the display by specified number of places."""
@@ -182,8 +184,6 @@ def _put(self, char, index=0):
182184
character = ord(char) * 2 - 64
183185
self._set_buffer(index * 2, CHARS[1 + character])
184186
self._set_buffer(index * 2 + 1, CHARS[character])
185-
if self._auto_write:
186-
self.show()
187187

188188
def _push(self, char):
189189
"""Scroll the display and add a character at the end."""
@@ -260,8 +260,6 @@ def _put(self, char, index=0):
260260
else:
261261
return
262262
self._set_buffer(index, NUMBERS[character])
263-
if self._auto_write:
264-
self.show()
265263

266264
class BigSeg7x4(Seg7x4):
267265
"""Numeric 7-segment display. It has the same methods as the alphanumeric display, but only

0 commit comments

Comments
 (0)