Skip to content

Commit

Permalink
Send InstallScheduled if firmware is to be installed during active tr…
Browse files Browse the repository at this point in the history
…ansactions

Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass committed Nov 23, 2023
1 parent a79d3bb commit 398ae8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ void ChargePoint::on_firmware_update_status_notification(int32_t request_id,
}

if (this->firmware_status_before_installing == req.status) {
const auto transaction_active = this->any_transaction_active(std::nullopt);
if (transaction_active) {
this->firmware_status = FirmwareStatusEnum::InstallScheduled;
req.status = firmware_status;
ocpp::Call<FirmwareStatusNotificationRequest> call(req, this->message_queue->createMessageId());
this->send_async<FirmwareStatusNotificationRequest>(call);
}
this->change_all_connectors_to_unavailable_for_firmware_update();
}
}
Expand Down

0 comments on commit 398ae8c

Please sign in to comment.