From 3f728d5505ca84f4cd747be299cda8597fbe181b Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Sat, 7 Feb 2026 16:29:11 +0100 Subject: [PATCH] stepcompress: don't increase max error On every cycle last step happens at the time or before. New max_error is equal to or larger than before. Simplify logic by avoiding re-computing it. It have insegnificant impact on the compressed output. Signed-off-by: Timofey Titovets --- klippy/chelper/stepcompress.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/klippy/chelper/stepcompress.c b/klippy/chelper/stepcompress.c index 78863e010..0c6e6f5ad 100644 --- a/klippy/chelper/stepcompress.c +++ b/klippy/chelper/stepcompress.c @@ -383,12 +383,6 @@ step_init_max_error(struct stepcompress *sc, struct qstep *pos) pos->max_error = max_error; } -static void -step_update_max_error(struct stepcompress *sc, struct qstep *pos) -{ - step_init_max_error(sc, pos); -} - // Convert previously scheduled steps into commands for the mcu static int queue_flush(struct stepcompress *sc, uint64_t move_clock) @@ -396,7 +390,6 @@ queue_flush(struct stepcompress *sc, uint64_t move_clock) if (sc->queue_pos >= sc->queue_next) return 0; while (sc->last_step_clock < move_clock) { - step_update_max_error(sc, sc->queue_pos); struct step_move move = compress_bisect_add(sc); int ret = check_line(sc, move); if (ret)