|
@@ -20,8 +20,12 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
|
23
|
+#include "../../inc/MarlinConfig.h"
|
|
24
|
+
|
|
25
|
+#if ENABLED(BEZIER_CURVE_SUPPORT)
|
|
26
|
+
|
|
27
|
+#include "../../module/motion.h"
|
23
|
28
|
#include "../../module/planner_bezier.h"
|
24
|
|
-#include "../../gcode/gcode.h"
|
25
|
29
|
|
26
|
30
|
void plan_cubic_move(const float offset[4]) {
|
27
|
31
|
cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
|
|
@@ -39,10 +43,13 @@ void plan_cubic_move(const float offset[4]) {
|
39
|
43
|
* parameters can be omitted and default to zero.
|
40
|
44
|
*/
|
41
|
45
|
|
|
46
|
+#include "../gcode.h"
|
|
47
|
+#include "../../Marlin.h" // for IsRunning()
|
|
48
|
+
|
42
|
49
|
/**
|
43
|
50
|
* G5: Cubic B-spline
|
44
|
51
|
*/
|
45
|
|
-void gcode_G5() {
|
|
52
|
+void GcodeSuite::G5() {
|
46
|
53
|
if (IsRunning()) {
|
47
|
54
|
|
48
|
55
|
#if ENABLED(CNC_WORKSPACE_PLANES)
|
|
@@ -53,7 +60,7 @@ void gcode_G5() {
|
53
|
60
|
}
|
54
|
61
|
#endif
|
55
|
62
|
|
56
|
|
- gcode.get_destination_from_command();
|
|
63
|
+ get_destination_from_command();
|
57
|
64
|
|
58
|
65
|
const float offset[] = {
|
59
|
66
|
parser.linearval('I'),
|
|
@@ -65,3 +72,5 @@ void gcode_G5() {
|
65
|
72
|
plan_cubic_move(offset);
|
66
|
73
|
}
|
67
|
74
|
}
|
|
75
|
+
|
|
76
|
+#endif // BEZIER_CURVE_SUPPORT
|