passivate normal mode for special requests
This commit is contained in:
parent
bb0c4ac03e
commit
b9cf144c1f
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user