Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -ra7bf3ca23ea37a61000379facae628a31b3ecc59 -rf308cc4c35eab630ebbbde405cfe47d049afeafb --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision a7bf3ca23ea37a61000379facae628a31b3ecc59) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision f308cc4c35eab630ebbbde405cfe47d049afeafb) @@ -7,8 +7,8 @@ * * @file ModeStandby.c * -* @author (last) Sean Nash -* @date (last) 12-Jun-2020 +* @author (last) Quang Nguyen +* @date (last) 21-Jul-2020 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -115,7 +115,7 @@ break; default: - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_SOFTWARE_FAULT, 0, standbyState ) // TODO - add s/w fault enum to 1st data param + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, 0, standbyState ) // TODO - add s/w fault enum to 1st data param standbyState = DG_STANDBY_MODE_STATE_START; break; } @@ -139,14 +139,15 @@ // go to standby solo mode if HD is turned off or stops communicating. if ( FALSE == isHDCommunicating() ) { // TODO if HD comm loss, should we wait an hour or so before going to solo standby? -// requestNewOperationMode( DG_MODE_SOLO ); // TODO - uncomment when solo mode is implemented. + requestNewOperationMode( DG_MODE_SOLO ); } // if HD requests water sample, go to water sample state else if ( TRUE == pendingSampleWaterRequest ) { pendingSampleWaterRequest = FALSE; waterSampleStartTime = getMSTimerCount(); - // TODO - open VPi and VSP valves + setValveState( VPI, VALVE_STATE_OPEN ); + setValveState( VSP, VALVE_STATE_OPEN ); result = DG_STANDBY_MODE_STATE_SAMPLE_WATER; } else if ( TRUE == pendingStartDGRequest ) @@ -174,7 +175,8 @@ // VPi and VSP valves open for 10 seconds, then close and return to idle state if ( TRUE == didTimeout( waterSampleStartTime, WATER_SAMPLE_TIME_MS ) ) { - // TODO - close VPi and VSP valves. + setValveState( VPI, VALVE_STATE_CLOSED ); + setValveState( VSP, VALVE_STATE_CLOSED ); result = DG_STANDBY_MODE_STATE_IDLE; }