chonky #670

Merged
muellerr merged 278 commits from v3.0.0-dev into main 2023-06-11 14:25:21 +02:00
Showing only changes of commit ae6b5b491b - Show all commits

View File

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