decline commands in wrong mode
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-11-21 16:35:34 +01:00
parent 1aef8b6973
commit 92bae9049f

View File

@ -198,6 +198,11 @@ ReturnValue_t FreshSupvHandler::initializeLocalDataPool(localpool::DataPool& loc
ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
using namespace supv;
// The SUPV does not have any action commands where there is no communication with the device
// involved.
if(mode != MODE_ON and mode != MODE_NORMAL) {
return HasModesIF::INVALID_MODE;
}
ReturnValue_t result;
if (uartManager->longerRequestActive()) {
return result::SUPV_HELPER_EXECUTING;
@ -238,8 +243,7 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI
default:
break;
}
// This might not be necessary, but I think the PLOC SUPV is not able to process multiple
// commands consecutively..
// The PLOC SUPV is not able to process multiple commands consecutively.
if (isCommandPending()) {
return HasActionsIF::IS_BUSY;
}