diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-01-19 19:43:46 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-01-19 19:43:46 +0300 |
commit | defc4bb6cb6ad5ce8b3713f2d146bc0b190b94fb (patch) | |
tree | 4fc43bc468bee08392be120eacfd438e7e07a725 | |
parent | 900130b55cec17b3e175c91860d0ea826e7c289f (diff) |
Bug fixes
Fixed possible 1-character buffer overflow in class OutputMemory
M564 S0 now allows delta printable radius to be exceeded
After deselecting a tool, allow for the nozzle offset having gone
-rw-r--r-- | src/GCodes/GCodes.cpp | 1 | ||||
-rw-r--r-- | src/Movement/Kinematics/LinearDeltaKinematics.cpp | 2 | ||||
-rw-r--r-- | src/OutputMemory.cpp | 4 | ||||
-rw-r--r-- | src/Version.h | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index e64538bf..a250a823 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -686,6 +686,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) if (oldTool != nullptr) { reprap.StandbyTool(oldTool->Number(), simulationMode != 0); + UpdateCurrentUserPosition(); // the tool offset may have changed, so get the current position } gb.AdvanceState(); if (reprap.GetTool(gb.MachineState().newToolNumber) != nullptr && AllAxesAreHomed() && (gb.MachineState().toolChangeParam & TPreBit) != 0) diff --git a/src/Movement/Kinematics/LinearDeltaKinematics.cpp b/src/Movement/Kinematics/LinearDeltaKinematics.cpp index aaf86620..abdee753 100644 --- a/src/Movement/Kinematics/LinearDeltaKinematics.cpp +++ b/src/Movement/Kinematics/LinearDeltaKinematics.cpp @@ -215,7 +215,7 @@ LimitPositionResult LinearDeltaKinematics::LimitPosition(float finalCoords[], co { // Constrain the move to be within the build radius const float diagonalSquared = fsquare(finalCoords[X_AXIS]) + fsquare(finalCoords[Y_AXIS]); - if (diagonalSquared > printRadiusSquared) + if (applyM208Limits && diagonalSquared > printRadiusSquared) { const float factor = sqrtf(printRadiusSquared / diagonalSquared); finalCoords[X_AXIS] *= factor; diff --git a/src/OutputMemory.cpp b/src/OutputMemory.cpp index 976b7d50..9d405380 100644 --- a/src/OutputMemory.cpp +++ b/src/OutputMemory.cpp @@ -63,7 +63,7 @@ char &OutputBuffer::operator[](size_t index) { // Get the right buffer to access OutputBuffer *itemToIndex = this; - while (index > itemToIndex->DataLength()) + while (index >= itemToIndex->DataLength()) { index -= itemToIndex->DataLength(); itemToIndex = itemToIndex->Next(); @@ -77,7 +77,7 @@ char OutputBuffer::operator[](size_t index) const { // Get the right buffer to access const OutputBuffer *itemToIndex = this; - while (index > itemToIndex->DataLength()) + while (index >= itemToIndex->DataLength()) { index -= itemToIndex->DataLength(); itemToIndex = itemToIndex->Next(); diff --git a/src/Version.h b/src/Version.h index add10d71..84ab111b 100644 --- a/src/Version.h +++ b/src/Version.h @@ -11,7 +11,7 @@ #ifndef VERSION #ifdef RTOS -# define MAIN_VERSION "2.05" +# define MAIN_VERSION "2.05+1" #else # define MAIN_VERSION "1.26" #endif @@ -20,7 +20,7 @@ #endif #ifndef DATE -# define DATE "2019-12-13b1" +# define DATE "2020-01-19b1" #endif #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d" |