Skip to content

Commit 53797f9

Browse files
committed
ground control to mjr travis
1 parent e01ac2c commit 53797f9

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

PyPortal_ISS_Tracker/pp_iss_tracker.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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
119119
while 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)

0 commit comments

Comments
 (0)