Index: firmware/App/Controllers/DryBiCart.c =================================================================== diff -u -r39fbf9fd993d5e735092cf4ad802d58d0f92f7b1 -rcabab4c56b6840c94126b71696d2c95011cb01a0 --- firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision 39fbf9fd993d5e735092cf4ad802d58d0f92f7b1) +++ firmware/App/Controllers/DryBiCart.c (.../DryBiCart.c) (revision cabab4c56b6840c94126b71696d2c95011cb01a0) @@ -43,8 +43,8 @@ // ********** private definitions ********** #define DRY_BICART_DATA_PUBLISH_INTERVAL ( 250 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the drybicart data published. -#define WCDI2_PRESSURE_OFFSET_PSI 7.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID1 -#define WCID1_PRESSURE_OFFSET_PSI 1.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID2 +#define WCDI2_PRESSURE_OFFSET_PSI 7.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID1 +#define WCID1_PRESSURE_OFFSET_PSI 1.0F ///< The difference between the actual pressure measured at bicart assembly and the measured D66 pressure based on the placement of the sensor for WCID2 #define DRY_BICART_PERSISTENCE_DURATION_MS 200 ///< Fill persistence duration to overcome the pressure overshoot/ drop for beta 1.9 and above. // Dry Bicart Fill Index: firmware/App/Controllers/MixingControl.c =================================================================== diff -u -r337209eec0c5a2a879f2df587e989f19f5a1effe -rcabab4c56b6840c94126b71696d2c95011cb01a0 --- firmware/App/Controllers/MixingControl.c (.../MixingControl.c) (revision 337209eec0c5a2a879f2df587e989f19f5a1effe) +++ firmware/App/Controllers/MixingControl.c (.../MixingControl.c) (revision cabab4c56b6840c94126b71696d2c95011cb01a0) @@ -97,8 +97,8 @@ #define STD_DILUTION_BICARB_POST_MIX_NA 37.0F ///< Bicarb post mix Sodium #define STD_DILUTION_BICARB_POST_MIX_CHO3 33.0F ///< Post mix bicarbonate -#define DIALYSATE_TARGET_STD_NA_SETTINGS 137.0F ///< Standard target sodium -#define DIALYSATE_TARGET_STD_BICARB_SETTING 33.0F ///< Standard bicarb +//#define DIALYSATE_TARGET_STD_NA_SETTINGS 137.0F ///< Standard target sodium +//#define DIALYSATE_TARGET_STD_BICARB_SETTING 33.0F ///< Standard bicarb #define DIALYSATE_TARGET_USER_ADJ_SODIUM_SETTING getTDSodiumConcentration() ///< User Sodium #define DIALYSATE_TARGET_USER_ADJ_BICARB_SETTING getTDBicarbonateConcentration() ///< User bicarb @@ -724,7 +724,7 @@ // Control based on the measured and target conductivity PI_CONTROLLER_SIGNALS_DATA debugBicarbControl; F32 measuredBicarbConductivity = getFilteredConductivity( D17_COND ); - F32 bicarbConductivity = getBicarbConductivityPre();//getBicarbTargetConductivity(); + F32 bicarbConductivity = getBicarbTargetConductivity();//getBicarbConductivityPre(); if ( fabs ( bicarbConductivity - measuredBicarbConductivity ) > BICARB_DEADBAND_CONTROL ) { @@ -755,7 +755,7 @@ // TODO: use the calculated API F32 measuredDialysateConductivity = getFilteredConductivity( D27_COND ); - F32 DialysateConductivity = getTotalConductivity();//getDialysateTargetConductivity(); + F32 DialysateConductivity = getDialysateTargetConductivity();//getTotalConductivity(); PI_CONTROLLER_SIGNALS_DATA debugAcidControl; if ( fabs ( DialysateConductivity - measuredDialysateConductivity ) > ACID_DEADBAND_CONTROL ) Index: firmware/App/Controllers/MixingControl.h =================================================================== diff -u -rcf3c037762699407089411de04bc9d1f4b597784 -rcabab4c56b6840c94126b71696d2c95011cb01a0 --- firmware/App/Controllers/MixingControl.h (.../MixingControl.h) (revision cf3c037762699407089411de04bc9d1f4b597784) +++ firmware/App/Controllers/MixingControl.h (.../MixingControl.h) (revision cabab4c56b6840c94126b71696d2c95011cb01a0) @@ -33,6 +33,9 @@ // ********** public definitions ********** +#define DIALYSATE_TARGET_STD_NA_SETTINGS 137.0F ///< Standard target sodium +#define DIALYSATE_TARGET_STD_BICARB_SETTING 33.0F + #pragma pack(push, 1) /// mixing control data structure typedef struct Index: firmware/App/Services/TDInterface.c =================================================================== diff -u -r39fbf9fd993d5e735092cf4ad802d58d0f92f7b1 -rcabab4c56b6840c94126b71696d2c95011cb01a0 --- firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision 39fbf9fd993d5e735092cf4ad802d58d0f92f7b1) +++ firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision cabab4c56b6840c94126b71696d2c95011cb01a0) @@ -20,6 +20,7 @@ #include "FPOperationModes.h" #include "Messaging.h" #include "MessagePayloads.h" +#include "MixingControl.h" #include "ModeGenDialysate.h" #include "ModeInitPOST.h" #include "ModePreGenDialysate.h" @@ -56,6 +57,8 @@ #define TD_SODIUM_MIN ( 130U ) ///< TD Min acid type index #define TD_SODIUM_MAX ( 155U ) ///< TD Max acid type index + + #define TD_BICARBONATE_MIN ( 20U ) ///< TD Min acid type index #define TD_BICARBONATE_MAX ( 40U ) ///< TD Max acid type index @@ -149,12 +152,12 @@ tdBicarbConvFactor.ovInitData = BICARBONATE_CONVERSION_FACTOR; tdBicarbConvFactor.override = OVERRIDE_RESET; - tdSodium.data = TD_SODIUM_MIN; + tdSodium.data = DIALYSATE_TARGET_STD_NA_SETTINGS; tdSodium.ovData = 0.0F; tdSodium.ovInitData = TD_SODIUM_MIN; tdSodium.override = OVERRIDE_RESET; - tdBicarbonate.data = 0.0F; + tdBicarbonate.data = DIALYSATE_TARGET_STD_BICARB_SETTING; tdBicarbonate.ovData = 0.0F; tdBicarbonate.ovInitData = TD_BICARBONATE_MIN; tdBicarbonate.override = OVERRIDE_RESET;