Skip to content

Commit

Permalink
🐛 Fix ProUI / JyersUI leveling preheat (MarlinFirmware#24064)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkleina authored and LCh-77 committed May 11, 2022
1 parent e46ab70 commit 8b1024d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
8 changes: 7 additions & 1 deletion Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,13 @@ G29_TYPE GcodeSuite::G29() {
remember_feedrate_scaling_off();

#if ENABLED(PREHEAT_BEFORE_LEVELING)
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, LEVELING_BED_TEMP);
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
#if BOTH(DWIN_LCD_PROUI, HAS_HEATED_BED)
HMI_data.BedLevT
#else
LEVELING_BED_TEMP
#endif
);
#endif
}

Expand Down
11 changes: 1 addition & 10 deletions Marlin/src/lcd/e3v2/jyersui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5654,16 +5654,7 @@ void CrealityDWINClass::Reset_Settings() {
void CrealityDWINClass::PreheatBefore() {
#if ENABLED(PREHEAT_BEFORE_LEVELING)
Popup_Handler(Heating);
#if HAS_HOTEND
if (thermalManager.degTargetHotend(0) < eeprom_settings.hotend_levtemp && (eeprom_settings.ena_hotend_levtemp))
thermalManager.setTargetHotend(eeprom_settings.hotend_levtemp, 0);
#endif
#if HAS_HEATED_BED
if (thermalManager.degTargetBed() < eeprom_settings.bed_levtemp && (eeprom_settings.ena_bed_levtemp))
thermalManager.setTargetBed(eeprom_settings.bed_levtemp);
#endif
TERN_(HAS_HOTEND, if (eeprom_settings.ena_hotend_levtemp) thermalManager.wait_for_hotend(0));
TERN_(HAS_HEATED_BED, if (eeprom_settings.ena_bed_levtemp) thermalManager.wait_for_bed_heating());
probe.preheat_for_probing(eeprom_settings.ena_hotend_levtemp, eeprom_settings.ena_bed_levtemp);
Update_Status("");
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ void DWIN_SetDataDefaults() {
ApplyExtMinT();
#endif
#if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
HMI_data.BedLevT = PREHEAT_1_TEMP_BED;
HMI_data.BedLevT = LEVELING_BED_TEMP;
#endif
TERN_(BAUD_RATE_GCODE, SetBaud250K());
}
Expand Down
13 changes: 6 additions & 7 deletions Marlin/src/lcd/e3v2/proui/dwin_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ typedef struct {
#if ENABLED(PREVENT_COLD_EXTRUSION)
int16_t ExtMinT = EXTRUDE_MINTEMP;
#endif
int16_t BedLevT = PREHEAT_1_TEMP_BED;
TERN_(BAUD_RATE_GCODE, bool Baud115K = false);
#if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
int16_t BedLevT = LEVELING_BED_TEMP;
#endif
#if ENABLED(BAUD_RATE_GCODE)
bool Baud115K = false;
#endif
bool FullManualTramming = false;
// Led
#if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
Expand All @@ -135,8 +139,3 @@ typedef struct {

static constexpr size_t eeprom_data_size = 64;
extern HMI_data_t HMI_data;

#if PREHEAT_1_TEMP_BED
#undef LEVELING_BED_TEMP
#define LEVELING_BED_TEMP HMI_data.BedLevT
#endif

0 comments on commit 8b1024d

Please sign in to comment.