Index: Common.h =================================================================== diff -u -r6b43c2eaf10c885e82f33bdb455420e574dc679c -r59871c9964559b5137781af9c2eeed6bab18ef73 --- Common.h (.../Common.h) (revision 6b43c2eaf10c885e82f33bdb455420e574dc679c) +++ Common.h (.../Common.h) (revision 59871c9964559b5137781af9c2eeed6bab18ef73) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file Common.h * -* @author (last) Dara Navaei -* @date (last) 10-Nov-2022 +* @author (last) Sean Nash +* @date (last) 09-Aug-2023 * * @author (original) Sean * @date (original) 04-Feb-2020 @@ -209,7 +209,7 @@ dat1.data.uInt.data = (U32)(d1); \ dat2.dataType = ALARM_DATA_TYPE_U32; \ dat2.data.uInt.data = (U32)(d2); \ - activateAlarm2Data( a, dat1, dat2 ); \ + activateAlarm2Data( a, dat1, dat2, FALSE ); \ } /// Macro to set a specific alarm with 2 pieces of floating point alarm data. @@ -220,7 +220,7 @@ dat1.data.flt.data = (F32)(d1); \ dat2.dataType = ALARM_DATA_TYPE_F32; \ dat2.data.flt.data = (F32)(d2); \ - activateAlarm2Data( a, dat1, dat2 ); \ + activateAlarm2Data( a, dat1, dat2, FALSE ); \ } /// Record structure for unsigned integer event data. @@ -322,6 +322,8 @@ F32 primaryCalcTargetTemp; ///< Primary heater calculated target temperature F32 trimmerCalcCurrentTemp; ///< Trimmer heater calculated current temperature U32 trimmerUseLastDC; ///< Trimmer heater use last duty cycle + F32 previsouFlow; ///< Trimmer heater previous flow L/min + U32 controlCounter; ///< Trimmer heater control count } HEATERS_DATA_T; /// Temperature sensors data structure. @@ -348,8 +350,21 @@ F32 interalTHDRTD; ///< THd RTD channel temperature sensor F32 internalCondSnsrTemp; ///< Conductivity Sensor internal temperature sensor F32 baroTempSensor; ///< Barometric temperature sensor + F32 dialysateInletMovingAvg; ///< Dialysate inlet moving average + F32 redundantOutletMovingAvg; ///< Redundant outlet moving average } TEMPERATURE_SENSORS_DATA_T; +/// Dialysate heating parameters +typedef struct +{ + 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. + BOOL usePriTargetTempEquation; ///< Use primary heater target temperature estimation equation or not. +} DG_CMD_DIALYSATE_HEATING_PARAMS_T; + /// Loadcell measurements struct. typedef struct { @@ -365,6 +380,8 @@ F32 ROFlowRateLPM; ///< RO flow rate in L/min. F32 ROFlowRateWithCPsLPM; ///< RO flow rate with concentrate pumps in L/min. F32 dialysateFlowRateLPM; ///< Dialysate flow rate L/min. + F32 RORawFlowRateLPM; ///< Raw RO flow rate in L/min. + F32 dialysateRawFlowRateLPM; ///< Raw dialysate flow rate in L/min. } FLOW_SENSORS_DATA_T; /// DG switch reservoirs command structure @@ -374,6 +391,54 @@ BOOL useLastTrimmerHeaterDC; ///< Use last trimmer heater duty cycle flag. } DG_SWITCH_RSRVRS_CMD_T; +/// DG change valve settings command structure +typedef struct +{ + U32 valveSettingCmd; ///< DG valve setting command. +} DG_VALVE_SETTING_CMD_REQUEST_T; + +/// DG fill command structure +typedef struct +{ + U32 fillToVolMl; ///< fill to volume in mL. + U32 cmd; ///< DG cmd. + F32 targetFlowRateLPM; ///< target flow rate in LPM. +} DG_FILL_CMD_T; + +/// DG start stop command structure +typedef struct +{ + BOOL start; ///< DG start stop cmd. + U32 acidType; ///< Acid type. + U32 bicarbType; ///< Bicarb type. +} DG_START_STOP_TX_CMD_REQUEST_T; + +/// DG start stop trimmer heater command structure +typedef struct +{ + BOOL start; ///< DG start stop trimmer heater. +} DG_START_STOP_TRIMMER_HEATER_CMD_T; + +typedef struct +{ + BOOL start; ///< DG start stop flush mode. +} DG_FLUSH_MODE_CMD_T; + +typedef struct +{ + BOOL start; ///< DG start stop heat disinfection mode. +} DG_HEAT_DISINFECTION_MODE_CMD_T; + +typedef struct +{ + BOOL start; ///< DG start stop chem disinfection mode. +} DG_CHEM_DISINFECTION_MODE_CMD_T; + +typedef struct +{ + U32 cmd; ///< DG sample water command. +} DG_SAMPLE_WATER_CMD_REQUEST_T; + #pragma pack(push, 1) /// DG usage info structure. typedef struct @@ -385,6 +450,7 @@ U32 lastChemDisCompleteDateEpoch; ///< Last chemical disinfect complete date in epoch. U32 lastChemDisFlushCompleteDateEpoch; ///< Last chemical disinfect flush complete date in epoch. U32 lastHeatDisCompleteDateEpoch; ///< Last heat disinfect complete date in epoch. + U32 lastHeatActiveCoolCompleteDateEpoch; ///< Last heat disinfect active cool complete date in epoch. U32 lastFilterFlushCompleteDateEpoch; ///< Last filter flush complete date in epoch. U32 lastResetTimeEpoch; ///< Last time the record was reset in epoch. U16 crc; ///< CRC for the DG usage info structure. @@ -404,7 +470,6 @@ // **** VectorCAST Definitions **** #ifdef _VECTORCAST_ - #define _enable_IRQ() #define _disable_IRQ() #define _enable_FIQ()