more defensive buffer handling
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-08-15 18:53:25 +02:00
parent 458929957d
commit 232372fd96
6 changed files with 19 additions and 14 deletions

View File

@ -104,6 +104,7 @@ ReturnValue_t PlocMPSoCHelper::startFlashWrite(std::string obcFile, std::string
ReturnValue_t PlocMPSoCHelper::resetHelper() {
ReturnValue_t result = RETURN_OK;
semaphore.release();
spParams.buf = commandBuffer;
terminate = false;
result = uartComIF->flushUartRxBuffer(comCookie);
return result;
@ -162,6 +163,7 @@ ReturnValue_t PlocMPSoCHelper::performFlashWrite() {
ReturnValue_t PlocMPSoCHelper::flashfopen() {
ReturnValue_t result = RETURN_OK;
spParams.buf = commandBuffer;
(*sequenceCount)++;
mpsoc::FlashFopen flashFopen(spParams, *sequenceCount);
result = flashFopen.createPacket(flashWrite.mpsocFile, mpsoc::FlashFopen::APPEND);
@ -177,6 +179,7 @@ ReturnValue_t PlocMPSoCHelper::flashfopen() {
ReturnValue_t PlocMPSoCHelper::flashfclose() {
ReturnValue_t result = RETURN_OK;
spParams.buf = commandBuffer;
(*sequenceCount)++;
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
result = flashFclose.createPacket(flashWrite.mpsocFile);