Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -raf2cd84d3319b1e298057fe2d329aa7824306507 -rf89cac0c61f0068c045411504925373c3731c874 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision af2cd84d3319b1e298057fe2d329aa7824306507) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision f89cac0c61f0068c045411504925373c3731c874) @@ -1610,7 +1610,28 @@ return result; } +/*********************************************************************//** + * @brief + * The testResetBloodPumpRotorCountOverride function resets the override + * of the blood pump rotor counter. + * @details Inputs: none + * @details Outputs: bloodPumpRotorCounter + * @return TRUE if reset successful, FALSE if not + *************************************************************************/ +BOOL testResetBloodPumpRotorCountOverride( void ) +{ + BOOL result = FALSE; + if ( TRUE == isTestingActivated() ) + { + result = TRUE; + bloodPumpRotorCounter.override = OVERRIDE_RESET; + bloodPumpRotorCounter.ovData = bloodPumpRotorCounter.ovInitData; + } + + return result; +} + /*********************************************************************//** * @brief * The testSetDialInPumpTargetDutyCycle function resets the override of the @@ -1625,7 +1646,7 @@ if ( TRUE == isTestingActivated() ) { - targetDialInFlowRate = (S32) BP_ML_PER_MIN_FROM_PWM( value ); + targetBloodFlowRate = (S32) BP_ML_PER_MIN_FROM_PWM( value ); result = TRUE; } Index: firmware/App/Controllers/DialInFlow.h =================================================================== diff -u -raf2cd84d3319b1e298057fe2d329aa7824306507 -rf89cac0c61f0068c045411504925373c3731c874 --- firmware/App/Controllers/DialInFlow.h (.../DialInFlow.h) (revision af2cd84d3319b1e298057fe2d329aa7824306507) +++ firmware/App/Controllers/DialInFlow.h (.../DialInFlow.h) (revision f89cac0c61f0068c045411504925373c3731c874) @@ -84,7 +84,7 @@ BOOL testResetMeasuredDialInPumpMCSpeedOverride( void ); BOOL testSetMeasuredDialInPumpMCCurrentOverride( F32 value ); BOOL testResetMeasuredDialInPumpMCCurrentOverride( void ); -BOOL testSetDialOutPumpTargetDutyCycle( F32 value ); +BOOL testSetDialInPumpTargetDutyCycle( F32 value ); /**@}*/ Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -raf2cd84d3319b1e298057fe2d329aa7824306507 -rf89cac0c61f0068c045411504925373c3731c874 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision af2cd84d3319b1e298057fe2d329aa7824306507) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision f89cac0c61f0068c045411504925373c3731c874) @@ -108,7 +108,7 @@ /// 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_PWM_FROM_ML_PER_MIN(pwm) ( ( ( pwm - DOP_PWM_ZERO_OFFSET - 0.0972 ) / 0.0009 ) ) +#define DOP_ML_PER_MIN_FROM_PWM(pwm) ( ( ( pwm - DOP_PWM_ZERO_OFFSET - 0.0972 ) / 0.0009 ) ) #define PUMP_DIR_ERROR_COUNT_MASK 0x3F ///< Bit mask for pump direction error counter. #define DATA_PUBLISH_COUNTER_START_COUNT 40 ///< Data publish counter start count. @@ -1643,7 +1643,7 @@ if ( TRUE == isTestingActivated() ) { - targetDialInFlowRate = (S32) DOP_PWM_FROM_ML_PER_MIN( value ); + lastGivenRate = (U32) DOP_PWM_FROM_ML_PER_MIN( value ); result = TRUE; } Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r94dab74a6432263dc4569e0cf8f9fa0b01bf1917 -rf89cac0c61f0068c045411504925373c3731c874 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 94dab74a6432263dc4569e0cf8f9fa0b01bf1917) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision f89cac0c61f0068c045411504925373c3731c874) @@ -812,6 +812,15 @@ // MSG_ID_HD_SEND_BLOOD_LEAK_EMB_MODE_RESPONSE BOOL handleSendBloodLeakEmbeddedModeCommandResponse( U32 responseLen, U08* response ); +// MSG_ID_HD_BLOOD_PUMP_SET_PWM +void handleTestBloodPumpSetPWM( MESSAGE_T* message ); + +// MSG_ID_HD_DIAL_IN_SET_PWM +void handleTestDialInSetPWM( MESSAGE_T* message ); + +// MSG_ID_HD_DIAL_OUT_SET_PWM +void handleTestDialOutSetPWM( MESSAGE_T* message ); + /**@}*/ #endif