Skip to content

Commit

Permalink
🔧 DWIN_CREALITY_LCD_ENHANCED => DWIN_LCD_PROUI
Browse files Browse the repository at this point in the history
Followup to #23624
  • Loading branch information
thinkyhead committed Mar 11, 2022
1 parent 4e467e9 commit 48b5362
Show file tree
Hide file tree
Showing 35 changed files with 94 additions and 92 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@
// Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
//
//#define DWIN_CREALITY_LCD // Creality UI
//#define DWIN_CREALITY_LCD_ENHANCED // Enhanced UI
//#define DWIN_LCD_PROUI // Pro UI by MRiscoC
//#define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers
//#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation)
//#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1335,11 +1335,11 @@

#endif // HAS_MARLINUI_MENU

#if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI)
#if ANY(HAS_DISPLAY, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
//#define SOUND_MENU_ITEM // Add a mute option to the LCD menu
#endif

#if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED)
#if EITHER(HAS_DISPLAY, DWIN_LCD_PROUI)
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#include "lcd/e3v2/common/encoder.h"
#if ENABLED(DWIN_CREALITY_LCD)
#include "lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#elif ENABLED(DWIN_LCD_PROUI)
#include "lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "lcd/e3v2/jyersui/dwin.h"
Expand Down Expand Up @@ -878,7 +878,7 @@ void kill(FSTR_P const lcd_error/*=nullptr*/, FSTR_P const lcd_component/*=nullp
// Echo the LCD message to serial for extra context
if (lcd_error) { SERIAL_ECHO_START(); SERIAL_ECHOLNF(lcd_error); }

#if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED)
#if EITHER(HAS_DISPLAY, DWIN_LCD_PROUI)
ui.kill_screen(lcd_error ?: GET_TEXT_F(MSG_KILLED), lcd_component ?: FPSTR(NUL_STR));
#else
UNUSED(lcd_error); UNUSED(lcd_component);
Expand Down
10 changes: 5 additions & 5 deletions Marlin/src/feature/pause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

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

Expand Down Expand Up @@ -281,7 +281,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
// Show "Purge More" / "Resume" menu and wait for reply
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = false;
#if EITHER(HAS_MARLINUI_MENU, DWIN_CREALITY_LCD_ENHANCED)
#if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
#else
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
Expand Down Expand Up @@ -549,7 +549,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep

TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(GET_TEXT_F(MSG_REHEATING)));

TERN_(DWIN_CREALITY_LCD_ENHANCED, LCD_MESSAGE(MSG_REHEATING));
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING));

// Re-enable the heaters if they timed out
HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e);
Expand All @@ -567,7 +567,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep

TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_REHEATDONE), FPSTR(CONTINUE_STR)));
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE)));
TERN_(DWIN_CREALITY_LCD_ENHANCED, LCD_MESSAGE(MSG_REHEATDONE));
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE));

IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true);

Expand Down Expand Up @@ -711,7 +711,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_

TERN_(HAS_STATUS_MESSAGE, ui.reset_status());
TERN_(HAS_MARLINUI_MENU, ui.return_to_status());
TERN_(DWIN_CREALITY_LCD_ENHANCED, HMI_ReturnScreen());
TERN_(DWIN_LCD_PROUI, HMI_ReturnScreen());
}

#endif // ADVANCED_PAUSE_FEATURE
4 changes: 2 additions & 2 deletions Marlin/src/feature/runout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bool FilamentMonitorBase::enabled = true,

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

Expand All @@ -88,7 +88,7 @@ void event_filament_runout(const uint8_t extruder) {
#endif

TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder)));
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_FilamentRunout(extruder));
TERN_(DWIN_LCD_PROUI, DWIN_FilamentRunout(extruder));

#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include "../../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD)
#include "../../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#endif

Expand Down Expand Up @@ -427,7 +427,7 @@ G29_TYPE GcodeSuite::G29() {
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
#endif

if (!faux) {
Expand Down Expand Up @@ -721,7 +721,7 @@ G29_TYPE GcodeSuite::G29() {

#endif // AUTO_BED_LEVELING_3POINT

TERN_(HAS_STATUS_MESSAGE, ui.reset_status());
ui.reset_status();

// Stow the probe. No raise for FIX_MOUNTED_PROBE.
if (probe.stow()) {
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/bedlevel/mbl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

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

Expand Down Expand Up @@ -193,7 +193,7 @@ void GcodeSuite::G29() {
if (parser.seenval('Z')) {
mbl.z_values[ix][iy] = parser.value_linear_units();
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, mbl.z_values[ix][iy]));
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ix, iy, mbl.z_values[ix][iy]));
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(ix, iy, mbl.z_values[ix][iy]));
}
else
return echo_not_entered('Z');
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/bedlevel/ubl/M421.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

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

Expand Down Expand Up @@ -69,7 +69,7 @@ void GcodeSuite::M421() {
float &zval = ubl.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_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ij.x, ij.y, zval));
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(ij.x, ij.y, zval));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD)
#include "../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/control/M997.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if ENABLED(PLATFORM_M997_SUPPORT)

#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

Expand All @@ -33,7 +33,7 @@
*/
void GcodeSuite::M997() {

TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_RebootScreen());
TERN_(DWIN_LCD_PROUI, DWIN_RebootScreen());

flashFirmware(parser.intval('S'));

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/feature/powerloss/M1000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "../../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD)
#include "../../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/lcd/M0_M1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "../../lcd/marlinui.h"
#elif ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin_popup.h"
#include "../../lcd/e3v2/proui/dwin.h"
#endif
Expand Down Expand Up @@ -71,7 +71,7 @@ void GcodeSuite::M0_M1() {
ExtUI::onUserConfirmRequired(parser.string_arg); // String in an SRAM buffer
else
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_USERWAIT));
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#elif ENABLED(DWIN_LCD_PROUI)
if (parser.string_arg)
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
else
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/lcd/M73.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "../../lcd/marlinui.h"
#include "../../sd/cardreader.h"

