Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rf66d82b848fd33b312f0f24c84fed91b5424b6fc -rac5a409920099e701227c507cbda86d5d1ea8bf8 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision f66d82b848fd33b312f0f24c84fed91b5424b6fc) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision ac5a409920099e701227c507cbda86d5d1ea8bf8) @@ -239,7 +239,6 @@ static void checkDialInPumpFlowRate( void ); static F32 calcDialInFlow( void ); static F32 dialysateInPumpPWMFromTargetFlowRate( F32 QdTarget ); -static void resetDialInPumpRotorCount( void ); /*********************************************************************//** * @brief @@ -1071,7 +1070,6 @@ payload.measMCCurr = getMeasuredDialInPumpMCCurrent(); payload.pwmDC = dialInPumpPWMDutyCyclePctSet * FRACTION_TO_PERCENT_FACTOR; payload.rotorCount = getDialInPumpRotorCount(); - payload.flowSigStrength = 0.0; broadcastData( MSG_ID_DIALYSATE_FLOW_DATA, COMM_BUFFER_OUT_CAN_HD_BROADCAST, (U08*)&payload, sizeof( DIALIN_PUMP_STATUS_PAYLOAD_T ) ); dialInFlowDataPublicationTimerCounter = 0; } @@ -1832,14 +1830,14 @@ /*********************************************************************//** * @brief - * The testSetDialInPumpRotorCountOverride function overrides the dialin pump + * The testSetDialysateInPumpRotorCountOverride function overrides the dialin pump * rotor counter value. * @details Inputs: none * @details Outputs: dialInPumpRotorCounter * @param value override dialin pump rotor counter value * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testSetDialInPumpRotorCountOverride( U32 value ) +BOOL testSetDialysateInPumpRotorCountOverride( U32 value ) { BOOL result = FALSE; Index: firmware/App/Controllers/DialInFlow.h =================================================================== diff -u -rf66d82b848fd33b312f0f24c84fed91b5424b6fc -rac5a409920099e701227c507cbda86d5d1ea8bf8 --- firmware/App/Controllers/DialInFlow.h (.../DialInFlow.h) (revision f66d82b848fd33b312f0f24c84fed91b5424b6fc) +++ firmware/App/Controllers/DialInFlow.h (.../DialInFlow.h) (revision ac5a409920099e701227c507cbda86d5d1ea8bf8) @@ -46,7 +46,6 @@ F32 measMCCurr; F32 pwmDC; U32 rotorCount; - F32 flowSigStrength; } DIALIN_PUMP_STATUS_PAYLOAD_T; // ********** public function prototypes ********** @@ -61,6 +60,7 @@ BOOL homeDialInPump( void ); BOOL isDialInPumpRunning( void ); BOOL isDialInPumpRampComplete( void ); +void resetDialInPumpRotorCount( void ); SELF_TEST_STATUS_T execDialInFlowTest( void ); @@ -87,7 +87,7 @@ BOOL testSetMeasuredDialInPumpMCCurrentOverride( F32 value ); BOOL testResetMeasuredDialInPumpMCCurrentOverride( void ); BOOL testSetDialInPumpTargetDutyCycle( F32 value ); -BOOL testSetDialysateInPumpRotorCountOverride( void ); +BOOL testSetDialysateInPumpRotorCountOverride( U32 value ); BOOL testResetDialysateInPumpRotorCountOverride( void ); /**@}*/ Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -ra4e044315bbfaaeff11cb9391485897458a48a5f -rac5a409920099e701227c507cbda86d5d1ea8bf8 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision a4e044315bbfaaeff11cb9391485897458a48a5f) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision ac5a409920099e701227c507cbda86d5d1ea8bf8) @@ -3592,6 +3592,38 @@ /*********************************************************************//** * @brief + * The handleHDDialInPumpRotorCountOverrideRequest function handles a request to + * override the dialysate inlet pump rotor count. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleHDDialInPumpRotorCountOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // Verify payload length + if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetDialysateInPumpRotorCountOverride( payload.state.u32 ); + } + else + { + result = testResetDialysateInPumpRotorCountOverride(); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief * The handleTestBloodPumpRotorMeasuredSpeedOverrideRequest function handles a request to * override the measured blood pump rotor speed (RPM). * @details Inputs: none