diff --git a/mission/acs/str/StarTrackerHandler.cpp b/mission/acs/str/StarTrackerHandler.cpp index 79f29a7f..9ad70d41 100644 --- a/mission/acs/str/StarTrackerHandler.cpp +++ b/mission/acs/str/StarTrackerHandler.cpp @@ -88,7 +88,6 @@ void StarTrackerHandler::doStartUp() { startupState = StartupState::WAIT_JCFG; return; } - startupState = StartupState::IDLE; break; case StartupState::WAIT_JCFG: { return; @@ -348,17 +347,16 @@ void StarTrackerHandler::performOperationHook() { } if (jcfgPending) { if (JCFG_DONE) { - sif::debug << "jcfg fucking done" << std::endl; + if(startupState == StartupState::WAIT_JCFG) { + startupState = StartupState::DONE; + } jsonCfgTask.join(); jcfgPending = false; - JCFG_DONE = false; auto iter = deviceCommandMap.find(startracker::RELOAD_JSON_CFG_FILE); if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != MessageQueueIF::NO_QUEUE) { - sif::debug << "jcfg sending finished" << std::endl; actionHelper.finish(true, iter->second.sendReplyTo, startracker::RELOAD_JSON_CFG_FILE); } } else if (jcfgCountdown.hasTimedOut()) { - JCFG_DONE = false; auto iter = deviceCommandMap.find(startracker::RELOAD_JSON_CFG_FILE); if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != MessageQueueIF::NO_QUEUE) { actionHelper.finish(false, iter->second.sendReplyTo, startracker::RELOAD_JSON_CFG_FILE);