Index: firmware/App/DGCommon.h =================================================================== diff -u -r54b7dbef86af8d97ed2edfc87f806295e45b5964 -r09bab7093c44ef358e505bfcef016ffb39f56bd9 --- firmware/App/DGCommon.h (.../DGCommon.h) (revision 54b7dbef86af8d97ed2edfc87f806295e45b5964) +++ firmware/App/DGCommon.h (.../DGCommon.h) (revision 09bab7093c44ef358e505bfcef016ffb39f56bd9) @@ -25,7 +25,7 @@ #define DG_VERSION_MAJOR 0 #define DG_VERSION_MINOR 6 #define DG_VERSION_MICRO 0 -#define DG_VERSION_BUILD 14 +#define DG_VERSION_BUILD 43 // ********** build switches ********** Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -r54b7dbef86af8d97ed2edfc87f806295e45b5964 -r09bab7093c44ef358e505bfcef016ffb39f56bd9 --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 54b7dbef86af8d97ed2edfc87f806295e45b5964) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision 09bab7093c44ef358e505bfcef016ffb39f56bd9) @@ -61,6 +61,9 @@ #define BICARB_CONCENTRATION_BOTTLE_VOLUME_ML 3000.0 ///< Volume of bicarb concentration in ml. #define CONCENTRATION_BOTTLE_LOW_VOLUME_ML 100.0 ///< Concentration bottle low volume in ml. +#define FLOW_MOVING_AVG_TIME_INTERVAL ( 1 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Fill flow moving average time interval. +#define NUMBER_OF_FLOW_SAMPLES_FOR_MOVING_AVG 10.0 ///< Number of flow samples to collect for moving average. + /// Multiplier to convert flow (mL/min) into volume (mL) for period of general task interval. static const F32 FLOW_INTEGRATOR = ( (F32)TASK_GENERAL_INTERVAL / (F32)( SEC_PER_MIN * MS_PER_SECOND ) ); @@ -74,7 +77,7 @@ static U32 concentrateTestStartTime; ///< Starting time for concentrate test. static U32 concentratePumpPrimeCount; ///< Interval count for concentrate pump prime. -static F32 totalROFlowRate_mL_min; ///< Total RO flow rate over period of time. +static F32 totalROFlowRate_mL_min; ///< Total RO flow rate over period of time. static F32 acidConductivityTotal; ///< Total of acid conductivity during fill. static F32 dialysateConductivityTotal; ///< Total of dialysate conductivity during fill. static U32 conductivitySampleCount; ///< Sample count of conductivity during fill. @@ -143,8 +146,8 @@ // NOTE: The target flow rate should be set prior to setting the start primary heater // because the initial guess in the heaters driver needs the target flow to calculate // the new PWMs for the main and small primary heaters - setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); - startPrimaryHeater(); + //setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); + startHeater( DG_PRIMARY_HEATER ); } /*********************************************************************//** @@ -539,7 +542,7 @@ static BOOL checkDialysateTemperature( void ) { F32 const dialysateTemp = getTemperatureValue( TEMPSENSORS_OUTLET_PRIMARY_HEATER ); - F32 const targetTemp = getPrimaryHeaterTargetTemperature(); + F32 const targetTemp = getHeaterTargetTemperature( DG_PRIMARY_HEATER ); return ( ( fabs( dialysateTemp - targetTemp ) <= DIALYSATE_TEMPERATURE_TOLERANCE_C ) ? TRUE : FALSE ); } Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r799b1f2e7a128ce670e7c4cdfd60f7991534b699 -r09bab7093c44ef358e505bfcef016ffb39f56bd9 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 799b1f2e7a128ce670e7c4cdfd60f7991534b699) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 09bab7093c44ef358e505bfcef016ffb39f56bd9) @@ -23,7 +23,6 @@ #include "DrainPump.h" #include "Fans.h" #include "FluidLeak.h" -#include "Heaters.h" #include "LoadCell.h" #include "MessageSupport.h" #include "ModeChemicalDisinfect.h" @@ -62,6 +61,9 @@ // MSG_ID_DG_EVENT BOOL sendEvent( DG_EVENT_ID_T event, EVENT_DATA_T dat1, EVENT_DATA_T dat2 ); +// Serialize message +U32 serializeMessage( MESSAGE_T msg, COMM_BUFFER_T buffer, BOOL ackReq ); + // MSG_ID_ALARM_TRIGGERED BOOL broadcastAlarmTriggered( U32 alarm, ALARM_DATA_T almData1, ALARM_DATA_T almData2 ); @@ -92,18 +94,12 @@ // MSG_ID_DRAIN_PUMP_DATA BOOL broadcastDrainPumpData( DRAIN_PUMP_DATA_T *drainPumpData ); -// MSG_ID_DG_CONCENTRATE_PUMP_DATA -BOOL broadcastConcentratePumpData( void * concentratePumpDataPtr ); - // MSG_ID_DG_PRESSURES_DATA BOOL broadcastPressureSensorsData( F32 measROIn, F32 measROOut, F32 measDrainIn, F32 measDrainOut ); // MSG_ID_DG_RESERVOIR_DATA BOOL broadcastReservoirData( U32 resID, U32 fillToVol, U32 drainToVol ); -// MSG_ID_HEATERS_READINGS -BOOL broadcastHeatersData( HEATERS_DATA_T *heatersData ); - // MSG_ID_TEMPERATURE_SENSORS_READINGS BOOL broadcastTemperatureSensorsData( TEMPERATURE_SENSORS_DATA_T* tempSensorsData );