integrated log level, log suscription and debug camera parameter setting in startup routine
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
1e40013210
commit
b1973f77f7
@ -266,7 +266,7 @@ void StarTrackerHandler::doStartUp() {
|
|||||||
return;
|
return;
|
||||||
case StartupState::BOOT_DELAY:
|
case StartupState::BOOT_DELAY:
|
||||||
if (bootCountdown.hasTimedOut()) {
|
if (bootCountdown.hasTimedOut()) {
|
||||||
startupState = StartupState::LIMITS;
|
startupState = StartupState::LOGLEVEL;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case StartupState::DONE:
|
case StartupState::DONE:
|
||||||
@ -313,6 +313,11 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t
|
|||||||
bootCountdown.setTimeout(BOOT_TIMEOUT);
|
bootCountdown.setTimeout(BOOT_TIMEOUT);
|
||||||
startupState = StartupState::BOOT_DELAY;
|
startupState = StartupState::BOOT_DELAY;
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
case StartupState::LOGLEVEL:
|
||||||
|
startupState = StartupState::WAIT_FOR_EXECUTION;
|
||||||
|
*id = StarTracker::LOGLEVEL;
|
||||||
|
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||||
|
paramJsonFile.size());
|
||||||
case StartupState::LIMITS:
|
case StartupState::LIMITS:
|
||||||
startupState = StartupState::WAIT_FOR_EXECUTION;
|
startupState = StartupState::WAIT_FOR_EXECUTION;
|
||||||
*id = StarTracker::LIMITS;
|
*id = StarTracker::LIMITS;
|
||||||
@ -363,6 +368,16 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t
|
|||||||
*id = StarTracker::ALGO;
|
*id = StarTracker::ALGO;
|
||||||
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||||
paramJsonFile.size());
|
paramJsonFile.size());
|
||||||
|
case StartupState::LOG_SUBSCRIPTION:
|
||||||
|
startupState = StartupState::WAIT_FOR_EXECUTION;
|
||||||
|
*id = StarTracker::LOGSUBSCRIPTION;
|
||||||
|
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||||
|
paramJsonFile.size());
|
||||||
|
case StartupState::DEBUG_CAMERA:
|
||||||
|
startupState = StartupState::WAIT_FOR_EXECUTION;
|
||||||
|
*id = StarTracker::DEBUG_CAMERA;
|
||||||
|
return buildCommandFromCommand(*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()),
|
||||||
|
paramJsonFile.size());
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2422,6 +2437,10 @@ ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dat
|
|||||||
|
|
||||||
void StarTrackerHandler::handleStartup(const uint8_t* parameterId) {
|
void StarTrackerHandler::handleStartup(const uint8_t* parameterId) {
|
||||||
switch (*parameterId) {
|
switch (*parameterId) {
|
||||||
|
case (StarTracker::ID::LOG_LEVEL): {
|
||||||
|
startupState = StartupState::LIMITS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case (StarTracker::ID::LIMITS): {
|
case (StarTracker::ID::LIMITS): {
|
||||||
startupState = StartupState::TRACKING;
|
startupState = StartupState::TRACKING;
|
||||||
break;
|
break;
|
||||||
@ -2459,6 +2478,14 @@ void StarTrackerHandler::handleStartup(const uint8_t* parameterId) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (StarTracker::ID::ALGO): {
|
case (StarTracker::ID::ALGO): {
|
||||||
|
startupState = StartupState::LOG_SUBSCRIPTION;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (StarTracker::ID::LOG_SUBSCRIPTION): {
|
||||||
|
startupState = StartupState::DEBUG_CAMERA;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (StarTracker::ID::DEBUG_CAMERA): {
|
||||||
startupState = StartupState::DONE;
|
startupState = StartupState::DONE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -296,6 +296,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
|||||||
CHECK_BOOT_STATE,
|
CHECK_BOOT_STATE,
|
||||||
BOOT,
|
BOOT,
|
||||||
BOOT_DELAY,
|
BOOT_DELAY,
|
||||||
|
LOGLEVEL,
|
||||||
LIMITS,
|
LIMITS,
|
||||||
TRACKING,
|
TRACKING,
|
||||||
MOUNTING,
|
MOUNTING,
|
||||||
@ -307,6 +308,8 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
|||||||
MATCHING,
|
MATCHING,
|
||||||
VALIDATION,
|
VALIDATION,
|
||||||
ALGO,
|
ALGO,
|
||||||
|
LOG_SUBSCRIPTION,
|
||||||
|
DEBUG_CAMERA,
|
||||||
WAIT_FOR_EXECUTION,
|
WAIT_FOR_EXECUTION,
|
||||||
DONE
|
DONE
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user