Skip to content

Commit 1daa05d

Browse files
committed
drivers: Replace deprecated utime imports with time.
1 parent d731420 commit 1daa05d

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/apds9960/apds9960/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
APDS9960_DEV_ID = [0xAB, 0x9C, 0xA8, -0x55]
1111

1212
# APDS9960 times
13-
APDS9960_TIME_FIFO_PAUSE = 0.03
13+
APDS9960_TIME_FIFO_PAUSE = 30
1414

1515
# APDS9960 register addresses
1616
APDS9960_REG_ENABLE = 0x80

lib/apds9960/apds9960/device.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from apds9960.const import *
22
from apds9960.exceptions import *
33

4-
from time import sleep
4+
from time import sleep_ms
55

66

77
class APDS9960(object):
@@ -199,10 +199,10 @@ def readGesture(self):
199199
self.gesture_data_.total_gestures = 0
200200

201201
# wait some time to collect next batch of FIFO data
202-
sleep(APDS9960_TIME_FIFO_PAUSE)
202+
sleep_ms(APDS9960_TIME_FIFO_PAUSE)
203203

204204
# determine best guessed gesture and clean up
205-
sleep(APDS9960_TIME_FIFO_PAUSE)
205+
sleep_ms(APDS9960_TIME_FIFO_PAUSE)
206206
self.decodeGesture()
207207
motion = self.gesture_motion_
208208

lib/wsen-pads/wsen_pads/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from utime import sleep_ms, ticks_ms, ticks_diff
1+
from time import sleep_ms, ticks_ms, ticks_diff
22

33
from wsen_pads.const import *
44
from wsen_pads.exceptions import *

0 commit comments

Comments
 (0)