feat(EvseManager)!: restructure charging state machine to simplify pause/resume and remove replug#1790
Open
corneliusclaussen wants to merge 3 commits intomainfrom
Open
feat(EvseManager)!: restructure charging state machine to simplify pause/resume and remove replug#1790corneliusclaussen wants to merge 3 commits intomainfrom
corneliusclaussen wants to merge 3 commits intomainfrom
Conversation
963841d to
d287068
Compare
Contributor
|
evse_replug cmd is still in the EvseBoardSupport interface. Shouldn't we just remove it if no one is using it anymore? |
Contributor
Yes I guess we will eventually remove it. This PR is still an early draft |
bc8c99d to
b2942cf
Compare
b2942cf to
43905b8
Compare
afed9ab to
3bbc287
Compare
3bbc287 to
ef9d73c
Compare
0bab031 to
b36221e
Compare
6730bb3 to
367254c
Compare
ea171f4 to
9481e08
Compare
This was
linked to
issues
Feb 27, 2026
Open
…ause/resume and remove replug Remove WaitingForEnergy, Replug states and related session events (ChargingResumed, ReplugStarted, ReplugFinished, WaitingForEnergy). Consolidate pause handling into ChargingPausedEVSE with reason tracking (Error, NoEnergy, UserPause) via new PauseChargingEVSEReasonEnum. Key changes in Charger state machine: - Replace WaitingForEnergy state with direct transitions through ChargingPausedEVSE, which now reports multiple concurrent reasons - Remove evse_replug command from BSP interface and all implementations - Remove EvseReplugStarted/Finished events from board_support_common - Add configurable hlc_charge_loop_without_energy_timeout_s for ISO sessions to handle no-energy scenarios gracefully in charge loop - Add dc_ramp_ampere_per_second config for DC current ramping - Change zero_power_ignore_pause default to true for better EV compatibility - Introduce StoppingCharging as proper transitional state that waits for contactor open before moving to paused or finished states - Use atomic flags (flag_authorized, flag_transaction_active, flag_ev_plugged_in, flag_paused_by_evse) for thread-safe state BREAKING CHANGE: Removes WaitingForEnergy, ChargingResumed, ReplugStarted, ReplugFinished session events and evse_replug BSP command. Consumers must handle ChargingPausedEVSE with reason tracking instead. Smoke tests: - Add pause/resume session commands to test controller interface - Add comprehensive smoke tests for pause/resume and no-energy scenarios - Remove deprecated startup_tests.py in favor of new probe-based tests Signed-off-by: Piet Gömpel <pietgoempel@gmail.com> Signed-off-by: Cornelius Claussen <cc@pionix.de> Signed-off-by: Sebastian Lukas <sebastian.lukas@pionix.de>
9481e08 to
cdf3ce6
Compare
Contributor
|
@barsnick Could you please review the changes in the RpcApi module? Unless you plan to find a workaround, the changes are breaking because we removed the |
Signed-off-by: Piet Gömpel <pietgoempel@gmail.com>
Contributor
|
I'll have a look. |
Signed-off-by: Sebastian Lukas <sebastian.lukas@pionix.de>
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.
Describe your changes
Remove WaitingForEnergy, Replug states and related session events (ChargingResumed, ReplugStarted, ReplugFinished, WaitingForEnergy). Consolidate pause handling into ChargingPausedEVSE with reason tracking
(Error, NoEnergy, UserPause) via new PauseChargingEVSEReasonEnum.
Key changes in Charger state machine:
BREAKING CHANGE: Removes WaitingForEnergy, ChargingResumed, ReplugStarted, ReplugFinished session events and evse_replug BSP command. Consumers must handle ChargingPausedEVSE with reason tracking instead.
Behavioral changes:
zero_power_ignore_pausehas been changed totruebecause this is more compatible with real EVs. With this configuration parameter beingtrueDC sessions will reach the charge loop in case no energy is available before the session is stopped by the EVSE afterhlc_charge_loop_without_energy_timeout_sSmoke tests:
These changes have been verified within the following test scenarios with real EVs for basic charging, ISO15118-2 AC and DC
NOTE: The main changes of this PR are located in
Charger.cpp/hppandEvseManager.cpp/hpp. Most of changes in the other files are due to the removed types, vars and interface commands.Issue ticket number and link
Checklist before requesting a review