#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

Expand All @@ -40,7 +40,7 @@
*/
void GcodeSuite::M73() {

#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)

DWIN_Progress_Update();

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

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

Expand Down Expand Up @@ -109,7 +109,7 @@ void GcodeSuite::M1001() {
#endif

TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished());
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Print_Finished());
TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());

// Re-select the last printed file in the UI
TERN_(SD_REPRINT_LAST_SELECTED_FILE, ui.reselect_last_file());
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/stats/M75-M78.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "../../MarlinCore.h" // for startOrResumeJob

#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

Expand All @@ -38,7 +38,7 @@
*/
void GcodeSuite::M75() {
startOrResumeJob();
#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)
DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
DWIN_Print_Started(false);
#endif
Expand All @@ -57,7 +57,7 @@ void GcodeSuite::M76() {
*/
void GcodeSuite::M77() {
print_job_timer.stop();
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Print_Finished());
TERN_(DWIN_LCD_PROUI, DWIN_Print_Finished());
}

#if ENABLED(PRINTCOUNTER)
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/temp/M303.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

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

Expand Down Expand Up @@ -73,7 +73,7 @@ void GcodeSuite::M303() {
default:
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM));
TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_BAD_EXTRUDER_NUM));
TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_BAD_EXTRUDER_NUM));
return;
}

Expand All @@ -83,7 +83,7 @@ void GcodeSuite::M303() {
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
const bool u = parser.boolval('U');

#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)
if (seenC) HMI_data.PidCycles = c;
if (seenS) { if (hid == H_BED) HMI_data.BedPidT = temp; else HMI_data.HotendPidT = temp; }
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
#endif

// Aliases for LCD features
#if EITHER(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED)
#if EITHER(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
#define HAS_DWIN_E3V2_BASIC 1
#endif
#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
Expand All @@ -494,7 +494,7 @@
#endif
#define HAS_LCD_BRIGHTNESS 1
#define LCD_BRIGHTNESS_MAX 250
#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#if ENABLED(DWIN_LCD_PROUI)
#define LCD_BRIGHTNESS_DEFAULT 127
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@
* Advanced Pause - Filament Change
*/
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
#define M600_PURGE_MORE_RESUMABLE 1
#endif
#ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH
Expand Down
Loading

1 comment on commit 48b5362

@ellensp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G29.cpp line 724 reverted from TERN_(HAS_STATUS_MESSAGE, ui.reset_status()); to just ui.reset_status();
This is breaking CI test [Test DUE] RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, E_DUAL_STEPPER_DRIVERS...

Please sign in to comment.