Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/bsp stop transaction #733

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions interfaces/evse_board_support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,9 @@ vars:
need to be implemented and the returned value is not used in those cases.
type: object
$ref: /board_support_common#/ProximityPilot
request_stop_transaction:
description: Publish to stop the transaction gracefully (e.g. user pressed the stop button)
type: object
$ref: /evse_manager#/StopTransactionRequest
errors:
- reference: /errors/evse_board_support
3 changes: 3 additions & 0 deletions modules/EvseManager/EvseManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ void EvseManager::init() {
[this](const auto& caps) { update_powersupply_capabilities(caps); });
}
}

r_bsp->subscribe_request_stop_transaction(
[this](types::evse_manager::StopTransactionRequest r) { charger->cancel_transaction(r); });
}

void EvseManager::ready() {
Expand Down
Loading