Skip to content

EVCC: fix DCPreCharge finished transition#64

Open
barsnick wants to merge 1 commit into
everestfrom
everest-fix-DCPreCharge-to-PowerSupply
Open

EVCC: fix DCPreCharge finished transition#64
barsnick wants to merge 1 commit into
everestfrom
everest-fix-DCPreCharge-to-PowerSupply

Conversation

@barsnick

Copy link
Copy Markdown

The EV-side DCPreCharge state tracked completion on the state instance, while the first precharge request was created by the preceding cable-check state. This allowed the EVProcessing state to get out of sync and let PowerDelivery start without first sending a final DCPreChargeReq with EVProcessing set to Finished.

Describe your changes

Track the sent Finished precharge request at session scope, reset it when entering DCPreCharge, force the initial precharge request to Ongoing, and only transition to PowerDelivery after the SECC has answered the Finished DCPreChargeReq.

Note: I'm not sure why the previous PRs #59 and #60 did not fix this, even though they say so.

Issue ticket number and link

Related to issue EVerest/EVerest#2305 and PR EVerest/EVerest#2312
Amends or fixes PR #59

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

The EV-side DCPreCharge state tracked completion on the state instance,
while the first precharge request was created by the preceding cable-check
state. This allowed the EVProcessing state to get out of sync and let
PowerDelivery start without first sending a final DCPreChargeReq with
EVProcessing set to Finished.

Track the sent Finished precharge request at session scope, reset it when
entering DCPreCharge, force the initial precharge request to Ongoing, and
only transition to PowerDelivery after the SECC has answered the Finished
DCPreChargeReq.

Signed-off-by: Moritz Barsnick <moritz.barsnick@chargebyte.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -4 complexity · 0 duplication

Metric Results
Complexity -4
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@SebaLukas SebaLukas self-requested a review June 17, 2026 05:29
@SebaLukas SebaLukas self-assigned this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants