Browse Source

Sort out some header dependencies

Scott Lahteine 8 years ago
parent
commit
d963020532
6 changed files with 34 additions and 36 deletions
  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 View File

394
 
394
 
395
 void calculate_volumetric_multipliers();
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
  * Blocking movement and shorthand functions
398
  * Blocking movement and shorthand functions
404
  */
399
  */

+ 20
- 15
Marlin/Marlin_main.cpp View File

33
 
33
 
34
 #include "Marlin.h"
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
 #include "ultralcd.h"
36
 #include "ultralcd.h"
51
 #include "planner.h"
37
 #include "planner.h"
52
 #include "stepper.h"
38
 #include "stepper.h"
61
 #include "duration_t.h"
47
 #include "duration_t.h"
62
 #include "types.h"
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
 #if ENABLED(USE_WATCHDOG)
67
 #if ENABLED(USE_WATCHDOG)
65
   #include "watchdog.h"
68
   #include "watchdog.h"
66
 #endif
69
 #endif
4560
   SERIAL_ECHO_START;
4563
   SERIAL_ECHO_START;
4561
   SERIAL_ECHOLNPAIR("Print time: ", buffer);
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
 #if ENABLED(SDSUPPORT)
4571
 #if ENABLED(SDSUPPORT)

+ 0
- 1
Marlin/cardreader.cpp View File

24
 
24
 
25
 #include "ultralcd.h"
25
 #include "ultralcd.h"
26
 #include "stepper.h"
26
 #include "stepper.h"
27
-#include "temperature.h"
28
 #include "language.h"
27
 #include "language.h"
29
 
28
 
30
 #include "Marlin.h"
29
 #include "Marlin.h"

+ 3
- 10
Marlin/planner.h View File

34
 
34
 
35
 #include "types.h"
35
 #include "types.h"
36
 #include "enum.h"
36
 #include "enum.h"
37
-#include "MarlinConfig.h"
37
+#include "Marlin.h"
38
 
38
 
39
 #if HAS_ABL
39
 #if HAS_ABL
40
   #include "vector_3.h"
40
   #include "vector_3.h"
41
 #endif
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
  * struct block_t
44
  * struct block_t
54
  *
45
  *
402
 
393
 
403
 };
394
 };
404
 
395
 
396
+extern Planner planner;
397
+
405
 #endif // PLANNER_H
398
 #endif // PLANNER_H

+ 4
- 4
Marlin/temperature.h View File

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

+ 7
- 1
Marlin/ultralcd.cpp View File

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

Loading…
Cancel
Save