Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProUI ExtUI | EXTENSIBLE_UI, fixes & cleanup #26917

Open
wants to merge 52 commits into
base: bugfix-2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6e4d1fa
update encoder.cpp LED_Action
classicrocker883 Mar 28, 2024
4a8b521
marlinui_HD44780.cpp remove whitespace
classicrocker883 Mar 28, 2024
015bfcb
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 1, 2024
c273079
changes, fixes
classicrocker883 Apr 1, 2024
670a867
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 5, 2024
21d3d37
fix for ExtUI startup, various tweaks
classicrocker883 Apr 5, 2024
53b2e49
add #if for PID
classicrocker883 Apr 5, 2024
424c83d
temp.cpp isbed?
classicrocker883 Apr 5, 2024
653f338
#if for PID DGUSS
classicrocker883 Apr 5, 2024
489afcb
revert encoder struct uint
classicrocker883 Apr 5, 2024
eecc290
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 6, 2024
84b0068
space, tweak printstats
classicrocker883 Apr 6, 2024
122be88
revert encoder
classicrocker883 Apr 8, 2024
5388d95
revert these changes to another PR
classicrocker883 Apr 8, 2024
9bbba4c
revert
classicrocker883 Apr 8, 2024
1d9df23
add missing confim, fix switch warning, update popup
classicrocker883 Apr 8, 2024
441a8e8
update chamber PID, add missing
classicrocker883 Apr 9, 2024
15a81cc
Update dwin.cpp #include extui
classicrocker883 Apr 18, 2024
c480580
revert some extui, update proui popup
classicrocker883 May 11, 2024
25868fc
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 May 29, 2024
87a407b
update language msg_
classicrocker883 May 29, 2024
6dee114
revert ui_api.h
classicrocker883 May 29, 2024
94df082
Update DGUSScreenHandler.cpp
classicrocker883 May 29, 2024
6e33ae4
remove space DGUSScreenHandler.cpp
classicrocker883 May 29, 2024
62dab77
update PID tuning - revert some, update tests
classicrocker883 May 29, 2024
1d6eea6
update dwin.cpp drawMainArea() - MPC_STARTED
classicrocker883 Jun 8, 2024
813e457
update proui ExtUI onMPCTuning
classicrocker883 Jun 8, 2024
fb19dfb
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Jun 27, 2024
5839cef
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Aug 2, 2024
85bff40
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Aug 10, 2024
9c5407d
revert ExtUI / EXTENSIBLE_UI
classicrocker883 Aug 11, 2024
0990cba
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Sep 17, 2024
cd9fb39
revert some changes
classicrocker883 Oct 10, 2024
412590b
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Oct 10, 2024
303a45b
revert more changes
classicrocker883 Oct 10, 2024
5b69d43
language_en.h
classicrocker883 Oct 11, 2024
6f521de
language_en.h
classicrocker883 Oct 11, 2024
ee0530f
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Oct 11, 2024
b2ac2cb
fix typo #else if => #elif error
classicrocker883 Oct 12, 2024
ed2a165
include bed_mesh_t
classicrocker883 Oct 12, 2024
5eafdc1
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Oct 21, 2024
5ced7c1
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Oct 31, 2024
9628f37
update PID/MPC ExtUI
classicrocker883 Oct 31, 2024
30a10a7
revert some changes
classicrocker883 Oct 31, 2024
8ff795e
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Nov 4, 2024
c4fbc09
revert settings.cpp
classicrocker883 Nov 4, 2024
7dfd495
ProUI updates
classicrocker883 Nov 9, 2024
f382068
revert some ProUI stuff
classicrocker883 Nov 9, 2024
9182086
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Nov 13, 2024
953d2ac
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Nov 21, 2024
8fd091a
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Jan 12, 2025
d48a78c
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
#include "lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "lcd/e3v2/jyersui/dwin.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "lcd/extui/ui_api.h"
#endif
#endif

