disable rad sensor auto-on
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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user