Commit 14606dab authored by schneider's avatar schneider
Browse files

chore(g-watch): use time instead of utime

parent 2f671ced
......@@ -4,7 +4,7 @@ import ledfx
import leds
import math
import bhi160
import utime
import time
import power
import light_sensor
......@@ -126,7 +126,7 @@ def render_colon():
def render7segment():
year, month, mday, hour, min, sec, wday, yday = utime.localtime()
year, month, mday, hour, min, sec, wday, yday = time.localtime()
render_num(hour, 1)
render_num(min, 13)
......@@ -146,7 +146,7 @@ with display.open() as disp:
yn = 0 # new y value
yd = 0 # y difference
ydl = 0 # yd lpf
clock_on = utime.monotonic_ms() # time in ms when clock is turned on
clock_on = time.monotonic_ms() # time in ms when clock is turned on
timeout = 7000 # time in ms how long clock will be displayed
clock_off = clock_on + timeout # time in ms when clock is turned off
fade_time = 0 # fade out counter
......@@ -156,8 +156,8 @@ with display.open() as disp:
p_leds_on = 0
while True:
millis = utime.monotonic_ms()
lt = utime.localtime()
millis = time.monotonic_ms()
lt = time.localtime()
dow = lt[6]
# ---------------------------------------- read brightness sensor
......@@ -183,7 +183,7 @@ with display.open() as disp:
disp.print("LEDS OFF", posx=40, posy=30, font=2)
disp.update()
disp.backlight(brightness=50)
utime.sleep_ms(500)
time.sleep_ms(500)
disp.backlight(brightness=0)
for led in range(led_count):
leds.prep_hsv(led, [0, 0, 0])
......@@ -195,7 +195,7 @@ with display.open() as disp:
disp.print("LEDS ON", posx=40, posy=30, font=2)
disp.update()
disp.backlight(brightness=50)
utime.sleep_ms(500)
time.sleep_ms(500)
disp.backlight(brightness=0)
# ---------------------------------------- read orientation sensor
......@@ -241,7 +241,7 @@ with display.open() as disp:
if clock_off >= millis:
# .................................... time
lt = utime.localtime()
lt = time.localtime()
year = lt[0]
month = lt[1]
day = lt[2]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment