From 51eb03583d3ac18091e51ba21b710f8882df74ba Mon Sep 17 00:00:00 2001 From: Nico Tonnhofer Date: Mon, 6 Nov 2017 19:00:56 +0100 Subject: [PATCH] Give a warning for wrong TEMP_EWMA values. float values are deprecated. Some users could accidentally set 1.0 to 1 --- config_wrapper.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config_wrapper.h b/config_wrapper.h index 137957b..ecd34ad 100644 --- a/config_wrapper.h +++ b/config_wrapper.h @@ -113,3 +113,15 @@ #if defined __ARMEL__ && defined BANG_BANG #undef BANG_BANG #endif + +/** + * TEMP_EWMA changed from float 0.0 - 1.0 to integer 1000 + * Some people could accidentally change the 1.0 to 1 which will have effect + * in very slow temperature readings. Let's force any value <= 1.0 to 1000 + * and give them a warning. +*/ +#if TEMP_EWMA < 2 +#undef TEMP_EWMA +#define TEMP_EWMA 1000 +#warning TEMP_EWMA scaling changed! Take a look in your printer.xxx.h. +#endif