bugfixes in hk handling
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-06-03 18:03:25 +02:00
parent 6c32ddf864
commit b3bb76c75f
8 changed files with 19 additions and 9 deletions

View File

@ -142,7 +142,8 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
}
void PlocSupervisorHandler::doStartUp() {
switch (startupState) {
if (setTimeDuringStartup) {
switch (startupState) {
case StartupState::OFF: {
bootTimeout.resetTimer();
startupState = StartupState::BOOTING;
@ -163,6 +164,9 @@ void PlocSupervisorHandler::doStartUp() {
default:
break;
}
} else {
setMode(_MODE_TO_ON);
}
}
void PlocSupervisorHandler::doShutDown() {

View File

@ -95,6 +95,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
static const uint32_t BOOT_TIMEOUT = 2000;
enum class StartupState : uint8_t { OFF, BOOTING, SET_TIME, SET_TIME_EXECUTING, ON };
bool setTimeDuringStartup = false;
StartupState startupState = StartupState::OFF;
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];