Skip to content

Commit 5b0c818

Browse files
thisiskeithbellenspthinkyhead
authored
🩹 Update preheat end time var (MarlinFirmware#27023)
Co-authored-by: ellensp <[email protected]> Co-authored-by: Scott Lahteine <[email protected]>
1 parent ece37ba commit 5b0c818

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Marlin/src/module/temperature.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ volatile bool Temperature::raw_temps_ready = false;
595595
#endif
596596

597597
#if MILLISECONDS_PREHEAT_TIME > 0
598-
millis_t Temperature::preheat_end_ms_hotend[HOTENDS]; // = { 0 };
598+
millis_t Temperature::preheat_end_ms_hotend[HOTENDS]; // = { 0 }
599599
#endif
600600
#if HAS_HEATED_BED && PREHEAT_TIME_BED_MS > 0
601601
millis_t Temperature::preheat_end_ms_bed = 0;
@@ -2442,7 +2442,7 @@ void Temperature::updateTemperaturesFromRawValues() {
24422442
/**
24432443
// DEBUG PREHEATING TIME
24442444
SERIAL_ECHOLNPGM("\nExtruder = ", e, " Preheat On/Off = ", is_preheating(e));
2445-
const float test_is_preheating = (preheat_end_time[HOTEND_INDEX] - millis()) * 0.001f;
2445+
const float test_is_preheating = (preheat_end_ms_hotend[HOTEND_INDEX] - millis()) * 0.001f;
24462446
if (test_is_preheating < 31) SERIAL_ECHOLNPGM("Extruder = ", e, " Preheat remaining time = ", test_is_preheating, "s", "\n");
24472447
//*/
24482448

Marlin/src/module/temperature.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ class Temperature {
747747
#endif
748748

749749
#if MILLISECONDS_PREHEAT_TIME > 0
750-
static millis_t preheat_end_time[HOTENDS];
750+
static millis_t preheat_end_ms_hotend[HOTENDS];
751751
#endif
752752

753753
#if HAS_FAN_LOGIC
@@ -909,13 +909,13 @@ class Temperature {
909909
*/
910910
#if MILLISECONDS_PREHEAT_TIME > 0
911911
static bool is_preheating(const uint8_t E_NAME) {
912-
return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
912+
return preheat_end_ms_hotend[HOTEND_INDEX] && PENDING(millis(), preheat_end_ms_hotend[HOTEND_INDEX]);
913913
}
914914
static void start_preheat_time(const uint8_t E_NAME) {
915-
preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
915+
preheat_end_ms_hotend[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
916916
}
917917
static void reset_preheat_time(const uint8_t E_NAME) {
918-
preheat_end_time[HOTEND_INDEX] = 0;
918+
preheat_end_ms_hotend[HOTEND_INDEX] = 0;
919919
}
920920
#else
921921
#define is_preheating(n) (false)

0 commit comments

Comments
 (0)