Fix cable check race condition causing permanent charger inoperability (#1392)#1900
Open
rishabhvaish wants to merge 2 commits intoEVerest:mainfrom
Open
Fix cable check race condition causing permanent charger inoperability (#1392)#1900rishabhvaish wants to merge 2 commits intoEVerest:mainfrom
rishabhvaish wants to merge 2 commits intoEVerest:mainfrom
Conversation
63b2146 to
a5fcb64
Compare
Member
|
Please resolve the conflicts before we can review your changes (updating your branch to latest main). |
a5fcb64 to
fe1fcfd
Compare
…erability When a car is unplugged during DC cable check, the detached cable_check thread can call fail_cable_check() after clear_errors_on_unplug() has already run, leaving MREC11CableCheckFault permanently raised. This makes the charger inoperative until EVerest is restarted. Add a state check before raising the fault: if the session has already ended (Idle or Finished state), log the failure but skip raising the error. Fixes EVerest#1392 Signed-off-by: Rishabh Vaish <rishabhvaish.904@gmail.com>
fe1fcfd to
5bf6514
Compare
SebaLukas
reviewed
Mar 4, 2026
Comment on lines
2552
to
2558
Member
There was a problem hiding this comment.
Can you add your changes to this check. In your case if current_state is not Idle or Finished the error should be raised
Author
There was a problem hiding this comment.
Good point — folded the Idle/Finished check into the existing raise_cable_check_fault guard in 71707f2 instead of the separate early return.
…ault guard Merge the unplug state check into the same conditional block that guards raise_cable_check_fault(), instead of a separate early return. Signed-off-by: Rishabh Vaish <rishabhvaish.904@gmail.com>
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
cable_checkthread and unplug handling in the state machinefail_cable_check()afterclear_errors_on_unplug()has already runMREC11CableCheckFaultpermanently raised, making the charger inoperative until EVerest is restartedIdleorFinished) before raising the cable check fault errorFiles changed
modules/EVSE/EvseManager/EvseManager.cpp— added state check infail_cable_check()before raising errorTest plan
MREC11CableCheckFaultFixes #1392