Repository navigation
fix(pixii): recover after the device was unreachable (2.1.9) - #180
Merged
Merged
Conversation
A poll where every read fails no longer counts toward retiring a register. The next poll that gets an answer clears the failure counts, and a register that stays silent while the device is up is tried again every five minutes. Register 40288 is still left alone between retries. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
frahlg
marked this pull request as ready for review
October 14, 2026 15:40
Member
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
Summary
After a power cut the Pixii driver stayed offline until a manual restart. Each register keeps its own failure count and stops being read after three misses (
GIVE_UP_AFTER = 3). When the Pixii boots slower than FTW, every read fails within about 15 seconds at a 5 second poll, every register is retired, and the driver never asks again.Pixii is now 2.1.9. Simulated with the existing Lua host mock: the device is unreachable from init through six polls, then answers, and battery and meter values come back without reloading the driver. Register 40288 is still left alone between retries.
FTW's bundled copy does not move with this commit. After this merges, bump the pin in FTW and run
scripts/sync-bundled-drivers.sh(srcfl/ftw#1620). Until then a gateway booting offline still runs the old driver.Driver evidence
drivers/tests/test_pixii_unreachable.pyagainst the host mock.Safety
No new driver and no control change. Heartbeat, setpoint, default mode and sign conversion are untouched. The existing control path is unchanged, so the read-only / new-control checkbox does not apply.
Control evidence
required: not applicableNot applicable. No control path change.
Checks
Signed-off-by.make test-driver ID=pixii— 110 passed, 13 skippedmake check— 4912 passed, 923 skippedmake package-driveris no longer a target in this repository; the package tree was removed, and pixii has no separate package target to update.