diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-04-14 16:22:29 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-04-14 16:22:29 +0300 |
commit | b1a55e6f661331abe60f3537e66b0eabab819bfa (patch) | |
tree | 636db33ed64dbc291ce2f2ae26097fdbc8f1ac72 | |
parent | 8120fc6ad228879666f9b205276ca36ffbf745ac (diff) |
Fixed M569 crash when P parameter was missing (still 3.01-RC7)3.01-RC7
-rw-r--r-- | src/GCodes/GCodes.cpp | 6 | ||||
-rw-r--r-- | src/GCodes/GCodes.h | 20 | ||||
-rw-r--r-- | src/GCodes/GCodes3.cpp | 16 | ||||
-rw-r--r-- | src/Version.h | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index 52b30420..e7495f85 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -2593,7 +2593,7 @@ void GCodes::FileMacroCyclesReturn(GCodeBuffer& gb) noexcept // Home one or more of the axes // 'reply' is only written if there is an error. -GCodeResult GCodes::DoHome(GCodeBuffer& gb, const StringRef& reply) +GCodeResult GCodes::DoHome(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { if (!LockMovementAndWaitForStandstill(gb)) { @@ -2999,7 +2999,7 @@ void GCodes::StartPrinting(bool fromStart) noexcept } // Function to handle dwell delays. Returns true for dwell finished, false otherwise. -GCodeResult GCodes::DoDwell(GCodeBuffer& gb) noexcept +GCodeResult GCodes::DoDwell(GCodeBuffer& gb) THROWS(GCodeException) { int32_t dwell; if (gb.Seen('S')) @@ -3048,7 +3048,7 @@ GCodeResult GCodes::DoDwell(GCodeBuffer& gb) noexcept } // Set offset, working and standby temperatures for a tool. I.e. handle a G10. -GCodeResult GCodes::SetOrReportOffsets(GCodeBuffer &gb, const StringRef& reply) +GCodeResult GCodes::SetOrReportOffsets(GCodeBuffer &gb, const StringRef& reply) THROWS(GCodeException) { int32_t toolNumber = 0; bool seenP = false; diff --git a/src/GCodes/GCodes.h b/src/GCodes/GCodes.h index e98b343c..9d2cbcb1 100644 --- a/src/GCodes/GCodes.h +++ b/src/GCodes/GCodes.h @@ -317,17 +317,17 @@ private: bool CheckEnoughAxesHomed(AxesBitmap axesMoved) noexcept; // Check that enough axes have been homed bool TravelToStartPoint(GCodeBuffer& gb) noexcept; // Set up a move to travel to the resume point - GCodeResult DoDwell(GCodeBuffer& gb) noexcept; // Wait for a bit - GCodeResult DoHome(GCodeBuffer& gb, const StringRef& reply); // Home some axes - GCodeResult SetOrReportOffsets(GCodeBuffer& gb, const StringRef& reply); // Deal with a G10 - GCodeResult SetPositions(GCodeBuffer& gb); // Deal with a G92 - GCodeResult StraightProbe(GCodeBuffer& gb, const StringRef& reply); // Deal with a G38.x - GCodeResult DoDriveMapping(GCodeBuffer& gb, const StringRef& reply) noexcept; // Deal with a M584 - GCodeResult ProbeTool(GCodeBuffer& gb, const StringRef& reply); // Deal with a M585 + GCodeResult DoDwell(GCodeBuffer& gb) THROWS(GCodeException); // Wait for a bit + GCodeResult DoHome(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Home some axes + GCodeResult SetOrReportOffsets(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Deal with a G10 + GCodeResult SetPositions(GCodeBuffer& gb) THROWS(GCodeException); // Deal with a G92 + GCodeResult StraightProbe(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Deal with a G38.x + GCodeResult DoDriveMapping(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Deal with a M584 + GCodeResult ProbeTool(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Deal with a M585 GCodeResult FindCenterOfCavity(GCodeBuffer& gb, const StringRef& reply, const bool towardsMin = true) THROWS(GCodeException); // Deal with a M675 - GCodeResult SetDateTime(GCodeBuffer& gb,const StringRef& reply) noexcept; // Deal with a M905 - GCodeResult SavePosition(GCodeBuffer& gb,const StringRef& reply) noexcept; // Deal with G60 - GCodeResult ConfigureDriver(GCodeBuffer& gb, const StringRef& reply) noexcept; // Deal with M569 + GCodeResult SetDateTime(GCodeBuffer& gb,const StringRef& reply) THROWS(GCodeException); // Deal with a M905 + GCodeResult SavePosition(GCodeBuffer& gb,const StringRef& reply) THROWS(GCodeException); // Deal with G60 + GCodeResult ConfigureDriver(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Deal with M569 bool ProcessWholeLineComment(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Process a whole-line comment diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp index 3f08d971..b758b057 100644 --- a/src/GCodes/GCodes3.cpp +++ b/src/GCodes/GCodes3.cpp @@ -41,7 +41,7 @@ #include "Wire.h" // Deal with G60 -GCodeResult GCodes::SavePosition(GCodeBuffer& gb, const StringRef& reply) noexcept +GCodeResult GCodes::SavePosition(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { const uint32_t sParam = (gb.Seen('S')) ? gb.GetUIValue() : 0; if (sParam < ARRAY_SIZE(numberedRestorePoints)) @@ -56,7 +56,7 @@ GCodeResult GCodes::SavePosition(GCodeBuffer& gb, const StringRef& reply) noexce } // This handles G92. Return true if completed, false if it needs to be called again. -GCodeResult GCodes::SetPositions(GCodeBuffer& gb) +GCodeResult GCodes::SetPositions(GCodeBuffer& gb) THROWS(GCodeException) { // Don't wait for the machine to stop if only extruder drives are being reset. // This avoids blobs and seams when the gcode uses absolute E coordinates and periodically includes G92 E0. @@ -519,7 +519,7 @@ GCodeResult GCodes::CheckTrigger(GCodeBuffer& gb, const StringRef& reply) } // Deal with a M584 -GCodeResult GCodes::DoDriveMapping(GCodeBuffer& gb, const StringRef& reply) noexcept +GCodeResult GCodes::DoDriveMapping(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { if (!LockMovementAndWaitForStandstill(gb)) // we also rely on this to retrieve the current motor positions to moveBuffer { @@ -642,7 +642,7 @@ GCodeResult GCodes::DoDriveMapping(GCodeBuffer& gb, const StringRef& reply) noex return GCodeResult::ok; } // Handle G38.[2-5] -GCodeResult GCodes::StraightProbe(GCodeBuffer& gb, const StringRef& reply) +GCodeResult GCodes::StraightProbe(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { const int8_t fraction = gb.GetCommandFraction(); if (fraction < 2 || fraction > 5) { @@ -740,7 +740,7 @@ GCodeResult GCodes::StraightProbe(GCodeBuffer& gb, const StringRef& reply) } // Deal with a M585 -GCodeResult GCodes::ProbeTool(GCodeBuffer& gb, const StringRef& reply) +GCodeResult GCodes::ProbeTool(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { if (reprap.GetCurrentTool() == nullptr) { @@ -819,7 +819,7 @@ GCodeResult GCodes::ProbeTool(GCodeBuffer& gb, const StringRef& reply) return GCodeResult::ok; } -GCodeResult GCodes::FindCenterOfCavity(GCodeBuffer& gb, const StringRef& reply, const bool towardsMin) +GCodeResult GCodes::FindCenterOfCavity(GCodeBuffer& gb, const StringRef& reply, const bool towardsMin) THROWS(GCodeException) { if (reprap.GetCurrentTool() == nullptr) { @@ -893,7 +893,7 @@ GCodeResult GCodes::FindCenterOfCavity(GCodeBuffer& gb, const StringRef& reply, } // Deal with a M905 -GCodeResult GCodes::SetDateTime(GCodeBuffer& gb, const StringRef& reply) noexcept +GCodeResult GCodes::SetDateTime(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { tm timeInfo; (void)platform.GetDateTime(timeInfo); @@ -1139,7 +1139,7 @@ GCodeResult GCodes::ReceiveI2c(GCodeBuffer& gb, const StringRef &reply) } // Deal with M569 -GCodeResult GCodes::ConfigureDriver(GCodeBuffer& gb, const StringRef& reply) noexcept +GCodeResult GCodes::ConfigureDriver(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException) { gb.MustSee('P'); const DriverId id = gb.GetDriverId(); diff --git a/src/Version.h b/src/Version.h index c43fce92..259c859c 100644 --- a/src/Version.h +++ b/src/Version.h @@ -19,7 +19,7 @@ #endif #ifndef DATE -# define DATE "2020-04-14b2" +# define DATE "2020-04-14b3" #endif #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d" |