Index: firmware/App/Services/Reservoirs.h =================================================================== diff -u -r38974e7129adace42bc44cacbf384a0b1442046c -reeb4e9c7c8ca2bc41168353c3d30f311080972b2 --- firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision 38974e7129adace42bc44cacbf384a0b1442046c) +++ firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision eeb4e9c7c8ca2bc41168353c3d30f311080972b2) @@ -20,7 +20,6 @@ #include "DGCommon.h" #include "DGDefs.h" -#include "Heaters.h" // TODO maybe remove this and bring TARGET_TEMPS_AND_TIME_PAYLOAD_T to reservoirs? #include "NVDataMgmt.h" /** @@ -34,60 +33,58 @@ // ********** public definitions ********** #define MAX_RESERVOIR_VOLUME_ML 2000 ///< Maximum reservoir volume in mL. -// TODO the extra temperature includes 1 degree of extra temperature to account for the concentrate pumps #define RESERVOIR_EXTRA_TEMPERATURE 2.0 ///< Reservoirs extra margin temperature. /// Fill command data structure. typedef struct { - U32 fillToVolumeMl; ///< Target volume to fill to (in mL) - U32 cmd; ///< General command (start/stop) - F32 targetFlowLPM; ///< Target flow rate L/min + U32 fillToVolumeMl; ///< Target volume to fill to (in mL) + U32 cmd; ///< General command (start/stop) + F32 targetFlowLPM; ///< Target flow rate L/min } FILL_CMD_T; /// Drain command data structure. typedef struct { - U32 targetVolume; ///< Target volume to drain to (in mL) - BOOL tareLoadCell; ///< Flag to tare load call - BOOL rinseConcentrateLines; ///< Flag indicates to rinse concentrate lines or not - U32 cmd; ///< General command (start/stop) + U32 targetVolume; ///< Target volume to drain to (in mL) + BOOL tareLoadCell; ///< Flag to tare load call + BOOL rinseConcentrateLines; ///< Flag indicates to rinse concentrate lines or not + U32 cmd; ///< General command (start/stop) } DRAIN_CMD_T; /// DG command response data record. typedef struct { - U32 commandID; ///< The command DG is responding to - BOOL rejected; ///< Flag indicates if the command has been rejected - U32 rejectCode; ///< Reason code for rejecting the command + U32 commandID; ///< The command DG is responding to + BOOL rejected; ///< Flag indicates if the command has been rejected + U32 rejectCode; ///< Reason code for rejecting the command } DG_CMD_RESPONSE_T; -// TODO add doxygen comments /// Dialysate heating parameters typedef struct { - F32 trimmerTargetTemperature; - U32 timeReservoirCycleMS; - F32 timeReservoirFillMS; - U32 timeReservoirWait2SwitchMS; - F32 dialysateFlowLPM; + F32 trimmerTargetTemperature; ///< Trimmer Target temperature + U32 timeReservoirCycleMS; ///< Reservoir cycle time in milliseconds + F32 timeReservoirFillMS; ///< Reservoir fill time in milliseconds + U32 timeReservoirWait2SwitchMS; ///< Wait to switch active reservoir time in milliseconds + F32 dialysateFlowLPM; ///< Dialysate flow rate in L/min } DG_CMD_DIALYSATE_HEATING_PARAMS_T; /// Reservoir data struct. typedef struct { - U32 activeReservoir; ///< Active reservoir ID - U32 fillToVolumeMl; ///< Volume target to fill to - U32 drainToVolumeMl; ///< Volume target to drain to - U32 timeReservoirCycleMS; - U32 timeReservoirFill2SwitchMS; - F32 timeUFDecayMS; - F32 tempUFFill; - F32 tempReservoirUseActual; - F32 tempReservoirEndFill; - F32 tempAvgFill; - F32 tempLastFill; - F32 timereservoirFill; + U32 activeReservoir; ///< Active reservoir ID + U32 fillToVolumeMl; ///< Volume target to fill to + U32 drainToVolumeMl; ///< Volume target to drain to + U32 timeReservoirCycleMS; ///< Reservoir cycle time in milliseconds + U32 timeReservoirFill2SwitchMS; ///< Reservoir fill to switch time in milliseconds + F32 timeUFDecayMS; ///< Ultrafilter temperature decay time in milliseconds + F32 tempUFFill; ///< Ultrafilter fill time in milliseconds + F32 tempReservoirUseActual; ///< Reservoir actual temperature + F32 tempReservoirEndFill; ///< Reservoir end fill temperature + F32 tempAvgFill; ///< Average fill temperature + F32 tempLastFill; ///< Last fill temperature + F32 timereservoirFill; ///< Reservoir fill time in milliseconds } RESERVOIR_DATA_T; // ********** public function prototypes ********** @@ -110,7 +107,6 @@ DG_RESERVOIR_ID_T getInactiveReservoir( void ); F32 getReservoirWeight( DG_RESERVOIR_ID_T reservoirId ); -// Heaters target temperature function prototype void setDialysateHeatingParameters( DG_CMD_DIALYSATE_HEATING_PARAMS_T params ); U32 getTargetFillVolumeML( void ); F32 getTargetFillFlowRateLPM( void );