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>2021-07-02 17:47:25 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-07-07 10:54:14 +0300
commitd253bb7b92326761b2c764aff264c8fa7eae02cd (patch)
tree0499f85fde59d83539d4992c9764522ddcb168d5
parent32eddd9999db8ecfdca32f14e86c04b8979c31d7 (diff)
Fixed issue with remote-only moves being scheduled too early
-rw-r--r--src/CAN/CanInterface.cpp3
-rw-r--r--src/Movement/DDA.cpp2
-rw-r--r--src/Movement/Move.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/CAN/CanInterface.cpp b/src/CAN/CanInterface.cpp
index daf73f13..89c4919a 100644
--- a/src/CAN/CanInterface.cpp
+++ b/src/CAN/CanInterface.cpp
@@ -635,6 +635,9 @@ static GCodeResult SetRemoteDriverStates(const CanDriversList& drivers, const St
void CanInterface::SendMotion(CanMessageBuffer *buf) noexcept
{
buf->next = nullptr;
+#if 0
+ buf->msg.moveLinear.DebugPrint();
+#endif
{
TaskCriticalSectionLocker lock;
diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp
index 89959ee0..1ff3fa12 100644
--- a/src/Movement/DDA.cpp
+++ b/src/Movement/DDA.cpp
@@ -2073,7 +2073,7 @@ void DDA::StepDrivers(Platform& p, uint32_t now) noexcept
// We need to make sure it has really started, or we can get arithmetic wrap round in the case that there are no local drivers stepping.
const uint32_t timeRunning = StepTimer::GetTimerTicks() - afterPrepare.moveStartTime;
if ( timeRunning + WakeupTime >= clocksNeeded // if it looks like the move has almost finished
- && timeRunning < 0 - MovementStartDelayClocks // and it really has started
+ && timeRunning < 0 - AbsoluteMinimumPreparedTime // and it really has started
)
{
state = completed;
diff --git a/src/Movement/Move.h b/src/Movement/Move.h
index 940cfe8b..bf891f1e 100644
--- a/src/Movement/Move.h
+++ b/src/Movement/Move.h
@@ -46,8 +46,6 @@ const unsigned int NumDms = 20 * 5; // suitable for e.g. a delta + 2-
#endif
-constexpr uint32_t MovementStartDelayClocks = StepTimer::StepClockRate/100; // 10ms delay between preparing the first move and starting it
-
// This is the master movement class. It controls all movement in the machine.
class Move INHERIT_OBJECT_MODEL
{