From 47dc3aed898d471e06d84a34e496b4cc7ee1dfa0 Mon Sep 17 00:00:00 2001 From: Wurstnase Date: Tue, 15 Nov 2016 18:01:13 +0100 Subject: [PATCH] dda_lookahead.c: one more debug variable defined out by default. Traumflug's note: if one uses #define LOOKAHEAD_DEBUG at line 177, one should use the same symbol in line 321. Edited the commit to do so. This reduces binary size by 38 bytes and RAM usage by 4 bytes. --- dda_lookahead.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dda_lookahead.c b/dda_lookahead.c index 05573b0..8b8f7a4 100644 --- a/dda_lookahead.c +++ b/dda_lookahead.c @@ -174,8 +174,8 @@ void dda_join_moves(DDA *prev, DDA *current) { // back up the move settings: they will remain constant. uint32_t this_F, this_F_in_steps, this_F_start_in_steps, this_rampup, this_rampdown, this_total_steps, this_fast_axis; uint8_t this_id; - static uint32_t la_cnt = 0; // Counter: how many moves did we join? #ifdef LOOKAHEAD_DEBUG + static uint32_t la_cnt = 0; // Counter: how many moves did we join? static uint32_t moveno = 0; // Debug counter to number the moves - helps while debugging moveno++; #endif @@ -318,7 +318,9 @@ void dda_join_moves(DDA *prev, DDA *current) { current->rampdown_steps = this_rampdown; current->end_steps = 0; current->start_steps = this_F_start_in_steps; - la_cnt++; + #ifdef LOOKAHEAD_DEBUG + la_cnt++; + #endif } #ifdef DEBUG else