Repository navigation
Conversation
Every read went through a guard that left a register alone until restart after three misses, and the model block (816) was read first in each poll. A charger, or its Modbus TCP to RTU gateway, that was off, restarting or held by another client at start-up used up every try while answering nothing. The driver then sent nothing and never set the model until FTW restarted it. A miss now counts only in a poll where another read answered, and a register that misses three times on a charger that does answer is asked again every five minutes. A reply counts only when every word asked for came back. The model is read last, once the charger has answered in that poll. The ev stream still goes out only when the order (100) or the car state (139) answered. driver_command and driver_default_mode are unchanged. test_schrack_ev_wakes.py fails on 1.1.0 (10 of 11 cases; the eleventh checks fields left out, which 1.1.0 already did) and passes on 1.1.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review Summary: ✅ CompletedThis 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. |
This branch has not been deployed
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.
Problem
schrack_ev 1.1.0 read every register through
probe_read, which leaves a register alone until restart after three misses. It read the model block (816, 32 words: device name and firmware) first in each poll, then the order (100), void and status (120), offered current (126), CP state (139) and error word (150).A charger, or the Modbus TCP to RTU gateway in front of it, that was off, restarting or held by another client when FTW started used up every try while answering nothing. The driver then sent nothing and never set the model until FTW restarted it.
Change
driver_cleanupresets the model flag and the new poll state.driver_commandanddriver_default_modewrite as before and read nothing. The ev stream still goes out only when the order (100) or the car state (139) answered.Test evidence
test_schrack_ev_wakes.py, eleven tests. Ten fail on 1.1.0 and all pass on 1.1.1:test_wakes_after_silence.lua(shared with the other PRs in this series): silent from start-up, silent mid-session, each register refused six times;test_schrack_ev_control.pypasses unchanged.make test-driver ID=schrack_ev: 52 passed, 14 skipped.make absent-register-report ID=schrack_ev: every address settles.make invented-number-report ID=schrack_ev: none. The driver was not in the baseline.make check: 5585 passed, 927 skipped.Not yet verified
experimentalas before.CHANGELOG.mdanddrivers/tests/lua_harness/test_wakes_after_silence.luaare shared with the other PRs in this series; whichever merges later needs a rebase there.drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code