Skip to content

Commit

Permalink
Fix dropped FirmwareStatusNotification::Installed message (refs EVERE…
Browse files Browse the repository at this point in the history
…ST-1175)

The variable to publish FirmwareStatusNotification::Installed message is
now delayed, because the message is dropped in case the OCPP client is
not connected or the OCPP module is not yet subscribed to the variable.
This is only a temporary solution as long as the
reported issues (EVerest/libocpp#758,
EVerest/everest-core#841) are not fixed.

Signed-off-by: Fabian Hartung <fabian.hartung@chargebyte.com>
  • Loading branch information
FaHaGit committed Sep 4, 2024
1 parent 2c12c9d commit da46425
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/CbSystem/main/systemImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ static std::string get_partition(PartitionType part_type) {
}

void systemImpl::ready() {
// TODO: Remove this sleep when fix of the issues (ref: https://github.com/EVerest/libocpp/issues/758,
// https://github.com/EVerest/everest-core/issues/841) are implemented
sleep(20);
check_update_marker();
}

Expand Down
4 changes: 4 additions & 0 deletions modules/CbSystem/main/systemImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ class systemImpl : public systemImplBase {
void install_signed_firmware(const types::system::FirmwareUpdateRequest& firmware_update_reqeust,
const std::filesystem::path& firmware_file_path);

/**
* @brief Checks if the firmware update marker is present and if so,
* notify the upper layer that the firmware update was successfuly installed.
*/
void check_update_marker();
// ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1
};
Expand Down

0 comments on commit da46425

Please sign in to comment.