Optimize G-code flag parameters (#21849)
This commit is contained in:
committed by
Scott Lahteine
parent
770edea577
commit
6a1e78e614
@ -49,9 +49,9 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) {
|
||||
if (IsRunning()
|
||||
#if ENABLED(NO_MOTION_BEFORE_HOMING)
|
||||
&& !homing_needed_error(
|
||||
(parser.seen('X') ? _BV(X_AXIS) : 0)
|
||||
| (parser.seen('Y') ? _BV(Y_AXIS) : 0)
|
||||
| (parser.seen('Z') ? _BV(Z_AXIS) : 0) )
|
||||
(parser.seen_test('X') ? _BV(X_AXIS) : 0)
|
||||
| (parser.seen_test('Y') ? _BV(Y_AXIS) : 0)
|
||||
| (parser.seen_test('Z') ? _BV(Z_AXIS) : 0) )
|
||||
#endif
|
||||
) {
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
|
||||
|
@ -74,7 +74,7 @@ void GcodeSuite::M290() {
|
||||
const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
|
||||
babystep.add_mm((AxisEnum)a, offs);
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_probe_offset(offs);
|
||||
if (a == Z_AXIS && parser.boolval('P', true)) mod_probe_offset(offs);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
|
Reference in New Issue
Block a user