diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-03-04 20:39:02 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-03-04 20:39:02 +0300 |
commit | ce2e74bc10a7ee558bfb2e7dcac3e8352ac253c5 (patch) | |
tree | afedc87b8faf10e4b9ab8481e0254bcfef556836 | |
parent | 012ddb937e5dd13a5f8d71f318a4a7afceffaf2f (diff) |
Partly reverted the previous commit
-rw-r--r-- | src/GCodes/GCodes.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index 6b5bb59f..3dcea262 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -1281,7 +1281,8 @@ bool GCodes::ReHomeOnStall(DriversBitmap stalledDrivers) noexcept return false; // can't handle it yet } - // Flag the stalled axes as not homed before we call rehome.g + // Evaluate which machine axes have stalled. + AxesBitmap machineAxesNotHomed; for (size_t axis = 0; axis < numVisibleAxes; ++axis) { const AxisDriversConfig& cfg = platform.GetAxisDriversConfig(axis); @@ -1290,15 +1291,18 @@ bool GCodes::ReHomeOnStall(DriversBitmap stalledDrivers) noexcept //TODO handle remote stalled drivers if (cfg.driverNumbers[i].IsLocal() && stalledDrivers.IsBitSet(cfg.driverNumbers[i].localDriver)) { - SetAxisNotHomed(axis); + machineAxesNotHomed.SetBit(axis); break; } } } + // Now pass the machine axes to the rehome.g file + // TODO + autoPauseGCode->SetState(GCodeState::resuming1); // set up to resume after rehoming pauseState = PauseState::resuming; - DoFileMacro(*autoPauseGCode, REHOME_G, true); // run the SD card rehome-and-resume script + DoFileMacro(*autoPauseGCode, REHOME_G, true); // run the SD card rehome-and-resume script return true; } |