Index: firmware/App/Controllers/PermeateTank.c =================================================================== diff -u -r3475e61837973cd54b99c24fce8e6085d340aad2 -rb110edbfea44736075d89212a7529df6df64e521 --- firmware/App/Controllers/PermeateTank.c (.../PermeateTank.c) (revision 3475e61837973cd54b99c24fce8e6085d340aad2) +++ firmware/App/Controllers/PermeateTank.c (.../PermeateTank.c) (revision b110edbfea44736075d89212a7529df6df64e521) @@ -34,9 +34,9 @@ #define PERMEATE_TANK_PUMP_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) for permeate tank broadcast #define PERMEATE_TANK_PUBLISH_COUNTER_START_COUNT 9 ///< Publishing counter offset -#define PERMEATE_TANK_FILL_SWITCH_MS ( 10 * MS_PER_SECOND ) ///< state switch timeout in fill state ( in ms ) -#define PERMEATE_TANK_FULL_SWITCH_MS ( 1 * MS_PER_SECOND ) ///< state switch timeout in full state (in ms) -#define PERMEATE_TANK_FULL_TIMEOUT_MS ( 60 * MS_PER_SECOND ) ///< timeout being in full state too long ( in ms ) +#define PERMEATE_TANK_FILL_SWITCH_MS ( 10 * MS_PER_SECOND ) ///< State switch timeout in fill state ( in ms ) +#define PERMEATE_TANK_FULL_SWITCH_MS ( 1 * MS_PER_SECOND ) ///< State switch timeout in full state (in ms) +#define PERMEATE_TANK_FULL_TIMEOUT_MS ( 60 * MS_PER_SECOND ) ///< Timeout being in full state too long ( in ms ) #define PERMEATE_TANK_FILL_RO_PUMP_TGT_FLOW_ML 750 ///< Flow target in ml/min for the ro pump during permeate tank fill state. // ********** private data ********** @@ -331,7 +331,6 @@ setValveState( P39_VALV, VALVE_STATE_OPEN ); setValveState( P20_VALV, VALVE_STATE_CLOSED ); setValveState( P43_VALV, VALVE_STATE_CLOSED ); -// setROPumpTargetFlowRateMLPM( PERMEATE_TANK_FILL_RO_PUMP_TGT_FLOW_ML, TRUE ); tankFillDelayTime = getMSTimerCount(); break; @@ -346,7 +345,6 @@ setValveState( P39_VALV, VALVE_STATE_CLOSED ); setValveState( P20_VALV, VALVE_STATE_CLOSED ); setValveState( P43_VALV, VALVE_STATE_CLOSED ); -// setROPumpTargetDutyCycle( getCurrentROPumpDutyCyclePCT(), TRUE ); tankFullDelayTime = getMSTimerCount(); tankFullAlarmTimeout = getMSTimerCount(); break; Index: firmware/App/Modes/FlushConcentrate.c =================================================================== diff -u -r6a318f2db61c3567fceea2c1963e0b02d90c8aee -rb110edbfea44736075d89212a7529df6df64e521 --- firmware/App/Modes/FlushConcentrate.c (.../FlushConcentrate.c) (revision 6a318f2db61c3567fceea2c1963e0b02d90c8aee) +++ firmware/App/Modes/FlushConcentrate.c (.../FlushConcentrate.c) (revision b110edbfea44736075d89212a7529df6df64e521) @@ -151,7 +151,6 @@ // if ( TRUE == 1 ) )// TODO Alarm and Stop State Rework // { - // state = CONC_FLUSH_PAUSED; // } Index: firmware/App/Modes/FlushFilter.c =================================================================== diff -u -r2652d50bbc5e78ed6fe3ad9ccbca0be6f802f1ff -rb110edbfea44736075d89212a7529df6df64e521 --- firmware/App/Modes/FlushFilter.c (.../FlushFilter.c) (revision 2652d50bbc5e78ed6fe3ad9ccbca0be6f802f1ff) +++ firmware/App/Modes/FlushFilter.c (.../FlushFilter.c) (revision b110edbfea44736075d89212a7529df6df64e521) @@ -33,8 +33,8 @@ #define FILTER_FLUSH_MAX_TIMEOUT ( 600 * MS_PER_SECOND ) ///< Max override timeout for 10 minutes #define FILTER_FLUSH_DATA_PUBLISH_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the gen water mode data published. -#define FILTER_FLUSH_TIMEOUT ( 30 * MS_PER_SECOND ) ///< filter flush timer (in ms) -#define FILTER_HEALTH_PRESSURE_DIFF 15 ///< Filter flush pressure difference threshold for alarm +#define FILTER_FLUSH_TIMEOUT ( 30 * MS_PER_SECOND ) ///< Filter flush timer (in ms) +#define FILTER_HEALTH_PRESSURE_DIFF 15 ///< Filter flush pressure difference threshold for alarm // ********** private data ********** Index: firmware/App/Monitors/Conductivity.c =================================================================== diff -u -r764e0e8c7a889f72a9b6bdced9ef08a09d72b36e -rb110edbfea44736075d89212a7529df6df64e521 --- firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision 764e0e8c7a889f72a9b6bdced9ef08a09d72b36e) +++ firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision b110edbfea44736075d89212a7529df6df64e521) @@ -40,6 +40,7 @@ #define SIZE_OF_FLOW_ROLLING_AVG ( CONDUCTIVITY_SAMPLE_FILTER_MS / TASK_PRIORITY_INTERVAL ) ///< Filtered conductivity moving average sample count. #define SIZE_OF_FLOW_TEMP_ROLLING_AVG ( CONDUCTIVITY_TEMP_SAMPLE_FILTER_MS / TASK_PRIORITY_INTERVAL ) ///< Filtered conductivity temprature moving average sample count. #define RO_RR_MOVING_AVG_NUM_OF_SAMPLES 300 ///< RO rejection ratio moving average number of samples. +#define FRACTION_TO_PERCENT_CONVERSION_FACTOR 100.0F ///< RO rejection ratio factor to percentage conversion factor value /// Filter conductivity readings record. typedef struct @@ -327,7 +328,7 @@ if ( fabs(feedConductivity) >= NEARLY_ZERO ) { - roRejectionRatio = 100.0F * ( ( feedConductivity - permeateConductivity ) / feedConductivity ); + roRejectionRatio = FRACTION_TO_PERCENT_CONVERSION_FACTOR * ( ( feedConductivity - permeateConductivity ) / feedConductivity ); } if ( getCurrentGenPermeateState() == FP_GENP_TANK_FILL_STATE ) {