diff --git a/linux/devices/startracker/ArcsecDatalinkLayer.cpp b/linux/devices/startracker/ArcsecDatalinkLayer.cpp index bc45d619..c7f1144e 100644 --- a/linux/devices/startracker/ArcsecDatalinkLayer.cpp +++ b/linux/devices/startracker/ArcsecDatalinkLayer.cpp @@ -49,7 +49,7 @@ uint8_t ArcsecDatalinkLayer::getReplyFrameType() { return decodedFrame[0]; } const uint8_t* ArcsecDatalinkLayer::getReply() { return &decodedFrame[1]; } -void ArcsecDatalinkLayer::encodeFrame(const uint8_t* data, uint32_t length) { +void ArcsecDatalinkLayer::encodeFrame(const uinah uint32_t length) { arc_transport_encode_body(data, length, encBuffer, &encFrameSize); } diff --git a/linux/devices/startracker/StarTrackerHandler.cpp b/linux/devices/startracker/StarTrackerHandler.cpp index 30971d5b..6e57f5d5 100644 --- a/linux/devices/startracker/StarTrackerHandler.cpp +++ b/linux/devices/startracker/StarTrackerHandler.cpp @@ -129,7 +129,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu break; } - if (strHelperExecuting == true) { + if (strHelperHandlingSpecialRequest == true) { return STR_HELPER_EXECUTING; } @@ -157,7 +157,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu if (result != returnvalue::OK) { return result; } - strHelperExecuting = true; + strHelperHandlingSpecialRequest = true; return EXECUTION_FINISHED; } case (startracker::DOWNLOAD_IMAGE): { @@ -173,7 +173,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu if (result != returnvalue::OK) { return result; } - strHelperExecuting = true; + strHelperHandlingSpecialRequest = true; return EXECUTION_FINISHED; } case (startracker::FLASH_READ): { @@ -185,7 +185,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu if (result != returnvalue::OK) { return result; } - strHelperExecuting = true; + strHelperHandlingSpecialRequest = true; return EXECUTION_FINISHED; } case (startracker::CHANGE_IMAGE_DOWNLOAD_FILE): { @@ -215,7 +215,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu if (result != returnvalue::OK) { return result; } - strHelperExecuting = true; + strHelperHandlingSpecialRequest = true; return EXECUTION_FINISHED; } default: @@ -283,6 +283,9 @@ void StarTrackerHandler::doShutDown() { } ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { + if (strHelperHandlingSpecialRequest) { + return NOTHING_TO_SEND; + } switch (normalState) { case NormalState::TEMPERATURE_REQUEST: *id = startracker::REQ_TEMPERATURE; @@ -1296,7 +1299,7 @@ size_t StarTrackerHandler::getNextReplyLength(DeviceCommandId_t commandId) { ReturnValue_t StarTrackerHandler::doSendReadHook() { // Prevent DHB from polling UART during commands executed by the image loader task - if (strHelperExecuting) { + if (strHelperHandlingSpecialRequest) { return returnvalue::FAILED; } return returnvalue::OK; @@ -1538,7 +1541,7 @@ void StarTrackerHandler::handleEvent(EventMessage* eventMessage) { case objects::STR_HELPER: { // All events from image loader signal either that the operation was successful or that it // failed - strHelperExecuting = false; + strHelperHandlingSpecialRequest = false; break; } default: diff --git a/linux/devices/startracker/StarTrackerHandler.h b/linux/devices/startracker/StarTrackerHandler.h index cd5e0a82..692ba7e1 100644 --- a/linux/devices/startracker/StarTrackerHandler.h +++ b/linux/devices/startracker/StarTrackerHandler.h @@ -291,7 +291,7 @@ class StarTrackerHandler : public DeviceHandlerBase { InternalState internalState = InternalState::IDLE; - bool strHelperExecuting = false; + bool strHelperHandlingSpecialRequest = false; const power::Switch_t powerSwitch = power::NO_SWITCH;