Index: firmware/App/Modes/FlushPermeate.c =================================================================== diff -u -r60df6fda52be699d377d3d5ec62cfb337f920706 -r44dbba513dffd7b1a997f873426407dbfc4163d1 --- firmware/App/Modes/FlushPermeate.c (.../FlushPermeate.c) (revision 60df6fda52be699d377d3d5ec62cfb337f920706) +++ firmware/App/Modes/FlushPermeate.c (.../FlushPermeate.c) (revision 44dbba513dffd7b1a997f873426407dbfc4163d1) @@ -1,27 +1,27 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2025-2025 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file FlushPermeate.c * -* @author (last) Michael Garthwaite -* @date (last) 28-Feb-2025 +* @author (last) “Raghu +* @date (last) 04-Sep-2025 * * @author (original) Michael Garthwaite -* @date (original) 28-Feb-2025 +* @date (original) 02-Jul-2025 * ***************************************************************************/ #include "BoostPump.h" #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 );