Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r8cebc7f282f403c99f712d422454c15414b6fc73 -rd39ef6232e746a4f2d425135208602670fae60bd --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 8cebc7f282f403c99f712d422454c15414b6fc73) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision d39ef6232e746a4f2d425135208602670fae60bd) @@ -89,6 +89,9 @@ static U32 lgLoadCellReadingsIdx = 0; ///< Index for next sample in large load cell rolling average sample array. static F32 lgLoadCellReadingsTotal[ NUM_OF_DG_RESERVOIRS ]; ///< Rolling total - used to calc large load cell moving average. +// DG Dialysate flow rate +static F32 dgDialysateFlowRateMlMin = 0.0; ///< Latest dialysate flow rate reported by the DG. + // Reservoir data static DG_RESERVOIR_ID_T dgActiveReservoir = DG_RESERVOIR_2; ///< Latest active reservoir reported by the DG. static DG_RESERVOIR_ID_T dgActiveReservoirSet = DG_RESERVOIR_2; ///< Active reservoir commanded. @@ -415,6 +418,21 @@ /*********************************************************************//** * @brief + * The getDGDialysateFlowRateMlMin function gets the latest dialysate flow + * rate reported by the DG. + * @details Inputs: dgDialysateFlowRateMlMin + * @details Outputs: none + * @return Latest dialysate flow rate reported by DG. + *************************************************************************/ +F32 getDGDialysateFlowRateMlMin( void ) +{ + F32 result = dgDialysateFlowRateMlMin; + + return result; +} + +/*********************************************************************//** + * @brief * The getLoadCellWeight function gets the current load cell weight. * @details Inputs: loadCellWeightInGrams * @details Outputs: none @@ -584,6 +602,20 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_HD_INVALID_RESERVOIR_ID, resID ); } } + +/*********************************************************************//** + * @brief + * The setDialysateFlowData function sets the latest dialysate flow data + * reported by the DG. + * @details Inputs: none + * @details Outputs: dgDialysateFlowRateMlMin + * @param flowRate latest dialysate flow rate (LPM) reported by DG + * @return none + *************************************************************************/ +void setDialysateFlowData( F32 flowRate ) +{ + dgDialysateFlowRateMlMin = flowRate; +} /*********************************************************************//** * @brief