minor improvements for PLOC SUPV update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-11-21 17:55:56 +01:00
parent c1e92605d4
commit 9953a49b09
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 8 additions and 8 deletions

View File

@ -314,17 +314,17 @@ void PlocSupvUartManager::executeFullCheckMemoryCommand() {
sif::info << "PLOC SUPV Mem Check: Selecting Memory" << std::endl; sif::info << "PLOC SUPV Mem Check: Selecting Memory" << std::endl;
result = selectMemory(); result = selectMemory();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
triggerEvent(SUPV_MEM_CHECK_FAIL, result); triggerEvent(SUPV_MEM_CHECK_FAIL, result, 1);
return; return;
} }
sif::info << "PLOC SUPV Mem Check: Preparing Update" << std::endl; sif::info << "PLOC SUPV Mem Check: Preparing Update" << std::endl;
result = prepareUpdate(); result = prepareUpdate();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
triggerEvent(SUPV_MEM_CHECK_FAIL, result); triggerEvent(SUPV_MEM_CHECK_FAIL, result, 2);
return; return;
} }
sif::info << "PLOC SUPV Mem Check: Memory Check" << std::endl; sif::info << "PLOC SUPV Mem Check: Memory Check" << std::endl;
handleCheckMemoryCommand(); handleCheckMemoryCommand(3);
} }
ReturnValue_t PlocSupvUartManager::executeUpdate() { ReturnValue_t PlocSupvUartManager::executeUpdate() {
@ -369,7 +369,7 @@ ReturnValue_t PlocSupvUartManager::updateOperation() {
return result; return result;
} }
sif::info << "PlocSupvHelper::performUpdate: Memory Check" << std::endl; sif::info << "PlocSupvHelper::performUpdate: Memory Check" << std::endl;
return handleCheckMemoryCommand(); return handleCheckMemoryCommand(0);
} }
ReturnValue_t PlocSupvUartManager::writeUpdatePackets() { ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
@ -733,7 +733,7 @@ ReturnValue_t PlocSupvUartManager::calcImageCrc() {
return result; return result;
} }
ReturnValue_t PlocSupvUartManager::handleCheckMemoryCommand() { ReturnValue_t PlocSupvUartManager::handleCheckMemoryCommand(uint8_t failStep) {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
resetSpParams(); resetSpParams();
supv::CheckMemory tcPacket(spParams); supv::CheckMemory tcPacket(spParams);
@ -803,7 +803,7 @@ ReturnValue_t PlocSupvUartManager::handleCheckMemoryCommand() {
<< std::setfill('0') << std::hex << std::setw(4) << std::setfill('0') << std::hex << std::setw(4)
<< static_cast<uint16_t>(update.crc) << " but received CRC 0x" << std::setw(4) << static_cast<uint16_t>(update.crc) << " but received CRC 0x" << std::setw(4)
<< report.getCrc() << std::dec << std::endl; << report.getCrc() << std::dec << std::endl;
triggerEvent(SUPV_MEM_CHECK_FAIL, result); triggerEvent(SUPV_MEM_CHECK_FAIL, result, failStep);
} }
} }
} }

View File

@ -298,7 +298,7 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
// Calculates CRC over image. Will be used for verification after update writing has // Calculates CRC over image. Will be used for verification after update writing has
// finished. // finished.
ReturnValue_t calcImageCrc(); ReturnValue_t calcImageCrc();
ReturnValue_t handleCheckMemoryCommand(); ReturnValue_t handleCheckMemoryCommand(uint8_t failStep);
ReturnValue_t exeReportHandling(); ReturnValue_t exeReportHandling();
/** /**
* @brief Return size of file with name filename * @brief Return size of file with name filename

2
tmtc

@ -1 +1 @@
Subproject commit f5766ea419ff2213468dab7e19a81075aefd1ad9 Subproject commit ac2b9cb712405ee07b9de1950fd6c923a6f184b5