Browse Source

Move G26 heading up

Scott Lahteine 5 years ago
parent
commit
2ae00db43e
1 changed files with 45 additions and 52 deletions
  1. 45
    52
      Marlin/src/gcode/bedlevel/G26.cpp

+ 45
- 52
Marlin/src/gcode/bedlevel/G26.cpp View File

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
- * Marlin Firmware -- G26 - Mesh Validation Tool
25
- */
26
-
27
-#include "../../inc/MarlinConfig.h"
28
-
29
-#if ENABLED(G26_MESH_VALIDATION)
30
-
31
-#define G26_OK false
32
-#define G26_ERR true
33
-
34
-#include "../../gcode/gcode.h"
35
-#include "../../feature/bedlevel/bedlevel.h"
36
-
37
-#include "../../MarlinCore.h"
38
-#include "../../module/planner.h"
39
-#include "../../module/stepper.h"
40
-#include "../../module/motion.h"
41
-#include "../../module/tool_change.h"
42
-#include "../../module/temperature.h"
43
-#include "../../lcd/ultralcd.h"
44
-
45
-#define EXTRUSION_MULTIPLIER 1.0
46
-#define PRIME_LENGTH 10.0
47
-#define OOZE_AMOUNT 0.3
48
-
49
-#define INTERSECTION_CIRCLE_RADIUS 5
50
-#define CROSSHAIRS_SIZE 3
51
-
52
-#ifndef G26_RETRACT_MULTIPLIER
53
-  #define G26_RETRACT_MULTIPLIER 1.0 // x 1mm
54
-#endif
55
-
56
-#ifndef G26_XY_FEEDRATE
57
-  #define G26_XY_FEEDRATE (PLANNER_XY_FEEDRATE() / 3.0)
58
-#endif
59
-
60
-#if CROSSHAIRS_SIZE >= INTERSECTION_CIRCLE_RADIUS
61
-  #error "CROSSHAIRS_SIZE must be less than INTERSECTION_CIRCLE_RADIUS."
62
-#endif
63
-
64
-#define G26_OK false
65
-#define G26_ERR true
66
-
67
-#if ENABLED(ARC_SUPPORT)
68
-  void plan_arc(const xyze_pos_t &cart, const ab_float_t &offset, const uint8_t clockwise);
69
-#endif
70
-
71
-/**
72
  *   G26 Mesh Validation Tool
24
  *   G26 Mesh Validation Tool
73
  *
25
  *
74
  *   G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System.
26
  *   G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System.
141
  *   Y #  Y Coord.    Specify the starting location of the drawing activity.
93
  *   Y #  Y Coord.    Specify the starting location of the drawing activity.
142
  */
94
  */
143
 
95
 
144
-// External references
96
+#include "../../inc/MarlinConfig.h"
97
+
98
+#if ENABLED(G26_MESH_VALIDATION)
99
+
100
+#define G26_OK false
101
+#define G26_ERR true
102
+
103
+#include "../../gcode/gcode.h"
104
+#include "../../feature/bedlevel/bedlevel.h"
105
+
106
+#include "../../MarlinCore.h"
107
+#include "../../module/planner.h"
108
+#include "../../module/stepper.h"
109
+#include "../../module/motion.h"
110
+#include "../../module/tool_change.h"
111
+#include "../../module/temperature.h"
112
+#include "../../lcd/ultralcd.h"
113
+
114
+#define EXTRUSION_MULTIPLIER 1.0
115
+#define PRIME_LENGTH 10.0
116
+#define OOZE_AMOUNT 0.3
117
+
118
+#define INTERSECTION_CIRCLE_RADIUS 5
119
+#define CROSSHAIRS_SIZE 3
120
+
121
+#ifndef G26_RETRACT_MULTIPLIER
122
+  #define G26_RETRACT_MULTIPLIER 1.0 // x 1mm
123
+#endif
124
+
125
+#ifndef G26_XY_FEEDRATE
126
+  #define G26_XY_FEEDRATE (PLANNER_XY_FEEDRATE() / 3.0)
127
+#endif
128
+
129
+#if CROSSHAIRS_SIZE >= INTERSECTION_CIRCLE_RADIUS
130
+  #error "CROSSHAIRS_SIZE must be less than INTERSECTION_CIRCLE_RADIUS."
131
+#endif
132
+
133
+#define G26_OK false
134
+#define G26_ERR true
135
+
136
+#if ENABLED(ARC_SUPPORT)
137
+  void plan_arc(const xyze_pos_t &cart, const ab_float_t &offset, const uint8_t clockwise);
138
+#endif
145
 
139
 
146
-// Private functions
140
+constexpr float g26_e_axis_feedrate = 0.025;
147
 
141
 
148
 static MeshFlags circle_flags, horizontal_mesh_line_flags, vertical_mesh_line_flags;
142
 static MeshFlags circle_flags, horizontal_mesh_line_flags, vertical_mesh_line_flags;
149
-float g26_e_axis_feedrate = 0.025,
150
-      random_deviation = 0.0;
143
+float random_deviation = 0.0;
151
 
144
 
152
 static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched
145
 static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched
153
                                    // retracts/recovers won't result in a bad state.
146
                                    // retracts/recovers won't result in a bad state.

Loading…
Cancel
Save