avoid faulty reply for STR special requests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-04-13 12:35:56 +02:00
parent ea606ce217
commit 8620bd0283
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -125,6 +125,7 @@ ReturnValue_t StrComHandler::startImageUpload(std::string fullname) {
}
{
MutexGuard mg(lock);
replyWasReceived = false;
state = InternalState::UPLOAD_IMAGE;
}
semaphore.release();
@ -151,6 +152,7 @@ ReturnValue_t StrComHandler::startImageDownload(std::string path) {
downloadImage.path = path;
{
MutexGuard mg(lock);
replyWasReceived = false;
state = InternalState::DOWNLOAD_IMAGE;
}
terminate = false;
@ -187,6 +189,7 @@ ReturnValue_t StrComHandler::startFirmwareUpdate(std::string fullname) {
flashWrite.lastRegion = static_cast<uint8_t>(startracker::FirmwareRegions::LAST);
{
MutexGuard mg(lock);
replyWasReceived = false;
state = InternalState::FIRMWARE_UPDATE;
}
semaphore.release();
@ -216,6 +219,7 @@ ReturnValue_t StrComHandler::startFlashRead(std::string path, uint8_t startRegio
flashRead.size = length;
{
MutexGuard mg(lock);
replyWasReceived = false;
state = InternalState::FLASH_READ;
}
semaphore.release();