Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r7c077d84b9db9f8b14d4ab49d4b02a7f41e8f923 -r31a5054c5a9a3c07ecfdced22fe25bb7ce4469cd --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 7c077d84b9db9f8b14d4ab49d4b02a7f41e8f923) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 31a5054c5a9a3c07ecfdced22fe25bb7ce4469cd) @@ -735,8 +735,8 @@ dutyCycle = flow * WATER_SPECIFIC_HEAT_DIVIDED_BY_MINUTES * ( targetTemperature - currentTemperature ) * heaterEfficiency; // Check the boundaries of the calculated duty cycle - dutyCycle = ( dutyCycle > HEATERS_MAX_DUTY_CYCLE ? HEATERS_MAX_DUTY_CYCLE : dutyCycle ); - dutyCycle = ( dutyCycle < HEATERS_MIN_DUTY_CYCLE ? HEATERS_MIN_DUTY_CYCLE : dutyCycle ); + dutyCycle = MIN( dutyCycle, HEATERS_MAX_DUTY_CYCLE ); + dutyCycle = MIN( dutyCycle, HEATERS_MIN_DUTY_CYCLE ); return dutyCycle; } @@ -838,7 +838,6 @@ data.interimTargetTemp = heatersStatus[ DG_PRIMARY_HEATER ].temporaryInterimTemperature; data.targetHeaterFlowLPM = heatersStatus[ DG_PRIMARY_HEATER ].targetROFlow; - broadcastData( MSG_ID_DG_HEATERS_DATA, COMM_BUFFER_OUT_CAN_DG_BROADCAST, (U08*)&data, sizeof( HEATERS_DATA_T ) ); dataPublicationTimerCounter = 0; @@ -871,8 +870,9 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_PRIMARY_HEATER_CJ_TEMP_OUT_OF_RANGE, primaryHeaterInternalTemp ); } - /*/ If any of the temperatures are above the range - /if ( ( FALSE == isPrimaryHeaterTempOutOfRange ) && ( TRUE == isTempOut ) ) +#ifndef IGNORE_HEATERS_MONITOR + // If any of the temperatures are above the range + if ( ( FALSE == isPrimaryHeaterTempOutOfRange ) && ( TRUE == isTempOut ) ) { stopPrimaryHeater(); isPrimaryHeaterTempOutOfRange = TRUE; @@ -884,7 +884,8 @@ { isPrimaryHeaterTempOutOfRange = FALSE; activateSafetyShutdown(); - }*/ + } +#endif } /*********************************************************************//** @@ -913,9 +914,10 @@ //SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_TRIMMER_HEATER_CJ_TEMP_OUT_OF_RANGE, trimmerHeaterColdJunctionTemp ); } +#ifndef IGNORE_HEATERS_MONITOR // If it is above the range for the first time, stop the trimmer heater // and set the variables - /*if ( ( FALSE == isTrimmerHeaterTempOutOfRange ) && ( TRUE == isTempOut ) ) + if ( ( FALSE == isTrimmerHeaterTempOutOfRange ) && ( TRUE == isTempOut ) ) { stopTrimmerHeater(); isTrimmerHeaterTempOutOfRange = TRUE; @@ -926,7 +928,8 @@ ( TRUE == didTimeout( trimmerHeaterTempOutTimer, HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_TIMEOUT_MS ) ) ) { activateSafetyShutdown(); - }*/ + } +#endif } /*********************************************************************//**