Skip to content

ina2xx_v2: second CodeRabbit round from wled/WLED#4237 - #60

Merged
KrX3D merged 1 commit into
0_15from
fix/ina2xx-v2-coderabbit-round2
Dec 1, 2026
Merged

KrX3D merged 1 commit into
0_15from
fix/ina2xx-v2-coderabbit-round2

Conversation

@KrX3D

@KrX3D KrX3D commented Nov 26, 2026

Copy link
Copy Markdown
Owner
  • Second CodeRabbit round on Usermod INA219 + INA226 Current, Voltage & Power Sensor wled/WLED#4237. INA226: the I2C error is checked after every measurement read, and a failed cycle is neither published nor counted. The first-conversion wait in setup() now has a deadline.
  • {"INA2xx":{"enabled":false}} disables sampling again; enabling stays with the usermod settings, which initialise the sensor. No energy baseline is kept before the time sync, so the first interval after the sync does not include pre-sync time.
  • Telemetry and HA discovery are retried when publish() did not queue them. A retained state that arrives in the same pass as the restore timeout is still applied.
  • Readme: build command for the nodemcuv2 example. Fixes the two sign-compare warnings on the topic length checks.

Changelog

  • 2026-11-26: initial version. Compiles without usermod warnings for esp32dev (INA219 and INA226, WLED_DEBUG) and nodemcuv2.

🤖 Generated with Claude Code

- INA226: check the I2C error after each measurement read and discard
  the cycle on failure; bounded wait for the first conversion
- JSON state can disable sampling again (enabling stays in settings)
- No energy baseline before time sync, so the first interval after the
  sync does not include pre-sync time
- Retry telemetry and HA discovery when publish() did not queue them
- A retained state that races the restore timeout is still applied
- Readme: build command for the nodemcuv2 example; fix sign-compare
  warnings on the topic length checks

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@KrX3D

KrX3D commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

localy merged

@KrX3D
KrX3D merged commit efe95d9 into 0_15 Dec 1, 2026
@KrX3D
KrX3D deleted the fix/ina2xx-v2-coderabbit-round2 branch December 1, 2026 18:35
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.

1 participant