str transition fixes #498

Merged
muellerr merged 9 commits from bugfix_str_mode_transitions into develop 2023-03-20 17:56:11 +01:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit c682d75aff - Show all commits

View File

@ -268,6 +268,8 @@ void StarTrackerHandler::doStartUp() {
default:
return;
}
startupState = StartupState::IDLE;
internalState = InternalState::IDLE;
boot = true;
setMode(_MODE_TO_ON);
}
@ -711,7 +713,6 @@ void StarTrackerHandler::doOnTransition(Submode_t subModeFrom) {
// transitions to firmware mode.
if (boot) {
subModeFrom = SUBMODE_BOOTLOADER;
boot = false;
}
if (dhbSubmode == SUBMODE_NONE) {
bootFirmware(MODE_ON);
@ -749,6 +750,7 @@ void StarTrackerHandler::bootFirmware(Mode_t toMode) {
break;
case InternalState::BOOT_DELAY:
if (bootCountdown.hasTimedOut()) {
sif::info << "STR: Starting firmware boot" << std::endl;
internalState = InternalState::REQ_VERSION;
}
break;
@ -2086,6 +2088,7 @@ void StarTrackerHandler::handleStartup(const uint8_t* parameterId) {
break;
}
case (startracker::ID::DEBUG_CAMERA): {
sif::info << "Star Tracker configuration done" << std::endl;
internalState = InternalState::DONE;
break;
}

View File

@ -277,6 +277,10 @@ class StarTrackerHandler : public DeviceHandlerBase {
BOOTING_BOOTLOADER_FAILED
};
enum class CfgSetupState {
};
InternalState internalState = InternalState::IDLE;
enum class StartupState {