Various fixes and improvements
This commit is contained in:
@ -151,7 +151,7 @@ void PlocSupervisorHandler::doStartUp() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (startupState == StartupState::SET_TIME_EXECUTING) {
|
||||
if (startupState == StartupState::TIME_WAS_SET) {
|
||||
startupState = StartupState::ON;
|
||||
}
|
||||
if (startupState == StartupState::ON) {
|
||||
@ -176,7 +176,7 @@ ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t*
|
||||
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||
if (startupState == StartupState::SET_TIME) {
|
||||
*id = supv::SET_TIME_REF;
|
||||
startupState = StartupState::SET_TIME_EXECUTING;
|
||||
startupState = StartupState::WAIT_FOR_TIME_REPLY;
|
||||
return buildCommandFromCommand(*id, nullptr, 0);
|
||||
}
|
||||
return NOTHING_TO_SEND;
|
||||
@ -1909,6 +1909,10 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
||||
case supv::SET_TIME_REF: {
|
||||
// We could only allow proper bootup when the time was set successfully, but
|
||||
// this makes debugging difficult.
|
||||
|
||||
if (startupState == StartupState::WAIT_FOR_TIME_REPLY) {
|
||||
startupState = StartupState::TIME_WAS_SET;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user