Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -rb20421d84b9049977c04f4752f4fc5697425f25c -r6ba3eebfe02e3918402e30e0bd775bcfbcb06443 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision b20421d84b9049977c04f4752f4fc5697425f25c) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 6ba3eebfe02e3918402e30e0bd775bcfbcb06443) @@ -1639,10 +1639,11 @@ /*********************************************************************//** * @brief - * The testSetDialInPumpTargetDutyCycle function resets the override of the - * measured dialIn pump motor current. + * The testSetBloodPumpTargetDutyCycle function sets the duty cycle of the + * blood pump by calling setBloodPumpTargetFlowRate. * @details Inputs: none - * @details Outputs: adcDialInPumpMCCurrentmA + * @details Outputs: none + * @param value duty cycle of the blood pump (as a percentage). * @return TRUE if reset successful, FALSE if not *************************************************************************/ BOOL testSetBloodPumpTargetDutyCycle( F32 value ) Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rb20421d84b9049977c04f4752f4fc5697425f25c -r6ba3eebfe02e3918402e30e0bd775bcfbcb06443 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision b20421d84b9049977c04f4752f4fc5697425f25c) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 6ba3eebfe02e3918402e30e0bd775bcfbcb06443) @@ -111,7 +111,7 @@ /// Conversion from PWM duty cycle % to commanded pump motor speed. PWM range is 10% to 90%. RPM range is 0 to 3200. 3200 / 0.8 = 4000. #define DIP_PWM_TO_MOTOR_SPEED_RPM(pwm) ( ((pwm) - DIP_PWM_ZERO_OFFSET) * 4000.0F ) // Macro converts PWM to estimate flow rate needed to achieve it. -#define DIP_ML_PER_MIN_FROM_PWM(pwm) ( (( pwm - DIP_PWM_ZERO_OFFSET) * 684.73 ) + 49.121 ) +#define DIP_ML_PER_MIN_FROM_PWM(pwm) ( (( pwm - DIP_PWM_ZERO_OFFSET) * 684.73F ) + 49.121F ) /// Measured dialIn flow is filtered w/ moving average. @@ -264,11 +264,10 @@ * @details Outputs: targetDialInFlowRate, dialInPumpdirection, dialInPumpPWMDutyCyclePct * @param flowRate new target dialIn flow rate * @param dir new dialIn flow direction - * @param mode new control mode - * @param pwm PWM duty cycle to set pump controller to (optional for open loop) + * @param mode new control mode * @return TRUE if new flow rate & dir are set, FALSE if not *************************************************************************/ -BOOL setDialInPumpTargetFlowRate( U32 flowRate, MOTOR_DIR_T dir, PUMP_CONTROL_MODE_T mode) +BOOL setDialInPumpTargetFlowRate( U32 flowRate, MOTOR_DIR_T dir, PUMP_CONTROL_MODE_T mode ) { BOOL result = FALSE; @@ -1646,10 +1645,11 @@ /*********************************************************************//** * @brief - * The testSetDialInPumpTargetDutyCycle function resets the override of the - * measured dialIn pump motor current. + * The testSetDialInPumpTargetDutyCycle function sets the duty cycle of the + * dialysate inlet pump by calling setDialInPumpTargetFlowRate. * @details Inputs: none - * @details Outputs: adcDialInPumpMCCurrentmA + * @details Outputs: none + * @param value duty cycle of the dialysate inlet pump (as a percentage). * @return TRUE if reset successful, FALSE if not *************************************************************************/ BOOL testSetDialInPumpTargetDutyCycle( F32 value ) Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r1fb211e6161cb3df67a0ac6db8743116cb451555 -r6ba3eebfe02e3918402e30e0bd775bcfbcb06443 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 1fb211e6161cb3df67a0ac6db8743116cb451555) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 6ba3eebfe02e3918402e30e0bd775bcfbcb06443) @@ -105,11 +105,11 @@ #define DOP_PWM_ZERO_OFFSET 0.1F ///< 10% PWM duty cycle = zero speed. /// Macro converts a flow rate to an estimated PWM duty cycle %. -#define DOP_PWM_FROM_ML_PER_MIN(rate) ( ( ( rate ) * 0.0009 ) + 0.0972 + DOP_PWM_ZERO_OFFSET ) +#define DOP_PWM_FROM_ML_PER_MIN(rate) ( ( ( rate ) * 0.0009F ) + 0.0972F + DOP_PWM_ZERO_OFFSET ) /// Conversion from PWM duty cycle % to commanded pump motor speed. #define DOP_PWM_TO_MOTOR_SPEED_RPM(pwm) ( ( ( pwm ) - DOP_PWM_ZERO_OFFSET) * 4000.0F ) /// Macro converts a PWM to an estimated flow rate. -#define DOP_ML_PER_MIN_FROM_PWM(pwm) ( ( ( pwm - DOP_PWM_ZERO_OFFSET ) - 0.0972 ) / 0.0009 ) +#define DOP_ML_PER_MIN_FROM_PWM(pwm) ( ( ( pwm - DOP_PWM_ZERO_OFFSET ) - 0.0972F ) / 0.0009F ) #define PUMP_DIR_ERROR_COUNT_MASK 0x3F ///< Bit mask for pump direction error counter. #define DOP_MIN_DIR_CHECK_SPEED_RPM 10.0F ///< Minimum motor speed before we check pump direction. @@ -1647,10 +1647,11 @@ /*********************************************************************//** * @brief - * The testSetDialInPumpTargetDutyCycle function resets the override of the - * measured dialIn pump motor current. + * The testSetBloodPumpTargetDutyCycle function sets the duty cycle of the + * blood pump by calling setDialOutPumpTargetRate. * @details Inputs: none - * @details Outputs: adcDialInPumpMCCurrentmA + * @details Outputs: none + * @param value duty cycle of the dialysate outlet pump (as a percentage). * @return TRUE if reset successful, FALSE if not *************************************************************************/ BOOL testSetDialOutPumpTargetDutyCycle( F32 value ) @@ -1672,5 +1673,4 @@ return result; } - /**@}*/ Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -rb20421d84b9049977c04f4752f4fc5697425f25c -r6ba3eebfe02e3918402e30e0bd775bcfbcb06443 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision b20421d84b9049977c04f4752f4fc5697425f25c) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 6ba3eebfe02e3918402e30e0bd775bcfbcb06443) @@ -911,7 +911,7 @@ #ifndef RUN_PUMPS_OPEN_LOOP setDialInPumpTargetFlowRate( DIALYSATE_FLOW_RATE_FOR_RECIRC, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); #else - setDialInPumpTargetFlowRate( DIALYSATE_FLOW_RATE_FOR_RECIRC, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP, 0.0F ); + setDialInPumpTargetFlowRate( DIALYSATE_FLOW_RATE_FOR_RECIRC, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP); #endif // Begin saline bolus result = SALINE_BOLUS_STATE_IN_PROGRESS; Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rd4bc221d9817b488c2dcd00868386d7036a5c9a1 -r6ba3eebfe02e3918402e30e0bd775bcfbcb06443 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision d4bc221d9817b488c2dcd00868386d7036a5c9a1) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 6ba3eebfe02e3918402e30e0bd775bcfbcb06443) @@ -1668,7 +1668,6 @@ handleTestDialOutSetPWM( message ); break; - // The default cannot be reached in VectorCAST since the cases are run in a for loop default: // Unrecognized message ID received - ignore Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rd4bc221d9817b488c2dcd00868386d7036a5c9a1 -r6ba3eebfe02e3918402e30e0bd775bcfbcb06443 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d4bc221d9817b488c2dcd00868386d7036a5c9a1) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 6ba3eebfe02e3918402e30e0bd775bcfbcb06443) @@ -7404,5 +7404,4 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } - /**@}*/