From c181a813e70bf3c1e8e1d3f32c5166561c610305 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 27 Nov 2016 19:32:08 +0100 Subject: [PATCH] dda_queue.c: take advantage of a special case. No functional change or stepping performance improvement, but a 14 bytes smaller binary: ATmega sizes '168 '328(P) '644(P) '1280 Program: 19426 bytes 136% 64% 31% 16% Data: 2177 bytes 213% 107% 54% 27% EEPROM: 32 bytes 4% 2% 2% 1% --- dda_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dda_queue.c b/dda_queue.c index b039312..a77f5a9 100644 --- a/dda_queue.c +++ b/dda_queue.c @@ -139,7 +139,7 @@ void enqueue_home(TARGET *t, uint8_t endstop_check, uint8_t endstop_stop_cond) { version is inlined (and simplified) in queue_step(). */ timer_reset(); - mb_tail = MB_NEXT(mb_tail); + mb_tail = mb_head; // Valid ONLY if the queue was empty before! dda_start(&movebuffer[mb_tail]); // Compensate for the cli() in timer_set(). sei();