File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
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- from adafruit_ticks import ticks_ms
29+ import adafruit_ticks
3030from adafruit_display_text import bitmap_label
3131
3232try :
@@ -81,10 +81,10 @@ def update(self, force: bool = False) -> None:
8181 Default is False.
8282 :return: None
8383 """
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 :
84+ _now = adafruit_ticks . ticks_ms ()
85+ if force or adafruit_ticks . ticks_less (
86+ self ._last_animate_time + int ( self . animate_time * 1000 ), _now
87+ ) :
8888 if len (self .full_text ) <= self .max_characters :
8989 super ()._set_text (self .full_text , self .scale )
9090 self ._last_animate_time = _now
You can’t perform that action at this time.
0 commit comments