Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r92c8880660a5d7c3b7a098dd61e13b7f7af987f6 -r656f3ada9ab5dff1d6c377d237e799f3ab5ba7c3 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 92c8880660a5d7c3b7a098dd61e13b7f7af987f6) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 656f3ada9ab5dff1d6c377d237e799f3ab5ba7c3) @@ -232,13 +232,11 @@ if( heater < NUM_OF_DG_HEATERS ) { -#ifndef DISABLE_HEATERS_AND_TEMPS - if ( TRUE == heatersStatus[ heater ].hasTargetTempChanged ) + if ( HEATER_EXEC_STATE_OFF == heatersStatus[ heater ].state ) { status = TRUE; heatersStatus[ heater ].startHeaterSignal = TRUE; } -#endif } else { @@ -648,8 +646,7 @@ F32 dutyCycle = calculateTrimmerHeaterDutyCycle( targetTemperature, outletRedundantTemperature, targetFlowLPM, TRUE ); trimmerHeaterControlCounter = 0; - - setHeaterDutyCycle( DG_TRIMMER_HEATER, dutyCycle ); + setHeaterDutyCycle( DG_TRIMMER_HEATER, ( heatersStatus[ DG_TRIMMER_HEATER ].dutycycle + dutyCycle ) ); } return state; @@ -699,39 +696,6 @@ *************************************************************************/ static F32 calculatePrimaryHeaterDutyCycle( F32 targetTemperature, F32 currentTemperature, F32 flow, BOOL checkEfficiency ) { - // Get the primary heater's efficiency and the last fill temperature from the ModeFill - F32 heaterEfficiency = heatersStatus[ DG_PRIMARY_HEATER ].heaterEstGain; - -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_HEATERS_EFFICIENCY ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - if ( TRUE == checkEfficiency ) - { - F32 lastFillTemperature = getLastFillTemperature(); - F32 primaryTargetTemperature = heatersStatus[ DG_PRIMARY_HEATER ].targetTemp; - - // If the last fill temperature > target temperature, it means the primary heater overshot the duty cycle - // so with its efficiency is toned down for the next fill cycle - // If the heater under-shoots the duty cycle, the efficiency increases the duty cycle for the next fill cycle - if ( lastFillTemperature - primaryTargetTemperature < 0.0F ) - { - heaterEfficiency -= ( lastFillTemperature - primaryTargetTemperature ) * PRIMARY_HEATER_DUTY_CYCLE_PER_TEMPERATURE_C; - } - else - { - heaterEfficiency += ( primaryTargetTemperature - lastFillTemperature ) * PRIMARY_HEATER_DUTY_CYCLE_PER_TEMPERATURE_C; - } - - // If the efficiency is less than 0, set it to 0 but if the efficiency is greater than 100, it is not enforced - // to be 100 since the duty cycle range check will cap the duty cycle to 100 anyways. - heaterEfficiency = MAX( heaterEfficiency, 0.0 ); - - // Update the heaters efficiency - heatersStatus[ DG_PRIMARY_HEATER ].heaterEstGain = heaterEfficiency; - } - } - // Duty cycle = ( 69.73 * flow rate * deltaT / primary heater maximum power ) ^ 1/2 // Multiply the duty cycle to the heater efficiency F32 dutyCycle = sqrt( ( WATER_SPECIFIC_HEAT_DIVIDED_BY_MINUTES * fabs( targetTemperature - currentTemperature ) * flow ) / PRIMARY_HEATERS_MAXIMUM_POWER_WATTS );