Expand Down Expand Up @@ -1596,11 +1598,11 @@ void setup() {
SERIAL_ECHO_TERNARY(err, "BL24CXX Check ", "failed", "succeeded", "!\n");
#endif

#if ENABLED(DWIN_CREALITY_LCD)
#if HAS_DWIN_E3V2_BASIC
SETUP_RUN(dwinInitScreen());
#endif

#if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD)
#if HAS_SERVICE_INTERVALS && !HAS_DWIN_E3V2_BASIC
SETUP_RUN(ui.reset_status(true)); // Show service messages or keep current status
#endif

Expand Down
1 change: 1 addition & 0 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,7 @@ void unified_bed_leveling::restore_ubl_active_state(const bool is_done/*=true*/)
set_bed_leveling_enabled(ubl_state_at_invocation);

if (is_done) {
TERN_(DWIN_LCD_PROUI, dwinLevelingDone());
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
}
}
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/feature/pause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../lcd/e3v2/proui/dwin_popup.h"
#endif

#include "../lcd/marlinui.h"
Expand Down Expand Up @@ -531,6 +533,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
// Wait for filament insert by user and press button
KEEPALIVE_STATE(PAUSED_FOR_USER);
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_NOZZLE_PARKED)));
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_NOZZLE_PARKED));
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_NOZZLE_PARKED)));
wait_for_user = true; // LCD click or M108 will clear this
while (wait_for_user) {
Expand Down
23 changes: 19 additions & 4 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
#include "../../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD)
#include "../../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#include "../../../lcd/e3v2/proui/meshviewer.h"
#endif

#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
Expand Down Expand Up @@ -81,7 +84,7 @@ static void pre_g29_return(const bool retry, const bool did) {
}
#if DISABLED(G29_RETRY_AND_RECOVER)
if (!retry || did) {
TERN_(DWIN_CREALITY_LCD, dwinLevelingDone());
TERN_(HAS_DWIN_E3V2_BASIC, dwinLevelingDone());
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
}
#endif
Expand Down Expand Up @@ -326,6 +329,7 @@ G29_TYPE GcodeSuite::G29() {
set_bed_leveling_enabled(false);
bedlevel.z_values[i][j] = rz;
bedlevel.refresh_bed_level();
TERN_(DWIN_LCD_PROUI, meshViewer.drawMeshPoint(i, j, rz));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(i, j, rz));
if (abl.reenable) {
set_bed_leveling_enabled(true);
Expand Down Expand Up @@ -430,6 +434,8 @@ G29_TYPE GcodeSuite::G29() {
#if ENABLED(AUTO_BED_LEVELING_3POINT)
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
#endif

TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
Expand All @@ -439,7 +445,13 @@ G29_TYPE GcodeSuite::G29() {

#if ENABLED(PREHEAT_BEFORE_LEVELING)
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
TERN(EXTENSIBLE_UI, ExtUI::getLevelingBedTemp(), LEVELING_BED_TEMP)
#if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED)
hmiData.bedLevT
#elif ENABLED(EXTENSIBLE_UI)
ExtUI::getLevelingBedTemp()
#else
LEVELING_BED_TEMP
#endif
);
#endif
}
Expand Down Expand Up @@ -567,6 +579,7 @@ G29_TYPE GcodeSuite::G29() {

const float newz = abl.measured_z + abl.Z_offset;
abl.z_values[abl.meshCount.x][abl.meshCount.y] = newz;
TERN_(DWIN_LCD_PROUI, meshViewer.drawMeshPoint(abl.meshCount.x, abl.meshCount.y, newz));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, newz));

if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset);
Expand Down Expand Up @@ -773,6 +786,7 @@ G29_TYPE GcodeSuite::G29() {

const float z = abl.measured_z + abl.Z_offset;
abl.z_values[abl.meshCount.x][abl.meshCount.y] = z;
TERN_(DWIN_LCD_PROUI, meshViewer.drawMeshPoint(abl.meshCount.x, abl.meshCount.y, z));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, z));

