Browse Source

Add HAS_TEMP_HOTEND define

Scott Lahteine 8 years ago
parent
commit
d24f14a799
4 changed files with 10 additions and 8 deletions
  1. 2
    0
      Marlin/Conditionals.h
  2. 1
    1
      Marlin/Marlin.h
  3. 5
    5
      Marlin/Marlin_main.cpp
  4. 2
    2
      Marlin/temperature.cpp

+ 2
- 0
Marlin/Conditionals.h View File

@@ -581,6 +581,8 @@
581 581
 
582 582
   #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
583 583
 
584
+  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
585
+
584 586
   /**
585 587
    * Helper Macros for heaters and extruder fan
586 588
    */

+ 1
- 1
Marlin/Marlin.h View File

@@ -368,7 +368,7 @@ extern uint8_t active_extruder;
368 368
   extern void digipot_i2c_init();
369 369
 #endif
370 370
 
371
-#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
371
+#if HAS_TEMP_HOTEND || HAS_TEMP_BED
372 372
   void print_heaterstates();
373 373
 #endif
374 374
 

+ 5
- 5
Marlin/Marlin_main.cpp View File

@@ -4100,10 +4100,10 @@ inline void gcode_M104() {
4100 4100
   if (print_job_stop()) LCD_MESSAGEPGM(WELCOME_MSG);
4101 4101
 }
4102 4102
 
4103
-#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
4103
+#if HAS_TEMP_HOTEND || HAS_TEMP_BED
4104 4104
 
4105 4105
   void print_heaterstates() {
4106
-    #if HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)
4106
+    #if HAS_TEMP_HOTEND
4107 4107
       SERIAL_PROTOCOLPGM(" T:");
4108 4108
       SERIAL_PROTOCOL_F(degHotend(target_extruder), 1);
4109 4109
       SERIAL_PROTOCOLPGM(" /");
@@ -4179,10 +4179,10 @@ inline void gcode_M104() {
4179 4179
 inline void gcode_M105() {
4180 4180
   if (setTargetedHotend(105)) return;
4181 4181
 
4182
-  #if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
4182
+  #if HAS_TEMP_HOTEND || HAS_TEMP_BED
4183 4183
     SERIAL_PROTOCOLPGM(MSG_OK);
4184 4184
     print_heaterstates();
4185
-  #else // !HAS_TEMP_0 && !HAS_TEMP_BED
4185
+  #else // !HAS_TEMP_HOTEND && !HAS_TEMP_BED
4186 4186
     SERIAL_ERROR_START;
4187 4187
     SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS);
4188 4188
   #endif
@@ -4271,7 +4271,7 @@ inline void gcode_M109() {
4271 4271
     now = millis();
4272 4272
     if (now > next_temp_ms) { //Print temp & remaining time every 1s while waiting
4273 4273
       next_temp_ms = now + 1000UL;
4274
-      #if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
4274
+      #if HAS_TEMP_HOTEND || HAS_TEMP_BED
4275 4275
         print_heaterstates();
4276 4276
       #endif
4277 4277
       #ifdef TEMP_RESIDENCY_TIME

+ 2
- 2
Marlin/temperature.cpp View File

@@ -350,7 +350,7 @@ void PID_autotune(float temp, int extruder, int ncycles, bool set_result/*=false
350 350
     }
351 351
     // Every 2 seconds...
352 352
     if (ms > temp_ms + 2000) {
353
-      #if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
353
+      #if HAS_TEMP_HOTEND || HAS_TEMP_BED
354 354
         print_heaterstates();
355 355
         SERIAL_EOL;
356 356
       #endif
@@ -1183,7 +1183,7 @@ void disable_all_heaters() {
1183 1183
     WRITE_HEATER_ ## NR (LOW); \
1184 1184
   }
1185 1185
 
1186
-  #if HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)
1186
+  #if HAS_TEMP_HOTEND
1187 1187
     setTargetHotend(0, 0);
1188 1188
     soft_pwm[0] = 0;
1189 1189
     WRITE_HEATER_0P(LOW); // Should HEATERS_PARALLEL apply here? Then change to DISABLE_HEATER(0)

Loading…
Cancel
Save