avoid faulty reply for STR special requests
This commit is contained in:
parent
ea606ce217
commit
8620bd0283
@ -125,6 +125,7 @@ ReturnValue_t StrComHandler::startImageUpload(std::string fullname) {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
|
replyWasReceived = false;
|
||||||
state = InternalState::UPLOAD_IMAGE;
|
state = InternalState::UPLOAD_IMAGE;
|
||||||
}
|
}
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
@ -151,6 +152,7 @@ ReturnValue_t StrComHandler::startImageDownload(std::string path) {
|
|||||||
downloadImage.path = path;
|
downloadImage.path = path;
|
||||||
{
|
{
|
||||||
MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
|
replyWasReceived = false;
|
||||||
state = InternalState::DOWNLOAD_IMAGE;
|
state = InternalState::DOWNLOAD_IMAGE;
|
||||||
}
|
}
|
||||||
terminate = false;
|
terminate = false;
|
||||||
@ -187,6 +189,7 @@ ReturnValue_t StrComHandler::startFirmwareUpdate(std::string fullname) {
|
|||||||
flashWrite.lastRegion = static_cast<uint8_t>(startracker::FirmwareRegions::LAST);
|
flashWrite.lastRegion = static_cast<uint8_t>(startracker::FirmwareRegions::LAST);
|
||||||
{
|
{
|
||||||
MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
|
replyWasReceived = false;
|
||||||
state = InternalState::FIRMWARE_UPDATE;
|
state = InternalState::FIRMWARE_UPDATE;
|
||||||
}
|
}
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
@ -216,6 +219,7 @@ ReturnValue_t StrComHandler::startFlashRead(std::string path, uint8_t startRegio
|
|||||||
flashRead.size = length;
|
flashRead.size = length;
|
||||||
{
|
{
|
||||||
MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
|
replyWasReceived = false;
|
||||||
state = InternalState::FLASH_READ;
|
state = InternalState::FLASH_READ;
|
||||||
}
|
}
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
|
Loading…
Reference in New Issue
Block a user