Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rb37ec507e3d9c1bdedf60e0df3ceab39aa535411 -r5a7668973976b88515dbff4d533dbf6b2576cc0f --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision b37ec507e3d9c1bdedf60e0df3ceab39aa535411) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 5a7668973976b88515dbff4d533dbf6b2576cc0f) @@ -79,14 +79,16 @@ #define MAX_ALLOWED_FLOW_DEVIATION_PCT 0.1F ///< Max allowed deviation from target flow in percent. #define MAX_ALLOWED_FLOW_DEVIATION_MLPM 100.0F ///< Max allowed deviation from target flow in mL/min. #define FLOW_OUT_OF_RANGE_TIME_OUT_MS ( 12 * MS_PER_SECOND ) ///< Flow out of range time out in counts. +#define FLOW_OUT_OF_LOWER_RANGE_TIMEOUT_MS ( 30 * MS_PER_SECOND ) ///< Flow out of lower range time out in ms +#define FLOW_OUT_OF_LOWER_RANGE_CLEAR_MS ( 10 * MS_PER_SECOND ) ///< Flow out of lower range clear time out in ms #define MAX_PRESSURE_TARGET_TOLERANCE 5 ///< Pressure tolerance from maximum set pressure by user in psi. #define MAX_ALLOWED_PRESSURE_PSI 130 ///< Maximum allowed pressure that the RO pump can go to. #define MIN_ALLOWED_PRESSURE_PSI 10 ///< Minimum allowed pressure that the RO pump can go to. #define MAX_ALLOWED_MEASURED_PRESSURE_PSI 135 ///< Maximum allowed pressure that the sensor measures. RO pump shut off pressure is 140psi. #define MAX_PRESSURE_OUT_OF_RANGE_PERSISTENT_INTERVAL MS_PER_SECOND ///< Maximum allowed time that the pressure can be very high. #define MAX_ALLOWED_RAMP_UP_TIME ( 10 * MS_PER_SECOND ) ///< Maximum allowed ramp up time to a flow rate in ms. #define MAX_ALLOWED_RO_PUMP_PWM_PERCENT ( 0.95F ) ///< Maximum allowed RO Pump PWM . -#define MAX_RO_PUMP_PWM_PERSISTENT_INTERVAL ( 12 * MS_PER_SECOND ) ///< Maximum allowed time that ROPump PWM can be high in ms. +#define MAX_RO_PUMP_PWM_PERSISTENT_INTERVAL ( 30 * MS_PER_SECOND ) ///< Maximum allowed time that ROPump PWM can be high in ms. #define ROP_PSI_TO_PWM_DC(p) ( 0.2F + ( (F32)((p) - 100) * 0.01F ) ) ///< Conversion factor from target PSI to PWM duty cycle estimate. #define SAFETY_SHUTDOWN_TIMEOUT ( 3 * MS_PER_SECOND ) ///< RO pump safety shutdown activation timeout in ms. @@ -188,7 +190,7 @@ // Initialize the persistent alarm for flow out of upper and lower range initPersistentAlarm( ALARM_ID_DG_FLOW_RATE_OUT_OF_UPPER_RANGE, FLOW_OUT_OF_RANGE_TIME_OUT_MS, FLOW_OUT_OF_RANGE_TIME_OUT_MS ); - initPersistentAlarm( ALARM_ID_DG_FLOW_RATE_OUT_OF_LOWER_RANGE, FLOW_OUT_OF_RANGE_TIME_OUT_MS, FLOW_OUT_OF_RANGE_TIME_OUT_MS ); + initPersistentAlarm( ALARM_ID_DG_FLOW_RATE_OUT_OF_LOWER_RANGE, FLOW_OUT_OF_LOWER_RANGE_CLEAR_MS, FLOW_OUT_OF_LOWER_RANGE_TIMEOUT_MS ); // Initialize the persistent alarm for max allowed pressure out of range initPersistentAlarm( ALARM_ID_DG_RO_PUMP_PRESSURE_OUT_OF_RANGE, MAX_PRESSURE_OUT_OF_RANGE_PERSISTENT_INTERVAL,