-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Closed as not planned
Closed as not planned
Copy link
Labels
Stalearea: Documentationarea: SensorsSensorsSensorsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
When using the sample code in Sensor Polling Read docs, temp_decoder is reused for all sensor_decode. The frame iterator temp_decoder.fit is not reset after each read-decode cycle, later call to sensor_decode will just return 0.
See: https://docs.zephyrproject.org/latest/hardware/peripherals/sensor/read_and_decode.html
To Reproduce
Just set up the overlay and Kconfig for ICM42688 , copy and paste then run it.
Expected behavior
New values will read on every iteration.
Impact
May be confusing to sensor read-decode API first-time users.
Environment (please complete the following information):
- OS: Linux
Additional context
Tested with an ICM42688.
Metadata
Metadata
Labels
Stalearea: Documentationarea: SensorsSensorsSensorsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug