|
@@ -132,33 +132,41 @@
|
132
|
132
|
*/
|
133
|
133
|
void GcodeSuite::G29() {
|
134
|
134
|
|
|
135
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE) || ENABLED(PROBE_MANUALLY)
|
|
136
|
+ const bool seenQ = parser.seen('Q');
|
|
137
|
+ #else
|
|
138
|
+ constexpr bool seenQ = false;
|
|
139
|
+ #endif
|
|
140
|
+
|
135
|
141
|
// G29 Q is also available if debugging
|
136
|
142
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
137
|
|
- const bool query = parser.seen('Q');
|
138
|
143
|
const uint8_t old_debug_flags = marlin_debug_flags;
|
139
|
|
- if (query) marlin_debug_flags |= DEBUG_LEVELING;
|
|
144
|
+ if (seenQ) marlin_debug_flags |= DEBUG_LEVELING;
|
140
|
145
|
if (DEBUGGING(LEVELING)) {
|
141
|
146
|
DEBUG_POS(">>> G29", current_position);
|
142
|
147
|
log_machine_info();
|
143
|
148
|
}
|
144
|
149
|
marlin_debug_flags = old_debug_flags;
|
145
|
150
|
#if DISABLED(PROBE_MANUALLY)
|
146
|
|
- if (query) return;
|
|
151
|
+ if (seenQ) return;
|
147
|
152
|
#endif
|
148
|
153
|
#endif
|
149
|
154
|
|
150
|
155
|
#if ENABLED(PROBE_MANUALLY)
|
151
|
|
- const bool seenA = parser.seen('A'), seenQ = parser.seen('Q'), no_action = seenA || seenQ;
|
152
|
|
- #endif
|
153
|
|
-
|
154
|
|
- #if ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(PROBE_MANUALLY)
|
155
|
|
- const bool faux = parser.boolval('C');
|
156
|
|
- #elif ENABLED(PROBE_MANUALLY)
|
157
|
|
- const bool faux = no_action;
|
|
156
|
+ const bool seenA = parser.seen('A');
|
158
|
157
|
#else
|
159
|
|
- bool constexpr faux = false;
|
|
158
|
+ constexpr bool seenA = false;
|
160
|
159
|
#endif
|
161
|
160
|
|
|
161
|
+ const bool no_action = seenA || seenQ,
|
|
162
|
+ faux =
|
|
163
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(PROBE_MANUALLY)
|
|
164
|
+ parser.boolval('C')
|
|
165
|
+ #else
|
|
166
|
+ no_action
|
|
167
|
+ #endif
|
|
168
|
+ ;
|
|
169
|
+
|
162
|
170
|
// Don't allow auto-leveling without homing first
|
163
|
171
|
if (axis_unhomed_error()) return;
|
164
|
172
|
|
|
@@ -388,7 +396,7 @@ void GcodeSuite::G29() {
|
388
|
396
|
|
389
|
397
|
// Disable auto bed leveling during G29.
|
390
|
398
|
// Be formal so G29 can be done successively without G28.
|
391
|
|
- set_bed_leveling_enabled(false);
|
|
399
|
+ if (!no_action) set_bed_leveling_enabled(false);
|
392
|
400
|
|
393
|
401
|
#if HAS_BED_PROBE
|
394
|
402
|
// Deploy the probe. Probe will raise if needed.
|