diff --git a/linux/payload/PlocMpsocHandler.cpp b/linux/payload/PlocMpsocHandler.cpp index a8634f6a..dacc423f 100644 --- a/linux/payload/PlocMpsocHandler.cpp +++ b/linux/payload/PlocMpsocHandler.cpp @@ -110,8 +110,6 @@ void PlocMPSoCHandler::performOperationHook() { ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, const uint8_t* data, size_t size) { ReturnValue_t result = returnvalue::OK; - commandIsPending = true; - cmdCountdown.resetTimer(); switch (actionId) { case mpsoc::SET_UART_TX_TRISTATE: { uartIsolatorSwitch.pullLow(); @@ -169,6 +167,9 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI default: break; } + // For longer commands, do not set these. + commandIsPending = true; + cmdCountdown.resetTimer(); return DeviceHandlerBase::executeAction(actionId, commandedBy, data, size); } @@ -245,7 +246,7 @@ void PlocMPSoCHandler::doShutDown() { } ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { - if (not commandIsPending) { + if (not commandIsPending and not plocMPSoCHelperExecuting) { *id = mpsoc::TC_GET_HK_REPORT; commandIsPending = true; cmdCountdown.resetTimer();