From 8332a158993caf2a718e046e145d5cd3dc4bb63d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 10 May 2015 23:03:24 -0700 Subject: [PATCH] Fix testing of runaway options in temperature.cpp --- Marlin/temperature.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 8aee2f73e..5ca03a757 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -73,14 +73,14 @@ unsigned char soft_pwm_bed; int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only #endif -#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED +#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED) enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway }; void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc); - #if THERMAL_PROTECTION_HOTENDS + #ifdef THERMAL_PROTECTION_HOTENDS static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset }; static millis_t thermal_runaway_timer[4]; // = {0,0,0,0}; #endif - #if THERMAL_PROTECTION_BED + #ifdef THERMAL_PROTECTION_BED static TRState thermal_runaway_bed_state_machine = TRReset; static millis_t thermal_runaway_bed_timer; #endif @@ -609,7 +609,7 @@ void manage_heater() { // Loop through all extruders for (int e = 0; e < EXTRUDERS; e++) { - #if THERMAL_PROTECTION_HOTENDS + #ifdef THERMAL_PROTECTION_HOTENDS thermal_runaway_protection(&thermal_runaway_state_machine[e], &thermal_runaway_timer[e], current_temperature[e], target_temperature[e], e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS); #endif @@ -673,7 +673,7 @@ void manage_heater() { #if TEMP_SENSOR_BED != 0 - #if THERMAL_PROTECTION_BED + #ifdef THERMAL_PROTECTION_BED thermal_runaway_protection(&thermal_runaway_bed_state_machine, &thermal_runaway_bed_timer, current_temperature_bed, target_temperature_bed, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); #endif @@ -1014,7 +1014,7 @@ void tp_init() { } #endif -#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED +#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED) void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {