File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,9 +96,9 @@ def update_display(current_time, update_iss=False):
9696 if len (trail ) >= TRAIL_LENGTH :
9797 trail .pop (0 )
9898 trail .append (displayio .TileGrid (trail_bitmap ,
99- pixel_shader = trail_palette ,
100- x = x - 1 ,
101- y = y - 1 ) )
99+ pixel_shader = trail_palette ,
100+ x = x - 1 ,
101+ y = y - 1 ) )
102102
103103
104104 # Date and time
@@ -117,10 +117,10 @@ def update_display(current_time, update_iss=False):
117117
118118# Run forever
119119while True :
120- current_time = time .monotonic ()
121- update_iss = False
122- if current_time - last_update > UPDATE_RATE :
123- update_iss = True
124- last_update = current_time
125- update_display (time .localtime (), update_iss )
120+ now = time .monotonic ()
121+ new_position = False
122+ if now - last_update > UPDATE_RATE :
123+ new_position = True
124+ last_update = now
125+ update_display (time .localtime (), new_position )
126126 time .sleep (0.5 )
You can’t perform that action at this time.
0 commit comments