Browse Source

🧑‍💻 Update planner/stepper includes

Scott Lahteine 2 years ago
parent
commit
21c48d9f92

+ 1
- 1
Marlin/src/core/utility.cpp View File

@@ -51,7 +51,7 @@ void safe_delay(millis_t ms) {
51 51
 
52 52
   #include "../module/probe.h"
53 53
   #include "../module/motion.h"
54
-  #include "../module/stepper.h"
54
+  #include "../module/planner.h"
55 55
   #include "../libs/numtostr.h"
56 56
   #include "../feature/bedlevel/bedlevel.h"
57 57
 

+ 5
- 0
Marlin/src/core/utility.h View File

@@ -59,6 +59,11 @@ void safe_delay(millis_t ms);           // Delay ensuring that temperatures are
59 59
   #define log_machine_info() NOOP
60 60
 #endif
61 61
 
62
+/**
63
+ * A restorer instance remembers a variable's value before setting a
64
+ * new value, then restores the old value when it goes out of scope.
65
+ * Put operator= on your type to get extended behavior on value change.
66
+ */
62 67
 template<typename T>
63 68
 class restorer {
64 69
   T& ref_;

+ 0
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -31,7 +31,6 @@
31 31
 #include "../../../libs/hex_print.h"
32 32
 #include "../../../module/settings.h"
33 33
 #include "../../../lcd/marlinui.h"
34
-#include "../../../module/stepper.h"
35 34
 #include "../../../module/planner.h"
36 35
 #include "../../../module/motion.h"
37 36
 #include "../../../module/probe.h"

+ 0
- 1
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp View File

@@ -26,7 +26,6 @@
26 26
 
27 27
 #include "../bedlevel.h"
28 28
 #include "../../../module/planner.h"
29
-#include "../../../module/stepper.h"
30 29
 #include "../../../module/motion.h"
31 30
 
32 31
 #if ENABLED(DELTA)

+ 0
- 1
Marlin/src/feature/dac/dac_dac084s085.cpp View File

@@ -11,7 +11,6 @@
11 11
 #include "dac_dac084s085.h"
12 12
 
13 13
 #include "../../MarlinCore.h"
14
-#include "../../module/stepper.h"
15 14
 #include "../../HAL/shared/Delay.h"
16 15
 
17 16
 dac084s085::dac084s085() { }

+ 0
- 1
Marlin/src/feature/fwretract.cpp View File

@@ -34,7 +34,6 @@ FWRetract fwretract; // Single instance - this calls the constructor
34 34
 
35 35
 #include "../module/motion.h"
36 36
 #include "../module/planner.h"
37
-#include "../module/stepper.h"
38 37
 
39 38
 #include "../gcode/gcode.h"
40 39
 

+ 0
- 1
Marlin/src/feature/max7219.cpp View File

@@ -44,7 +44,6 @@
44 44
 #include "max7219.h"
45 45
 
46 46
 #include "../module/planner.h"
47
-#include "../module/stepper.h"
48 47
 #include "../MarlinCore.h"
49 48
 #include "../HAL/shared/Delay.h"
50 49
 

+ 4
- 1
Marlin/src/feature/pause.cpp View File

@@ -35,10 +35,13 @@
35 35
 #include "../gcode/gcode.h"
36 36
 #include "../module/motion.h"
37 37
 #include "../module/planner.h"
38
-#include "../module/stepper.h"
39 38
 #include "../module/printcounter.h"
40 39
 #include "../module/temperature.h"
41 40
 
41
+#if HAS_EXTRUDERS
42
+  #include "../module/stepper.h"
43
+#endif
44
+
42 45
 #if ENABLED(AUTO_BED_LEVELING_UBL)
43 46
   #include "bedlevel/bedlevel.h"
44 47
 #endif

+ 2
- 1
Marlin/src/feature/power.cpp View File

@@ -30,7 +30,7 @@
30 30
 
31 31
 #include "power.h"
32 32
 #include "../module/planner.h"
33
-#include "../module/stepper.h"
33
+#include "../module/stepper/indirection.h" // for restore_stepper_drivers
34 34
 #include "../module/temperature.h"
35 35
 #include "../MarlinCore.h"
36 36
 
@@ -46,6 +46,7 @@ Power powerManager;
46 46
 bool Power::psu_on;
47 47
 
48 48
 #if ENABLED(AUTO_POWER_CONTROL)
49
+  #include "../module/stepper.h"
49 50
   #include "../module/temperature.h"
50 51
 
51 52
   #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)

+ 0
- 5
Marlin/src/feature/tmc_util.cpp View File

@@ -33,17 +33,12 @@
33 33
 #include "../gcode/gcode.h"
34 34
 
35 35
 #if ENABLED(TMC_DEBUG)
36
-  #include "../module/planner.h"
37 36
   #include "../libs/hex_print.h"
38 37
   #if ENABLED(MONITOR_DRIVER_STATUS)
39 38
     static uint16_t report_tmc_status_interval; // = 0
40 39
   #endif
41 40
 #endif
42 41
 
43
-#if HAS_MARLINUI_MENU
44
-  #include "../module/stepper.h"
45
-#endif
46
-
47 42
 /**
48 43
  * Check for over temperature or short to ground error flags.
49 44
  * Report and log warning of overtemperature condition.

+ 0
- 1
Marlin/src/gcode/bedlevel/G26.cpp View File

@@ -107,7 +107,6 @@
107 107
 
108 108
 #include "../../MarlinCore.h"
109 109
 #include "../../module/planner.h"
110
-#include "../../module/stepper.h"
111 110
 #include "../../module/motion.h"
112 111
 #include "../../module/tool_change.h"
113 112
 #include "../../module/temperature.h"

+ 0
- 1
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -32,7 +32,6 @@
32 32
 #include "../../../feature/bedlevel/bedlevel.h"
33 33
 #include "../../../module/motion.h"
34 34
 #include "../../../module/planner.h"
35
-#include "../../../module/stepper.h"
36 35
 #include "../../../module/probe.h"
37 36
 #include "../../queue.h"
38 37
 

+ 1
- 1
Marlin/src/gcode/bedlevel/mbl/G29.cpp View File

@@ -36,7 +36,7 @@
36 36
 #include "../../../libs/buzzer.h"
37 37
 #include "../../../lcd/marlinui.h"
38 38
 #include "../../../module/motion.h"
39
-#include "../../../module/stepper.h"
39
+#include "../../../module/planner.h"
40 40
 
41 41
 #if ENABLED(EXTENSIBLE_UI)
42 42
   #include "../../../lcd/extui/ui_api.h"

+ 2
- 1
Marlin/src/gcode/calibrate/G28.cpp View File

@@ -24,8 +24,9 @@
24 24
 
25 25
 #include "../gcode.h"
26 26
 
27
-#include "../../module/stepper.h"
28 27
 #include "../../module/endstops.h"
28
+#include "../../module/planner.h"
29
+#include "../../module/stepper.h" // for various
29 30
 
30 31
 #if HAS_MULTI_HOTEND
31 32
   #include "../../module/tool_change.h"

+ 1
- 1
Marlin/src/gcode/calibrate/G33.cpp View File

@@ -27,7 +27,7 @@
27 27
 #include "../gcode.h"
28 28
 #include "../../module/delta.h"
29 29
 #include "../../module/motion.h"
30
-#include "../../module/stepper.h"
30
+#include "../../module/planner.h"
31 31
 #include "../../module/endstops.h"
32 32
 #include "../../lcd/marlinui.h"
33 33
 

+ 4
- 1
Marlin/src/gcode/calibrate/G34.cpp View File

@@ -26,9 +26,12 @@
26 26
 
27 27
 #include "../gcode.h"
28 28
 #include "../../module/motion.h"
29
-#include "../../module/stepper.h"
30 29
 #include "../../module/endstops.h"
31 30
 
31
+#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_TRINAMIC_CONFIG)
32
+  #include "../../module/stepper.h"
33
+#endif
34
+
32 35
 #if HAS_LEVELING
33 36
   #include "../../feature/bedlevel/bedlevel.h"
34 37
 #endif

+ 1
- 1
Marlin/src/gcode/config/M540.cpp View File

@@ -25,7 +25,7 @@
25 25
 #if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
26 26
 
27 27
 #include "../gcode.h"
28
-#include "../../module/stepper.h"
28
+#include "../../module/planner.h"
29 29
 
30 30
 /**
31 31
  * M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>)

+ 1
- 0
Marlin/src/gcode/control/M17_M18_M84.cpp View File

@@ -24,6 +24,7 @@
24 24
 #include "../../MarlinCore.h" // for stepper_inactive_time, disable_e_steppers
25 25
 #include "../../lcd/marlinui.h"
26 26
 #include "../../module/motion.h" // for e_axis_mask
27
+#include "../../module/planner.h"
27 28
 #include "../../module/stepper.h"
28 29
 
29 30
 #if ENABLED(AUTO_BED_LEVELING_UBL)

+ 1
- 1
Marlin/src/gcode/control/M226.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #include "../gcode.h"
28 28
 #include "../../MarlinCore.h" // for pin_is_protected and idle()
29
-#include "../../module/stepper.h"
29
+#include "../../module/planner.h"
30 30
 
31 31
 void protected_pin_err();
32 32
 

+ 1
- 1
Marlin/src/gcode/control/M3-M5.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #include "../gcode.h"
28 28
 #include "../../feature/spindle_laser.h"
29
-#include "../../module/stepper.h"
29
+#include "../../module/planner.h"
30 30
 
31 31
 /**
32 32
  * Laser:

+ 1
- 1
Marlin/src/gcode/control/M400.cpp View File

@@ -21,7 +21,7 @@
21 21
  */
22 22
 
23 23
 #include "../gcode.h"
24
-#include "../../module/stepper.h"
24
+#include "../../module/planner.h"
25 25
 
26 26
 /**
27 27
  * M400: Finish all moves

+ 0
- 1
Marlin/src/gcode/control/M605.cpp View File

@@ -28,7 +28,6 @@
28 28
 
29 29
 #include "../gcode.h"
30 30
 #include "../../module/motion.h"
31
-#include "../../module/stepper.h"
32 31
 #include "../../module/tool_change.h"
33 32
 #include "../../module/planner.h"
34 33
 

+ 0
- 1
Marlin/src/gcode/feature/advance/M900.cpp View File

@@ -26,7 +26,6 @@
26 26
 
27 27
 #include "../../gcode.h"
28 28
 #include "../../../module/planner.h"
29
-#include "../../../module/stepper.h"
30 29
 
31 30
 #if ENABLED(EXTRA_LIN_ADVANCE_K)
32 31
   float other_extruder_advance_K[EXTRUDERS];

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M122.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #include "../../gcode.h"
28 28
 #include "../../../feature/tmc_util.h"
29
-#include "../../../module/stepper/indirection.h"
29
+#include "../../../module/stepper/indirection.h" // for restore_stepper_drivers
30 30
 
31 31
 /**
32 32
  * M122: Debug TMC drivers

+ 0
- 2
Marlin/src/gcode/geometry/G53-G59.cpp View File

@@ -25,8 +25,6 @@
25 25
 
26 26
 #if ENABLED(CNC_COORDINATE_SYSTEMS)
27 27
 
28
-#include "../../module/stepper.h"
29
-
30 28
 //#define DEBUG_M53
31 29
 
32 30
 /**

+ 0
- 1
Marlin/src/gcode/geometry/G92.cpp View File

@@ -22,7 +22,6 @@
22 22
 
23 23
 #include "../gcode.h"
24 24
 #include "../../module/motion.h"
25
-#include "../../module/stepper.h"
26 25
 
27 26
 #if ENABLED(I2C_POSITION_ENCODERS)
28 27
   #include "../../feature/encoder_i2c.h"

+ 1
- 1
Marlin/src/gcode/motion/G0_G1.cpp View File

@@ -32,7 +32,7 @@
32 32
 #include "../../sd/cardreader.h"
33 33
 
34 34
 #if ENABLED(NANODLP_Z_SYNC)
35
-  #include "../../module/stepper.h"
35
+  #include "../../module/planner.h"
36 36
 #endif
37 37
 
38 38
 extern xyze_pos_t destination;

+ 1
- 1
Marlin/src/gcode/motion/G4.cpp View File

@@ -21,7 +21,7 @@
21 21
  */
22 22
 
23 23
 #include "../gcode.h"
24
-#include "../../module/stepper.h"
24
+#include "../../module/planner.h"
25 25
 #include "../../lcd/marlinui.h"
26 26
 
27 27
 /**

+ 1
- 1
Marlin/src/gcode/probe/G38.cpp View File

@@ -28,7 +28,7 @@
28 28
 
29 29
 #include "../../module/endstops.h"
30 30
 #include "../../module/motion.h"
31
-#include "../../module/stepper.h"
31
+#include "../../module/planner.h"
32 32
 #include "../../module/probe.h"
33 33
 
34 34
 inline void G38_single_probe(const uint8_t move_value) {

+ 3
- 3
Marlin/src/module/stepper.cpp View File

@@ -1467,14 +1467,14 @@ void Stepper::isr() {
1467 1467
     // Enable ISRs to reduce USART processing latency
1468 1468
     hal.isr_on();
1469 1469
 
1470
-    if (!nextMainISR) pulse_phase_isr();                            // 0 = Do coordinated axes Stepper pulses
1470
+    if (!nextMainISR) pulse_phase_isr();                    // 0 = Do coordinated axes Stepper pulses
1471 1471
 
1472 1472
     #if ENABLED(LIN_ADVANCE)
1473
-      if (!nextAdvanceISR) nextAdvanceISR = advance_isr();          // 0 = Do Linear Advance E Stepper pulses
1473
+      if (!nextAdvanceISR) nextAdvanceISR = advance_isr();  // 0 = Do Linear Advance E Stepper pulses
1474 1474
     #endif
1475 1475
 
1476 1476
     #if ENABLED(INTEGRATED_BABYSTEPPING)
1477
-      const bool is_babystep = (nextBabystepISR == 0);              // 0 = Do Babystepping (XY)Z pulses
1477
+      const bool is_babystep = (nextBabystepISR == 0);      // 0 = Do Babystepping (XY)Z pulses
1478 1478
       if (is_babystep) nextBabystepISR = babystepping_isr();
1479 1479
     #endif
1480 1480
 

Loading…
Cancel
Save