Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r67731d57db9a620418b3b848d8f75ff204902c36 -r0797158d6e367debb04e043798f1aeb1fb17063b --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 67731d57db9a620418b3b848d8f75ff204902c36) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 0797158d6e367debb04e043798f1aeb1fb17063b) @@ -1,30 +1,33 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2024-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 ModeStandby.c * -* @author (last) Vinayakam Mani -* @date (last) 06-Aug-2024 +* @author (last) Sameer Kalliadan Poyil +* @date (last) 10-Feb-2026 * * @author (original) Vinayakam Mani -* @date (original) 06-Aug-2024 +* @date (original) 07-Aug-2024 * ***************************************************************************/ #include "BalancingChamber.h" #include "ConcentratePumps.h" #include "ConductivitySensors.h" +#include "FPOperationModes.h" #include "Heaters.h" #include "ModeFault.h" #include "ModeStandby.h" +#include "ModeGenDialysate.h" #include "MessageSupport.h" #include "Messaging.h" //#include "NVDataMgmt.h" #include "OperationModes.h" +#include "PermeateTank.h" #include "Pressure.h" #include "SystemCommDD.h" #include "TaskGeneral.h" @@ -90,6 +93,8 @@ deenergizeActuators( PARK_CONC_PUMPS ); + resetPermeateTank(); + // // Upon transition to mode standby set CD1 and CD2 calibration records to be picked to the normal // // table. If the chemical disinfect fails, the mode transitions back to mode standby. // setCondcutivitySensorCalTable( D17_COND, CAL_DATA_CD1_COND_SENSOR ); @@ -153,6 +158,7 @@ static DD_STANDBY_MODE_STATE_T handleStandbyIdleState( void ) { DD_STANDBY_MODE_STATE_T state = DD_STANDBY_MODE_STATE_IDLE; + FP_OP_MODE_T fpMode = getCurrentFPOperationMode(); //TODO : Define comm loss alarm when TD is turned off or stops communicating // if ( FALSE == isTDCommunicating() ) @@ -161,8 +167,17 @@ // } if ( TRUE == pendingStartDDPreGenRequest ) { - pendingStartDDPreGenRequest = FALSE; - requestNewOperationMode( DD_MODE_PREG ); + // wait for IOFP GENP mode and when IOFP manual control is not set + if ( ( FP_MODE_GENP == fpMode ) && ( getTestConfigStatus( TEST_CONFIG_DD_RUN_SOLO ) == FALSE ) ) + { + pendingStartDDPreGenRequest = FALSE; + requestNewOperationMode( DD_MODE_PREG ); + } + else if ( getTestConfigStatus( TEST_CONFIG_DD_RUN_SOLO ) == TRUE ) + { + pendingStartDDPreGenRequest = FALSE; + requestNewOperationMode( DD_MODE_PREG ); + } } //Test request to handle only balancing chamber switching else if ( TRUE == pendingBalanceChamberSwOnlyRequest )