diff --git a/mission/devices/RadiationSensorHandler.cpp b/mission/devices/RadiationSensorHandler.cpp index 411dd510..61704c91 100644 --- a/mission/devices/RadiationSensorHandler.cpp +++ b/mission/devices/RadiationSensorHandler.cpp @@ -41,7 +41,14 @@ void RadiationSensorHandler::doStartUp() { } } -void RadiationSensorHandler::doShutDown() { setMode(_MODE_POWER_DOWN); } +void RadiationSensorHandler::doShutDown() { + ReturnValue_t retval = stackHandler.deviceToOff(StackCommander::RAD_SENSOR); + if (retval == BUSY) { + return; + } + internalState = InternalState::OFF; + setMode(_MODE_POWER_DOWN); +} ReturnValue_t RadiationSensorHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) { switch (communicationStep) {