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

Fix issue with signed meter values for resumed transactions in OCPP1.6 #737

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
2 changes: 1 addition & 1 deletion lib/ocpp/v16/charge_point_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ void ChargePointImpl::try_resume_transactions(const std::set<std::string>& resum
}

const auto stop_energy_wh = std::make_shared<StampedEnergyWh>(timestamp, meter_stop);
transaction->add_stop_energy_wh(stop_energy_wh);
transaction->set_transaction_id(transaction_entry.transaction_id);
// we need this in order to handle a StartTransaction.conf
transaction->set_start_transaction_message_id(transaction_entry.start_transaction_message_id);
Expand All @@ -409,6 +408,7 @@ void ChargePointImpl::try_resume_transactions(const std::set<std::string>& resum
EVLOG_info << "Queuing StopTransaction.req for transaction with id: "
<< transaction_entry.transaction_id
<< " because it hasn't been acknowledged by CSMS and shall not be resumed.";
transaction->add_stop_energy_wh(stop_energy_wh);
this->stop_transaction(transaction_entry.connector, Reason::PowerLoss, std::nullopt);
} else {
EVLOG_info << "Resuming transaction with transaction id: " << transaction_entry.transaction_id;
Expand Down
Loading