Skip to content

Commit 43817d1

Browse files
authored
Merge pull request #120 from WanderingStar/patch-1
Don't reset scroll index if loop is False
2 parents e6083b6 + 8b41de9 commit 43817d1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎adafruit_ht16k33/segments.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,13 @@ def non_blocking_marquee(
398398

399399
self.print(text[self._nb_scroll_index])
400400
self._nb_prev_char_is_dot = text[self._nb_scroll_index] == "."
401-
else:
401+
elif loop:
402402
self._nb_scroll_index = -1
403-
if loop:
404-
if space_between:
405-
self._last_nb_scroll_time = now
406-
self.print(" ")
407-
else:
408-
return True
403+
if space_between:
404+
self._last_nb_scroll_time = now
405+
self.print(" ")
406+
else:
407+
return True
409408
else:
410409
# different text
411410
self._nb_scroll_index = 0

0 commit comments

Comments
 (0)