Fix power.py module
The last update to this module used new at the time ```check_deadline``` function wrong, I seem to have fixed this.
This commit is contained in:
parent
20be6e9072
commit
18687e5278
@ -103,9 +103,9 @@ class Power(Module):
|
|||||||
'''
|
'''
|
||||||
Sleeps longer and longer to save power the more time in between updates.
|
Sleeps longer and longer to save power the more time in between updates.
|
||||||
'''
|
'''
|
||||||
if check_deadline(ticks_ms(), self._powersave_start) <= 60000:
|
if check_deadline(ticks_ms(), self._powersave_start, 60000):
|
||||||
sleep(8 / 1000)
|
sleep(8 / 1000)
|
||||||
elif check_deadline(ticks_ms(), self._powersave_start) >= 240000:
|
elif check_deadline(ticks_ms(), self._powersave_start, 240000) is False:
|
||||||
sleep(180 / 1000)
|
sleep(180 / 1000)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ class Power(Module):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def usb_rescan_timer(self):
|
def usb_rescan_timer(self):
|
||||||
return bool(check_deadline(ticks_ms(), self._usb_last_scan) > 5000)
|
return bool(check_deadline(ticks_ms(), self._usb_last_scan, 5000) == False)
|
||||||
|
|
||||||
def usb_time_reset(self):
|
def usb_time_reset(self):
|
||||||
self._usb_last_scan = ticks_ms()
|
self._usb_last_scan = ticks_ms()
|
||||||
|
Loading…
Reference in New Issue
Block a user