diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-11-01 12:34:37 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-11-01 12:34:37 +0300 |
commit | 4e687fd2cb2193df180a78d914ca64013a672bb0 (patch) | |
tree | 1a185dcf2c3baf006b492566397df87f26d64ae4 /src | |
parent | 97ead36a9b3e8a5ee3019c7a3c1ac6a4289408cc (diff) |
In laser mode, turn laser off immediately when the move ends
Diffstat (limited to 'src')
-rw-r--r-- | src/Movement/Move.cpp | 6 | ||||
-rw-r--r-- | src/Movement/Move.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Movement/Move.cpp b/src/Movement/Move.cpp index 718da83d..f3bbc97e 100644 --- a/src/Movement/Move.cpp +++ b/src/Movement/Move.cpp @@ -1194,7 +1194,7 @@ void Move::WakeMoveTaskFromISR() noexcept Task<Move::LaserTaskStackWords> *Move::laserTask = nullptr; // the task used to manage laser power or IOBits -extern "C" void LaserTaskStart(void * pvParameters) noexcept +extern "C" [[noreturn]] void LaserTaskStart(void * pvParameters) noexcept { reprap.GetMove().LaserTaskRun(); } @@ -1242,7 +1242,7 @@ void Move::LaserTaskRun() noexcept uint32_t ticks; while ((ticks = mainDDARing.ManageLaserPower()) != 0) { - delay(ticks); + (void)TaskBase::Take(ticks); } # endif } @@ -1253,7 +1253,7 @@ void Move::LaserTaskRun() noexcept uint32_t ticks; while ((ticks = reprap.GetPortControl().UpdatePorts()) != 0) { - delay(ticks); + (void)TaskBase::Take(ticks); } # endif } diff --git a/src/Movement/Move.h b/src/Movement/Move.h index 4caf011f..8d4e560e 100644 --- a/src/Movement/Move.h +++ b/src/Movement/Move.h @@ -192,7 +192,7 @@ public: static float MotorStepsToMovement(size_t drive, int32_t endpoint) noexcept; // Convert number of motor steps to motor position #if SUPPORT_LASER || SUPPORT_IOBITS - void LaserTaskRun() noexcept; + [[noreturn]] void LaserTaskRun() noexcept; static void CreateLaserTask() noexcept; // create the laser task if we haven't already static void WakeLaserTask() noexcept; // wake up the laser task, called at the start of a new move |