Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r031627883dbd40abd52312d64a1a3b811478d1c3 -r8cebc7f282f403c99f712d422454c15414b6fc73 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 031627883dbd40abd52312d64a1a3b811478d1c3) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 8cebc7f282f403c99f712d422454c15414b6fc73) @@ -71,7 +71,6 @@ static U32 resMgmtTimer = 0; ///< Used for keeping state time. // DG sensor data -static F32 dgPressures[ NUM_OF_DG_PRESSURE_SENSORS ]; ///< Latest pressures reported by the DG. static F32 dgDialysateTemp = 0.0; ///< Dialysate temperature reported by the DG. static F32 dgRedundantDialysateTemp = 0.0; ///< Redundant dialysate temperature reported by the DG. static F32 dgPrimaryTempSet = 0.0; ///< Primary heater target temperature commanded. @@ -90,11 +89,6 @@ 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 pumps data -static F32 dgROPumpFlowRateMlMin = 0.0; ///< Latest RO water flow rate reported by the DG. -static U32 dgROPumpPressureSetPtPSI = 0; ///< Latest RO pump target pressure reported by the DG. -static U32 dgDrainPumpSpeedSetPtRPM = 0; ///< Latest Drain pump target speed 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. @@ -419,76 +413,6 @@ return ( dgActiveReservoir == dgActiveReservoirSet ); } -/*********************************************************************//** - * @brief - * The getDGPressure function gets the latest pressure reported by the DG - * for a given pressure sensor. - * @details Inputs: dgPressures[] - * @details Outputs: none - * @param sensorID pressure sensor we are getting reading for - * @return Latest pressure reading reported by DG for the given sensor. - *************************************************************************/ -F32 getDGPressure( DG_PRESSURE_SENSORS_T sensorID ) -{ - F32 result = 0.0; - - if ( sensorID < NUM_OF_DG_PRESSURE_SENSORS ) - { - result = dgPressures[ sensorID ]; - } - else - { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_DG_PRESSURE_ID, sensorID ) - } - - return result; -} - -/*********************************************************************//** - * @brief - * The getDGROPumpPressureSetPt function gets the latest RO pump - * pressure set point reported by the DG. - * @details Inputs: dgROPumpPressureSetPtPSI - * @details Outputs: none - * @return Latest RO pump pressure set point reported by DG. - *************************************************************************/ -U32 getDGROPumpPressureSetPt( void ) -{ - U32 result = dgROPumpPressureSetPtPSI; - - return result; -} - -/*********************************************************************//** - * @brief - * The getDGROPumpFlowRateMlMin function gets the latest RO pump flow - * rate reported by the DG. - * @details Inputs: dgROPumpFlowRateMlMin - * @details Outputs: none - * @return Latest RO pump flow rate reported by DG. - *************************************************************************/ -F32 getDGROPumpFlowRateMlMin( void ) -{ - F32 result = dgROPumpFlowRateMlMin; - - return result; -} - -/*********************************************************************//** - * @brief - * The getDGDrainPumpRPMSetPt function gets the latest drain pump RPM - * set point reported by the DG. - * @details Inputs: dgDrainPumpSpeedSetPtRPM - * @details Outputs: none - * @return Latest drain pump RPM set point reported by DG. - *************************************************************************/ -U32 getDGDrainPumpRPMSetPt( void ) -{ - U32 result = dgDrainPumpSpeedSetPtRPM; - - return result; -} - /*********************************************************************//** * @brief * The getLoadCellWeight function gets the current load cell weight. @@ -661,53 +585,6 @@ } } -/*********************************************************************//** - * @brief - * The setDGPressures function sets the latest pressures reported by the DG. - * @details Inputs: none - * @details Outputs: dgPressures[] - * @param roIn latest RO pump inlet pressure reported by DG - * @param roOut latest RO pump outlet pressure reported by DG - * @param drainIn latest drain pump inlet pressure reported by DG - * @param drainOut latest drain pump outlet pressure reported by DG - * @return none - *************************************************************************/ -void setDGPressures( F32 roIn, F32 roOut, F32 drainIn, F32 drainOut ) -{ - dgPressures[ DG_PRESSURE_SENSOR_RO_PUMP_INLET ] = roIn; - dgPressures[ DG_PRESSURE_SENSOR_RO_PUMP_OUTLET ] = roOut; - dgPressures[ DG_PRESSURE_SENSOR_DRAIN_PUMP_INLET ] = drainIn; - dgPressures[ DG_PRESSURE_SENSOR_DRAIN_PUMP_OUTLET ] = drainOut; -} - -/*********************************************************************//** - * @brief - * The setDGROPumpData function sets the latest RO pump data reported by the DG. - * @details Inputs: none - * @details Outputs: dgROPumpPressureSetPtPSI, dgROPumpFlowRateMlMin - * @param presSetPt latest RO pump pressure set point reported by DG - * @param flowRate latest RO pump flow rate (LPM) reported by DG - * @return none - *************************************************************************/ -void setDGROPumpData( U32 presSetPt, F32 flowRate ) -{ - dgROPumpPressureSetPtPSI = presSetPt; - dgROPumpFlowRateMlMin = flowRate * ML_PER_LITER; -} - -/*********************************************************************//** - * @brief - * The setDGDrainPumpData function sets the latest drain pump data reported by the DG. - * @details Inputs: none - * @details Outputs: dgDrainPumpSpeedSetPtRPM - * @param rpmSetPt latest drain pump RPM set point reported by DG - * @return none - *************************************************************************/ -void setDGDrainPumpData( U32 rpmSetPt ) -{ - dgDrainPumpSpeedSetPtRPM = rpmSetPt; -} - /*********************************************************************//** * @brief * The setNewLoadCellReadings function sets the latest DG reservoir load cell