From 2e5802370c1ab944373814f96f9d35a3db9d3143 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 24 Nov 2025 19:30:35 -0500 Subject: [PATCH] serialqueue: Tune MIN_REQTIME_DELTA timing The MIN_REQTIME_DELTA parameter controls when the host will flush incomplete message blocks to the mcu. If the message had a target time less than 250ms it would result in a flush even if a message block was not completely full. In the situation where the host generates lots of queue_step commands to the point that it fills the mcu move_queue, then it would be possible for individual queue_step commands to become eligible for transmit only microseconds apart. It could also lead to a situation where the target time was less than 250ms in the future. The result could lead to many small message blocks as each became flushed individually. Tune the MIN_REQTIME_DELTA to 100ms to reduce the chance of this. Signed-off-by: Kevin O'Connor --- klippy/chelper/serialqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klippy/chelper/serialqueue.c b/klippy/chelper/serialqueue.c index d30433554..dab6b8a1a 100644 --- a/klippy/chelper/serialqueue.c +++ b/klippy/chelper/serialqueue.c @@ -107,7 +107,7 @@ struct serialqueue { #define MIN_RTO 0.025 #define MAX_RTO 5.000 #define MAX_PENDING_BLOCKS 12 -#define MIN_REQTIME_DELTA 0.250 +#define MIN_REQTIME_DELTA 0.100 #define MIN_BACKGROUND_DELTA 0.005 #define IDLE_QUERY_TIME 1.0