diff --git a/linux/devices/startracker/StarTrackerHandler.cpp b/linux/devices/startracker/StarTrackerHandler.cpp index 9324458c..83776d2d 100644 --- a/linux/devices/startracker/StarTrackerHandler.cpp +++ b/linux/devices/startracker/StarTrackerHandler.cpp @@ -266,7 +266,7 @@ void StarTrackerHandler::doStartUp() { return; case StartupState::BOOT_DELAY: if (bootCountdown.hasTimedOut()) { - startupState = StartupState::LIMITS; + startupState = StartupState::LOGLEVEL; } return; case StartupState::DONE: @@ -313,6 +313,11 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t bootCountdown.setTimeout(BOOT_TIMEOUT); startupState = StartupState::BOOT_DELAY; return buildCommandFromCommand(*id, nullptr, 0); + case StartupState::LOGLEVEL: + startupState = StartupState::WAIT_FOR_EXECUTION; + *id = StarTracker::LOGLEVEL; + return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), + paramJsonFile.size()); case StartupState::LIMITS: startupState = StartupState::WAIT_FOR_EXECUTION; *id = StarTracker::LIMITS; @@ -363,6 +368,16 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id = StarTracker::ALGO; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); + case StartupState::LOG_SUBSCRIPTION: + startupState = StartupState::WAIT_FOR_EXECUTION; + *id = StarTracker::LOGSUBSCRIPTION; + return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), + paramJsonFile.size()); + case StartupState::DEBUG_CAMERA: + startupState = StartupState::WAIT_FOR_EXECUTION; + *id = StarTracker::DEBUG_CAMERA; + return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), + paramJsonFile.size()); default: break; } @@ -2422,6 +2437,10 @@ ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dat void StarTrackerHandler::handleStartup(const uint8_t* parameterId) { switch (*parameterId) { + case (StarTracker::ID::LOG_LEVEL): { + startupState = StartupState::LIMITS; + break; + } case (StarTracker::ID::LIMITS): { startupState = StartupState::TRACKING; break; @@ -2459,6 +2478,14 @@ void StarTrackerHandler::handleStartup(const uint8_t* parameterId) { break; } 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; break; } diff --git a/linux/devices/startracker/StarTrackerHandler.h b/linux/devices/startracker/StarTrackerHandler.h index 736ae7e0..8fb49b63 100644 --- a/linux/devices/startracker/StarTrackerHandler.h +++ b/linux/devices/startracker/StarTrackerHandler.h @@ -296,6 +296,7 @@ class StarTrackerHandler : public DeviceHandlerBase { CHECK_BOOT_STATE, BOOT, BOOT_DELAY, + LOGLEVEL, LIMITS, TRACKING, MOUNTING, @@ -307,6 +308,8 @@ class StarTrackerHandler : public DeviceHandlerBase { MATCHING, VALIDATION, ALGO, + LOG_SUBSCRIPTION, + DEBUG_CAMERA, WAIT_FOR_EXECUTION, DONE };