Index: firmware/App/Modes/FlushPermeate.c =================================================================== diff -u -r60df6fda52be699d377d3d5ec62cfb337f920706 -rb6b45de61b9f011263147c7313134198fa83725f --- firmware/App/Modes/FlushPermeate.c (.../FlushPermeate.c) (revision 60df6fda52be699d377d3d5ec62cfb337f920706) +++ firmware/App/Modes/FlushPermeate.c (.../FlushPermeate.c) (revision b6b45de61b9f011263147c7313134198fa83725f) @@ -19,9 +19,9 @@ #include "Conductivity.h" #include "FlushPermeate.h" #include "FPOperationModes.h" +#include "Level.h" #include "MessageSupport.h" #include "Messaging.h" -#include "PermeateTank.h" #include "Pressure.h" #include "ROPump.h" #include "TaskGeneral.h" @@ -141,12 +141,24 @@ static FP_PERM_FLUSH_STATE_T handlePermeateFlushProgressState( void ) { FP_PERM_FLUSH_STATE_T state = PERM_FLUSH_IN_PROGRESS; + LEVEL_STATE_T level = getLevelStatus(); // if ( TRUE == 1 ))// TODO Alarm and Stop State Rework // { // state = PERM_FLUSH_PAUSED; // } + // Manual control of Permeate tank while in Permeate Flush + // to prevent overfill. + if ( LEVEL_STATE_HIGH == level ) + { + setValveState( M4_VALV,VALVE_STATE_CLOSED ); + } + else if ( LEVEL_STATE_LOW == level ) + { + setValveState( M4_VALV,VALVE_STATE_OPEN ); + } + if( TRUE == didTimeout( permeateFlushTimer, getPermeateFlushTimeout() ) ) { F32 p18conductivity = getFilteredConductivity( P18_COND ); @@ -217,7 +229,6 @@ setValveState( P39_VALV, VALVE_STATE_OPEN ); setValveState( P20_VALV, VALVE_STATE_CLOSED ); setValveState( P43_VALV, VALVE_STATE_CLOSED ); - startPermeateTankControl(); if ( TRUE == isBoostPumpInstalled() ) { setBoostPumpTargetPressure( PERMEATE_FLUSH_BOOST_PUMP_TGT_PSI );