Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r5a36a768d11cc597a36b894c1fb3a5e5590130f1 -re44aad7a9d5fa48aeaa55c65bd28ad9acde6ce05 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 5a36a768d11cc597a36b894c1fb3a5e5590130f1) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision e44aad7a9d5fa48aeaa55c65bd28ad9acde6ce05) @@ -19,6 +19,7 @@ #include "CPLD.h" #include "DrainPump.h" #include "Heaters.h" +#include "ModeFault.h" #include "ModeStandby.h" #include "OperationModes.h" #include "Pressures.h" @@ -98,6 +99,8 @@ // re-initialize standby mode each time we transition to standby mode initStandbyMode(); + //deenergizeActuators(); + // set initial actuator states setValveState( VRF, VALVE_STATE_R2_C_TO_NO ); setValveState( VRI, VALVE_STATE_R1_C_TO_NO ); @@ -191,7 +194,7 @@ filterFlushStartTime = getMSTimerCount(); setValveState( VPI, VALVE_STATE_OPEN ); #ifndef V_2_SYSTEM - setValveState( VPD, VALVE_STATE_OPEN_C_TO_NC ); + setValveState( VPD, VALVE_STATE_DRAIN_C_TO_NO ); #else setValveState( VPD, VALVE_STATE_OPEN ); // TODO: VPD drain state is closed for V3 #endif @@ -223,6 +226,7 @@ if ( TRUE == didTimeout( filterFlushStartTime, filterFlushTimePeriod_ms ) ) { + setValveState( VPI, VALVE_STATE_CLOSED ); state = DG_STANDBY_MODE_STATE_FLUSH_FILTER_IDLE; } @@ -288,6 +292,7 @@ // After HD requests to stop or 10 seconds has elapsed, close and return to idle state if ( ( TRUE == stopSampleWaterRequest ) || ( TRUE == didTimeout( waterSampleStartTime, MAX_WATER_SAMPLE_TIME_MS ) ) ) { + stopSampleWaterRequest = FALSE; setValveState( VSP, VALVE_STATE_CLOSED ); #ifndef V_2_SYSTEM setValveState( VPD, VALVE_STATE_DRAIN_C_TO_NO ); @@ -420,7 +425,28 @@ ( DG_MODE_SOLO == getCurrentOperationMode() ) ) { requestNewOperationMode( DG_MODE_HEAT ); + status = TRUE; + } + return status; +} + +/*********************************************************************//** + * @brief + * The startDGChemicalDisinfect function starts chemical disinfect mode. + * @details Inputs: standbyState + * @details Outputs: none + * @return: TRUE if the switch was successful + *************************************************************************/ +BOOL startDGChemicalDisinfect( void ) +{ + BOOL status = FALSE; + + // If DG is in standby mode and the standby mode is in Idle, request chemical disinfect + // Chemical disinfect cannot be run in solo mode because the user has to confirm that the acid is inserted or removed + //if ( ( DG_MODE_STAN == getCurrentOperationMode() ) && ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) ) TODO un-comment this line. This is commented to be able to run chemical without HD for development + { + requestNewOperationMode( DG_MODE_CHEM ); status = TRUE; }