Index: firmware/App/Controllers/DGInterface.h =================================================================== diff -u -ra19a676d1e67bb3e1aca9e9bba49727f9d5f8b38 -r7c8ec681f8c5dc44674893b5c3924a6203f2c8d0 --- firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision a19a676d1e67bb3e1aca9e9bba49727f9d5f8b38) +++ firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 7c8ec681f8c5dc44674893b5c3924a6203f2c8d0) @@ -18,6 +18,7 @@ #define __DG_H__ #include "HDCommon.h" +#include "DGDefs.h" /** * @defgroup DGInterface DGInterface @@ -30,23 +31,8 @@ // ********** public definitions ********** -/// Enumeration of DG operation modes. -typedef enum DG_Op_Modes -{ - DG_MODE_FAUL = 0, ///< Fault mode. - DG_MODE_SERV, ///< Service mode. - DG_MODE_INIT, ///< Initialization & POST mode. - DG_MODE_STAN, ///< Standby mode - connected to HD. - DG_MODE_SOLO, ///< Standby Solo mode - no HD connected. - DG_MODE_CIRC, ///< Re-circulate mode. - DG_MODE_FILL, ///< Fill mode. - DG_MODE_DRAI, ///< Drain mode. - DG_MODE_FLUS, ///< Flush mode. - DG_MODE_DISI, ///< Disinfect mode. - DG_MODE_CHEM, ///< Chemical Disinfect mode. - DG_MODE_NLEG, ///< Not legal - an illegal mode transition occurred. - NUM_OF_DG_MODES -} DG_OP_MODE_T; +#define DRAIN_RESERVOIR_TO_VOLUME_ML 200 ///< 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. /// Enumeration of DG reservoirs. typedef enum DG_Reservoirs @@ -69,15 +55,19 @@ // ********** public function prototypes ********** void initDGInterface( void ); +void initTreatmentReservoirMgmt( void ); +void execTreatmentReservoirMgmt( void ); DG_OP_MODE_T getDGOpMode( void ); +U32 getDGSubMode( void ); DG_RESERVOIR_ID_T getDGActiveReservoir( void ); F32 getDGPressure( DG_PRESSURE_SENSORS_T sensorID ); U32 getDGROPumpPressureSetPt( void ); F32 getDGROPumpFlowRateMlMin( void ); U32 getDGDrainPumpRPMSetPt( void ); -void setDGOpMode( U32 opMode ); +void setDGOpMode( U32 opMode, U32 subMode ); +void setDialysateTemperatureReadings( F32 temp1, F32 temp2 ); void setDGDialysateTemperatures( F32 primaryHtrTemp, F32 trimmerHtrTemp ); void setDGReservoirsData( DG_RESERVOIR_ID_T resID, U32 fillVol, U32 drainVol ); void setDGPressures( F32 roIn, F32 roOut, F32 drainIn, F32 drainOut ); @@ -90,6 +80,8 @@ void cmdSetDGActiveReservoir( DG_RESERVOIR_ID_T resID ); void cmdStartDGFill( U32 fillToVolMl ); void cmdStartDGDrain( U32 drainToVolMl ); +void cmdStartDGTrimmerHeater( void ); +void cmdStopDGTrimmerHeater( void ); void cmdDGSampleWater( void ); /**@}*/