Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rac05209d7b6c65b22359754eced5ad2672d3092a -r78c03fb021407eaf8d17dd0f74f6969443b397ce --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision ac05209d7b6c65b22359754eced5ad2672d3092a) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 78c03fb021407eaf8d17dd0f74f6969443b397ce) @@ -294,7 +294,7 @@ } result = TRUE; } - else // requested flow rate too high + else // Requested flow rate too high { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_DIAL_IN_FLOW_SET_TOO_HIGH, flowRate ) } @@ -334,7 +334,7 @@ U32 rotTime = getMSTimerCount(); U32 deltaTime = calcTimeBetween( dipRotorRevStartTime, rotTime ); - // calculate rotor speed (in RPM) + // Calculate rotor speed (in RPM) dialInPumpRotorSpeedRPM.data = ( 1.0 / (F32)deltaTime ) * (F32)MS_PER_SECOND * (F32)SEC_PER_MIN; dipRotorRevStartTime = rotTime; @@ -400,22 +400,22 @@ filterDialInFlowReadings( dipFlow ); - // calculate dialysate inlet pump motor speed/direction from hall sensor count + // Calculate dialysate inlet pump motor speed/direction from hall sensor count updateDialInPumpSpeedAndDirectionFromHallSensors(); // don't start enforcing checks until out of init/POST mode if ( opMode != MODE_INIT ) { - // check pump direction + // Check pump direction checkDialInPumpDirection(); - // check pump controller current + // Check pump controller current checkDialInPumpMCCurrent(); - // check pump speeds and flow + // Check pump speeds and flow checkDialInPumpSpeeds(); checkDialInPumpFlowAgainstSpeed(); - // check for home position, zero/low speed + // Check for home position, zero/low speed checkDialInPumpRotor(); - // check flow sensor signal strength + // Check flow sensor signal strength checkDialInFlowSensorSignalStrength(); } @@ -518,7 +518,7 @@ } result = DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE; } - // continue ramp up + // Continue ramp up else { dialInPumpPWMDutyCyclePctSet += MAX_DIAL_IN_PUMP_PWM_STEP_UP_CHANGE; @@ -560,7 +560,7 @@ } result = DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE; } - // continue ramp down + // Continue ramp down else { dialInPumpPWMDutyCyclePctSet -= MAX_DIAL_IN_PUMP_PWM_STEP_DN_CHANGE; @@ -582,7 +582,7 @@ { DIAL_IN_PUMP_STATE_T result = DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE; - // control at set interval + // Control at set interval if ( ++dipControlTimerCounter >= DIP_CONTROL_INTERVAL ) { if ( dialInPumpControlModeSet == PUMP_CONTROL_MODE_CLOSED_LOOP ) @@ -976,7 +976,7 @@ dipMCDir = ( getMeasuredDialInPumpMCSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); dipDir = ( getMeasuredDialInPumpSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); - // check set direction vs. direction from hall sensors + // Check set direction vs. direction from hall sensors if ( dialInPumpDirectionSet != dipDir ) { if ( ++errorDialInPumpDirectionPersistTimerCtr >= DIP_DIRECTION_ERROR_PERSIST ) @@ -986,7 +986,7 @@ #endif } } - // check set direction vs. direction from sign of motor controller speed + // Check set direction vs. direction from sign of motor controller speed else if ( dialInPumpDirectionSet != dipMCDir ) { if ( ++errorDialInPumpDirectionPersistTimerCtr >= DIP_DIRECTION_ERROR_PERSIST ) @@ -1024,7 +1024,7 @@ F32 measMotorSpeed = getMeasuredDialInPumpSpeed(); S32 cmdRate = targetDialInFlowRate; - // check for pump running while commanded off + // Check for pump running while commanded off if ( 0 == cmdRate ) { if ( measMotorSpeed > DIP_MAX_MOTOR_SPEED_WHILE_OFF_RPM ) @@ -1055,7 +1055,7 @@ F32 measMotorSpeedInRotorRPM = measMotorSpeed / DIP_GEAR_RATIO; F32 deltaRotorSpeed = fabs( measRotorSpeed - measMotorSpeedInRotorRPM ); - // check measured motor speed vs. commanded motor speed while controlling to target + // Check measured motor speed vs. commanded motor speed while controlling to target if ( deltaMotorSpeed > DIP_MAX_MOTOR_SPEED_ERROR_RPM ) { if ( ++errorDialInMotorSpeedPersistTimerCtr >= DIP_MOTOR_SPEED_ERROR_PERSIST ) @@ -1070,7 +1070,7 @@ errorDialInMotorSpeedPersistTimerCtr = 0; } - // check measured rotor speed vs. measured motor speed while controlling to target + // Check measured rotor speed vs. measured motor speed while controlling to target if ( deltaRotorSpeed > DIP_MAX_ROTOR_VS_MOTOR_DIFF_RPM ) { if ( ++errorDialInRotorSpeedPersistTimerCtr >= DIP_ROTOR_SPEED_ERROR_PERSIST ) @@ -1105,7 +1105,7 @@ *************************************************************************/ static void checkDialInPumpFlowAgainstSpeed( void ) { - // check only performed while in treatment mode and while we're in control to target state + // Check only performed while in treatment mode and while we're in control to target state if ( ( MODE_TREA == getCurrentOperationMode() ) && ( DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE == dialInPumpState ) ) { F32 flow = getMeasuredDialInFlowRate(); @@ -1198,7 +1198,7 @@ #ifndef DISABLE_PUMP_FLOW_CHECKS HD_OP_MODE_T opMode = getCurrentOperationMode(); - // check flow sensor signal strength when appropriate TODO - in pre-treatment, must be far enough along for fluid to be in tubing + // Check flow sensor signal strength when appropriate TODO - in pre-treatment, must be far enough along for fluid to be in tubing if ( MODE_TREA == opMode || ( MODE_PRET == opMode && FALSE ) ) { F32 sigStrength = getMeasuredDialInFlowSignalStrength(); @@ -1225,7 +1225,7 @@ switch ( dialInPumpSelfTestState ) { case DIAL_IN_FLOW_SELF_TEST_STATE_START: - // retrieve blood flow sensor calibration data + // Retrieve blood flow sensor calibration data if ( TRUE == getCalibrationData( &cal ) ) { dialInFlowCalGain = cal.dialysateFlowGain;