Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rac05209d7b6c65b22359754eced5ad2672d3092a -r78c03fb021407eaf8d17dd0f74f6969443b397ce --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision ac05209d7b6c65b22359754eced5ad2672d3092a) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 78c03fb021407eaf8d17dd0f74f6969443b397ce) @@ -278,7 +278,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_OUT_FLOW_SET_TOO_HIGH, flowRate ) } @@ -335,7 +335,7 @@ U32 rotTime = getMSTimerCount(); U32 deltaTime = calcTimeBetween( dopRotorRevStartTime, rotTime ); - // calculate rotor speed (in RPM) + // Calculate rotor speed (in RPM) dialOutPumpRotorSpeedRPM.data = ( 1.0 / (F32)deltaTime ) * (F32)MS_PER_SECOND * (F32)SEC_PER_MIN; dopRotorRevStartTime = rotTime; @@ -422,19 +422,19 @@ dialOutPumpMCSpeedRPM.data = (F32)(SIGN_FROM_12_BIT_VALUE(bpRPM)) * DOP_SPEED_ADC_TO_RPM_FACTOR; dialOutPumpMCCurrentmA.data = (F32)(SIGN_FROM_12_BIT_VALUE(bpmA)) * DOP_CURRENT_ADC_TO_MA_FACTOR; - // calculate dialysate outlet pump motor speed/direction from hall sensor count + // Calculate dialysate outlet pump motor speed/direction from hall sensor count updateDialOutPumpSpeedAndDirectionFromHallSensors(); // don't start enforcing checks until out of init/POST mode if ( getCurrentOperationMode() != MODE_INIT ) { - // check pump direction + // Check pump direction checkDialOutPumpDirection(); - // check pump controller current + // Check pump controller current checkDialOutPumpMCCurrent(); - // check pump speeds + // Check pump speeds checkDialOutPumpSpeeds(); - // check for home position, zero/low speed + // Check for home position, zero/low speed checkDialOutPumpRotor(); } @@ -540,7 +540,7 @@ } result = DIAL_OUT_PUMP_CONTROL_TO_TARGET_STATE; } - // continue ramp up + // Continue ramp up else { dialOutPumpPWMDutyCyclePctSet += MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE; @@ -581,7 +581,7 @@ } result = DIAL_OUT_PUMP_CONTROL_TO_TARGET_STATE; } - // continue ramp down + // Continue ramp down else { dialOutPumpPWMDutyCyclePctSet -= MAX_DIAL_OUT_PUMP_PWM_STEP_DN_CHANGE; @@ -603,7 +603,7 @@ { DIAL_OUT_PUMP_STATE_T result = DIAL_OUT_PUMP_CONTROL_TO_TARGET_STATE; - // control at set interval + // Control at set interval if ( ++dopControlTimerCounter >= DOP_CONTROL_INTERVAL ) { if ( dialOutPumpControlModeSet == PUMP_CONTROL_MODE_CLOSED_LOOP ) @@ -815,7 +815,7 @@ dopMCDir = ( getMeasuredDialOutPumpMCSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); dopDir = ( getMeasuredDialOutPumpSpeed() >= 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 ( dialOutPumpDirectionSet != dopDir ) { if ( ++errorDialOutPumpDirectionPersistTimerCtr >= DOP_DIRECTION_ERROR_PERSIST ) @@ -825,7 +825,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 ( dialOutPumpDirectionSet != dopMCDir ) { if ( ++errorDialOutPumpDirectionPersistTimerCtr >= DOP_DIRECTION_ERROR_PERSIST ) @@ -862,7 +862,7 @@ { F32 measMotorSpeed = getMeasuredDialOutPumpSpeed(); - // check for pump running while commanded off + // Check for pump running while commanded off if ( FALSE == isDialOutPumpOn ) { if ( measMotorSpeed > DOP_MAX_MOTOR_SPEED_WHILE_OFF_RPM ) @@ -893,7 +893,7 @@ F32 measMotorSpeedInRotorRPM = measMotorSpeed / DOP_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 > DOP_MAX_MOTOR_SPEED_ERROR_RPM ) { if ( ++errorDialOutMotorSpeedPersistTimerCtr >= DOP_MOTOR_SPEED_ERROR_PERSIST ) @@ -908,7 +908,7 @@ errorDialOutMotorSpeedPersistTimerCtr = 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 > DOP_MAX_ROTOR_VS_MOTOR_DIFF_RPM ) { if ( ++errorDialOutRotorSpeedPersistTimerCtr >= DOP_ROTOR_SPEED_ERROR_PERSIST )