Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2022-10-10 16:52:59 +0300
committerDavid Crocker <dcrocker@eschertech.com>2022-10-10 16:52:59 +0300
commitd53d540aa782b88cffd0d14942ed4338255a8825 (patch)
tree1cd609ffd44d04212942ad214c228172c4500354
parentb3bbc45ab098b3ca3790e12dc3fb6b0076d579bc (diff)
Don't force sync between motion systems when a macro completes
-rw-r--r--src/GCodes/GCodes.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp
index 18fd99e5..e9c5fa17 100644
--- a/src/GCodes/GCodes.cpp
+++ b/src/GCodes/GCodes.cpp
@@ -606,12 +606,17 @@ bool GCodes::DoFilePrint(GCodeBuffer& gb, const StringRef& reply) noexcept
{
if (gb.IsFileFinished())
{
- if (!LockMovementAndWaitForStandstill(gb)) // wait until movement has finished and deferred command queue has caught up
+ const bool printFileFinished = (gb.LatestMachineState().GetPrevious() == nullptr);
+ if (!LockMovementAndWaitForStandstill(gb
+# if SUPPORT_ASYNC_MOVES
+ , printFileFinished
+# endif
+ )) // wait until movement has finished and deferred command queue has caught up
{
return false;
}
- if (gb.LatestMachineState().GetPrevious() == nullptr)
+ if (printFileFinished)
{
// Finished printing SD card file.
// We never get here if the file ends in M0 because CancelPrint gets called directly in that case.
@@ -747,12 +752,17 @@ bool GCodes::DoFilePrint(GCodeBuffer& gb, const StringRef& reply) noexcept
gb.Init(); // mark buffer as empty
- if (!LockMovementAndWaitForStandstill(gb)) // wait until movement has finished and deferred command queue has caught up
+ const bool printFileFinished = (gb.LatestMachineState().GetPrevious() == nullptr);
+ if (!LockMovementAndWaitForStandstill(gb
+#if SUPPORT_ASYNC_MOVES
+ , printFileFinished
+#endif
+ )) // wait until movement has finished and deferred command queue has caught up
{
return false;
}
- if (gb.LatestMachineState().GetPrevious() == nullptr)
+ if (printFileFinished)
{
// Finished printing SD card file.
// We never get here if the file ends in M0 because CancelPrint gets called directly in that case.