Skip to content

Commit

Permalink
Apply HOTEND_INDEX in preheat methods
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 12, 2016
1 parent 3d78b69 commit 809da99
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions Marlin/temperature.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 809da99

Please sign in to comment.