Index: firmware/App/Modes/FPModes/ModeGenPermeate.c =================================================================== diff -u -rdfa0c83c8e4c159ba143fdcbc1e5e351d30e4219 -r3e1af7cc2576e347ab8bdf2f400196b2301def07 --- firmware/App/Modes/FPModes/ModeGenPermeate.c (.../ModeGenPermeate.c) (revision dfa0c83c8e4c159ba143fdcbc1e5e351d30e4219) +++ firmware/App/Modes/FPModes/ModeGenPermeate.c (.../ModeGenPermeate.c) (revision 3e1af7cc2576e347ab8bdf2f400196b2301def07) @@ -7,8 +7,8 @@ * * @file ModeGenPermeate.c * -* @author (last) “rkallala” -* @date (last) 15-Jan-2026 +* @author (last) Raghu Kallala +* @date (last) 31-Mar-2026 * * @author (original) Michael Garthwaite * @date (original) 08-Sep-2025 @@ -512,4 +512,59 @@ return result; } +/*********************************************************************//** + * @brief + * The testValidateGenPermeateChangeReq function validate whether requested + * sub mode change is legal or not. + * @details \b Inputs: none + * @details \b Outputs: none + * @param newSubMode the enumerated sub state of the mode. + * @return TRUE if request is legal, FALSE if not. + *************************************************************************/ +BOOL testValidateGenPermeateChangeReq( U32 newSubMode ) +{ + BOOL result = FALSE; + + if ( newSubMode < NUM_OF_FP_GENP_MODE_STATES ) + { + switch ( newSubMode ) + { + case FP_GENP_TANK_FILL_STATE: + case FP_GENP_TANK_FULL_STATE: + default: + result = TRUE; + break; + } + } + + return result; +} + +/*********************************************************************//** + * @brief + * The testSignalNewGenPermeateSubMode function requests transition to + * a new Gen Permeate sub mode. + * @details \b Inputs: none + * @details \b Outputs: genPermeateState + * @param newSubMode the enumerated sub state of the mode. + * @return none + *************************************************************************/ +void testSignalNewGenPermeateSubMode( U32 newSubMode ) +{ + if ( newSubMode < NUM_OF_FP_GENP_MODE_STATES ) + { + genPermeateState = (FP_GENP_MODE_STATE_T)newSubMode; + // handle the prerequisite if any + switch ( newSubMode ) + { + // Any of these state require no special handling + case FP_GENP_TANK_FILL_STATE: + case FP_GENP_TANK_FULL_STATE: + default: + break; + } + setModeGenPTransition( genPermeateState ); + } +} + /**@}*/