From 6d7d3403e49c2197c2d9a281dd152518c1ee28c8 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 7 Feb 2026 14:49:00 -0500 Subject: [PATCH] stepcompress: Add some comments on internal structs Signed-off-by: Kevin O'Connor --- klippy/chelper/stepcompress.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/klippy/chelper/stepcompress.c b/klippy/chelper/stepcompress.c index 3176647ab..0fe515ee5 100644 --- a/klippy/chelper/stepcompress.c +++ b/klippy/chelper/stepcompress.c @@ -28,10 +28,13 @@ #define CHECK_LINES 1 #define QUEUE_START_SIZE 1024 +// Storage for queuing steps (only lower 32 bits of step clock are stored as +// optimization to reduce memory, improve cache usage, and reduce 64 bit ops) struct qstep { uint32_t clock32; }; +// Main stepcompress object storage struct stepcompress { // Buffer management struct qstep *queue, *queue_end, *queue_pos, *queue_next; @@ -52,12 +55,14 @@ struct stepcompress { struct list_head history_list; }; +// Parameters of a single queue_step command struct step_move { uint32_t interval; uint16_t count; int16_t add; }; +// Storage for internal history of recently sent queue_step commands struct history_steps { struct list_node node; uint64_t first_clock, last_clock;