PLOC SUPV update 2 #324

Merged
muellerr merged 10 commits from mueller/tas_ploc_supv_update_2 into develop 2022-11-24 14:48:23 +01:00
2 changed files with 8 additions and 5 deletions
Showing only changes of commit 6766395f44 - Show all commits

View File

@ -1154,8 +1154,11 @@ class WriteMemory : public TcBase {
} }
spParams.creator.setSeqFlags(seqFlags); spParams.creator.setSeqFlags(seqFlags);
spParams.creator.setSeqCount(sequenceCount); spParams.creator.setSeqCount(sequenceCount);
initPacket(memoryId, startAddress, length, updateData); auto res = initPacket(memoryId, startAddress, length, updateData);
auto res = checkSizeAndSerializeHeader(); if (res != returnvalue::OK) {
return res;
}
res = checkSizeAndSerializeHeader();
if (res != returnvalue::OK) { if (res != returnvalue::OK) {
return res; return res;
} }
@ -1182,7 +1185,7 @@ class WriteMemory : public TcBase {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
size_t serializedSize = 6; size_t serializedSize = MIN_TMTC_LEN;
SerializeAdapter::serialize(&memoryId, &data, &serializedSize, spParams.maxSize, SerializeAdapter::serialize(&memoryId, &data, &serializedSize, spParams.maxSize,
SerializeIF::Endianness::BIG); SerializeIF::Endianness::BIG);
SerializeAdapter::serialize(&n, &data, &serializedSize, spParams.maxSize, SerializeAdapter::serialize(&n, &data, &serializedSize, spParams.maxSize,

View File

@ -429,7 +429,7 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
update.bytesWritten); update.bytesWritten);
return result; return result;
} }
result = handlePacketTransmissionNoReply(packet, 2000); result = handlePacketTransmissionNoReply(packet, 5000);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount), triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
update.bytesWritten); update.bytesWritten);
@ -443,7 +443,7 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1 #if OBSW_DEBUG_PLOC_SUPERVISOR == 1
progressPrinter.print(update.bytesWritten); progressPrinter.print(update.bytesWritten);
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */ #endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
TaskFactory::delayTask(1); // TaskFactory::delayTask(1);
} }
return result; return result;
} }