File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2626__version__ = "0.0.0+auto.0"
2727__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"
2828
29- import time
29+ from supervisor import ticks_ms
3030from adafruit_display_text import bitmap_label
3131
3232try :
@@ -81,8 +81,10 @@ def update(self, force: bool = False) -> None:
8181 Default is False.
8282 :return: None
8383 """
84- _now = time .monotonic ()
85- if force or self ._last_animate_time + self .animate_time <= _now :
84+ _now = ticks_ms ()
85+ if _now < self ._last_animate_time : # ticks_ms has rolled over
86+ self ._last_animate_time = _now
87+ if force or self ._last_animate_time + (self .animate_time * 1000 ) <= _now :
8688 if len (self .full_text ) <= self .max_characters :
8789 super ()._set_text (self .full_text , self .scale )
8890 self ._last_animate_time = _now
You can’t perform that action at this time.
0 commit comments