Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/apds9960/apds9960/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# APDS9960 device IDs
APDS9960_DEV_ID = [0xAB, 0x9C, 0xA8, -0x55]

# APDS9960 times
APDS9960_TIME_FIFO_PAUSE = 0.03
# APDS9960 times (FIFO pause in milliseconds)
APDS9960_TIME_FIFO_PAUSE = 30

# APDS9960 register addresses
APDS9960_REG_ENABLE = 0x80
Expand Down
6 changes: 3 additions & 3 deletions lib/apds9960/apds9960/device.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from apds9960.const import *
from apds9960.exceptions import *

from time import sleep
from time import sleep_ms


class APDS9960(object):
Expand Down Expand Up @@ -199,10 +199,10 @@ def readGesture(self):
self.gesture_data_.total_gestures = 0

# wait some time to collect next batch of FIFO data
sleep(APDS9960_TIME_FIFO_PAUSE)
sleep_ms(APDS9960_TIME_FIFO_PAUSE)

# determine best guessed gesture and clean up
sleep(APDS9960_TIME_FIFO_PAUSE)
sleep_ms(APDS9960_TIME_FIFO_PAUSE)
self.decodeGesture()
motion = self.gesture_motion_

Expand Down
2 changes: 1 addition & 1 deletion lib/wsen-pads/wsen_pads/device.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from utime import sleep_ms, ticks_ms, ticks_diff
from time import sleep_ms, ticks_ms, ticks_diff

from wsen_pads.const import *
from wsen_pads.exceptions import *
Expand Down
Loading