diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-12-16 19:55:40 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-12-16 19:55:40 +0300 |
commit | 5bdc9713789627987e326b74a5a465cdb11ed9a4 (patch) | |
tree | 6f5600345136294c8bfc95d8d093ffd143afeae0 /src/Endstops/EndstopsManager.cpp | |
parent | 9ec73aac0702d91fb099dc086f8fb686541c88da (diff) |
3.0RC1 final(?)
Fixed issue with G1 H1 moves when endstops are not already triggered. There is still an issue if a move involves only remote drivers and a main board endstop switch.
Don't set up a default bed heater on Duet 3
Fixed issue when creating a switch endstop failed
Diffstat (limited to 'src/Endstops/EndstopsManager.cpp')
-rw-r--r-- | src/Endstops/EndstopsManager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Endstops/EndstopsManager.cpp b/src/Endstops/EndstopsManager.cpp index a3925ba6..461b92ac 100644 --- a/src/Endstops/EndstopsManager.cpp +++ b/src/Endstops/EndstopsManager.cpp @@ -293,7 +293,14 @@ GCodeResult EndstopsManager::HandleM574(GCodeBuffer& gb, const StringRef& reply, axisEndstops[lastAxisSeen] = nullptr; SwitchEndstop * const sw = new SwitchEndstop(lastAxisSeen, lastPosSeen); const GCodeResult rslt = sw->Configure(gb, reply); - axisEndstops[lastAxisSeen] = sw; + if (rslt == GCodeResult::ok) + { + axisEndstops[lastAxisSeen] = sw; + } + else + { + delete sw; + } return rslt; } |