Skip to content

Commit acd3240

Browse files
thisiskeithbthinkyhead
authored and
Jeremy Fairbanks
committed
🐛 Fix ProUI / JyersUI leveling preheat (MarlinFirmware#24060, MarlinFirmware#24064)
Co-Authored-By: Scott Lahteine <thinkyhead@users.noreply.github.com>
1 parent 431b4d9 commit acd3240

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

Marlin/src/gcode/bedlevel/abl/G29.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,13 @@ G29_TYPE GcodeSuite::G29() {
433433
remember_feedrate_scaling_off();
434434

435435
#if ENABLED(PREHEAT_BEFORE_LEVELING)
436-
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, LEVELING_BED_TEMP);
436+
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
437+
#if BOTH(DWIN_LCD_PROUI, HAS_HEATED_BED)
438+
HMI_data.BedLevT
439+
#else
440+
LEVELING_BED_TEMP
441+
#endif
442+
);
437443
#endif
438444
}
439445

Marlin/src/lcd/e3v2/jyersui/dwin.cpp

+2-11
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
20792079
#endif // HAS_HEATED_BED
20802080

20812081
#if HAS_PREHEAT
2082-
#define _PREHEAT_SUBMENU_CASE(N) case Preheat##N: preheat_submenu(N, item, TEMP_PREHEAT##N); break;
2082+
#define _PREHEAT_SUBMENU_CASE(N) case Preheat##N: preheat_submenu((N) - 1, item, TEMP_PREHEAT##N); break;
20832083
REPEAT_1(PREHEAT_COUNT, _PREHEAT_SUBMENU_CASE)
20842084
#endif
20852085

@@ -2869,16 +2869,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
28692869
#if ENABLED(AUTO_BED_LEVELING_UBL)
28702870
#if ENABLED(PREHEAT_BEFORE_LEVELING)
28712871
Popup_Handler(Heating);
2872-
#if HAS_HOTEND
2873-
if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP)
2874-
thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0);
2875-
#endif
2876-
#if HAS_HEATED_BED
2877-
if (thermalManager.degTargetBed() < LEVELING_BED_TEMP)
2878-
thermalManager.setTargetBed(LEVELING_BED_TEMP);
2879-
#endif
2880-
thermalManager.wait_for_hotend(0);
2881-
TERN_(HAS_HEATED_BED, thermalManager.wait_for_bed_heating());
2872+
probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, LEVELING_BED_TEMP);
28822873
#endif
28832874
#if HAS_BED_PROBE
28842875
Popup_Handler(Level);

Marlin/src/lcd/e3v2/proui/dwin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,7 @@ void DWIN_SetDataDefaults() {
17021702
ApplyExtMinT();
17031703
#endif
17041704
#if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
1705-
HMI_data.BedLevT = PREHEAT_1_TEMP_BED;
1705+
HMI_data.BedLevT = LEVELING_BED_TEMP;
17061706
#endif
17071707
TERN_(BAUD_RATE_GCODE, SetBaud250K());
17081708
}

Marlin/src/lcd/e3v2/proui/dwin_defines.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,12 @@ typedef struct {
120120
#if ENABLED(PREVENT_COLD_EXTRUSION)
121121
int16_t ExtMinT = EXTRUDE_MINTEMP;
122122
#endif
123-
int16_t BedLevT = PREHEAT_1_TEMP_BED;
124-
TERN_(BAUD_RATE_GCODE, bool Baud115K = false);
123+
#if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
124+
int16_t BedLevT = LEVELING_BED_TEMP;
125+
#endif
126+
#if ENABLED(BAUD_RATE_GCODE)
127+
bool Baud115K = false;
128+
#endif
125129
bool FullManualTramming = false;
126130
// Led
127131
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
@@ -135,8 +139,3 @@ typedef struct {
135139

136140
static constexpr size_t eeprom_data_size = 64;
137141
extern HMI_data_t HMI_data;
138-
139-
#if PREHEAT_1_TEMP_BED
140-
#undef LEVELING_BED_TEMP
141-
#define LEVELING_BED_TEMP HMI_data.BedLevT
142-
#endif

0 commit comments

Comments
 (0)