Variable STR CFG path #824

Merged
muellerr merged 7 commits from str-variable-cfg-path-q7s into main 2023-11-29 14:09:10 +01:00
Showing only changes of commit 518b265b4a - Show all commits

View File

@ -88,7 +88,6 @@ void StarTrackerHandler::doStartUp() {
startupState = StartupState::WAIT_JCFG; startupState = StartupState::WAIT_JCFG;
return; return;
} }
startupState = StartupState::IDLE;
break; break;
case StartupState::WAIT_JCFG: { case StartupState::WAIT_JCFG: {
return; return;
@ -348,17 +347,16 @@ void StarTrackerHandler::performOperationHook() {
} }
if (jcfgPending) { if (jcfgPending) {
if (JCFG_DONE) { if (JCFG_DONE) {
sif::debug << "jcfg fucking done" << std::endl; if(startupState == StartupState::WAIT_JCFG) {
startupState = StartupState::DONE;
}
jsonCfgTask.join(); jsonCfgTask.join();
jcfgPending = false; jcfgPending = false;
JCFG_DONE = false;
auto iter = deviceCommandMap.find(startracker::RELOAD_JSON_CFG_FILE); auto iter = deviceCommandMap.find(startracker::RELOAD_JSON_CFG_FILE);
if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != MessageQueueIF::NO_QUEUE) { 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); actionHelper.finish(true, iter->second.sendReplyTo, startracker::RELOAD_JSON_CFG_FILE);
} }
} else if (jcfgCountdown.hasTimedOut()) { } else if (jcfgCountdown.hasTimedOut()) {
JCFG_DONE = false;
auto iter = deviceCommandMap.find(startracker::RELOAD_JSON_CFG_FILE); auto iter = deviceCommandMap.find(startracker::RELOAD_JSON_CFG_FILE);
if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != MessageQueueIF::NO_QUEUE) { if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != MessageQueueIF::NO_QUEUE) {
actionHelper.finish(false, iter->second.sendReplyTo, startracker::RELOAD_JSON_CFG_FILE); actionHelper.finish(false, iter->second.sendReplyTo, startracker::RELOAD_JSON_CFG_FILE);