Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r8aa885b17330f096934f175d35912c3c95825039 -r21d8cec02d7e0f8ad98b54ca310243f690948ddc --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 8aa885b17330f096934f175d35912c3c95825039) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 21d8cec02d7e0f8ad98b54ca310243f690948ddc) @@ -7,8 +7,8 @@ * * @file ModeStandby.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 24-Feb-2026 +* @author (last) Michael Garthwaite +* @date (last) 17-Apr-2026 * * @author (original) Vinayakam Mani * @date (original) 07-Aug-2024 @@ -47,7 +47,6 @@ static DD_STANDBY_MODE_STATE_T standbyState; ///< Currently active standby state. static BOOL pendingStartDDPreGenRequest; ///< Flag indicating TD has requested DD start the pre generation dialysate request. -static BOOL pendingBalanceChamberSwOnlyRequest; ///< Flag indicating balancing chamber switch only request. //static BOOL pendingStartDDFlushRequest; ///< Flag indicating TD has requested DD start flush. //static BOOL pendingStartDDHeatDisinfectRequest; ///< Flag indicating TD has requested DD start heat disinfect. //static BOOL pendingStartDDHeatDisinfectActiveCoolRequest; ///< Flag indicating TD has requested DD start heat disinfect active cool. @@ -69,7 +68,6 @@ { standbyState = DD_STANDBY_MODE_STATE_IDLE; pendingStartDDPreGenRequest = FALSE; - pendingBalanceChamberSwOnlyRequest = FALSE; // pendingStartDDFlushRequest = FALSE; // pendingStartDDHeatDisinfectRequest = FALSE; // pendingStartDDHeatDisinfectActiveCoolRequest = FALSE; @@ -95,6 +93,9 @@ resetPermeateTank(); + // Deactivate Balancing Chamber Switching + requestBalChamberSwitching( FALSE ); + // // 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 ); @@ -168,7 +169,7 @@ if ( TRUE == pendingStartDDPreGenRequest ) { // 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 ) ) + if ( ( ( FP_MODE_GENP == fpMode ) || ( FP_MODE_DEGP == fpMode ) ) && ( getTestConfigStatus( TEST_CONFIG_DD_RUN_SOLO ) == FALSE ) ) { pendingStartDDPreGenRequest = FALSE; requestNewOperationMode( DD_MODE_PREG ); @@ -179,11 +180,6 @@ requestNewOperationMode( DD_MODE_PREG ); } } - //Test request to handle only balancing chamber switching - else if ( TRUE == pendingBalanceChamberSwOnlyRequest ) - { - execBalancingChamberControl(); - } // else if ( TRUE == pendingStartDDFlushRequest ) // { // pendingStartDDFlushRequest = FALSE; @@ -249,7 +245,7 @@ * The requestBCSwitchingOnlyStart function handles Balancing chamber switching * only start request. * @details \b Inputs: standbyState - * @details \b Outputs: pendingBalanceChamberSwOnlyRequest + * @details \b Outputs: none * @return TRUE if request accepted, FALSE if not. *************************************************************************/ BOOL requestBCSwitchingOnlyStart( void ) @@ -259,7 +255,9 @@ if ( DD_STANDBY_MODE_STATE_IDLE == standbyState ) { result = TRUE; - pendingBalanceChamberSwOnlyRequest = TRUE; + + // Activate Balancing Chamber Switching + requestBalChamberSwitching( TRUE ); } return result; @@ -270,12 +268,14 @@ * The requestBCSwitchingOnlyStop function handles Balancing chamber switching * only stop request. * @details \b Inputs: standbyState - * @details \b Outputs: pendingBalanceChamberSwOnlyRequest + * @details \b Outputs: none * @return none. *************************************************************************/ void requestBCSwitchingOnlyStop( void ) { - pendingBalanceChamberSwOnlyRequest = FALSE; + // Deactivate Balancing Chamber Switching + requestBalChamberSwitching( FALSE ); + // Close all balancing chamber valves valveControlForBCClosedState(); }