Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -rbe1f6ba8f58abfe098865c85ebca070eb0dde6ce -rc453782e68c6f05a67a3e0839467e5941c8b21db --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision be1f6ba8f58abfe098865c85ebca070eb0dde6ce) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision c453782e68c6f05a67a3e0839467e5941c8b21db) @@ -362,10 +362,8 @@ // Lower air trap level if fluid reaches upper level. else if ( AIR_TRAP_LEVEL_FLUID == getLevelSensorState( H16_LEVL ) ) { - // TODO un-comment - //if ( ( AIR_PUMP_STATE_OFF == getAirPumpState() ) && - // ( TRUE == didTimeout( airTrapLowerDelayStartTime, AIR_PUMP_ON_DELAY_TIME_MS ) ) ) - if ( AIR_PUMP_STATE_OFF == getAirPumpState() ) + if ( ( AIR_PUMP_STATE_OFF == getAirPumpState() ) && + ( TRUE == didTimeout( airTrapLowerDelayStartTime, AIR_PUMP_ON_DELAY_TIME_MS ) ) ) { set3WayValveState( H13_VALV, VALVE_3WAY_COMMON_TO_OPEN_STATE ); // open valve H13 to allow air to be pumped into air trap from atmosphere setAirPumpState( AIR_PUMP_STATE_ON, getAirPumpLowerPowerLevel() ); @@ -452,11 +450,9 @@ set3WayValveState( H13_VALV, VALVE_3WAY_COMMON_TO_CLOSED_STATE ); result = AIR_TRAP_MANUAL_CONTROL_STATE; } - // TODO investigate the timeout // Transition back to closed state when air trap lower level operation completed when air detected at upper level - //else if ( ( TRUE == didTimeout( airTrapLowerStartTime, airPumpStopTime ) ) || - // ( AIR_TRAP_LEVEL_AIR == getRawLevelSensorState( H16_LEVL ) ) ) - else if ( AIR_TRAP_LEVEL_AIR == getRawLevelSensorState( H16_LEVL ) ) + else if ( ( TRUE == didTimeout( airTrapLowerStartTime, airPumpStopTime ) ) || + ( AIR_TRAP_LEVEL_AIR == getRawLevelSensorState( H16_LEVL ) ) ) { setAirPumpState( AIR_PUMP_STATE_OFF, AIR_PUMP_MOTOR_OFF ); set3WayValveState( H13_VALV, VALVE_3WAY_COMMON_TO_CLOSED_STATE );