Kaynağa Gözat

Add HAS_TEMP_SENSOR conditional

Scott Lahteine 6 yıl önce
ebeveyn
işleme
ffbf63e6af

+ 1
- 1
Marlin/src/Marlin.cpp Dosyayı Görüntüle

519
     gcode.host_keepalive();
519
     gcode.host_keepalive();
520
   #endif
520
   #endif
521
 
521
 
522
-  #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
522
+  #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
523
     thermalManager.auto_report_temperatures();
523
     thermalManager.auto_report_temperatures();
524
   #endif
524
   #endif
525
 
525
 

+ 1
- 1
Marlin/src/gcode/gcode.cpp Dosyayı Görüntüle

391
         KEEPALIVE_STATE(NOT_BUSY);
391
         KEEPALIVE_STATE(NOT_BUSY);
392
         return; // "ok" already printed
392
         return; // "ok" already printed
393
 
393
 
394
-      #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
394
+      #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
395
         case 155: M155(); break;  // M155: Set temperature auto-report interval
395
         case 155: M155(); break;  // M155: Set temperature auto-report interval
396
       #endif
396
       #endif
397
 
397
 

+ 1
- 1
Marlin/src/gcode/gcode.h Dosyayı Görüntüle

547
     static void M150();
547
     static void M150();
548
   #endif
548
   #endif
549
 
549
 
550
-  #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
550
+  #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
551
     static void M155();
551
     static void M155();
552
   #endif
552
   #endif
553
 
553
 

+ 1
- 1
Marlin/src/gcode/temperature/M105.cpp Dosyayı Görüntüle

37
     const int16_t port = command_queue_port[cmd_queue_index_r];
37
     const int16_t port = command_queue_port[cmd_queue_index_r];
38
   #endif
38
   #endif
39
 
39
 
40
-  #if HAS_TEMP_HOTEND || HAS_TEMP_BED
40
+  #if HAS_TEMP_SENSOR
41
     SERIAL_PROTOCOLPGM_P(port, MSG_OK);
41
     SERIAL_PROTOCOLPGM_P(port, MSG_OK);
42
     thermalManager.print_heaterstates(
42
     thermalManager.print_heaterstates(
43
       #if NUM_SERIAL > 1
43
       #if NUM_SERIAL > 1

+ 2
- 2
Marlin/src/gcode/temperature/M155.cpp Dosyayı Görüntüle

22
 
22
 
23
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
24
 
24
 
25
-#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
25
+#if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
26
 
26
 
27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../module/temperature.h"
28
 #include "../../module/temperature.h"
37
 
37
 
38
 }
38
 }
39
 
39
 
40
-#endif // AUTO_REPORT_TEMPERATURES && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
40
+#endif // AUTO_REPORT_TEMPERATURES && HAS_TEMP_SENSOR

+ 5
- 0
Marlin/src/inc/Conditionals_post.h Dosyayı Görüntüle

754
 #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2)
754
 #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2)
755
 #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
755
 #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
756
 #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
756
 #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
757
+#define HAS_TEMP_SENSOR (HAS_TEMP_HOTEND || HAS_TEMP_BED)
757
 
758
 
758
 // Heaters
759
 // Heaters
759
 #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
760
 #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
816
 #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
817
 #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
817
 #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
818
 #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
818
 
819
 
820
+#if !HAS_TEMP_SENSOR
821
+  #undef AUTO_REPORT_TEMPERATURES
822
+#endif
823
+
819
 /**
824
 /**
820
  * This setting is also used by M109 when trying to calculate
825
  * This setting is also used by M109 when trying to calculate
821
  * a ballpark safe margin to prevent wait-forever situation.
826
  * a ballpark safe margin to prevent wait-forever situation.

+ 3
- 3
Marlin/src/module/temperature.cpp Dosyayı Görüntüle

417
 
417
 
418
       // Report heater states every 2 seconds
418
       // Report heater states every 2 seconds
419
       if (ELAPSED(ms, next_temp_ms)) {
419
       if (ELAPSED(ms, next_temp_ms)) {
420
-        #if HAS_TEMP_HOTEND || HAS_TEMP_BED
420
+        #if HAS_TEMP_SENSOR
421
           print_heaterstates();
421
           print_heaterstates();
422
           SERIAL_EOL();
422
           SERIAL_EOL();
423
         #endif
423
         #endif
2144
   ENABLE_TEMPERATURE_INTERRUPT(); //re-enable Temperature ISR
2144
   ENABLE_TEMPERATURE_INTERRUPT(); //re-enable Temperature ISR
2145
 }
2145
 }
2146
 
2146
 
2147
-#if HAS_TEMP_HOTEND || HAS_TEMP_BED
2147
+#if HAS_TEMP_SENSOR
2148
 
2148
 
2149
   #include "../gcode/gcode.h"
2149
   #include "../gcode/gcode.h"
2150
 
2150
 
2251
 
2251
 
2252
   #endif // AUTO_REPORT_TEMPERATURES
2252
   #endif // AUTO_REPORT_TEMPERATURES
2253
 
2253
 
2254
-#endif // HAS_TEMP_HOTEND || HAS_TEMP_BED
2254
+#endif // HAS_TEMP_SENSOR

+ 1
- 1
Marlin/src/module/temperature.h Dosyayı Görüntüle

564
 
564
 
565
     #endif // HEATER_IDLE_HANDLER
565
     #endif // HEATER_IDLE_HANDLER
566
 
566
 
567
-    #if HAS_TEMP_HOTEND || HAS_TEMP_BED
567
+    #if HAS_TEMP_SENSOR
568
       static void print_heaterstates(
568
       static void print_heaterstates(
569
         #if NUM_SERIAL > 1
569
         #if NUM_SERIAL > 1
570
           const int8_t port = -1
570
           const int8_t port = -1

Loading…
İptal
Kaydet