From e6f55ba2c1466d93a72a58aa5ba715c268b07ff0 Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L15 Date: Thu, 12 May 2022 14:04:55 +0200 Subject: [PATCH] increased execution timeout of prepare update command --- bsp_q7s/core/CoreController.cpp | 10 +++++----- linux/devices/ploc/PlocSupvHelper.cpp | 6 +++--- linux/devices/ploc/PlocSupvHelper.h | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 208999c2..0d166600 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -1708,11 +1708,11 @@ ReturnValue_t CoreController::timeFileHandler() { } std::string fileName = currMntPrefix + TIME_FILE; std::ofstream timeFile(fileName); - if (not timeFile.good()) { - sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) - << std::endl; - return RETURN_FAILED; - } +// if (not timeFile.good()) { +// sif::error << "CoreController::timeFileHandler: Error opening time file: " << strerror(errno) +// << std::endl; +// return RETURN_FAILED; +// } timeFile << "UNIX SECONDS: " << currentTime.tv_sec << std::endl; } return RETURN_OK; diff --git a/linux/devices/ploc/PlocSupvHelper.cpp b/linux/devices/ploc/PlocSupvHelper.cpp index 2e483b7e..c5214ca6 100644 --- a/linux/devices/ploc/PlocSupvHelper.cpp +++ b/linux/devices/ploc/PlocSupvHelper.cpp @@ -233,7 +233,7 @@ ReturnValue_t PlocSupvHelper::performEventBufferRequest() { ReturnValue_t PlocSupvHelper::prepareUpdate() { ReturnValue_t result = RETURN_OK; supv::ApidOnlyPacket packet(supv::APID_PREPARE_UPDATE); - result = handlePacketTransmission(packet); + result = handlePacketTransmission(packet, PREPARE_UPDATE_EXECUTION_REPORT); if (result != RETURN_OK) { return result; } @@ -342,8 +342,8 @@ ReturnValue_t PlocSupvHelper::handleTmReception(supv::TmPacket* tmPacket, size_t } } if (remainingBytes != 0) { - sif::warning << "PlocSupvHelper::handleTmReception: Failed to read " << remainingBytes - << " bytes" << std::endl; + sif::warning << "PlocSupvHelper::handleTmReception: Failed to read " << std::dec + << remainingBytes << " bytes" << std::endl; return RETURN_FAILED; } result = tmPacket->checkCrc(); diff --git a/linux/devices/ploc/PlocSupvHelper.h b/linux/devices/ploc/PlocSupvHelper.h index e4f0d40a..cf433ca8 100644 --- a/linux/devices/ploc/PlocSupvHelper.h +++ b/linux/devices/ploc/PlocSupvHelper.h @@ -128,6 +128,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha static const size_t SIZE_EVENT_BUFFER_FULL_PACKET = 1024; static const size_t SIZE_EVENT_BUFFER_LAST_PACKET = 200; static const uint32_t CRC_EXECUTION_TIMEOUT = 60000; + static const uint32_t PREPARE_UPDATE_EXECUTION_REPORT = 2000; struct Update { uint8_t memoryId;