Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed time.sleep() from accelrometer and magnometer reading methods. #24

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

42xnor
Copy link

@42xnor 42xnor commented Jul 2, 2024

This should fix issue #15 and has been sucessfully tested on a Raspberry Pi 4 B with an ICM20948. Similar to Pull Request #20 but only removes the time.sleep() calls, saving 20ms per imu.acceleration access and 5ms per imu.magnetic access.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

I pushed a commit to fix the docs build. sphinx was trying to "follow" the reference to board.I2C but not finding it in the cpython docs build environment. Using double tick marks makes it still an inline code formatted string, but won't try to find it's reference.

This looks good to me. Thanks for submitting the fix @42xnor!

I don't have a sensor to test on.

@FoamyGuy FoamyGuy merged commit d566ca7 into adafruit:main Jul 15, 2024
1 check passed
@42xnor 42xnor deleted the remove-accelrometer-sleep-calls branch July 15, 2024 19:27
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 16, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_ENS160 to 1.0.7 from 1.0.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_ENS160#5 from bablokb/no-reset

Updating https://github.com/adafruit/Adafruit_CircuitPython_ICM20X to 2.0.21 from 2.0.20:
  > Merge pull request adafruit/Adafruit_CircuitPython_ICM20X#24 from 42xnor/remove-accelrometer-sleep-calls

Updating https://github.com/adafruit/Adafruit_CircuitPython_PIOASM to 1.0.3 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PIOASM#65 from adafruit/better-error-sideset-delay

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_HDC302x

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sleep during sensor reading methods
2 participants