improvements for ploc supv SW
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -136,29 +136,34 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
|
||||
}
|
||||
|
||||
void PlocSupervisorHandler::doStartUp() {
|
||||
if (setTimeDuringStartup) {
|
||||
if (startupState == StartupState::OFF) {
|
||||
bootTimeout.resetTimer();
|
||||
startupState = StartupState::BOOTING;
|
||||
}
|
||||
if (startupState == StartupState::BOOTING) {
|
||||
if (bootTimeout.hasTimedOut()) {
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
uartManager.start();
|
||||
if (startupState == StartupState::OFF) {
|
||||
bootTimeout.resetTimer();
|
||||
startupState = StartupState::BOOTING;
|
||||
}
|
||||
if (startupState == StartupState::BOOTING) {
|
||||
if (bootTimeout.hasTimedOut()) {
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
uartManager.start();
|
||||
if (SET_TIME_DURING_BOOT) {
|
||||
startupState = StartupState::SET_TIME;
|
||||
} else {
|
||||
startupState = StartupState::ON;
|
||||
}
|
||||
}
|
||||
if (startupState == StartupState::ON) {
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
} else {
|
||||
uartIsolatorSwitch.pullHigh();
|
||||
}
|
||||
if (startupState == StartupState::SET_TIME_EXECUTING) {
|
||||
startupState = StartupState::ON;
|
||||
}
|
||||
if (startupState == StartupState::ON) {
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
}
|
||||
|
||||
void PlocSupervisorHandler::doShutDown() {
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
shutdownCmdSent = false;
|
||||
packetInBuffer = false;
|
||||
nextReplyId = supv::NONE;
|
||||
uartManager.stop();
|
||||
uartIsolatorSwitch.pullLow();
|
||||
startupState = StartupState::OFF;
|
||||
@ -1896,9 +1901,8 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
||||
break;
|
||||
}
|
||||
case supv::SET_TIME_REF: {
|
||||
if (startupState == StartupState::SET_TIME_EXECUTING) {
|
||||
startupState = StartupState::ON;
|
||||
}
|
||||
// We could only allow proper bootup when the time was set successfully, but
|
||||
// this makes debugging difficult.
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user