diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-11-05 14:32:41 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-11-05 14:32:41 +0300 |
commit | d96a02b9d9f720ed83b992b498a3a1f1cd8d8d24 (patch) | |
tree | e9b9407e6cf2f83ced5a1fc2cb219d230fe9f601 | |
parent | 90e701a8f7ef911138849b9daf65d20612396de0 (diff) |
Fixed issue with tool not owning user XY axes
-rw-r--r-- | src/GCodes/GCodes.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index 90812def..907c65ac 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -4966,6 +4966,10 @@ void GCodes::AllocateAxes(const GCodeBuffer& gb, MovementState& ms, AxesBitmap a const AxesBitmap badAxes = ms.AllocateAxes(axes, axLetters); if (!badAxes.IsEmpty()) { + if (reprap.Debug(moduleMove)) + { + debugPrintf("Failed to allocate axes %07" PRIx32 " to MS %u letters %08" PRIx32 "\n", badAxes.GetRaw(), ms.GetMsNumber(), axLetters.GetRaw()); + } gb.ThrowGCodeException("Axis %c is already used by a different motion system", (unsigned int)axisLetters[badAxes.LowestSetBit()]); } UpdateUserPositionFromMachinePosition(gb, ms); @@ -4997,7 +5001,6 @@ void GCodes::AllocateAxisLetters(const GCodeBuffer& gb, MovementState& ms, Param const unsigned int axisLetterBitNumber = ParameterLetterToBitNumber(c); if (axLetters.IsBitSet(axisLetterBitNumber)) { -# if !PREALLOCATE_TOOL_AXES // if we pre-allocated the tool X and Y axes, then if we have X or Y here then no tool is selected if (axis == 0) // axis 0 is always X { newAxes |= Tool::GetXAxes(ms.currentTool); @@ -5007,7 +5010,6 @@ void GCodes::AllocateAxisLetters(const GCodeBuffer& gb, MovementState& ms, Param newAxes |= Tool::GetYAxes(ms.currentTool); } else -# endif { newAxes.SetBit(axis); } |