Skip to content

Commit

Permalink
Fix signed update firmware conversion
Browse files Browse the repository at this point in the history
retrieveDateTime is a required field, not optional

Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
  • Loading branch information
hikinggrass committed Oct 14, 2024
1 parent bcef5c4 commit f6ccd75
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/OCPP/OCPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,7 @@ void OCPP::ready() {
firmware_update_request.location = msg.firmware.location;
firmware_update_request.signature.emplace(msg.firmware.signature.get());
firmware_update_request.signing_certificate.emplace(msg.firmware.signingCertificate.get());

if (msg.firmware.retrieveDateTime.has_value()) {
firmware_update_request.retrieve_timestamp.emplace(msg.firmware.retrieveDateTime.value().to_rfc3339());
}
firmware_update_request.retrieve_timestamp.emplace(msg.firmware.retrieveDateTime.to_rfc3339());

if (msg.firmware.installDateTime.has_value()) {
firmware_update_request.install_timestamp.emplace(msg.firmware.installDateTime.value());
Expand Down

0 comments on commit f6ccd75

Please sign in to comment.