Index: firmware/App/Modes/FPModes/FPModeStandby.c =================================================================== diff -u -rd79faa7118db6d048ce3433224b3e5a478c97a98 -r3e1af7cc2576e347ab8bdf2f400196b2301def07 --- firmware/App/Modes/FPModes/FPModeStandby.c (.../FPModeStandby.c) (revision d79faa7118db6d048ce3433224b3e5a478c97a98) +++ firmware/App/Modes/FPModes/FPModeStandby.c (.../FPModeStandby.c) (revision 3e1af7cc2576e347ab8bdf2f400196b2301def07) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2025-2026 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file FPModeStandby.c * -* @author (last) Michael Garthwaite -* @date (last) 28-Feb-2025 +* @author (last) Raghu Kallala +* @date (last) 31-Mar-2026 * * @author (original) Michael Garthwaite -* @date (original) 28-Feb-2025 +* @date (original) 08-Sep-2025 * ***************************************************************************/ @@ -20,6 +20,7 @@ #include "FPOperationModes.h" #include "ModePreGenPermeateDefeatured.h" #include "ModePreGenPermeate.h" +#include "PermeateTank.h" #include "PersistentAlarm.h" #include "ROPump.h" #include "SystemCommDD.h" @@ -65,6 +66,7 @@ { initFPStandbyMode(); + resetPermeateTank(); setValveState( M4_VALV,VALVE_STATE_CLOSED ); setValveState( M12_VALV, VALVE_STATE_CLOSED ); setValveState( P6_VALV,VALVE_STATE_CLOSED ); @@ -144,4 +146,56 @@ *************************************************************************/ +/*********************************************************************//** + * @brief + * The testValidateStandbyChangeReq 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 testValidateStandbyChangeReq( U32 newSubMode ) +{ + BOOL result = FALSE; + + if ( newSubMode < NUM_OF_FP_STANDBY_MODE_STATES ) + { + switch ( newSubMode ) + { + case FP_STANDBY_MODE_STATE_IDLE: + default: + result = TRUE; + break; + } + } + + return result; +} + +/*********************************************************************//** + * @brief + * The testSignalNewStandbySubMode function requests transition + * to a new standby sub mode. + * @details \b Inputs: none + * @details \b Outputs: standbyState + * @param newSubMode the enumerated sub state of the mode. + * @return none + *************************************************************************/ +void testSignalNewStandbySubMode( U32 newSubMode ) +{ + if ( newSubMode < NUM_OF_FP_STANDBY_MODE_STATES ) + { + standbyState = (FP_STANDBY_MODE_STATE_T)newSubMode; + // handle the prerequisite if any + switch ( newSubMode ) + { + // Any of these state require no special handling + case FP_STANDBY_MODE_STATE_IDLE: + default: + break; + } + } +} + /**@}*/