Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rc7d750b36ffa45ed57c73899aa7861e2d8d63be9 -r8533726f0d9dbde9edfb041966696b0b26a9b004 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision c7d750b36ffa45ed57c73899aa7861e2d8d63be9) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 8533726f0d9dbde9edfb041966696b0b26a9b004) @@ -396,7 +396,7 @@ F32 actualPressure = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_OUTLET ); BOOL isPressureMax = ( actualPressure >= MAX_ALLOWED_MEASURED_PRESSURE_PSI ? TRUE : FALSE ); BOOL isDutyCycleOutOfRange = FALSE; - BOOL isMaxPWM = ( roPumpDutyCyclePctSet > MAX_ALLOWED_RO_PUMP_PWM_PERCENT ) ? TRUE : FALSE; + BOOL isMaxPWM = ( roPumpDutyCyclePctSet > MAX_ALLOWED_RO_PUMP_PWM_PERCENT ? TRUE : FALSE ); // The feedback voltage is on the 0V line so when the duty cycle is 0, the feedback is 2.5V // The duty cycle is calculated by getting the 1 - (ratio of feedback / to the voltage at 0 percent duty cycle). @@ -434,14 +434,14 @@ { case DG_MODE_GENE: // The flow cannot be out of target by more than +/- 100 mL/min - isFlowOutOfRange = ( ( fabs( currentFlowLPM - targetFlowLPM ) * ML_PER_LITER ) > MAX_ALLOWED_FLOW_DEVIATION_MLPM ); + isFlowOutOfRange = ( ( fabs( currentFlowLPM - targetFlowLPM ) * ML_PER_LITER ) > MAX_ALLOWED_FLOW_DEVIATION_MLPM ? TRUE : FALSE ); isFlowOutOfUpperRange = ( isFlowOutOfRange && ( currentFlowLPM > targetFlowLPM ) ? TRUE : FALSE ); isFlowOutOfLowerRange = ( isFlowOutOfRange && ( currentFlowLPM < targetFlowLPM ) ? TRUE : FALSE ); break; case DG_MODE_DRAI: // The flow cannot be out of target by less than 100 mL/min - isFlowOutOfRange = ( ( fabs( currentFlowLPM - targetFlowLPM ) * ML_PER_LITER ) > MAX_ALLOWED_FLOW_DEVIATION_MLPM ); + isFlowOutOfRange = ( ( fabs( currentFlowLPM - targetFlowLPM ) * ML_PER_LITER ) > MAX_ALLOWED_FLOW_DEVIATION_MLPM ? TRUE : FALSE ); isFlowOutOfUpperRange = FALSE; isFlowOutOfLowerRange = ( isFlowOutOfRange && ( currentFlowLPM < targetFlowLPM ) ? TRUE : FALSE ); break;