Skip to content

ism330dl: Ensure read methods auto-trigger conversion in power-down mode. #123

@nedseb

Description

@nedseb

Context

Part of the auto-trigger convention audit (#44).

After power_down(), calling acceleration_g(), gyroscope_dps(), or temperature_c() returns stale/frozen data without warning. The driver should automatically re-enable the sensor and trigger a fresh measurement, consistent with the pattern used in WSEN-PADS, WSEN-HIDS, and HTS221.

TODO

  • Add _is_power_down() method (check if CTRL1_XL and CTRL2_G are both 0)
  • Add _ensure_data() method that restores previous ODR/scale if in power-down mode
  • Call _ensure_data() in acceleration_raw(), gyroscope_raw(), temperature_raw()
  • Add mock tests for read-after-power-down behavior
  • Add hardware test: verify fresh data after power_down() + read

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdriverConcerne un driver spécifiquereleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions