From 801362d5418c46aca9db1adc7eda0ab80d512c08 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sat, 9 Jul 2016 13:36:22 +0200 Subject: [PATCH] Lookahead: disable in config_wrapper.h, not in dda_lookahead.h. Disable it only when appropriate, of course. The move of this code makes Teacup compiling with both, ACCELERATION_REPRAP and LOOKAHEAD enabled. Such a configuration makes no sense, but can happen anyways. --- config_wrapper.h | 8 ++++++++ dda_lookahead.h | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config_wrapper.h b/config_wrapper.h index 78083b1..ba27e78 100644 --- a/config_wrapper.h +++ b/config_wrapper.h @@ -60,6 +60,14 @@ #undef LOOKAHEAD #endif +/** + For ACCELERATION_REPRAP or no acceleration at all, lookahead makes no sense. + Explicitely disable it to deal with misconfigurations. +*/ +#if ! defined ACCELERATION_RAMPING && ! defined ACCELERATION_TEMPORAL + #undef LOOKAHEAD +#endif + /** Silently discard EECONFIG on ARM. Silently to not disturb regression tests. diff --git a/dda_lookahead.h b/dda_lookahead.h index a104145..0dc9a7d 100644 --- a/dda_lookahead.h +++ b/dda_lookahead.h @@ -5,11 +5,6 @@ #include "config_wrapper.h" #include "dda.h" -#ifndef ACCELERATION_RAMPING -// Only enable the lookahead bits if ramping acceleration is enabled -#undef LOOKAHEAD -#endif - #ifdef LOOKAHEAD // Sanity: make sure the defines are in place