Skip to content

Commit

Permalink
moving add_stop_energy_wh (#737)
Browse files Browse the repository at this point in the history
Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried authored Aug 7, 2024
1 parent 01dba25 commit 8476c0d
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 8476c0d

Please sign in to comment.