Browse Source

Fix testing of runaway options in temperature.cpp

Scott Lahteine 10 years ago
parent
commit
8332a15899
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      Marlin/temperature.cpp

+ 6
- 6
Marlin/temperature.cpp View File

@@ -73,14 +73,14 @@ unsigned char soft_pwm_bed;
73 73
   int current_raw_filwidth = 0;  //Holds measured filament diameter - one extruder only
74 74
 #endif  
75 75
 
76
-#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED
76
+#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED)
77 77
   enum TRState { TRReset, TRInactive, TRFirstHeating, TRStable, TRRunaway };
78 78
   void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
79
-  #if THERMAL_PROTECTION_HOTENDS
79
+  #ifdef THERMAL_PROTECTION_HOTENDS
80 80
     static TRState thermal_runaway_state_machine[4] = { TRReset, TRReset, TRReset, TRReset };
81 81
     static millis_t thermal_runaway_timer[4]; // = {0,0,0,0};
82 82
   #endif
83
-  #if THERMAL_PROTECTION_BED
83
+  #ifdef THERMAL_PROTECTION_BED
84 84
     static TRState thermal_runaway_bed_state_machine = TRReset;
85 85
     static millis_t thermal_runaway_bed_timer;
86 86
   #endif
@@ -609,7 +609,7 @@ void manage_heater() {
609 609
   // Loop through all extruders
610 610
   for (int e = 0; e < EXTRUDERS; e++) {
611 611
 
612
-    #if THERMAL_PROTECTION_HOTENDS
612
+    #ifdef THERMAL_PROTECTION_HOTENDS
613 613
       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);
614 614
     #endif
615 615
 
@@ -673,7 +673,7 @@ void manage_heater() {
673 673
 
674 674
   #if TEMP_SENSOR_BED != 0
675 675
   
676
-    #if THERMAL_PROTECTION_BED
676
+    #ifdef THERMAL_PROTECTION_BED
677 677
       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);
678 678
     #endif
679 679
 
@@ -1014,7 +1014,7 @@ void tp_init() {
1014 1014
   }
1015 1015
 #endif
1016 1016
 
1017
-#if THERMAL_PROTECTION_HOTENDS || THERMAL_PROTECTION_BED
1017
+#if defined(THERMAL_PROTECTION_HOTENDS) || defined(THERMAL_PROTECTION_BED)
1018 1018
 
1019 1019
   void thermal_runaway_protection(TRState *state, millis_t *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {
1020 1020
 

Loading…
Cancel
Save