|
@@ -59,6 +59,7 @@
|
59
|
59
|
#include "language.h"
|
60
|
60
|
#include "pins_arduino.h"
|
61
|
61
|
#include "math.h"
|
|
62
|
+#include "nozzle.h"
|
62
|
63
|
|
63
|
64
|
#if ENABLED(USE_WATCHDOG)
|
64
|
65
|
#include "watchdog.h"
|
|
@@ -1660,7 +1661,7 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
|
1660
|
1661
|
* Plan a move to (X, Y, Z) and set the current_position
|
1661
|
1662
|
* The final current_position may not be the one that was requested
|
1662
|
1663
|
*/
|
1663
|
|
-static void do_blocking_move_to(float x, float y, float z, float fr_mm_m = 0.0) {
|
|
1664
|
+void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
|
1664
|
1665
|
float old_feedrate_mm_m = feedrate_mm_m;
|
1665
|
1666
|
|
1666
|
1667
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -1708,21 +1709,14 @@ static void do_blocking_move_to(float x, float y, float z, float fr_mm_m = 0.0)
|
1708
|
1709
|
feedrate_mm_m = old_feedrate_mm_m;
|
1709
|
1710
|
}
|
1710
|
1711
|
|
1711
|
|
-inline void do_blocking_move_to_x(float x, float fr_mm_m = 0.0) {
|
1712
|
|
- do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m);
|
1713
|
|
-}
|
1714
|
|
-
|
1715
|
|
-inline void do_blocking_move_to_y(float y) {
|
1716
|
|
- do_blocking_move_to(current_position[X_AXIS], y, current_position[Z_AXIS]);
|
1717
|
|
-}
|
1718
|
|
-
|
1719
|
|
-inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m = 0.0) {
|
1720
|
|
- do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_m);
|
1721
|
|
-}
|
1722
|
|
-
|
1723
|
|
-inline void do_blocking_move_to_z(float z, float fr_mm_m = 0.0) {
|
1724
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_m);
|
|
1712
|
+void do_blocking_move_to_axis_pos(AxisEnum axis, float where, float fr_mm_m/*=0.0*/) {
|
|
1713
|
+ current_position[axis] = where;
|
|
1714
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m);
|
1725
|
1715
|
}
|
|
1716
|
+void do_blocking_move_to_x(float x, float fr_mm_m/*=0.0*/) { do_blocking_move_to_axis_pos(X_AXIS, x, fr_mm_m); }
|
|
1717
|
+void do_blocking_move_to_y(float y) { do_blocking_move_to_axis_pos(Y_AXIS, y); }
|
|
1718
|
+void do_blocking_move_to_z(float z, float fr_mm_m/*=0.0*/) { do_blocking_move_to_axis_pos(Z_AXIS, z, fr_mm_m); }
|
|
1719
|
+void do_blocking_move_to_xy(float x, float y, float fr_mm_m/*=0.0*/) { do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_m); }
|
1726
|
1720
|
|
1727
|
1721
|
//
|
1728
|
1722
|
// Prepare to do endstop or probe moves
|
|
@@ -2784,9 +2778,7 @@ inline void gcode_G4() {
|
2784
|
2778
|
|
2785
|
2779
|
#endif //FWRETRACT
|
2786
|
2780
|
|
2787
|
|
-#if ENABLED(NOZZLE_CLEAN_FEATURE) && HAS_BED_PROBE
|
2788
|
|
- #include "nozzle.h"
|
2789
|
|
-
|
|
2781
|
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
2790
|
2782
|
/**
|
2791
|
2783
|
* G12: Clean the nozzle
|
2792
|
2784
|
*/
|
|
@@ -2819,8 +2811,6 @@ inline void gcode_G4() {
|
2819
|
2811
|
#endif
|
2820
|
2812
|
|
2821
|
2813
|
#if ENABLED(NOZZLE_PARK_FEATURE)
|
2822
|
|
- #include "nozzle.h"
|
2823
|
|
-
|
2824
|
2814
|
/**
|
2825
|
2815
|
* G27: Park the nozzle
|
2826
|
2816
|
*/
|
|
@@ -3301,7 +3291,7 @@ inline void gcode_G28() {
|
3301
|
3291
|
}
|
3302
|
3292
|
// For each G29 S2...
|
3303
|
3293
|
if (probe_point == 0) {
|
3304
|
|
- // For the intial G29 S2 make Z a positive value (e.g., 4.0)
|
|
3294
|
+ // For the initial G29 S2 make Z a positive value (e.g., 4.0)
|
3305
|
3295
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
|
3306
|
3296
|
#if Z_HOME_DIR > 0
|
3307
|
3297
|
+ Z_MAX_POS
|
|
@@ -7084,7 +7074,7 @@ void process_next_command() {
|
7084
|
7074
|
break;
|
7085
|
7075
|
#endif // FWRETRACT
|
7086
|
7076
|
|
7087
|
|
- #if ENABLED(NOZZLE_CLEAN_FEATURE) && HAS_BED_PROBE
|
|
7077
|
+ #if ENABLED(NOZZLE_CLEAN_FEATURE)
|
7088
|
7078
|
case 12:
|
7089
|
7079
|
gcode_G12(); // G12: Nozzle Clean
|
7090
|
7080
|
break;
|