Convert to supervisor ticks

This commit is contained in:
Kyle Brown
2021-09-13 08:18:01 -07:00
parent ea9625106c
commit 584eee64c6
8 changed files with 42 additions and 46 deletions

View File

@@ -1,10 +1,11 @@
'''Enables splitting keyboards wirelessly or wired'''
import busio
from micropython import const
from supervisor import ticks_ms
from storage import getmount
from kmk.kmktime import ticks_diff, ticks_ms
from kmk.kmktime import check_deadline
from kmk.matrix import intify_coordinate
from kmk.modules import Module
@@ -241,7 +242,7 @@ class Split(Module):
def ble_rescan_timer(self):
'''If true, the rescan timer is up'''
return bool(ticks_diff(ticks_ms(), self._ble_last_scan) > 5000)
return bool(check_deadline(ticks_ms(), self._ble_last_scan) > 5000)
def ble_time_reset(self):
'''Resets the rescan timer'''