Commit 3804e445 authored by schneider's avatar schneider
Browse files

fix(spo2): Use time, not utime

parent 68caf887
import max86150
import display
import utime
import time
import buttons
import spo2_algo
import utime
import color
......@@ -29,7 +28,7 @@ class SPO2:
self.average = 0
self.prev_w_ir = 0
self.prev_w_red = 0
self.t0 = utime.time_ms()
self.t0 = time.time_ms()
def open(self):
def callback(datasets):
......@@ -46,8 +45,8 @@ class SPO2:
self.ir_history, self.red_history
)
print(utime.time_ms() - self.t0, spo2, spo2_valid, hr, hr_valid)
self.t0 = utime.time_ms()
print(time.time_ms() - self.t0, spo2, spo2_valid, hr, hr_valid)
self.t0 = time.time_ms()
if hr_valid:
self.disp.print("HR: {0:3} bpm".format(hr), posy=20)
else:
......@@ -162,7 +161,7 @@ if __name__ == "__main__":
raise e
while True:
utime.sleep(0.1)
time.sleep(0.1)
if buttons.read(buttons.BOTTOM_RIGHT):
pass
while buttons.read(buttons.BOTTOM_RIGHT):
......
Markdown is supported
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