Skip to content

Commit 8c05e38

Browse files
mriscocSMHRambo
authored andcommitted
🚸 ProUI updates (MarlinFirmware#25176)
1 parent 50382fb commit 8c05e38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1407
-1476
lines changed

Marlin/src/feature/pause.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
410410
#endif
411411

412412
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_open(PROMPT_INFO, F("Pause"), FPSTR(DISMISS_STR)));
413-
TERN_(DWIN_LCD_PROUI, DWIN_Print_Pause());
414413

415414
// Indicate that the printer is paused
416415
++did_pause_print;
@@ -461,6 +460,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
461460

462461
// If axes don't need to home then the nozzle can park
463462
if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move
463+
TERN_(DWIN_LCD_PROUI, if (!do_park) ui.set_status(GET_TEXT_F(MSG_PARK_FAILED)));
464464

465465
#if ENABLED(DUAL_X_CARRIAGE)
466466
const int8_t saved_ext = active_extruder;
@@ -710,13 +710,8 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
710710

711711
TERN_(HAS_FILAMENT_SENSOR, runout.reset());
712712

713-
#if ENABLED(DWIN_LCD_PROUI)
714-
DWIN_Print_Resume();
715-
HMI_ReturnScreen();
716-
#else
717-
ui.reset_status();
718-
ui.return_to_status();
719-
#endif
713+
ui.reset_status();
714+
ui.return_to_status();
720715
}
721716

722717
#endif // ADVANCED_PAUSE_FEATURE

Marlin/src/gcode/config/M302.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "../../module/temperature.h"
2929

3030
#if ENABLED(DWIN_LCD_PROUI)
31-
#include "../../lcd/e3v2/proui/dwin_defines.h"
31+
#include "../../lcd/e3v2/proui/dwin.h"
3232
#endif
3333

3434
/**

Marlin/src/gcode/lcd/M145.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void GcodeSuite::M145() {
4747
preheat_t &mat = ui.material_preset[material];
4848
#if HAS_HOTEND
4949
if (parser.seenval('H'))
50-
mat.hotend_temp = constrain(parser.value_int(), EXTRUDE_MINTEMP, thermalManager.hotend_max_target(0));
50+
mat.hotend_temp = constrain(parser.value_int(), thermalManager.extrude_min_temp, thermalManager.hotend_max_target(0));
5151
#endif
5252
#if HAS_HEATED_BED
5353
if (parser.seenval('B'))

Marlin/src/gcode/sd/M1001.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ void GcodeSuite::M1001() {
109109
#endif
110110

111111
TERN_(EXTENSIBLE_UI, ExtUI::onPrintDone());
112-
TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
113112

114113
// Re-select the last printed file in the UI
115114
TERN_(SD_REPRINT_LAST_SELECTED_FILE, ui.reselect_last_file());

Marlin/src/gcode/sd/M524.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "../../sd/cardreader.h"
2929

3030
#if ENABLED(DWIN_LCD_PROUI)
31-
#include "../../lcd/e3v2/proui/dwin.h"
31+
#include "../../lcd/marlinui.h"
3232
#endif
3333

3434
/**
@@ -38,7 +38,7 @@ void GcodeSuite::M524() {
3838

3939
#if ENABLED(DWIN_LCD_PROUI)
4040

41-
HMI_flag.abort_flag = true; // The LCD will handle it
41+
ui.abort_print();
4242

4343
#else
4444

Marlin/src/gcode/stats/M75-M78.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
void GcodeSuite::M75() {
4040
startOrResumeJob();
4141
#if ENABLED(DWIN_LCD_PROUI)
42-
DWIN_Print_Started(false);
4342
if (!IS_SD_PRINTING()) DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
4443
#endif
4544
}
@@ -48,17 +47,15 @@ void GcodeSuite::M75() {
4847
* M76: Pause print timer
4948
*/
5049
void GcodeSuite::M76() {
51-
print_job_timer.pause();
50+
TERN(DWIN_LCD_PROUI, ui.pause_print(), print_job_timer.pause());
5251
TERN_(HOST_PAUSE_M76, hostui.pause());
53-
TERN_(DWIN_LCD_PROUI, DWIN_Print_Pause());
5452
}
5553

