fix(pixii): retain calibration fault while charge status is unknown - #147
Conversation
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19b7de7b85
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| -- SunSpec enum16/uint16 uses 0xffff for an unsupported value. | ||
| local function read_status_u16(addr) | ||
| local regs = probe_read(addr, 1, "holding") | ||
| if regs then return regs[1] end | ||
| if regs and regs[1] ~= 0xffff then return regs[1] end |
There was a problem hiding this comment.
Record the status specifications in upstream_docs
This new sentinel and enum interpretation is explicitly decoded from the SunSpec Device Information Model and model 802, but manifests/pixii.yaml still has no upstream_docs entry. As a result, the weekly watcher cannot alert maintainers if either specification changes or disappears; add the durable source URLs already identified for this change to the manifest.
AGENTS.md reference: AGENTS.md:L76-L82
Useful? React with 👍 / 👎.
Problem and result
Pixii's SunSpec charge status can return
0xffff(unsupported). The driver treated every readable value except TESTING (7) as proof that calibration had ended. A TESTING → unsupported/unknown transition therefore cleared the device fault and allowed Core to rely on the battery again without evidence of recovery.Pixii 2.1.5 reports unsupported status as
unknown, omits unsupported numeric status fields, and retains a known calibration fault until a recognized non-testing charge status arrives. Unknown status at startup does not establish calibration and does not create a new fault. A warning records changes to unknown charge status without repeating it every poll. Battery and meter telemetry remain available.Scope and safety
Companion Core fix: srcfl/ftw#1468 makes planner and dispatch power limits agree. The fixes can be reviewed independently.
Verification
0xffff, 99 and 0.make test-driver ID=pixii: 103 passed, 13 skipped.make check: 4742 passed, 913 skipped; manifests, catalog generation, sandbox and host API checks passed.