Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r0bcac6885c8461b05da276fd245b580b7339ddfd -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 0bcac6885c8461b05da276fd245b580b7339ddfd) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -78,6 +78,7 @@ #define HEATERS_MAX_VOLTAGE_OUT_OF_RANGE_TOL 0.2F ///< Heaters max voltage out of range tolerance. #define D5_HEATER_DEADBAND_CONTROL 0.1F ///< Heater dead band range for control. +//#define D5_HEAT_CONTROL_INTERVAL_MS 30000 /// Primary heater control interval in milli seconds #define D5_HEAT_CONTROL_INTERVAL_MS 3000 /// Primary heater control interval in milli seconds #define D5_HEAT_CONTROL_INTERVAL_COUNT ( D5_HEAT_CONTROL_INTERVAL_MS / TASK_GENERAL_INTERVAL ) ///< Primary heater control interval count. #define D45_HEAT_CONTROL_INTERVAL_MS ( 1 * MS_PER_SECOND ) ///< Trimmer heater control interval in milli seconds @@ -524,17 +525,17 @@ // finds the delta temperature to be added with the target temperature // to maintain the target temperature at dialyzer. // Lets calculate the B1,B2 and B3 heat dissipation factors - if ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) ) + if ( TRUE == getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_1_9_HW ) ) { + heatDissipation_b3 = calculateHeatDissipationB3(); + heatDissipation_b1b2 = calculateHeatDissipationB1andB2(); + } + else + { // based on Beta2.0 heat loss model heatDissipation_b3 = calculateBeta2HeatDissipationB3(); heatDissipation_b1b2 = calculateBeta2HeatDissipationB1andB2(); } - else - { - heatDissipation_b3 = calculateHeatDissipationB3(); - heatDissipation_b1b2 = calculateHeatDissipationB1andB2(); - } // Reverse calculation of target temp at D28 to get the target dialyzer temperature targetTempAtD28 = calculateInitialTemp( targetTemp, heatDissipation_b3 ); @@ -601,12 +602,10 @@ if ( ++primaryTargetTempAdjCounter >= d5OuterLoopControlInterval ) { #ifdef __USE_D1_TEMP_ - // Use new RTD sensor placed closed to dialyzer, connected to D1 port measuredTempAtDialyzer = getFilteredTemperatureValue( D1_TEMP ); - #else - if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) != TRUE ) + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_1_9_HW ) == TRUE ) { measuredTempAtDialyzer = getTeensyConductivityTemperatureValue( D27_COND ); } @@ -704,7 +703,7 @@ // Use new RTD sensor placed closed to dialyzer, connected to D1 port measuredTempAtDialyzer = getFilteredTemperatureValue( D1_TEMP ); #else - if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) != TRUE ) + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_1_9_HW ) == TRUE ) { measuredTempAtDialyzer = getTeensyConductivityTemperatureValue( D27_COND ); }