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.
This commit is contained in:
Markus Hitter 2016-07-09 13:36:22 +02:00
parent 51321910bc
commit 801362d541
2 changed files with 8 additions and 5 deletions

View File

@ -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.

View File

@ -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