From 17baad1d9076ffe791f939063b7d16e3f335fb94 Mon Sep 17 00:00:00 2001 From: Leonardo Romor Date: Sat, 29 Apr 2023 22:39:14 +0200 Subject: [PATCH] Improved comments describing interfaces --- src/motion-queue.h | 5 +++-- src/segment-queue.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/motion-queue.h b/src/motion-queue.h index 612d6cd..6a89189 100644 --- a/src/motion-queue.h +++ b/src/motion-queue.h @@ -119,8 +119,9 @@ class MotionQueue { // of not yet executed loops in the item currenly being executed. virtual int GetPendingElements(uint32_t *head_item_progress) = 0; - // Perform an immediate reset of the queue, - // even if motors are still moving. + // Immediately stop any motion and clear the internal queue. + // Returns true if the queue was successfully cleared, + // false if an internal error occurred. virtual bool Clear() = 0; }; diff --git a/src/segment-queue.h b/src/segment-queue.h index 7b6fd67..334f7ca 100644 --- a/src/segment-queue.h +++ b/src/segment-queue.h @@ -78,10 +78,10 @@ class SegmentQueue { // PhysicalStatus. virtual void SetExternalPosition(int axis, int position_steps) = 0; - // Clear the queue and reset it to its initial state. - // This action is immediate and will discard any running or - // enqueued and not yet executed segment. + // Immediately stop any motion and clear the internal queue. // Current physical status will be lost. + // Returns true if the queue was successfully cleared, + // false if an internal error occurred. virtual bool Clear() = 0; };