Ver código fonte

Sort out some header dependencies

Scott Lahteine 8 anos atrás
pai
commit
d963020532
6 arquivos alterados com 34 adições e 36 exclusões
  1. 0
    5
      Marlin/Marlin.h
  2. 20
    15
      Marlin/Marlin_main.cpp
  3. 0
    1
      Marlin/cardreader.cpp
  4. 3
    10
      Marlin/planner.h
  5. 4
    4
      Marlin/temperature.h
  6. 7
    1
      Marlin/ultralcd.cpp

+ 0
- 5
Marlin/Marlin.h Ver arquivo

@@ -394,11 +394,6 @@ extern uint8_t active_extruder;
394 394
 
395 395
 void calculate_volumetric_multipliers();
396 396
 
397
-// Buzzer
398
-#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
399
-  #include "buzzer.h"
400
-#endif
401
-
402 397
 /**
403 398
  * Blocking movement and shorthand functions
404 399
  */

+ 20
- 15
Marlin/Marlin_main.cpp Ver arquivo

@@ -33,20 +33,6 @@
33 33
 
34 34
 #include "Marlin.h"
35 35
 
36
-#if HAS_ABL
37
-  #include "vector_3.h"
38
-#endif
39
-
40
-#if ENABLED(AUTO_BED_LEVELING_LINEAR)
41
-  #include "qr_solve.h"
42
-#elif ENABLED(MESH_BED_LEVELING)
43
-  #include "mesh_bed_leveling.h"
44
-#endif
45
-
46
-#if ENABLED(BEZIER_CURVE_SUPPORT)
47
-  #include "planner_bezier.h"
48
-#endif
49
-
50 36
 #include "ultralcd.h"
51 37
 #include "planner.h"
52 38
 #include "stepper.h"
@@ -61,6 +47,23 @@
61 47
 #include "duration_t.h"
62 48
 #include "types.h"
63 49
 
50
+#if HAS_ABL
51
+  #include "vector_3.h"
52
+  #if ENABLED(AUTO_BED_LEVELING_LINEAR)
53
+    #include "qr_solve.h"
54
+  #endif
55
+#elif ENABLED(MESH_BED_LEVELING)
56
+  #include "mesh_bed_leveling.h"
57
+#endif
58
+
59
+#if ENABLED(BEZIER_CURVE_SUPPORT)
60
+  #include "planner_bezier.h"
61
+#endif
62
+
63
+#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
64
+  #include "buzzer.h"
65
+#endif
66
+
64 67
 #if ENABLED(USE_WATCHDOG)
65 68
   #include "watchdog.h"
66 69
 #endif
@@ -4560,7 +4563,9 @@ inline void gcode_M31() {
4560 4563
   SERIAL_ECHO_START;
4561 4564
   SERIAL_ECHOLNPAIR("Print time: ", buffer);
4562 4565
 
4563
-  thermalManager.autotempShutdown();
4566
+  #if ENABLED(AUTOTEMP)
4567
+    thermalManager.autotempShutdown();
4568
+  #endif
4564 4569
 }
4565 4570
 
4566 4571
 #if ENABLED(SDSUPPORT)

+ 0
- 1
Marlin/cardreader.cpp Ver arquivo

@@ -24,7 +24,6 @@
24 24
 
25 25
 #include "ultralcd.h"
26 26
 #include "stepper.h"
27
-#include "temperature.h"
28 27
 #include "language.h"
29 28
 
30 29
 #include "Marlin.h"

+ 3
- 10
Marlin/planner.h Ver arquivo

@@ -34,21 +34,12 @@
34 34
 
35 35
 #include "types.h"
36 36
 #include "enum.h"
37
-#include "MarlinConfig.h"
37
+#include "Marlin.h"
38 38
 
39 39
 #if HAS_ABL
40 40
   #include "vector_3.h"
41 41
 #endif
42 42
 
43
-class Planner;
44
-extern Planner planner;
45
-
46
-#if IS_KINEMATIC
47
-  // for inline buffer_line_kinematic
48
-  extern float delta[ABC];
49
-  void inverse_kinematics(const float logical[XYZ]);
50
-#endif
51
-
52 43
 /**
53 44
  * struct block_t
54 45
  *
@@ -402,4 +393,6 @@ class Planner {
402 393
 
403 394
 };
404 395
 
396
+extern Planner planner;
397
+
405 398
 #endif // PLANNER_H

+ 4
- 4
Marlin/temperature.h Ver arquivo

@@ -372,15 +372,15 @@ class Temperature {
372 372
      */
373 373
     static void updatePID();
374 374
 
375
-    static void autotempShutdown() {
376
-      #if ENABLED(AUTOTEMP)
375
+    #if ENABLED(AUTOTEMP)
376
+      static void autotempShutdown() {
377 377
         if (planner.autotemp_enabled) {
378 378
           planner.autotemp_enabled = false;
379 379
           if (degTargetHotend(EXTRUDER_IDX) > planner.autotemp_min)
380 380
             setTargetHotend(0, EXTRUDER_IDX);
381 381
         }
382
-      #endif
383
-    }
382
+      }
383
+    #endif
384 384
 
385 385
     #if ENABLED(BABYSTEPPING)
386 386
 

+ 7
- 1
Marlin/ultralcd.cpp Ver arquivo

@@ -30,6 +30,10 @@
30 30
 #include "configuration_store.h"
31 31
 #include "utility.h"
32 32
 
33
+#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
34
+  #include "buzzer.h"
35
+#endif
36
+
33 37
 #if ENABLED(BLTOUCH)
34 38
   #include "endstops.h"
35 39
 #endif
@@ -581,7 +585,9 @@ void kill_screen(const char* lcd_msg) {
581 585
       clear_command_queue();
582 586
       quickstop_stepper();
583 587
       print_job_timer.stop();
584
-      thermalManager.autotempShutdown();
588
+      #if ENABLED(AUTOTEMP)
589
+        thermalManager.autotempShutdown();
590
+      #endif
585 591
       wait_for_heatup = false;
586 592
       lcd_setstatus(MSG_PRINT_ABORTED, true);
587 593
     }

Carregando…
Cancelar
Salvar