Index: firmware/App/Modes/FPModes/ModeGenPermeate.c =================================================================== diff -u -r38c8d303358e16782f9d6a1828ee1cc55a4e9a24 -r3c6e233681b5a51632bdb6a06b20506fe50cd9f0 --- firmware/App/Modes/FPModes/ModeGenPermeate.c (.../ModeGenPermeate.c) (revision 38c8d303358e16782f9d6a1828ee1cc55a4e9a24) +++ firmware/App/Modes/FPModes/ModeGenPermeate.c (.../ModeGenPermeate.c) (revision 3c6e233681b5a51632bdb6a06b20506fe50cd9f0) @@ -1,6 +1,6 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2024-2026 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. @@ -46,7 +46,6 @@ #define PUMP_REST_TIMEOUT_MS ( 3 * MS_PER_SECOND ) ///< Duraion for open loop control at the start of tank fill/full state ( in ms ) #define RO_REJECTION_WAIT_TIME_MS ( 8 * MS_PER_SECOND ) ///< RO rejection alarm wait time. 5 seconds for RR to stabilize and 3 seconds for calculating rolling average ( in ms ) #define MIN_SAMPLES_NEEDED_FOR_DUTY_CYCLE_AVG 10 ///< Minimum number for samples needed for calculating the average duty cycle -#define PERMEATE_FLOW_FAULT_MIN_THRESHOLD 200.0F ///< Permeate flow low tolerance limit #define PERMEATE_FLOW_OUT_OF_RANGE_TIMEOUT_MS ( 12 * MS_PER_SECOND ) ///< Permeate flow low tolerance out of range timeout // ********** private data ********** @@ -167,6 +166,8 @@ checkPermeateHighFlow(); + checkPermeateLowFlow(); + //Publish Gen Permeate mode data publishGenPModeData(); @@ -417,27 +418,7 @@ } } -/*********************************************************************//** - * @brief - * The checkPermeateLowFlowRate function checks the permeate low flow rate from P16 - * against the set target flow rate and alarm if the flow is out of range. - * @details \b Inputs: permeateFlow - * @details \b Outputs: none - * @details \b Alarms: ALARM_ID_FP_PERMEATE_FLOW_OUT_LOW_RANGE when - * P16 flow goes beyond threshold limit from set target flow. - * @return none - *************************************************************************/ -void checkPermeateLowFlowRate( void ) -{ - F32 permeateFlow = getFilteredFlow( P16_FLOW ); - BOOL isFlowOutOfRange = FALSE; - F32 minimumAllowedPermeateFlow = (F32)getTargetROPumpFlowRateMLPM() - PERMEATE_FLOW_FAULT_MIN_THRESHOLD; - isFlowOutOfRange = ( ( permeateFlow < minimumAllowedPermeateFlow ) ? TRUE : FALSE); - checkPersistentAlarm( ALARM_ID_FP_PERMEATE_FLOW_OUT_LOW_RANGE, isFlowOutOfRange, permeateFlow, minimumAllowedPermeateFlow); -} - - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/