Index: firmware/App/Controllers/DGInterface.h =================================================================== diff -u -r549119eae64732f124d22df66de4fc88c56193c0 -r9a45dcbdfae33fc06479d99b8d52bada8f682194 --- firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 549119eae64732f124d22df66de4fc88c56193c0) +++ firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 9a45dcbdfae33fc06479d99b8d52bada8f682194) @@ -32,15 +32,25 @@ // ********** public definitions ********** +#define DEFAULT_TARGET_FILL_FLOW_RATE_LPM 0.8 ///< Default target fill flow rate in L/min. + // TODO remove the #defines #define DRAIN_RESERVOIR_TO_VOLUME_ML 0 ///< Drain reservoir to this volume (in mL) during treatment. #define FILL_RESERVOIR_TO_VOLUME_ML 1700 ///< Fill reservoir to this volume (in mL) during treatment. #define FILL_RESERVOIR_TO_VOLUME_LOW_FLOW_ML 1300 ///< Fill reservoir to this volume (in mL) during treatment if dialysate flow is slow. #define SLOW_DIALYSATE_FLOW_ML_MIN 250 ///< Threshold for slow dialysate flow designation. -/// Dialysate flow meter data struct. +/// DG Concentrate ratios data structure. typedef struct { + F32 acidMixingRatio; ///< Acid mixing ratio + F32 bicarbMixingRatio; ///< Bicarb mixing ratio + U32 fillPrepTimeMS; ///< Fill prepare time in milliseconds +} DG_MIXING_RATIOS_T; + +/// Dialysate flow meter data structure. +typedef struct +{ F32 measuredDialysateFlowRate; ///< Dialysate flow meter rate average measurement } DIALYSATE_FLOW_METER_DATA_T; @@ -128,6 +138,7 @@ F32 getReservoirWeightLargeFilter( DG_RESERVOIR_ID_T resID ); F32 getDialysateTemperature( void ); DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ); +DG_MIXING_RATIOS_T getDGMixingRatios( void ); void setDGOpMode( U32 opMode, U32 subMode ); void setDialysateTemperatureReadings( F32 temp1, F32 temp2 ); @@ -136,13 +147,14 @@ void setDialysateFlowData( F32 flowRate ); void setNewLoadCellReadings( F32 res1Primary, F32 res1Backup, F32 res2Primary, F32 res2Backup ); void setDGDisinfectsStates( DG_DISINFECT_UI_STATES_T states ); +void setDGMixingRatios( DG_MIXING_RATIOS_T ratios ); void cmdSetDGDialysateTargetTemps( F32 primaryHtrTemp, F32 trimmerHtrTemp ); void cmdStartDG( void ); void cmdStopDG( void ); void cmdSetDGActiveReservoir( DG_RESERVOIR_ID_T resID ); void cmdChangeDGValveSetting( DG_VALVE_SETTING_ID_T valveSettingID ); -void cmdStartDGFill( U32 fillToVolMl ); +void cmdStartDGFill( U32 fillToVolMl, F32 targetFlowLPM ); void cmdStopDGFill( void ); void cmdStartDGDrain( U32 drainToVolMl, BOOL tareLoadCell, BOOL rinse, BOOL start ); void cmdStartDGTrimmerHeater( void ); @@ -154,6 +166,7 @@ void cmdStopDGHeatDisinfect( void ); void cmdStartDGChemicalDisinfect( void ); void cmdStopDGChemicalDisinfect( void ); +void cmdRequestDGMixingRatios( void ); void handleDGCommandResponse( DG_CMD_RESPONSE_T *dgCmdRespPtr ); BOOL getDGCommandResponse( U32 commandID, DG_CMD_RESPONSE_T *cmdRespPtr );