diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-07-29 15:58:47 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-07-31 09:51:16 +0300 |
commit | 2779dc5e86bed31e94b04aa3668c83ffca9f06db (patch) | |
tree | ff7b397d74e707b794cf4eb14be079ad7feee74b /src/GCodes/GCodes3.cpp | |
parent | a0863fe026b25d3fd4f6e32584565969001e62ec (diff) |
Lock movement before executing M569.1; implement remote M569.2
Diffstat (limited to 'src/GCodes/GCodes3.cpp')
-rw-r--r-- | src/GCodes/GCodes3.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp index 3f991bf0..b2c7712e 100644 --- a/src/GCodes/GCodes3.cpp +++ b/src/GCodes/GCodes3.cpp @@ -1384,22 +1384,22 @@ GCodeResult GCodes::ConfigureLocalDriver(GCodeBuffer& gb, const StringRef& reply { if (drive < platform.GetNumActualDirectDrivers()) { - bool seen = false; - if (gb.Seen('S')) + if (gb.SeenAny("RS")) { if (!LockMovementAndWaitForStandstill(gb)) { return GCodeResult::notFinished; } + } + + bool seen = false; + if (gb.Seen('S')) + { seen = true; platform.SetDirectionValue(drive, gb.GetIValue() != 0); } if (gb.Seen('R')) { - if (!LockMovementAndWaitForStandstill(gb)) - { - return GCodeResult::notFinished; - } seen = true; platform.SetEnableValue(drive, (int8_t)gb.GetIValue()); } |