Repository navigation
ina2xx_v2: fix CodeRabbit review findings from wled/WLED#4237 - #59
Merged
Merged
Conversation
- INA226: apply the correction factor after setResistorRange(), which rewrote the calibration register with the uncorrected value - MQTT restore: plain wait tick plus flag (millis()|1 could time out at once), only restore with a valid total, republish once restored - Validate energy from the JSON API; reject shunt_resistor <= 0 - Integrate unrounded power, keep the day/month rollover for negative power, do not integrate across a re-init or disabled period - INA226: refresh the overflow flag on every sample - Re-create the sensor in loop() instead of the web task (use-after-free), subscribe when enabled while MQTT is connected, drop "enabled" from the JSON state API (re-enabling there could never work) - Readme: ina2xx_v2 name, nodemcuv2 example, check_interval range, heartbeat vs check_interval, energy only after NTP sync Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
locally added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setResistorRange(), the MQTT restore no longer times out at once or starts from an invalid total, and invalid energy and shunt values are rejected.loop()uses it; the sensor is re-created inloop(). Enabling the usermod while MQTT is connected now subscribes.enabledis no longer read from the JSON state API.ina2xx_v2name, nodemcuv2 example,check_intervalrange, heartbeat vs. check interval, energy only after NTP sync.Changelog
🤖 Generated with Claude Code