created back transition handler and channel enum
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-02-24 12:44:50 +01:00
parent 20074dcbd7
commit 608d45f055
4 changed files with 44 additions and 1 deletions

View File

@ -214,6 +214,23 @@ void PayloadPcduHandler::enablePeriodicPrintout(bool enable, uint8_t divider) {
opDivider.setDivider(divider);
}
void PayloadPcduHandler::transitionBackToOff() {
States currentState = state;
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::PCDU_OFF;
adcState = AdcStates::OFF;
setMode(MODE_OFF);
// Notify FDIR
triggerEvent(TRANSITION_BACK_TO_OFF, static_cast<uint32_t>(currentState));
}
void PayloadPcduHandler::stateMachineToNormal() {
if (adcState == AdcStates::BOOT_DELAY) {
if (adcCountdown.hasTimedOut()) {