Skip to content
Snippets Groups Projects
Commit e2dbfe81 authored by markus's avatar markus
Browse files

Model localtime as parameter to update function

parent ad560d6c
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,8 @@ class Clock:
try:
with display.open() as disp:
while True:
self.updateClock(disp)
localtime = utime.localtime()
self.updateClock(disp, localtime)
if self.run_once:
break
......@@ -181,9 +182,8 @@ class Clock:
leds.set(i, (0, 0, 0))
return
def updateClock(self, disp):
def updateClock(self, disp, localtime):
disp.clear(self.background_col)
localtime = utime.localtime()
disp.pixel(self.center[0] + self.offsetx, self.center[1], col=self.center_col)
hour_coords = self.circlePoint(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment