Index: firmware/App/Services/DDInterface.c =================================================================== diff -u -r6f02ff4686ec9dfc60247e9ed3fc9c5cc7771543 -r8f8e52d51c3b9082fe932fce1cca8610f5ac97d3 --- firmware/App/Services/DDInterface.c (.../DDInterface.c) (revision 6f02ff4686ec9dfc60247e9ed3fc9c5cc7771543) +++ firmware/App/Services/DDInterface.c (.../DDInterface.c) (revision 8f8e52d51c3b9082fe932fce1cca8610f5ac97d3) @@ -97,16 +97,18 @@ *************************************************************************/ void resetDDInterface( void ) { - ddStarted = FALSE; - ddStartCommandSent = FALSE; + ddStarted = FALSE; + ddStartCommandSent = FALSE; - dialysateDeliveryCmdSet.start = FALSE; - dialysateDeliveryCmdSet.dialRate = 0.0F; - dialysateDeliveryCmdSet.ufRate = 0.0F; - dialysateDeliveryCmdSet.dialTemp = 0.0F; - dialysateDeliveryCmdSet.bypassDialyzer = TRUE; - dialysateDeliveryCmdSet.acidType = 0; - dialysateDeliveryCmdSet.bicarbType = 0; + dialysateDeliveryCmdSet.start = FALSE; + dialysateDeliveryCmdSet.dialRate = 0.0F; + dialysateDeliveryCmdSet.ufRate = 0.0F; + dialysateDeliveryCmdSet.dialTemp = 0.0F; + dialysateDeliveryCmdSet.bypassDialyzer = TRUE; + dialysateDeliveryCmdSet.acidConvFactor = 0.0F; + dialysateDeliveryCmdSet.bicarbConvFactor = 0.0F; + dialysateDeliveryCmdSet.sodium = 0; + dialysateDeliveryCmdSet.bicarbonate = 0; } /**********************************************************************//** @@ -293,19 +295,23 @@ * @param quf Target ultrafiltration rate (Quf). * @param dialTemp Target dialysate temperature in deg C. * @param bypass Flag indicating whether dialyzer should be bypassed. - * @param acid Type of acid concentrate used. - * @param bicarb Type of bicarbonate concentrate used. + * @param acidConvFactor Conversion factor for the acid used. + * @param bicarbConvFactor Conversion factor for the bicarbonate used. + * @param sodium Level of sodium used in mEq/L. + * @param bicarbonate Level of bicarbonate used in mEq/L. * @return none *************************************************************************/ -void cmdStartGenerateDialysate( F32 qd, F32 quf, F32 dialTemp, BOOL bypass, ACID_CONCENTRATE_TYPE_T acid, BICARB_CONCENTRATE_TYPE_T bicarb ) +void cmdStartGenerateDialysate( F32 qd, F32 quf, F32 dialTemp, BOOL bypass, F32 acidConvFactor, F32 bicarbConvFactor, U32 sodium, U32 bicarbonate ) { - dialysateDeliveryCmdSet.start = TRUE; - dialysateDeliveryCmdSet.dialRate = qd; - dialysateDeliveryCmdSet.ufRate = quf; - dialysateDeliveryCmdSet.dialTemp = dialTemp; - dialysateDeliveryCmdSet.bypassDialyzer = bypass; - dialysateDeliveryCmdSet.acidType = (U32)acid; - dialysateDeliveryCmdSet.bicarbType = (U32)bicarb; + dialysateDeliveryCmdSet.start = TRUE; + dialysateDeliveryCmdSet.dialRate = qd; + dialysateDeliveryCmdSet.ufRate = quf; + dialysateDeliveryCmdSet.dialTemp = dialTemp; + dialysateDeliveryCmdSet.bypassDialyzer = bypass; + dialysateDeliveryCmdSet.acidConvFactor = acidConvFactor; + dialysateDeliveryCmdSet.bicarbConvFactor = bicarbConvFactor; + dialysateDeliveryCmdSet.sodium = sodium; + dialysateDeliveryCmdSet.bicarbonate = bicarbonate; #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 ) );