disable rad sensor auto-on
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-12-22 11:00:04 +01:00
parent 7aae4efd69
commit 9aedc32527
3 changed files with 21 additions and 11 deletions

View File

@ -7,8 +7,11 @@
RadiationSensorHandler::RadiationSensorHandler(object_id_t objectId, object_id_t comIF,
CookieIF *comCookie, GpioIF *gpioIF,
Stack5VHandler &handler)
: DeviceHandlerBase(objectId, comIF, comCookie), dataset(this), gpioIF(gpioIF) {
Stack5VHandler &stackHandler)
: DeviceHandlerBase(objectId, comIF, comCookie),
dataset(this),
gpioIF(gpioIF),
stackHandler(stackHandler) {
if (comCookie == nullptr) {
sif::error << "RadiationSensorHandler: Invalid com cookie" << std::endl;
}
@ -17,12 +20,22 @@ RadiationSensorHandler::RadiationSensorHandler(object_id_t objectId, object_id_t
RadiationSensorHandler::~RadiationSensorHandler() {}
void RadiationSensorHandler::doStartUp() {
if (internalState == InternalState::OFF) {
ReturnValue_t retval = stackHandler.deviceToOn(StackCommander::RAD_SENSOR);
if (retval == BUSY) {
return;
}
internalState = InternalState::POWER_SWITCHING;
}
if (internalState == InternalState::POWER_SWITCHING) {
if (stackHandler.isSwitchOn()) {
internalState == InternalState::SETUP;
}
}
if (internalState == InternalState::CONFIGURED) {
if (goToNormalMode) {
setMode(MODE_NORMAL);
}
else {
} else {
setMode(_MODE_TO_ON);
}
}