5654
/**
5755
* M77: Stop print timer
5856
*/
5957
void GcodeSuite::M77() {
6058
print_job_timer.stop();
61-
TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
6259
}
6360

6461
#if ENABLED(PRINTCOUNTER)

Marlin/src/gcode/temp/M303.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,9 @@ void GcodeSuite::M303() {
6161
const heater_id_t hid = (heater_id_t)parser.intval('E');
6262
celsius_t default_temp;
6363
switch (hid) {
64-
#if ENABLED(PIDTEMP)
65-
case 0 ... HOTENDS - 1: default_temp = PREHEAT_1_TEMP_HOTEND; break;
66-
#endif
67-
#if ENABLED(PIDTEMPBED)
68-
case H_BED: default_temp = PREHEAT_1_TEMP_BED; break;
69-
#endif
70-
#if ENABLED(PIDTEMPCHAMBER)
71-
case H_CHAMBER: default_temp = PREHEAT_1_TEMP_CHAMBER; break;
72-
#endif
64+
OPTCODE(PIDTEMP, case 0 ... HOTENDS - 1: default_temp = PREHEAT_1_TEMP_HOTEND; break)
65+
OPTCODE(PIDTEMPBED, case H_BED: default_temp = PREHEAT_1_TEMP_BED; break)
66+
OPTCODE(PIDTEMPCHAMBER, case H_CHAMBER: default_temp = PREHEAT_1_TEMP_CHAMBER; break)
7367
default:
7468
SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
7569
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
@@ -84,9 +78,15 @@ void GcodeSuite::M303() {
8478
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
8579
const bool u = parser.boolval('U');
8680

87-
#if ENABLED(DWIN_LCD_PROUI)
81+
#if ENABLED(DWIN_LCD_PROUI) && EITHER(PIDTEMP, PIDTEMPBED)
8882
if (seenC) HMI_data.PidCycles = c;
89-
if (seenS) { if (hid == H_BED) HMI_data.BedPidT = temp; else HMI_data.HotendPidT = temp; }
83+
if (seenS) {
84+
switch (hid) {
85+
OPTCODE(PIDTEMP, case 0 ... HOTENDS - 1: HMI_data.HotendPidT = temp; break)
86+
OPTCODE(PIDTEMPBED, case H_BED: HMI_data.BedPidT = temp; break)
87+
default: break;
88+
}
89+
}
9090
#endif
9191

9292
#if DISABLED(BUSY_WHILE_HEATING)

Marlin/src/inc/Conditionals_LCD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,7 @@
12841284
// Clear probe pin settings when no probe is selected
12851285
#undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
12861286
#undef USE_PROBE_FOR_Z_HOMING
1287+
#undef Z_MIN_PROBE_REPEATABILITY_TEST
12871288
#endif
12881289

12891290
#if ENABLED(BELTPRINTER) && !defined(HOME_Y_BEFORE_X)

Marlin/src/inc/Conditionals_adv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@
7979
#define SERVO_DELAY { 50 }
8080
#endif
8181

82+
#if !HAS_BED_PROBE
83+
#undef BABYSTEP_ZPROBE_OFFSET
84+
#endif
8285
#if !HAS_STOWABLE_PROBE
8386
#undef PROBE_DEPLOY_STOW_MENU
8487
#endif

Marlin/src/inc/Conditionals_post.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,6 +2472,7 @@
24722472
#define BED_MAX_TARGET (BED_MAXTEMP - (BED_OVERSHOOT))
24732473
#else
24742474
#undef PIDTEMPBED
2475+
#undef PREHEAT_BEFORE_LEVELING
24752476
#endif
24762477

24772478
#if HAS_TEMP_COOLER && PIN_EXISTS(COOLER)

0 commit comments

Comments
 (0)