PLOC SUPV periodic HK
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
2023-08-15 13:49:06 +02:00
parent 6919ab9455
commit af5f51928b
3 changed files with 11 additions and 1 deletions

View File

@ -155,12 +155,15 @@ void PlocSupervisorHandler::doStartUp() {
startupState = StartupState::ON;
}
if (startupState == StartupState::ON) {
hkset.setReportingEnabled(true);
setMode(_MODE_TO_ON);
}
}
void PlocSupervisorHandler::doShutDown() {
setMode(_MODE_POWER_DOWN);
hkset.setReportingEnabled(false);
hkset.setValidity(false, true);
shutdownCmdSent = false;
packetInBuffer = false;
nextReplyId = supv::NONE;
@ -170,6 +173,10 @@ void PlocSupervisorHandler::doShutDown() {
}
ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
if (not commandIsExecuting(GET_HK_REPORT)) {
*id = GET_HK_REPORT;
return OK;
}
return NOTHING_TO_SEND;
}
@ -790,6 +797,8 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
localDataPoolMap.emplace(supv::ADC_ENG_14, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(supv::ADC_ENG_15, new PoolEntry<uint16_t>({0}));
poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(hkset.getSid(), false, 10.0));
return returnvalue::OK;
}