Give a warning for wrong TEMP_EWMA values.

float values are deprecated. Some users could accidentally set 1.0 to 1
This commit is contained in:
Nico Tonnhofer 2017-11-06 19:00:56 +01:00
parent 01c2300d20
commit 51eb03583d
1 changed files with 12 additions and 0 deletions

View File

@ -113,3 +113,15 @@
#if defined __ARMEL__ && defined BANG_BANG #if defined __ARMEL__ && defined BANG_BANG
#undef BANG_BANG #undef BANG_BANG
#endif #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