#endif
Expand Down Expand Up @@ -848,7 +862,8 @@ G29_TYPE GcodeSuite::G29() {
else {
bedlevel.set_grid(abl.gridSpacing, abl.probe_position_lf);
COPY(bedlevel.z_values, abl.z_values);
TERN_(IS_KINEMATIC, bedlevel.extrapolate_unprobed_bed_level());
if (parser.boolval('K')) bedlevel.extrapolate_unprobed_bed_level();
else if (ENABLED(DWIN_LCD_PROUI) || ENABLED(IS_KINEMATIC)) bedlevel.extrapolate_unprobed_bed_level();
bedlevel.refresh_bed_level();

bedlevel.print_leveling_grid();
Expand Down Expand Up @@ -984,7 +999,7 @@ G29_TYPE GcodeSuite::G29() {
// Restore state after probing
if (!faux) restore_feedrate_and_scaling();

TERN_(HAS_BED_PROBE, probe.move_z_after_probing());
TERN_(Z_AFTER_PROBING, probe.move_z_after_probing());

#ifdef EVENT_GCODE_AFTER_G29
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29);
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/gcode/bedlevel/abl/M421.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#endif

/**
Expand All @@ -59,6 +61,7 @@ void GcodeSuite::M421() {
for (uint8_t x = sx; x <= ex; ++x) {
for (uint8_t y = sy; y <= ey; ++y) {
bedlevel.z_values[x][y] = zval + (hasQ ? bedlevel.z_values[x][y] : 0);
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(x, y, bedlevel.z_values[x][y]);)
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, bedlevel.z_values[x][y]));
}
}
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/gcode/bedlevel/mbl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ void GcodeSuite::G29() {

queue.inject(F("G29S2"));

TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());

return;
Expand All @@ -166,6 +167,7 @@ void GcodeSuite::G29() {
else {
// Save Z for the previous mesh position
bedlevel.set_zigzag_z(mbl_probe_index - 1, current_position.z);
TERN_(DWIN_LCD_PROUI, dwinPointUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
SET_SOFT_ENDSTOP_LOOSE(false);
}
Expand Down Expand Up @@ -232,6 +234,7 @@ void GcodeSuite::G29() {

if (parser.seenval('Z')) {
bedlevel.z_values[ix][iy] = parser.value_linear_units();
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
}
else
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/gcode/bedlevel/ubl/M421.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#endif

/**
Expand Down Expand Up @@ -66,6 +68,7 @@ void GcodeSuite::M421() {
else {
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ij.x, ij.y, zval));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh
}
}
Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD)
#include "../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

#if ENABLED(LASER_FEATURE)
Expand Down Expand Up @@ -221,7 +223,7 @@ void GcodeSuite::G28() {
set_and_report_grblstate(M_HOMING);
#endif

TERN_(DWIN_CREALITY_LCD, dwinHomingStart());
TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingStart());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());

planner.synchronize(); // Wait for planner moves to finish!
Expand Down Expand Up @@ -650,7 +652,7 @@ void GcodeSuite::G28() {

ui.refresh();

TERN_(DWIN_CREALITY_LCD, dwinHomingDone());
TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingDone());
TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone());

report_current_position();
Expand Down
7 changes: 6 additions & 1 deletion Marlin/src/gcode/calibrate/M48.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@

void GcodeSuite::M48() {

if (homing_needed_error()) return;
#if ENABLED(DWIN_LCD_PROUI)
TERN_(ADVANCED_PAUSE_FEATURE, dwinPopupPause(GET_TEXT_F(MSG_M48_TEST));)
#endif

if (homing_needed_error()) TERN(DWIN_LCD_PROUI, return hmiReturnScreen(), return);

const int8_t verbose_level = parser.byteval('V', 1);
if (!WITHIN(verbose_level, 0, 4)) {
Expand Down Expand Up @@ -274,6 +278,7 @@ void GcodeSuite::M48() {
TERN_(HAS_PTC, ptc.set_enabled(true));

report_current_position();
TERN_(DWIN_LCD_PROUI, hmiReturnScreen();)
}

#endif // Z_MIN_PROBE_REPEATABILITY_TEST
3 changes: 3 additions & 0 deletions Marlin/src/gcode/config/M302.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

#include "../../module/temperature.h"
Expand All @@ -51,6 +53,7 @@ void GcodeSuite::M302() {
const bool seen_S = parser.seen('S');
if (seen_S) {
thermalManager.extrude_min_temp = parser.value_celsius();
TERN_(DWIN_LCD_PROUI, hmiData.extMinT = thermalManager.extrude_min_temp);
TERN_(EXTENSIBLE_UI, ExtUI::onSetMinExtrusionTemp(thermalManager.extrude_min_temp));
}

Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/gcode/control/M997.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

/**
* M997: Perform in-application firmware update
*/
void GcodeSuite::M997() {

TERN_(DWIN_LCD_PROUI, dwinRebootScreen());
TERN_(EXTENSIBLE_UI, ExtUI::onFirmwareFlash());

flashFirmware(parser.intval('S'));
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/gcode/feature/powerloss/M1000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include "../../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#endif

#define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY)
Expand Down
10 changes: 6 additions & 4 deletions Marlin/src/gcode/lcd/M0_M1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "../../lcd/marlinui.h"
#elif ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin_popup.h"
#endif

#if ENABLED(HOST_PROMPT_SUPPORT)
Expand Down Expand Up @@ -63,14 +65,14 @@ void GcodeSuite::M0_M1() {
#endif
}

#elif ENABLED(DWIN_LCD_PROUI) // ExtUI with icon, string, button title
#elif ENABLED(DWIN_LCD_PROUI)

if (parser.string_arg)
ExtUI::onUserConfirmRequired(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
dwinPopupContinue(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
else
ExtUI::onUserConfirmRequired(ICON_Stop_1, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
dwinPopupContinue(ICON_Stop_1, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));

#elif ENABLED(EXTENSIBLE_UI)
#elif ENABLED(EXTENSIBLE_UI) // ExtUI with icon, string, button title

if (parser.string_arg)
ExtUI::onUserConfirmRequired(parser.string_arg); // String in an SRAM buffer
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/probe/G30.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "../../feature/probe_temp_comp.h"
#endif

#if ANY(DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
#define VERBOSE_SINGLE_PROBE
#endif

Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/gcode/sd/M1001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

#if ENABLED(HOST_ACTION_COMMANDS)
Expand Down
8 changes: 7 additions & 1 deletion Marlin/src/gcode/sd/M524.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,20 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/marlinui.h"
#endif

/**
* M524: Abort the current SD print job (started with M24)
*/
void GcodeSuite::M524() {

#if ENABLED(EXTENSIBLE_UI)
#if ENABLED(DWIN_LCD_PROUI)

ui.abort_print();

#elif ENABLED(EXTENSIBLE_UI)

ExtUI::stopPrint(); // Calls ui.abort_print() which does the same as below

Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/gcode/temp/M303.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

/**
Expand Down Expand Up @@ -66,6 +68,7 @@ void GcodeSuite::M303() {
default:
SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
TERN_(DWIN_LCD_PROUI, dwinPIDTuning(PID_BAD_HEATER_ID);)
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_BAD_HEATER_ID));
return;
}
Expand All @@ -76,6 +79,7 @@ void GcodeSuite::M303() {
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
const bool u = parser.boolval('U');

TERN_(DWIN_LCD_PROUI, dwinStartM303(c, hid, temp));
TERN_(EXTENSIBLE_UI, ExtUI::onStartM303(c, hid, temp));

IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@
#endif

// Extensible UI serial touch screens. (See src/lcd/extui)
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE, DWIN_LCD_PROUI)
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE)
#define IS_EXTUI 1 // Just for sanity check.
#define EXTENSIBLE_UI
#endif
Expand Down
Loading