Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r830213bc6dcc1a684610caf78c79d55f2cb41e93 -r8822df8e80c96e00269b961cf497b40b1b63b965 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 830213bc6dcc1a684610caf78c79d55f2cb41e93) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 8822df8e80c96e00269b961cf497b40b1b63b965) @@ -18,6 +18,7 @@ #include "BalancingChamber.h" #include "ConcentratePumps.h" #include "ConductivitySensors.h" +#include "FPOperationModes.h" #include "Heaters.h" #include "ModeFault.h" #include "ModeStandby.h" @@ -156,6 +157,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() ) @@ -164,8 +166,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 )