From 809da999dcf16ce54354b420e7828e522dd9339d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 11 Jul 2016 22:08:47 -0700 Subject: [PATCH] Apply HOTEND_INDEX in preheat methods --- Marlin/temperature.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Marlin/temperature.h b/Marlin/temperature.h index 6fa7821f2..fd737bc6a 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -247,11 +247,24 @@ class Temperature { * Preheating hotends */ #ifdef MILLISECONDS_PREHEAT_TIME - static bool is_preheating(uint8_t hotend) { - return preheat_end_time[hotend] && PENDING(millis(), preheat_end_time[hotend]); + static bool is_preheating(uint8_t e) { + #if HOTENDS == 1 + UNUSED(e); + #endif + return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]); + } + static void start_preheat_time(uint8_t e) { + #if HOTENDS == 1 + UNUSED(e); + #endif + preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME; + } + static void reset_preheat_time(uint8_t e) { + #if HOTENDS == 1 + UNUSED(e); + #endif + preheat_end_time[HOTEND_INDEX] = 0; } - static void start_preheat_time(uint8_t hotend) { preheat_end_time[hotend] = millis() + MILLISECONDS_PREHEAT_TIME; } - static void reset_preheat_time(uint8_t hotend) { preheat_end_time[hotend] = 0; } #else #define is_preheating(n) (false) #endif