diff --git a/mission/devices/PayloadPcduHandler.cpp b/mission/devices/PayloadPcduHandler.cpp index 7b4353e4..f4aba7ef 100644 --- a/mission/devices/PayloadPcduHandler.cpp +++ b/mission/devices/PayloadPcduHandler.cpp @@ -69,6 +69,16 @@ void PayloadPcduHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) { if (getMode() == _MODE_TO_NORMAL) { stateMachineToNormal(modeFrom, subModeFrom); return; + } else if (getMode() == _MODE_TO_ON and modeFrom == MODE_NORMAL) { + gpioIF->pullLow(gpioIds::PLPCDU_ENB_HPA); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_MPA); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_TX); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_X8); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_DRO); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_TX); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_VBAT0); + gpioIF->pullLow(gpioIds::PLPCDU_ENB_VBAT1); + state = States::POWER_CHANNELS_ON; } DeviceHandlerBase::doTransition(modeFrom, subModeFrom); } @@ -144,6 +154,10 @@ ReturnValue_t PayloadPcduHandler::stateMachineToNormal(Mode_t modeFrom, Submode_ } }; + // sif::debug << "DIFF MASK: " << (int)diffMask << std::endl; + + // No handling for the SSRs: If those are pulled low, the ADC is off + // and normal mode does not really make sense anyway switchHandler(DRO_ON, gpioIds::PLPCDU_ENB_DRO, "DRO"); switchHandler(X8_ON, gpioIds::PLPCDU_ENB_X8, "X8"); switchHandler(TX_ON, gpioIds::PLPCDU_ENB_TX, "TX");