Index: firmware/App/Services/DDInterface.c =================================================================== diff -u -rfc697848283d289571f9d365b28acf44beb0883e -rfff7eb3560421130e0cd4788f84bce0a8ee7ff44 --- firmware/App/Services/DDInterface.c (.../DDInterface.c) (revision fc697848283d289571f9d365b28acf44beb0883e) +++ firmware/App/Services/DDInterface.c (.../DDInterface.c) (revision fff7eb3560421130e0cd4788f84bce0a8ee7ff44) @@ -114,7 +114,6 @@ dialysateDeliveryCmdSet.start = FALSE; dialysateDeliveryCmdSet.dialRate = 0.0F; dialysateDeliveryCmdSet.ufRate = 0.0F; - dialysateDeliveryCmdSet.hdfRate = 0.0F; dialysateDeliveryCmdSet.dialTemp = 0.0F; dialysateDeliveryCmdSet.bypassDialyzer = TRUE; dialysateDeliveryCmdSet.acidConvFactor = 0.0F; @@ -383,7 +382,7 @@ * @details \b Message \b Sent: Start/continue generate dialysate command. * @param qd Target dialysate flow rate (Qd). * @param quf Target ultrafiltration rate (Quf) (in mL/min). - * @param qhdf Hemodiafiltration rate (Qhdf) (in mL/min). + * @param qsub Hemodiafiltration rate (QSub) (in mL/min). * @param dialTemp Target dialysate temperature in deg C. * @param bypass Flag indicating whether dialyzer should be bypassed. * @param acidConvFactor Conversion factor for the acid used. @@ -392,19 +391,18 @@ * @param bicarbonate Level of bicarbonate used in mEq/L. * @return none *************************************************************************/ -void cmdStartGenerateDialysate( F32 qd, F32 quf, F32 qhdf, F32 dialTemp, BOOL bypass, F32 acidConvFactor, F32 bicarbConvFactor, U32 sodium, U32 bicarbonate ) +void cmdStartGenerateDialysate( F32 qd, F32 quf, F32 qsub, F32 dialTemp, BOOL bypass, F32 acidConvFactor, F32 bicarbConvFactor, U32 sodium, U32 bicarbonate ) { dialysateDeliveryCmdSet.start = TRUE; dialysateDeliveryCmdSet.dialRate = qd; dialysateDeliveryCmdSet.ufRate = quf; - dialysateDeliveryCmdSet.hdfRate = qhdf; dialysateDeliveryCmdSet.dialTemp = dialTemp; dialysateDeliveryCmdSet.bypassDialyzer = bypass; dialysateDeliveryCmdSet.acidConvFactor = acidConvFactor; dialysateDeliveryCmdSet.bicarbConvFactor = bicarbConvFactor; dialysateDeliveryCmdSet.sodium = sodium; dialysateDeliveryCmdSet.bicarbonate = bicarbonate; - dialysateDeliveryCmdSet.substitutionRate = 0.0F; + dialysateDeliveryCmdSet.substitutionRate = qsub; #ifndef TEST_UI_ONLY sendMessage( MSG_ID_DD_GEN_DIALYSATE_REQUEST_DATA, COMM_BUFFER_OUT_CAN_TD_2_DD, (U08*)(&dialysateDeliveryCmdSet), sizeof( DIALYSATE_DELIVERY_REQ_PAYLOAD_T ) ); @@ -476,7 +474,7 @@ { if ( TRUE == dialysateDeliveryCmdSet.start ) { - dialysateDeliveryCmdSet.hdfRate = qhdf; + dialysateDeliveryCmdSet.substitutionRate = qhdf; #ifndef TEST_UI_ONLY sendMessage( MSG_ID_DD_GEN_DIALYSATE_REQUEST_DATA, COMM_BUFFER_OUT_CAN_TD_2_DD, (U08*)(&dialysateDeliveryCmdSet), sizeof( DIALYSATE_DELIVERY_REQ_PAYLOAD_T ) ); #endif @@ -653,7 +651,19 @@ } } +/*********************************************************************//** + * @brief + * The getTDUFRate function gets the last set UF rate. + * @details \b Inputs: dialysateDeliveryCmdSet.ufRate + * @details \b Outputs: none + * @return Latest uf rate. + *************************************************************************/ +F32 getTDUFRate( void ) +{ + return dialysateDeliveryCmdSet.ufRate; +} + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/