Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -rf5dc98b3d5fcd39e3ab502fbe81110e188ce0ec5 -reeb4e9c7c8ca2bc41168353c3d30f311080972b2 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision f5dc98b3d5fcd39e3ab502fbe81110e188ce0ec5) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision eeb4e9c7c8ca2bc41168353c3d30f311080972b2) @@ -330,7 +330,7 @@ heatersStatus[ DG_TRIMMER_HEATER ].targetTemp = heaterCmdPtr->targetTemp; // TODo do we need to remove this since the trimmer heater is set in the reservoirs #ifndef DISABLE_HEATERS_AND_TEMPS - //heatersStatus[ DG_TRIMMER_HEATER ].startHeaterSignal = TRUE; // DEBUG_DENALI + heatersStatus[ DG_TRIMMER_HEATER ].startHeaterSignal = TRUE; #endif } else @@ -730,8 +730,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; } @@ -833,7 +833,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; @@ -866,8 +865,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; @@ -879,7 +879,8 @@ { isPrimaryHeaterTempOutOfRange = FALSE; activateSafetyShutdown(); - }*/ + } +#endif } /*********************************************************************//** @@ -908,9 +909,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; @@ -921,7 +923,8 @@ ( TRUE == didTimeout( trimmerHeaterTempOutTimer, HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_TIMEOUT_MS ) ) ) { activateSafetyShutdown(); - }*/ + } +#endif } /*********************************************************************//**