Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion lib/apds9960/apds9960/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
APDS9960_DEV_ID = [0xAB, 0x9C, 0xA8, -0x55]

# APDS9960 times
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APDS9960_TIME_FIFO_PAUSE changed from a float seconds value to an integer milliseconds value (now passed to sleep_ms). To avoid unit confusion, please update the constant name (e.g., suffix _MS) or adjust the nearby comment to explicitly state the units are milliseconds.

Suggested change
# APDS9960 times
# APDS9960 times (FIFO pause in milliseconds)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the comment to clarify units are milliseconds (commit 42c08a6).

APDS9960_TIME_FIFO_PAUSE = 0.03
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