Fixed API (wait() returns number, not Sleep object)
This commit is contained in:
parent
e382737fda
commit
561b82a5be
|
@ -1,4 +1,3 @@
|
|||
from trezor.loop import Sleep
|
||||
import utime
|
||||
|
||||
class ConstDelay:
|
||||
|
@ -10,4 +9,4 @@ class ConstDelay:
|
|||
# FIXME - use loop.call_at instead of call_later to avoid multiple time handling
|
||||
delay = 2 * self.delay - (utime.ticks_us() - self.last_run)
|
||||
self.last_run = utime.ticks_us()
|
||||
return Sleep(delay)
|
||||
return delay
|
||||
|
|
Loading…
Reference in New Issue