mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-12-06 22:04:40 +00:00
Behavioural change. Cause: ZephCore reads power monitors in triggered mode, but an INA219 does not power down after a triggered conversion; it idles at its active supply current (datasheet 0.7 mA typ, 1 mA max; measured 579 uA) between telemetry reads. Fix: power monitors are suspended after probe and resumed only around each read. Of the INA drivers only the INA219 has PM, and its suspend wrote "ADC off" (0b100), which measured the same 579 uA; patches/zephyr/0020 makes it write power-down (0b000), as TURN_OFF already does. Resume re-runs ina219_init(), restoring configuration and calibration. A monitor that fails to wake is not read and its error is returned, so telemetry drops the channel instead of reporting 0 A; a failed suspend is logged. Measured on a XIAO nRF52840 repeater, INA219 supply current: 579 uA before, 579 uA with suspend as "ADC off" (without 0020), 4 uA with 0020; telemetry readings stay valid. Tests: UNIT-SENSOR-001..005 build ZephyrEnvSensors.cpp on the host against new device/sensor/PM stubs. Docs: ARCHITECTURE.md telemetry, 1.18.3 release notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>