From ad52220855b2527423c9610142867b3d76a68ab1 Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Sat, 20 Nov 2010 13:10:44 +1100 Subject: [PATCH] check for HEATER_SANITY_CHECK before trying to use sanity checking variables --- heater.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/heater.c b/heater.c index e71ca9b..6e050ca 100644 --- a/heater.c +++ b/heater.c @@ -6,7 +6,9 @@ #include "arduino.h" #include "debug.h" +#ifndef EXTRUDER #include "sersendf.h" +#endif #define HEATER_C #include "config.h" @@ -74,8 +76,10 @@ void heater_init() { } } - // 0 is a "sane" temperature when we're trying to cool down - heaters_runtime[i].sane_temperature = 0; + #ifdef HEATER_SANITY_CHECK + // 0 is a "sane" temperature when we're trying to cool down + heaters_runtime[i].sane_temperature = 0; + #endif // read factors from eeprom heaters_pid[i].p_factor = eeprom_read_dword((uint32_t *) &EE_factors[i].EE_p_factor);