Browse Source

Apply HOTEND_INDEX in preheat methods

Scott Lahteine 8 years ago
parent
commit
809da999dc
1 changed files with 17 additions and 4 deletions
  1. 17
    4
      Marlin/temperature.h

+ 17
- 4
Marlin/temperature.h View File

@@ -247,11 +247,24 @@ class Temperature {
247 247
      * Preheating hotends
248 248
      */
249 249
     #ifdef MILLISECONDS_PREHEAT_TIME
250
-      static bool is_preheating(uint8_t hotend) {
251
-        return preheat_end_time[hotend] && PENDING(millis(), preheat_end_time[hotend]);
250
+      static bool is_preheating(uint8_t e) {
251
+        #if HOTENDS == 1
252
+          UNUSED(e);
253
+        #endif
254
+        return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
255
+      }
256
+      static void start_preheat_time(uint8_t e) {
257
+        #if HOTENDS == 1
258
+          UNUSED(e);
259
+        #endif
260
+        preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
261
+      }
262
+      static void reset_preheat_time(uint8_t e) {
263
+        #if HOTENDS == 1
264
+          UNUSED(e);
265
+        #endif
266
+        preheat_end_time[HOTEND_INDEX] = 0;
252 267
       }
253
-      static void start_preheat_time(uint8_t hotend) { preheat_end_time[hotend] = millis() + MILLISECONDS_PREHEAT_TIME; }
254
-      static void reset_preheat_time(uint8_t hotend) { preheat_end_time[hotend] = 0; }
255 268
     #else
256 269
       #define is_preheating(n) (false)
257 270
     #endif

Loading…
Cancel
Save