Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -ra580886223882d877287b27c65214067a2e01fd9 -ra1c2136dc760870fcaadace67e566f026c46c019 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision a580886223882d877287b27c65214067a2e01fd9) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision a1c2136dc760870fcaadace67e566f026c46c019) @@ -840,30 +840,26 @@ CONCENTRATE_PUMPS_T pumpId; CONCENTRATE_PUMPS_T pumpInAlarm = CONCENTRATEPUMPS_FIRST; F32 pumpInAlarmPulseWidthInMicroSeconds = 0.0F; + BOOL isPumpPulseWidthOut = FALSE; for ( pumpId = CONCENTRATEPUMPS_FIRST; pumpId < NUM_OF_CONCENTRATE_PUMPS; pumpId++ ) { switch (pumpId) { case CONCENTRATEPUMPS_CP1_ACID: - { pulseWidthCount = getFPGACP1HallSensePulseWidth(); break; - } case CONCENTRATEPUMPS_CP2_BICARB: - { - pulseWidthCount = getFPGACP2HallSensePulseWidth(); + pulseWidthCount = getFPGACP2HallSensePulseWidth(); break; - } default: - { + // Loop only allows for valid concentrate pump Ids. break; - } - } + } pulseWidthInMicroSeconds = pulseWidthCount * CONCENTRATE_PUMP_HALL_SENSE_PERIOD_RESOLUTION; concentratePumps[ pumpId ].pulseWidthUS = pulseWidthInMicroSeconds; - BOOL isPumpPulseWidthOut = ( pulseWidthInMicroSeconds <= (F32)CONCENTRATE_PUMP_MIN_ALLOWED_HALL_SENSOR_COUNT ? TRUE : FALSE ); + isPumpPulseWidthOut = ( pulseWidthInMicroSeconds <= (F32)CONCENTRATE_PUMP_MIN_ALLOWED_HALL_SENSOR_COUNT ? TRUE : FALSE ); // Determine measured speed for the pump if ( CONCENTRATE_PUMP_ZERO_FLOW_RATE == pulseWidthCount ) Index: firmware/App/Controllers/ConcentratePumps.h =================================================================== diff -u -ra580886223882d877287b27c65214067a2e01fd9 -ra1c2136dc760870fcaadace67e566f026c46c019 --- firmware/App/Controllers/ConcentratePumps.h (.../ConcentratePumps.h) (revision a580886223882d877287b27c65214067a2e01fd9) +++ firmware/App/Controllers/ConcentratePumps.h (.../ConcentratePumps.h) (revision a1c2136dc760870fcaadace67e566f026c46c019) @@ -40,8 +40,8 @@ typedef enum ConcentratePumps { - CONCENTRATEPUMPS_CP1_ACID = 0, ///< First concentrate pump in list - CONCENTRATEPUMPS_FIRST = CONCENTRATEPUMPS_CP1_ACID, ///< Acid concentrate pump + CONCENTRATEPUMPS_CP1_ACID = 0, ///< Acid concentrate pump + CONCENTRATEPUMPS_FIRST = CONCENTRATEPUMPS_CP1_ACID, ///< First concentrate pump in list CONCENTRATEPUMPS_CP2_BICARB, ///< Bicarbonate concentrate pump NUM_OF_CONCENTRATE_PUMPS ///< Number of concentrate pumps } CONCENTRATE_PUMPS_T;