From 6e4d1fadbfc826b7d5fbfffeec901f3d54294b2d Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 28 Mar 2024 04:27:35 -0400 Subject: [PATCH 01/35] update encoder.cpp LED_Action --- Marlin/src/lcd/e3v2/common/encoder.cpp | 6 ++++-- Marlin/src/lcd/e3v2/common/encoder.h | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index 5825fb0f7753..fddde14b9bea 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -85,7 +85,7 @@ EncoderState encoderReceiveAnalyze() { next_click_update_ms = millis() + 300; Encoder_tick(); #if PIN_EXISTS(LCD_LED) - //LED_Action(); + LED_Action(); #endif TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); if (!ui.backlight) { @@ -174,8 +174,10 @@ EncoderState encoderReceiveAnalyze() { // LED light operation void LED_Action() { LED_Control(RGB_SCALE_WARM_WHITE, 0x0F); + //LED_GraduallyControl(RGB_SCALE_COOL_WHITE, 0x0F, 1000); delay(30); LED_Control(RGB_SCALE_WARM_WHITE, 0x00); + //LED_GraduallyControl(RGB_SCALE_COOL_WHITE, 0x00, 1000); } // LED initialization @@ -223,7 +225,7 @@ EncoderState encoderReceiveAnalyze() { // luminance: brightness (0~0xFF) // change_Time: gradient time (ms) void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval) { - struct { uint8_t g, r, b; } led_data[LED_NUM]; + struct { int g, r, b; } led_data[LED_NUM]; for (uint8_t i = 0; i < LED_NUM; i++) { switch (RGB_Scale) { case RGB_SCALE_R10_G7_B5: diff --git a/Marlin/src/lcd/e3v2/common/encoder.h b/Marlin/src/lcd/e3v2/common/encoder.h index ce431c9811b1..9e7b4c7f59a6 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.h +++ b/Marlin/src/lcd/e3v2/common/encoder.h @@ -86,8 +86,6 @@ inline bool applyEncoder(const EncoderState &encoder_diffState, T &valref) { #define RGB_SCALE_WARM_WHITE RGB_SCALE_R10_G7_B4 #define RGB_SCALE_COOL_WHITE RGB_SCALE_R10_G8_B7 - extern unsigned int LED_DataArray[LED_NUM]; - // LED light operation void LED_Action(); From 4a8b521a69000bfb5a8494c3ee0f660cefdad321 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 28 Mar 2024 04:28:03 -0400 Subject: [PATCH 02/35] marlinui_HD44780.cpp remove whitespace --- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index d36233d73d98..7159d4a25fb6 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1169,7 +1169,6 @@ void MarlinUI::draw_status_screen() { lcd_moveto(LCD_WIDTH - 9, 2); lcd_put_lchar('S'); - #endif // LCD_INFO_SCREEN_STYLE From c2730794dcaca1bfc24a8e2ad2670f0bf62b514b Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sun, 31 Mar 2024 22:55:21 -0400 Subject: [PATCH 03/35] changes, fixes --- Marlin/src/feature/pause.h | 10 ++++------ Marlin/src/lcd/e3v2/common/encoder.cpp | 14 +++++++------- Marlin/src/lcd/extui/ui_api.h | 12 +++--------- Marlin/src/lcd/marlinui.cpp | 2 +- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index b86f86b633a9..57d9cdb9809f 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -57,9 +57,7 @@ enum PauseMessage : char { }; #if M600_PURGE_MORE_RESUMABLE - /** - * Input methods can Purge More, Resume, or request input - */ + // Input methods can Purge More, Resume, or request input enum PauseMenuResponse : char { PAUSE_RESPONSE_WAIT_FOR, PAUSE_RESPONSE_EXTRUDE_MORE, @@ -109,7 +107,7 @@ void wait_for_confirmation( void resume_print( const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move - const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length + const_float_t purge_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length const int8_t max_beep_count=0, // Beep alert for attention const celsius_t targetTemp=0 // (°C) A target temperature for the hotend DXC_PARAMS // Dual-X-Carriage extruder index @@ -118,7 +116,7 @@ void resume_print( bool load_filament( const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move - const_float_t extrude_length=0, // (mm) Purge length + const_float_t purge_length=0, // (mm) Purge length const int8_t max_beep_count=0, // Beep alert for attention const bool show_lcd=false, // Set LCD status messages? const bool pause_for_user=false, // Pause for user before returning? @@ -139,4 +137,4 @@ bool unload_filament( constexpr uint8_t did_pause_print = 0; -#endif // !ADVANCED_PAUSE_FEATURE +#endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index fddde14b9bea..921b2718d2c0 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -169,7 +169,7 @@ EncoderState encoderReceiveAnalyze() { #if PIN_EXISTS(LCD_LED) // Take the low 24 valid bits 24Bit: G7 G6 G5 G4 G3 G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0 - uint16_t LED_DataArray[LED_NUM]; + uint32_t LED_DataArray[LED_NUM]; // LED light operation void LED_Action() { @@ -212,9 +212,9 @@ EncoderState encoderReceiveAnalyze() { for (uint8_t i = 0; i < LED_NUM; i++) { LED_DataArray[i] = 0; switch (RGB_Scale) { - case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 5/10; break; - case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 4/10; break; - case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 8/10) << 16 | luminance * 7/10; break; + case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 7/10) << 16 | uint8_t(luminance * 5/10); break; + case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 7/10) << 16 | uint8_t(luminance * 4/10); break; + case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 8/10) << 16 | uint8_t(luminance * 7/10); break; } } LED_WriteData(); @@ -229,13 +229,13 @@ EncoderState encoderReceiveAnalyze() { for (uint8_t i = 0; i < LED_NUM; i++) { switch (RGB_Scale) { case RGB_SCALE_R10_G7_B5: - led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 5/10 }; + led_data[i] = { uint8_t(luminance * 7/10), uint8_t(luminance * 10/10), uint8_t(luminance * 5/10) }; break; case RGB_SCALE_R10_G7_B4: - led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 4/10 }; + led_data[i] = { uint8_t(luminance * 7/10), uint8_t(luminance * 10/10), uint8_t(luminance * 4/10) }; break; case RGB_SCALE_R10_G8_B7: - led_data[i] = { luminance * 8/10, luminance * 10/10, luminance * 7/10 }; + led_data[i] = { uint8_t(luminance * 8/10), uint8_t(luminance * 10/10), uint8_t(luminance * 7/10) }; break; } } diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index b7d670de13d6..7c9a8028b762 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -66,15 +66,9 @@ namespace ExtUI { enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 }; enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 }; - enum result_t : uint8_t { - OPTITEM(HAS_PID_HEATING, PID_STARTED) - OPTITEM(HAS_PID_HEATING, PID_BED_STARTED) - OPTITEM(HAS_PID_HEATING, PID_BAD_HEATER_ID) - OPTITEM(HAS_PID_HEATING, PID_TEMP_TOO_HIGH) - OPTITEM(HAS_PID_HEATING, PID_TUNING_TIMEOUT) - OPTITEM(HAS_PID_HEATING, PID_DONE) - }; - + #if HAS_PID_HEATING + enum result_t : uint8_t { PID_STARTED, PID_BED_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; + #endif constexpr uint8_t extruderCount = EXTRUDERS; constexpr uint8_t hotendCount = HOTENDS; constexpr uint8_t fanCount = FAN_COUNT; diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 4eed5f3c6595..c1f0b624a34d 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1671,7 +1671,7 @@ void MarlinUI::host_notify(const char * const cstr) { card.abortFilePrintSoon(); else if (card.isMounted()) card.closefile(); - #endif + #endif #ifdef ACTION_ON_CANCEL hostui.cancel(); #endif From 21d3d37b4fcdfc9de15f205c69db2f153a8457a6 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 4 Apr 2024 21:55:03 -0400 Subject: [PATCH 04/35] fix for ExtUI startup, various tweaks --- Marlin/src/MarlinCore.cpp | 2 ++ Marlin/src/lcd/e3v2/common/encoder.cpp | 6 +++--- Marlin/src/lcd/e3v2/proui/dwin.cpp | 18 +++--------------- Marlin/src/lcd/e3v2/proui/dwin.h | 19 ++++--------------- Marlin/src/lcd/e3v2/proui/dwin_popup.cpp | 14 ++++++++++++++ Marlin/src/lcd/e3v2/proui/dwin_popup.h | 4 ++++ Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 2 +- Marlin/src/lcd/extui/ui_api.h | 6 +++++- Marlin/src/module/temperature.cpp | 2 +- 9 files changed, 37 insertions(+), 36 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 272e50340a2d..67a77e9d534b 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1594,6 +1594,8 @@ void setup() { #if ENABLED(DWIN_CREALITY_LCD) SETUP_RUN(dwinInitScreen()); + #elif ENABLED(DWIN_LCD_PROUI) + SETUP_RUN(ExtUI::onStartup()); #endif #if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD) diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index 921b2718d2c0..c378b26130f8 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -212,9 +212,9 @@ EncoderState encoderReceiveAnalyze() { for (uint8_t i = 0; i < LED_NUM; i++) { LED_DataArray[i] = 0; switch (RGB_Scale) { - case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 7/10) << 16 | uint8_t(luminance * 5/10); break; - case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 7/10) << 16 | uint8_t(luminance * 4/10); break; - case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = uint32_t(luminance * 10/10) << 8 | uint32_t(luminance * 8/10) << 16 | uint8_t(luminance * 7/10); break; + case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = uint8_t(luminance * 10/10) << 8 | uint8_t(luminance * 7/10) << 16 | uint8_t(luminance * 5/10); break; + case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = uint8_t(luminance * 10/10) << 8 | uint8_t(luminance * 7/10) << 16 | uint8_t(luminance * 4/10); break; + case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = uint8_t(luminance * 10/10) << 8 | uint8_t(luminance * 8/10) << 16 | uint8_t(luminance * 7/10); break; } } LED_WriteData(); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index bb345e519155..91b4008526ba 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -457,15 +457,15 @@ void popupPauseOrStop() { } else { FSTR_P heaterstr = nullptr; - if (TERN0(HAS_HEATED_BED, heater_id == H_BED)) heaterstr = F("Bed"); - else if (TERN0(HAS_HEATED_CHAMBER, heater_id == H_CHAMBER)) heaterstr = F("Chamber"); + if (TERN0(HAS_HEATED_CHAMBER, heater_id == H_CHAMBER)) heaterstr = F("Chamber"); + else if (TERN0(HAS_HEATED_BED, heater_id == H_BED)) heaterstr = F("Bed"); else if (TERN0(HAS_HOTEND, heater_id >= 0)) heaterstr = F("Nozzle"); FSTR_P errorstr; uint8_t icon; switch (state) { case 0: errorstr = GET_TEXT_F(MSG_TEMP_TOO_LOW); icon = ICON_TempTooLow; break; case 1: errorstr = GET_TEXT_F(MSG_TEMP_TOO_HIGH); icon = ICON_TempTooHigh; break; - default: errorstr = GET_TEXT_F(MSG_ERR_HEATING_FAILED); icon = ICON_Temperature; break; // May be thermal runaway, temp malfunction, etc. + default: errorstr = GET_TEXT_F(MSG_ERR_HEATING_FAILED); icon = ICON_Info_1; break; // May be thermal runaway, temp malfunction, etc. } dwinShowPopup(icon, heaterstr, errorstr, BTN_Continue); } @@ -1967,18 +1967,6 @@ void dwinRedrawScreen() { #if ENABLED(ADVANCED_PAUSE_FEATURE) - void dwinPopupPause(FSTR_P const fmsg, uint8_t button/*=0*/) { - hmiSaveProcessID(button ? ID_WaitResponse : ID_NothingToDo); - dwinShowPopup(ICON_Pause_1, GET_TEXT_F(MSG_ADVANCED_PAUSE), fmsg, button); - } - - void drawPopupFilamentPurge() { - dwinDrawPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_ADVANCED_PAUSE), GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE_CONTINUE)); - DWINUI::drawButton(BTN_Purge, 26, 280); - DWINUI::drawButton(BTN_Continue, 146, 280); - drawSelectHighlight(true); - } - void onClickFilamentPurge() { if (hmiFlag.select_flag) pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // "Purge More" button diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 7d264b8b12ed..47fd5681e616 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -73,18 +73,12 @@ enum processID : uint8_t { #if ANY(HAS_PID_HEATING, MPC_AUTOTUNE) - enum TempControl { + enum tempcontrol_t : uint8_t { AUTOTUNE_DONE, #if HAS_PID_HEATING - #if ENABLED(PIDTEMP) - PIDTEMP_START, - #endif - #if ENABLED(PIDTEMPBED) - PIDTEMPBED_START, - #endif - #if ENABLED(PIDTEMPCHAMBER) - PIDTEMPCHAMBER_START, - #endif + OPTITEM(PIDTEMP, PIDTEMP_START) + OPTITEM(PIDTEMPBED, PIDTEMPBED_START) + OPTITEM(PIDTEMPCHAMBER, PIDTEMPCHAMBER_START) PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, @@ -94,11 +88,8 @@ enum processID : uint8_t { MPC_TEMP_ERROR, MPC_INTERRUPTED, #endif - TEMPCONTROL_COUNT }; - typedef bits_t(TEMPCONTROL_COUNT) tempcontrol_t; - #endif #define DWIN_CHINESE 123 @@ -307,8 +298,6 @@ void dwinSetDataDefaults(); void dwinRebootScreen(); #if ENABLED(ADVANCED_PAUSE_FEATURE) - void dwinPopupPause(FSTR_P const fmsg, uint8_t button=0); - void drawPopupFilamentPurge(); void gotoFilamentPurge(); #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp b/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp index 5756b770afbe..31d91a0ed8f7 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp @@ -92,4 +92,18 @@ void hmiPopup() { } } + #if ENABLED(ADVANCED_PAUSE_FEATURE) + void dwinPopupPause(FSTR_P const fmsg, uint8_t button/*=0*/) { + hmiSaveProcessID(button ? ID_WaitResponse : ID_NothingToDo); + dwinShowPopup(ICON_Pause_1, GET_TEXT_F(MSG_ADVANCED_PAUSE), fmsg, button); + } + + void drawPopupFilamentPurge() { + dwinDrawPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_ADVANCED_PAUSE), GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE_CONTINUE)); + DWINUI::drawButton(BTN_Purge, 26, 280); + DWINUI::drawButton(BTN_Continue, 146, 280); + drawSelectHighlight(true); + } + #endif // ADVANCED_PAUSE_FEATURE + #endif // DWIN_LCD_PROUI diff --git a/Marlin/src/lcd/e3v2/proui/dwin_popup.h b/Marlin/src/lcd/e3v2/proui/dwin_popup.h index fa55b286fb25..a2874ddf42d2 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_popup.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_popup.h @@ -42,6 +42,10 @@ void dwinPopupContinue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg void dwinPopupConfirmCancel(const uint8_t icon, FSTR_P const fmsg2); void gotoPopup(const popupDrawFunc_t fnDraw, const popupClickFunc_t fnClick=nullptr, const popupChangeFunc_t fnChange=nullptr); void hmiPopup(); +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void dwinPopupPause(FSTR_P const fmsg, uint8_t button=0); + void drawPopupFilamentPurge(); +#endif inline void drawPopupBkgd() { dwinDrawRectangle(1, hmiData.colorPopupBg, 14, 60, 258, 330); diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index d377ca5fdce3..e6a63b649c2d 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -93,7 +93,7 @@ namespace ExtUI { void onUserConfirmRequired(const char * const cstr) { // TODO: A version of this method that takes an icon and button title, // or implement some kind of ExtUI enum. - onUserConfirmRequired(ICON_Continue_1, cstr, GET_TEXT_F(MSG_USERWAIT)); + dwinPopupContinue(ICON_Continue_1, FSTR_P(cstr), GET_TEXT_F(MSG_USERWAIT)); } // For fancy LCDs include an icon ID, message, and translated button title diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 8202f7be8d0a..bd466c24dd56 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -69,7 +69,11 @@ namespace ExtUI { enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 }; #if HAS_PID_HEATING - enum pidresult_t : uint8_t { PID_STARTED, PID_BED_STARTED, PID_CHAMBER_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; + enum pidresult_t : uint8_t { + OPTITEM(PIDTEMP, PID_STARTED) + OPTITEM(PIDTEMPBED, PID_BED_STARTED) + OPTITEM(PIDTEMPCHAMBER, PID_CHAMBER_STARTED) + PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; #endif #if ENABLED(MPC_AUTOTUNE) enum mpcresult_t : uint8_t { MPC_STARTED, MPC_TEMP_ERROR, MPC_INTERRUPTED, MPC_DONE }; diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index a1fe14c75df3..b0096e309603 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -721,7 +721,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_FAN_LOGIC, fan_update_ms = next_temp_ms + fan_update_interval_ms); - TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED : isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED)); + TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(TERN_(PIDTEMPCHAMBER, ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED :) isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED)); if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) { SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); From 53b2e49be191ab362a471c0044fbf9de22e34016 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 4 Apr 2024 22:13:36 -0400 Subject: [PATCH 05/35] add #if for PID --- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 12 +++++++++--- Marlin/src/lcd/extui/example/example.cpp | 12 +++++++++--- .../lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 12 +++++++++--- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 12 +++++++++--- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 2bc6e0d4617a..e569dd27db82 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -176,9 +176,15 @@ namespace ExtUI { void onPIDTuning(const pidresult_t rst) { // Called for temperature PID tuning result switch (rst) { - case PID_STARTED: - case PID_BED_STARTED: - case PID_CHAMBER_STARTED: + #if ENABLED(PIDTEMP) + case PID_STARTED: + #endif + #if ENABLED(PIDTEMPBED) + case PID_BED_STARTED: + #endif + #if ENABLED(PIDTEMPCHAMBER) + case PID_CHAMBER_STARTED: + #endif screen.setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case PID_BAD_HEATER_ID: diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index fb033b965539..9937c8d4016a 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -161,9 +161,15 @@ namespace ExtUI { void onPIDTuning(const pidresult_t rst) { // Called for temperature PID tuning result switch (rst) { - case PID_STARTED: - case PID_BED_STARTED: - case PID_CHAMBER_STARTED: break; + #if ENABLED(PIDTEMP) + case PID_STARTED: + #endif + #if ENABLED(PIDTEMPBED) + case PID_BED_STARTED: + #endif + #if ENABLED(PIDTEMPCHAMBER) + case PID_CHAMBER_STARTED: break; + #endif case PID_BAD_HEATER_ID: break; case PID_TEMP_TOO_HIGH: break; case PID_TUNING_TIMEOUT: break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp index 48c136bd6e8e..c6259a337f85 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -179,9 +179,15 @@ namespace ExtUI { // Called for temperature PID tuning result //SERIAL_ECHOLNPGM("OnPIDTuning:", rst); switch (rst) { - case PID_STARTED: - case PID_BED_STARTED: - case PID_CHAMBER_STARTED: + #if ENABLED(PIDTEMP) + case PID_STARTED: + #endif + #if ENABLED(PIDTEMPBED) + case PID_BED_STARTED: + #endif + #if ENABLED(PIDTEMPCHAMBER) + case PID_CHAMBER_STARTED: + #endif StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case PID_BAD_HEATER_ID: diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index 9287091cfe60..a55557a76616 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -108,9 +108,15 @@ namespace ExtUI { // Called for temperature PID tuning result //SERIAL_ECHOLNPGM("OnPIDTuning:", rst); switch (rst) { - case PID_STARTED: - case PID_BED_STARTED: - case PID_CHAMBER_STARTED: + #if ENABLED(PIDTEMP) + case PID_STARTED: + #endif + #if ENABLED(PIDTEMPBED) + case PID_BED_STARTED: + #endif + #if ENABLED(PIDTEMPCHAMBER) + case PID_CHAMBER_STARTED: + #endif set_lcd_error(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case PID_BAD_HEATER_ID: From 424c83d1c761d4c3f095e66806aa22ecd120d2fb Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 4 Apr 2024 22:20:16 -0400 Subject: [PATCH 06/35] temp.cpp isbed? --- Marlin/src/module/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index b0096e309603..ab2893638768 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -721,7 +721,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_FAN_LOGIC, fan_update_ms = next_temp_ms + fan_update_interval_ms); - TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(TERN_(PIDTEMPCHAMBER, ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED :) isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED)); + TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(TERN_(PIDTEMPCHAMBER, ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED :) TERN_(PIDTEMPBED, isbed ? ExtUI::pidresult_t::PID_BED_STARTED :) ExtUI::pidresult_t::PID_STARTED)); if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) { SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); From 653f33844865e9ab9b885e3fab5d67c1ac6a80d7 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 4 Apr 2024 22:26:54 -0400 Subject: [PATCH 07/35] #if for PID DGUSS --- .../extui/dgus_reloaded/DGUSScreenHandler.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index 181d1ae34c04..45a044190096 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -307,11 +307,17 @@ void DGUSScreenHandler::filamentRunout(const ExtUI::extruder_t extruder) { void DGUSScreenHandler::pidTuning(const ExtUI::pidresult_t rst) { switch (rst) { - case ExtUI::PID_STARTED: - case ExtUI::PID_BED_STARTED: - case ExtUI::PID_CHAMBER_STARTED: - setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); - break; + #if ENABLED(PIDTEMP) + case ExtUI::PID_STARTED: + #endif + #if ENABLED(PIDTEMPBED) + case ExtUI::PID_BED_STARTED: + #endif + #if ENABLED(PIDTEMPCHAMBER) + case ExtUI::PID_CHAMBER_STARTED: + setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); + break; + #endif case ExtUI::PID_BAD_HEATER_ID: setStatusMessage(GET_TEXT_F(MSG_PID_BAD_HEATER_ID)); break; From 489afcbb790a54eed4734f7edaeed819f40e4e26 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Fri, 5 Apr 2024 09:41:52 -0400 Subject: [PATCH 08/35] revert encoder struct uint --- Marlin/src/lcd/e3v2/common/encoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index c378b26130f8..230ab67bcfd1 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -225,7 +225,7 @@ EncoderState encoderReceiveAnalyze() { // luminance: brightness (0~0xFF) // change_Time: gradient time (ms) void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval) { - struct { int g, r, b; } led_data[LED_NUM]; + struct { uint8_t g, r, b; } led_data[LED_NUM]; for (uint8_t i = 0; i < LED_NUM; i++) { switch (RGB_Scale) { case RGB_SCALE_R10_G7_B5: From 84b0068ce2516d6a3a30659d692b05aca33c6440 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 6 Apr 2024 07:32:43 -0400 Subject: [PATCH 09/35] space, tweak printstats --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- Marlin/src/lcd/e3v2/proui/printstats.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 91b4008526ba..c60ac1ed14a0 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -3972,7 +3972,7 @@ void drawMaxAccelMenu() { if (SET_MENU_F(chamberPIDMenu, STR_CHAMBER_PID " Settings", 8)) { BACK_ITEM(drawAdvancedSettingsMenu); #if ENABLED(PID_AUTOTUNE_MENU) - MENU_ITEM_F(ICON_PIDChamber, STR_CHAMBER_PID, onDrawMenuItem,chamberPID); + MENU_ITEM_F(ICON_PIDChamber, STR_CHAMBER_PID, onDrawMenuItem, chamberPID); EDIT_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawPIntMenu, setChamberPIDT, &hmiData.chamberPIDT); EDIT_ITEM(ICON_PIDCycles, MSG_PID_CYCLE, onDrawPIntMenu, setPIDCycles, &hmiData.pidCycles); #endif diff --git a/Marlin/src/lcd/e3v2/proui/printstats.cpp b/Marlin/src/lcd/e3v2/proui/printstats.cpp index 732e80542d16..2942261b7cd1 100644 --- a/Marlin/src/lcd/e3v2/proui/printstats.cpp +++ b/Marlin/src/lcd/e3v2/proui/printstats.cpp @@ -55,9 +55,9 @@ void PrintStats::draw() { DWINUI::drawString(MRG, 80, TS(GET_TEXT_F(MSG_INFO_PRINT_COUNT), F(": "), ps.totalPrints)); DWINUI::drawString(MRG, 100, TS(GET_TEXT_F(MSG_INFO_COMPLETED_PRINTS), F(": "), ps.finishedPrints)); duration_t(print_job_timer.getStats().printTime).toDigital(str, true); - DWINUI::drawString(MRG, 120, MString<50>(GET_TEXT_F(MSG_INFO_PRINT_TIME), F(": "), str)); + DWINUI::drawString(MRG, 120, TS(GET_TEXT_F(MSG_INFO_PRINT_TIME), F(": "), str)); duration_t(print_job_timer.getStats().longestPrint).toDigital(str, true); - DWINUI::drawString(MRG, 140, MString<50>(GET_TEXT(MSG_INFO_PRINT_LONGEST), F(": "), str)); + DWINUI::drawString(MRG, 140, TS(GET_TEXT_F(MSG_INFO_PRINT_LONGEST), F(": "), str)); DWINUI::drawString(MRG, 160, TS(GET_TEXT_F(MSG_INFO_PRINT_FILAMENT), F(": "), p_float_t(ps.filamentUsed / 1000, 2), F(" m"))); } From 122be88443ed7b0267525b6be90730596cebf082 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sun, 7 Apr 2024 22:04:50 -0400 Subject: [PATCH 10/35] revert encoder --- Marlin/src/lcd/e3v2/common/encoder.cpp | 18 ++++++++---------- Marlin/src/lcd/e3v2/common/encoder.h | 2 ++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index 230ab67bcfd1..5825fb0f7753 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -85,7 +85,7 @@ EncoderState encoderReceiveAnalyze() { next_click_update_ms = millis() + 300; Encoder_tick(); #if PIN_EXISTS(LCD_LED) - LED_Action(); + //LED_Action(); #endif TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); if (!ui.backlight) { @@ -169,15 +169,13 @@ EncoderState encoderReceiveAnalyze() { #if PIN_EXISTS(LCD_LED) // Take the low 24 valid bits 24Bit: G7 G6 G5 G4 G3 G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0 - uint32_t LED_DataArray[LED_NUM]; + uint16_t LED_DataArray[LED_NUM]; // LED light operation void LED_Action() { LED_Control(RGB_SCALE_WARM_WHITE, 0x0F); - //LED_GraduallyControl(RGB_SCALE_COOL_WHITE, 0x0F, 1000); delay(30); LED_Control(RGB_SCALE_WARM_WHITE, 0x00); - //LED_GraduallyControl(RGB_SCALE_COOL_WHITE, 0x00, 1000); } // LED initialization @@ -212,9 +210,9 @@ EncoderState encoderReceiveAnalyze() { for (uint8_t i = 0; i < LED_NUM; i++) { LED_DataArray[i] = 0; switch (RGB_Scale) { - case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = uint8_t(luminance * 10/10) << 8 | uint8_t(luminance * 7/10) << 16 | uint8_t(luminance * 5/10); break; - case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = uint8_t(luminance * 10/10) << 8 | uint8_t(luminance * 7/10) << 16 | uint8_t(luminance * 4/10); break; - case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = uint8_t(luminance * 10/10) << 8 | uint8_t(luminance * 8/10) << 16 | uint8_t(luminance * 7/10); break; + case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 5/10; break; + case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 4/10; break; + case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 8/10) << 16 | luminance * 7/10; break; } } LED_WriteData(); @@ -229,13 +227,13 @@ EncoderState encoderReceiveAnalyze() { for (uint8_t i = 0; i < LED_NUM; i++) { switch (RGB_Scale) { case RGB_SCALE_R10_G7_B5: - led_data[i] = { uint8_t(luminance * 7/10), uint8_t(luminance * 10/10), uint8_t(luminance * 5/10) }; + led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 5/10 }; break; case RGB_SCALE_R10_G7_B4: - led_data[i] = { uint8_t(luminance * 7/10), uint8_t(luminance * 10/10), uint8_t(luminance * 4/10) }; + led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 4/10 }; break; case RGB_SCALE_R10_G8_B7: - led_data[i] = { uint8_t(luminance * 8/10), uint8_t(luminance * 10/10), uint8_t(luminance * 7/10) }; + led_data[i] = { luminance * 8/10, luminance * 10/10, luminance * 7/10 }; break; } } diff --git a/Marlin/src/lcd/e3v2/common/encoder.h b/Marlin/src/lcd/e3v2/common/encoder.h index 9e7b4c7f59a6..ce431c9811b1 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.h +++ b/Marlin/src/lcd/e3v2/common/encoder.h @@ -86,6 +86,8 @@ inline bool applyEncoder(const EncoderState &encoder_diffState, T &valref) { #define RGB_SCALE_WARM_WHITE RGB_SCALE_R10_G7_B4 #define RGB_SCALE_COOL_WHITE RGB_SCALE_R10_G8_B7 + extern unsigned int LED_DataArray[LED_NUM]; + // LED light operation void LED_Action(); From 5388d95b958eeb37b999552931afa64943fab2dd Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sun, 7 Apr 2024 22:24:41 -0400 Subject: [PATCH 11/35] revert these changes to another PR --- Marlin/src/feature/pause.h | 10 ++++++---- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 1 + Marlin/src/lcd/marlinui.cpp | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index 57d9cdb9809f..b86f86b633a9 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -57,7 +57,9 @@ enum PauseMessage : char { }; #if M600_PURGE_MORE_RESUMABLE - // Input methods can Purge More, Resume, or request input + /** + * Input methods can Purge More, Resume, or request input + */ enum PauseMenuResponse : char { PAUSE_RESPONSE_WAIT_FOR, PAUSE_RESPONSE_EXTRUDE_MORE, @@ -107,7 +109,7 @@ void wait_for_confirmation( void resume_print( const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move - const_float_t purge_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length + const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length const int8_t max_beep_count=0, // Beep alert for attention const celsius_t targetTemp=0 // (°C) A target temperature for the hotend DXC_PARAMS // Dual-X-Carriage extruder index @@ -116,7 +118,7 @@ void resume_print( bool load_filament( const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move - const_float_t purge_length=0, // (mm) Purge length + const_float_t extrude_length=0, // (mm) Purge length const int8_t max_beep_count=0, // Beep alert for attention const bool show_lcd=false, // Set LCD status messages? const bool pause_for_user=false, // Pause for user before returning? @@ -137,4 +139,4 @@ bool unload_filament( constexpr uint8_t did_pause_print = 0; -#endif // ADVANCED_PAUSE_FEATURE +#endif // !ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 7159d4a25fb6..0ab045bda37a 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1170,6 +1170,7 @@ void MarlinUI::draw_status_screen() { lcd_moveto(LCD_WIDTH - 9, 2); lcd_put_lchar('S'); + #endif // LCD_INFO_SCREEN_STYLE // ========= Last Line ======== diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index dca18f2125ff..aaa8fb65e837 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1668,7 +1668,7 @@ void MarlinUI::host_notify(const char * const cstr) { card.abortFilePrintSoon(); else if (card.isMounted()) card.closefile(); - #endif + #endif #ifdef ACTION_ON_CANCEL hostui.cancel(); #endif From 9bbba4caa7a33f19769d20a66a5238e10cfde23d Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sun, 7 Apr 2024 22:32:08 -0400 Subject: [PATCH 12/35] revert --- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 0ab045bda37a..d36233d73d98 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1169,7 +1169,7 @@ void MarlinUI::draw_status_screen() { lcd_moveto(LCD_WIDTH - 9, 2); lcd_put_lchar('S'); - + #endif // LCD_INFO_SCREEN_STYLE From 1d9df238f457944c70e6abbf8594e58b0c5301e4 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Mon, 8 Apr 2024 02:19:41 -0400 Subject: [PATCH 13/35] add missing confim, fix switch warning, update popup --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index c60ac1ed14a0..5600e732487e 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -454,6 +454,8 @@ void popupPauseOrStop() { else { // Chinese "Temp Error" } + DWINUI::drawIconWB(ICON_Confirm_C, 86, 280); + dwinUpdateLCD(); } else { FSTR_P heaterstr = nullptr; @@ -467,7 +469,7 @@ void popupPauseOrStop() { case 1: errorstr = GET_TEXT_F(MSG_TEMP_TOO_HIGH); icon = ICON_TempTooHigh; break; default: errorstr = GET_TEXT_F(MSG_ERR_HEATING_FAILED); icon = ICON_Info_1; break; // May be thermal runaway, temp malfunction, etc. } - dwinShowPopup(icon, heaterstr, errorstr, BTN_Continue); + dwinPopupContinue(icon, heaterstr, errorstr); } } #endif @@ -1234,6 +1236,7 @@ void drawMainArea() { #if ENABLED(PIDTEMPCHAMBER) case PIDTEMPCHAMBER_START: drawCPlot(); break; #endif + default: break; } break; #endif case ID_Popup: popupDraw(); break; From 441a8e890b78fe0467e89783d98555d233466584 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Tue, 9 Apr 2024 06:13:17 -0400 Subject: [PATCH 14/35] update chamber PID, add missing --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 25 ++++++++++++++++++++---- Marlin/src/lcd/e3v2/proui/dwin.h | 5 +++-- Marlin/src/lcd/e3v2/proui/dwin_defines.h | 25 +++++++++++------------- 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 5600e732487e..564f064308d3 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1229,6 +1229,8 @@ void drawMainArea() { switch (hmiValue.tempControl) { #if ENABLED(PIDTEMP) case PIDTEMP_START: drawHPlot(); break; + #elif ENABLED(MPCTEMP) + case MPCTEMP_START: drawHPlot(); break; #endif #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: drawBPlot(); break; @@ -1705,13 +1707,21 @@ void dwinLevelingDone() { #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: hmiSaveProcessID(ID_PIDProcess); + #if PROUI_TUNING_GRAPH + dwinDrawPIDMPCPopup(); + #else dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_PID_FOR_BED)); + #endif break; #endif #if ENABLED(PIDTEMPCHAMBER) case PIDTEMPCHAMBER_START: hmiSaveProcessID(ID_PIDProcess); + #if PROUI_TUNING_GRAPH + dwinDrawPIDMPCPopup(); + #else dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_PID_FOR_CHAMBER)); + #endif break; #endif case PID_BAD_HEATER_ID: @@ -1859,6 +1869,7 @@ void dwinSetDataDefaults() { DWINUI::setColors(hmiData.colorText, hmiData.colorBackground, hmiData.colorStatusBg); TERN_(PIDTEMP, hmiData.hotendPIDT = DEF_HOTENDPIDT); TERN_(PIDTEMPBED, hmiData.bedPIDT = DEF_BEDPIDT); + TERN_(PIDTEMPCHAMBER, hmiData.chamberPIDT = DEF_CHAMBERPIDT); TERN_(HAS_PID_HEATING, hmiData.pidCycles = DEF_PIDCYCLES); #if ENABLED(PREVENT_COLD_EXTRUSION) hmiData.extMinT = EXTRUDE_MINTEMP; @@ -3091,8 +3102,11 @@ void drawPrepareMenu() { #endif MENU_ITEM(ICON_Cool, MSG_COOLDOWN, onDrawCooldown, doCoolDown); #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) - MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); - MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot); + #if ANY(PIDTEMP, MPCTEMP) + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + #endif + TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot)); + TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawCPlot)); #endif MENU_ITEM(ICON_Language, MSG_UI_LANGUAGE, onDrawLanguage, setLanguage); } @@ -3422,8 +3436,11 @@ void drawTuneMenu() { EDIT_ITEM(ICON_RemainTime, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes); #endif #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) - MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); - MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot); + #if ANY(PIDTEMP, MPCTEMP) + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + #endif + TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot)); + TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawCPlot)); #endif #if ENABLED(CASE_LIGHT_MENU) EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 47fd5681e616..7e49dad39f6d 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -71,7 +71,7 @@ enum processID : uint8_t { ID_NothingToDo }; -#if ANY(HAS_PID_HEATING, MPC_AUTOTUNE) +#if ANY(HAS_PID_HEATING, MPCTEMP) enum tempcontrol_t : uint8_t { AUTOTUNE_DONE, @@ -83,7 +83,7 @@ enum processID : uint8_t { PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, #endif - #if ENABLED(MPC_AUTOTUNE) + #if ENABLED(MPCTEMP) MPCTEMP_START, MPC_TEMP_ERROR, MPC_INTERRUPTED, @@ -317,6 +317,7 @@ void dwinRebootScreen(); void dwinDrawPlot(tempcontrol_t result); void drawHPlot(); void drawBPlot(); + void drawCPlot(); #endif // Menu drawing functions diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index f09d2bd625ab..56eff0e54bfa 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -86,25 +86,22 @@ #ifdef Z_AFTER_HOMING #define DEF_Z_AFTER_HOMING Z_AFTER_HOMING -#else - #define DEF_Z_AFTER_HOMING 0 +#elif ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + #define DEF_Z_AFTER_HOMING 10 #endif -#ifdef PREHEAT_1_TEMP_HOTEND - #define DEF_HOTENDPIDT PREHEAT_1_TEMP_HOTEND -#else - #define DEF_HOTENDPIDT 195 +#ifndef PREHEAT_1_TEMP_HOTEND + #define PREHEAT_1_TEMP_HOTEND 195 #endif -#ifdef PREHEAT_1_TEMP_BED - #define DEF_BEDPIDT PREHEAT_1_TEMP_BED -#else - #define DEF_BEDPIDT 60 +#ifndef PREHEAT_1_TEMP_BED + #define PREHEAT_1_TEMP_BED 60 #endif -#ifdef PREHEAT_1_TEMP_CHAMBER - #define DEF_CHAMBERPIDT PREHEAT_1_TEMP_CHAMBER -#else - #define DEF_CHAMBERPIDT 0 +#ifndef PREHEAT_1_TEMP_CHAMBER + #define PREHEAT_1_TEMP_CHAMBER 35 #endif +#define DEF_HOTENDPIDT PREHEAT_1_TEMP_HOTEND +#define DEF_BEDPIDT PREHEAT_1_TEMP_BED +#define DEF_CHAMBERPIDT PREHEAT_1_TEMP_CHAMBER #define DEF_PIDCYCLES 5 /** From 15a81cc299997e96049e1418b30d7a556085aada Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:30:37 -0400 Subject: [PATCH 15/35] Update dwin.cpp #include extui --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 564f064308d3..45bf83a0e4d8 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -37,6 +37,7 @@ #include "../../utf8.h" #include "../../marlinui.h" +#include "../../extui/ui_api.h" #include "../../../MarlinCore.h" #include "../../../core/serial.h" #include "../../../core/macros.h" From c4805803fdae2c1b696caa7b55dbc5e9d8144430 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 11 May 2024 08:46:44 -0400 Subject: [PATCH 16/35] revert some extui, update proui popup --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 18 ++++++++------ Marlin/src/lcd/e3v2/proui/dwin_popup.cpp | 30 +++++++++-------------- Marlin/src/lcd/e3v2/proui/dwin_popup.h | 10 ++++++-- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 2 +- Marlin/src/lcd/extui/ui_api.h | 6 +---- Marlin/src/module/temperature.cpp | 2 +- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 45bf83a0e4d8..af5ee568deef 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1727,15 +1727,15 @@ void dwinLevelingDone() { #endif case PID_BAD_HEATER_ID: checkkey = last_checkkey; - dwinPopupConfirm(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_PID_BAD_HEATER_ID)); + dwinPopupContinue(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_PID_BAD_HEATER_ID)); break; case PID_TUNING_TIMEOUT: checkkey = last_checkkey; - dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), GET_TEXT_F(MSG_PID_TIMEOUT)); + dwinPopupContinue(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), GET_TEXT_F(MSG_PID_TIMEOUT)); break; case PID_TEMP_TOO_HIGH: checkkey = last_checkkey; - dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_TEMP_TOO_HIGH)); + dwinPopupContinue(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_TEMP_TOO_HIGH)); break; case AUTOTUNE_DONE: checkkey = last_checkkey; @@ -1765,12 +1765,12 @@ void dwinLevelingDone() { break; case MPC_TEMP_ERROR: checkkey = last_checkkey; - dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), F(STR_MPC_TEMPERATURE_ERROR)); + dwinPopupContinue(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), F(STR_MPC_TEMPERATURE_ERROR)); ui.reset_alert_level(); break; case MPC_INTERRUPTED: checkkey = last_checkkey; - dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), F(STR_MPC_AUTOTUNE_INTERRUPTED)); + dwinPopupContinue(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), F(STR_MPC_AUTOTUNE_INTERRUPTED)); ui.reset_alert_level(); break; case AUTOTUNE_DONE: @@ -1780,6 +1780,7 @@ void dwinLevelingDone() { break; default: checkkey = last_checkkey; + dwinPopupConfirm(ICON_Info_0, GET_TEXT_F(MSG_ERROR), GET_TEXT_F(MSG_STOPPING)); ui.reset_alert_level(); break; } @@ -2001,7 +2002,7 @@ void dwinRedrawScreen() { #if HAS_MESH void dwinMeshViewer() { if (!leveling_is_valid()) - dwinPopupContinue(ICON_Leveling_1, GET_TEXT_F(MSG_MESH_VIEWER), GET_TEXT_F(MSG_NO_VALID_MESH)); + dwinPopupConfirm(ICON_Leveling_1, GET_TEXT_F(MSG_MESH_VIEWER), GET_TEXT_F(MSG_NO_VALID_MESH)); else { hmiSaveProcessID(ID_WaitResponse); meshViewer.draw(); @@ -4177,7 +4178,10 @@ void drawMaxAccelMenu() { #if ENABLED(PROUI_MESH_EDIT) void drawEditMeshMenu() { - if (!leveling_is_valid()) { LCD_MESSAGE(MSG_UBL_MESH_INVALID); return; } + if (!leveling_is_valid()) { + LCD_MESSAGE(MSG_UBL_MESH_INVALID); + return dwinPopupConfirm(ICON_Leveling_1, GET_TEXT_F(MSG_NO_VALID_MESH), GET_TEXT_F(MSG_UBL_LOAD_MESH)); + } set_bed_leveling_enabled(false); checkkey = ID_Menu; if (SET_MENU(editMeshMenu, MSG_EDIT_MESH, 4)) { diff --git a/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp b/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp index 31d91a0ed8f7..3aa7062a483f 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin_popup.cpp @@ -54,12 +54,6 @@ void drawSelectHighlight(const bool sel, const uint16_t ypos) { dwinDrawRectangle(0, c2, 144, ypos - 2, 247, ypos + 39); } -void dwinPopupContinue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2) { - hmiSaveProcessID(ID_WaitResponse); - dwinDrawPopup(icon, fmsg1, fmsg2, BTN_Continue); // Button Continue - dwinUpdateLCD(); -} - void dwinPopupConfirmCancel(const uint8_t icon, FSTR_P const fmsg2) { dwinDrawPopup(ICON_BLTouch, F("Please confirm"), fmsg2); DWINUI::drawButton(BTN_Confirm, 26, 280); @@ -92,18 +86,18 @@ void hmiPopup() { } } - #if ENABLED(ADVANCED_PAUSE_FEATURE) - void dwinPopupPause(FSTR_P const fmsg, uint8_t button/*=0*/) { - hmiSaveProcessID(button ? ID_WaitResponse : ID_NothingToDo); - dwinShowPopup(ICON_Pause_1, GET_TEXT_F(MSG_ADVANCED_PAUSE), fmsg, button); - } +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void dwinPopupPause(FSTR_P const fmsg, uint8_t button/*=0*/) { + hmiSaveProcessID(button ? ID_WaitResponse : ID_NothingToDo); + dwinShowPopup(ICON_Pause_1, GET_TEXT_F(MSG_ADVANCED_PAUSE), fmsg, button); + } - void drawPopupFilamentPurge() { - dwinDrawPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_ADVANCED_PAUSE), GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE_CONTINUE)); - DWINUI::drawButton(BTN_Purge, 26, 280); - DWINUI::drawButton(BTN_Continue, 146, 280); - drawSelectHighlight(true); - } - #endif // ADVANCED_PAUSE_FEATURE + void drawPopupFilamentPurge() { + dwinDrawPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_ADVANCED_PAUSE), GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE_CONTINUE)); + DWINUI::drawButton(BTN_Purge, 26, 280); + DWINUI::drawButton(BTN_Continue, 146, 280); + drawSelectHighlight(true); + } +#endif // ADVANCED_PAUSE_FEATURE #endif // DWIN_LCD_PROUI diff --git a/Marlin/src/lcd/e3v2/proui/dwin_popup.h b/Marlin/src/lcd/e3v2/proui/dwin_popup.h index a2874ddf42d2..5ab135cff3be 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_popup.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_popup.h @@ -38,7 +38,6 @@ extern popupDrawFunc_t popupDraw; void drawSelectHighlight(const bool sel, const uint16_t ypos); inline void drawSelectHighlight(const bool sel) { drawSelectHighlight(sel, 280); }; -void dwinPopupContinue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2); void dwinPopupConfirmCancel(const uint8_t icon, FSTR_P const fmsg2); void gotoPopup(const popupDrawFunc_t fnDraw, const popupClickFunc_t fnClick=nullptr, const popupChangeFunc_t fnChange=nullptr); void hmiPopup(); @@ -77,6 +76,13 @@ void dwinShowPopup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t template void dwinPopupConfirm(const uint8_t icon, T amsg1, U amsg2) { hmiSaveProcessID(ID_WaitResponse); - dwinDrawPopup(icon, amsg1, amsg2, BTN_Confirm); // Button Confirm + dwinDrawPopup(icon, amsg1, amsg2, BTN_Confirm); // Button Confirm + dwinUpdateLCD(); +} + +template +void dwinPopupContinue(const uint8_t icon, T amsg1, U amsg2) { + hmiSaveProcessID(ID_WaitResponse); + dwinDrawPopup(icon, amsg1, amsg2, BTN_Continue); // Button Continue dwinUpdateLCD(); } diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index e6a63b649c2d..a0eba4956fa2 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -93,7 +93,7 @@ namespace ExtUI { void onUserConfirmRequired(const char * const cstr) { // TODO: A version of this method that takes an icon and button title, // or implement some kind of ExtUI enum. - dwinPopupContinue(ICON_Continue_1, FSTR_P(cstr), GET_TEXT_F(MSG_USERWAIT)); + dwinPopupContinue(ICON_Continue_1, cstr, GET_TEXT_F(MSG_USERWAIT)); } // For fancy LCDs include an icon ID, message, and translated button title diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index bd466c24dd56..0bc86bea7bdf 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -69,11 +69,7 @@ namespace ExtUI { enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 }; #if HAS_PID_HEATING - enum pidresult_t : uint8_t { - OPTITEM(PIDTEMP, PID_STARTED) - OPTITEM(PIDTEMPBED, PID_BED_STARTED) - OPTITEM(PIDTEMPCHAMBER, PID_CHAMBER_STARTED) - PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; + enum pidresult_t : uint8_t { PID_STARTED, PIDTEMPBED, PID_BED_STARTED, PIDTEMPCHAMBER, PID_CHAMBER_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; #endif #if ENABLED(MPC_AUTOTUNE) enum mpcresult_t : uint8_t { MPC_STARTED, MPC_TEMP_ERROR, MPC_INTERRUPTED, MPC_DONE }; diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index ab2893638768..a1fe14c75df3 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -721,7 +721,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_FAN_LOGIC, fan_update_ms = next_temp_ms + fan_update_interval_ms); - TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(TERN_(PIDTEMPCHAMBER, ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED :) TERN_(PIDTEMPBED, isbed ? ExtUI::pidresult_t::PID_BED_STARTED :) ExtUI::pidresult_t::PID_STARTED)); + TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED : isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED)); if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) { SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); From 87a407bdf40db45373dcfb9b9e23f6d47be65869 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Wed, 29 May 2024 03:11:14 -0400 Subject: [PATCH 17/35] update language msg_ --- Marlin/src/lcd/e3v2/creality/dwin.cpp | 6 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 43 +++--- Marlin/src/lcd/language/language_de.h | 2 - Marlin/src/lcd/language/language_en.h | 140 ++++++++++++------ Marlin/src/lcd/language/language_it.h | 2 - Marlin/src/lcd/language/language_ru.h | 36 ++--- Marlin/src/lcd/language/language_sk.h | 2 - Marlin/src/lcd/language/language_tr.h | 8 +- Marlin/src/lcd/language/language_uk.h | 4 +- Marlin/src/module/probe.cpp | 2 +- .../pins/stm32f4/pins_CREALITY_CR4NTXXC10.h | 2 +- buildroot/tests/STM32F103RE_creality | 15 +- 12 files changed, 157 insertions(+), 105 deletions(-) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 7f057137d8a0..c8c8f626d61c 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1116,9 +1116,9 @@ void popupWindowResume() { dwinIconShow(ICON, ICON_Continue_C, 146, 307); } else { - dwinDrawString(true, font8x16, COLOR_POPUP_TEXT, COLOR_BG_WINDOW, (272 - 8 * 14) / 2, 115, F("Continue Print")); - dwinDrawString(true, font8x16, COLOR_POPUP_TEXT, COLOR_BG_WINDOW, (272 - 8 * 22) / 2, 192, F("It looks like the last")); - dwinDrawString(true, font8x16, COLOR_POPUP_TEXT, COLOR_BG_WINDOW, (272 - 8 * 22) / 2, 212, F("file was interrupted.")); + dwinDrawString(true, font8x16, COLOR_POPUP_TEXT, COLOR_BG_WINDOW, (272 - 8 * 14) / 2, 115, GET_TEXT_F(MSG_OUTAGE_RECOVERY)); + dwinDrawString(true, font8x16, COLOR_POPUP_TEXT, COLOR_BG_WINDOW, (272 - 8 * 22) / 2, 192, GET_TEXT_F(MSG_OUTAGE_RECOVERY2)); + dwinDrawString(true, font8x16, COLOR_POPUP_TEXT, COLOR_BG_WINDOW, (272 - 8 * 22) / 2, 212, GET_TEXT_F(MSG_OUTAGE_RECOVERY3)); dwinIconShow(ICON, ICON_Cancel_E, 26, 307); dwinIconShow(ICON, ICON_Continue_E, 146, 307); } diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 168b75dc382f..12ffcdac5b65 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1016,7 +1016,7 @@ void drawPrintFileMenu() { checkkey = ID_Menu; if (card.isMounted()) { if (SET_MENU(fileMenu, MSG_MEDIA_MENU, nr_sd_menu_items() + 1)) { - BACK_ITEM(gotoMainMenu); + menuItemAdd(ICON_Back, GET_TEXT_F(MSG_EXIT_TO_MAIN_MENU), onDrawMenuItem, gotoMainMenu); for (uint8_t i = 0; i < nr_sd_menu_items(); ++i) menuItemAdd(onDrawFileName, onClickSDItem); } @@ -1412,8 +1412,8 @@ void eachMomentUpdate() { } else { DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_OUTAGE_RECOVERY)); - DWINUI::drawCenteredString(hmiData.colorPopupTxt, 147, F("It looks like the last")); - DWINUI::drawCenteredString(hmiData.colorPopupTxt, 167, F("file was interrupted.")); + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 147, GET_TEXT_F(MSG_OUTAGE_RECOVERY2)); + DWINUI::drawCenteredString(hmiData.colorPopupTxt, 167, GET_TEXT_F(MSG_OUTAGE_RECOVERY3)); DWINUI::drawButton(BTN_Cancel, 26, 280); DWINUI::drawButton(BTN_Continue, 146, 280); } @@ -1575,7 +1575,7 @@ void dwinLevelingDone() { #if ENABLED(MPC_AUTOTUNE) case MPC_STARTED: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_MPC_AUTOTUNE)); - DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius")); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_MPC_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_NOZZLE)); _maxtemp = thermalManager.hotend_maxtemp[0]; _target = 200; @@ -1584,7 +1584,7 @@ void dwinLevelingDone() { #if ENABLED(PIDTEMP) case PIDTEMP_START: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); - DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_PID_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_NOZZLE)); _maxtemp = thermalManager.hotend_maxtemp[0]; _target = hmiData.hotendPIDT; @@ -1593,7 +1593,7 @@ void dwinLevelingDone() { #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); - DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_PID_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_BED)); _maxtemp = BED_MAXTEMP; _target = hmiData.bedPIDT; @@ -1602,7 +1602,7 @@ void dwinLevelingDone() { #if ENABLED(PIDTEMPCHAMBER) case PIDTEMPCHAMBER_START: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); - DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius")); + DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_PID_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_CHAMBER)); _maxtemp = CHAMBER_MAXTEMP; _target = hmiData.chamberPIDT; @@ -1654,7 +1654,7 @@ void dwinLevelingDone() { default: break; } - dwinDrawString(false, 2, hmiData.colorPopupTxt, hmiData.colorPopupBg, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("Target: Celsius")); + dwinDrawString(false, 2, hmiData.colorPopupTxt, hmiData.colorPopupBg, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_TARGET)); plot.draw(gfrm, _maxtemp, _target); DWINUI::drawInt(false, 2, hmiData.colorStatusTxt, hmiData.colorPopupBg, 3, gfrm.x + 80, gfrm.y - DWINUI::fontHeight() - 4, _target); DWINUI::drawButton(BTN_Continue, 86, 305); @@ -1761,7 +1761,7 @@ void dwinLevelingDone() { #if PROUI_TUNING_GRAPH dwinDrawPIDMPCPopup(); #else - dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_MPC_AUTOTUNE), F("for Nozzle is running.")); + dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_MPC_AUTOTUNE), GET_TEXT_F(MSG_PID_FOR_NOZZLE)); #endif break; case MPC_TEMP_ERROR: @@ -2483,10 +2483,13 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres void trammingwizard() { if (hmiData.fullManualTramming) { - LCD_MESSAGE_F("Disable manual tramming"); + LCD_MESSAGE(MSG_DISABLE_MANUAL_TRAMMING); return; } - bed_mesh_t zval = {0}; + LCD_MESSAGE(MSG_TRAMMING_WIZARD_START); + DWINUI::clearMainArea(); + static bed_mesh_t zval = {}; + probe.stow(); zval[0][0] = tram(0); checkkey = ID_NothingToDo; meshViewer.drawMesh(zval, 2, 2); @@ -2497,8 +2500,8 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres zval[0][1] = tram(3); meshViewer.drawMesh(zval, 2, 2); - DWINUI::drawCenteredString(140, F("Calculating average")); - DWINUI::drawCenteredString(160, F("and relative heights")); + DWINUI::drawCenteredString(140, GET_TEXT_F(MSG_CALCULATING_AVERAGE)); + DWINUI::drawCenteredString(160, GET_TEXT_F(MSG_AND_RELATIVE_HEIGHTS)); safe_delay(1000); float avg = 0.0f; for (uint8_t x = 0; x < 2; ++x) for (uint8_t y = 0; y < 2; ++y) avg += zval[x][y]; @@ -2512,8 +2515,8 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres #endif if (ABS(meshViewer.max - meshViewer.min) < BED_TRAMMING_PROBE_TOLERANCE) { - DWINUI::drawCenteredString(140, F("Corners leveled")); - DWINUI::drawCenteredString(160, F("Tolerance achieved!")); + DWINUI::drawCenteredString(140, GET_TEXT_F(MSG_CORNERS_LEVELED)); + DWINUI::drawCenteredString(160, GET_TEXT_F(MSG_TOLERANCE_ACHIEVED)); } else { uint8_t p = 0; @@ -2535,9 +2538,9 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres case 0b11 : plabel = GET_TEXT_F(MSG_TRAM_BR); break; default : plabel = F(""); break; } - DWINUI::drawCenteredString(120, F("Corners not leveled")); - DWINUI::drawCenteredString(140, F("Knob adjustment required")); - DWINUI::drawCenteredString(COLOR_GREEN, 160, s ? F("Lower") : F("Raise")); + DWINUI::drawCenteredString(120, GET_TEXT_F(MSG_CORNERS_NOT_LEVELED)); + DWINUI::drawCenteredString(140, GET_TEXT_F(MSG_KNOB_ADJUSTMENT_REQUIRED)); + DWINUI::drawCenteredString(COLOR_GREEN, 160, s ? GET_TEXT_F(MSG_LOWER) : GET_TEXT_F(MSG_RAISE)); DWINUI::drawCenteredString(COLOR_GREEN, 180, plabel); } DWINUI::drawButton(BTN_Continue, 86, 305); @@ -3261,7 +3264,7 @@ void drawMoveMenu() { #endif } updateMenu(moveMenu); - if (!all_axes_trusted()) LCD_MESSAGE_F("WARNING: Current position unknown. Home axes."); + if (!all_axes_trusted()) LCD_MESSAGE(MSG_POSITION_UNKNOWN); } #if HAS_HOME_OFFSET @@ -4038,7 +4041,7 @@ void drawMaxAccelMenu() { EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR); } updateMenu(zOffsetWizMenu); - if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home"); + if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE(MSG_POSITION_UNKNOWN_Z); } #endif diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 828a44bf5206..7b42d3d95aa3 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -602,8 +602,6 @@ namespace LanguageNarrow_de { LSTR MSG_LOCKSCREEN = _UxGT("Bildschirm sperren"); // ProUI LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Drucker ist gesperrt,"); // ProUI LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scrollen zum Entsper."); // ProUI - LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Auf Neustart warten"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Bitte vorheizen"); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Drucke"); LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Komplette"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index f30b29dd4e64..6a23307b20b9 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -114,7 +114,6 @@ namespace LanguageNarrow_en { LSTR MSG_HOME_OFFSET_Z = _UxGT("Home Offset Z"); // DWIN LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets Applied"); LSTR MSG_ERR_M428_TOO_FAR = _UxGT("MIN/MAX Too Far"); - LSTR MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); LSTR MSG_SELECT_ORIGIN = _UxGT("Select Origin"); LSTR MSG_LAST_VALUE_SP = _UxGT("Last value "); @@ -360,7 +359,7 @@ namespace LanguageNarrow_en { LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Autotune failed!"); - LSTR MSG_PID_FOR_NOZZLE = _UxGT("for Nozzle is running."); + LSTR MSG_PID_FOR_NOZZLE = _UxGT("for NOZZLE is running."); LSTR MSG_PID_FOR_BED = _UxGT("for BED is running."); LSTR MSG_PID_FOR_CHAMBER = _UxGT("for CHAMBER is running."); @@ -376,6 +375,10 @@ namespace LanguageNarrow_en { LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed! Temperature too high."); LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); + LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Hotend Temp Graph"); + LSTR MSG_BED_TEMP_GRAPH = _UxGT("Bed Temp Graph"); + LSTR MSG_CHAMBER_TEMP_GRAPH = _UxGT("Chamber Temp Graph"); + LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss"); LSTR MSG_MPC_HEATING_PAST_200 = _UxGT("Heating to >200C"); LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Cooling to ambient"); @@ -425,12 +428,12 @@ namespace LanguageNarrow_en { LSTR MSG_SHAPING_DISABLE = _UxGT("Disable @ shaping"); LSTR MSG_SHAPING_FREQ = _UxGT("@ frequency"); LSTR MSG_SHAPING_ZETA = _UxGT("@ damping"); - LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frequency"); // ProUI - LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frequency"); // ProUI - LSTR MSG_SHAPING_C_FREQ = STR_C _UxGT(" frequency"); // ProUI - LSTR MSG_SHAPING_A_ZETA = STR_A _UxGT(" damping"); // ProUI - LSTR MSG_SHAPING_B_ZETA = STR_B _UxGT(" damping"); // ProUI - LSTR MSG_SHAPING_C_ZETA = STR_C _UxGT(" damping"); // ProUI + LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frequency"); // ProUI + LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frequency"); // ProUI + LSTR MSG_SHAPING_C_FREQ = STR_C _UxGT(" frequency"); // ProUI + LSTR MSG_SHAPING_A_ZETA = STR_A _UxGT(" damping"); // ProUI + LSTR MSG_SHAPING_B_ZETA = STR_B _UxGT(" damping"); // ProUI + LSTR MSG_SHAPING_C_ZETA = STR_C _UxGT(" damping"); // ProUI LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Freq Limit"); LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor"); LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm"); @@ -463,8 +466,6 @@ namespace LanguageNarrow_en { LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); LSTR MSG_BRIGHTNESS = _UxGT("LCD Brightness"); LSTR MSG_SCREEN_TIMEOUT = _UxGT("LCD Timeout (m)"); - LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Hotend Temp Graph"); - LSTR MSG_BED_TEMP_GRAPH = _UxGT("Bed Temp Graph"); LSTR MSG_BRIGHTNESS_OFF = _UxGT("Backlight Off"); LSTR MSG_STORE_EEPROM = _UxGT("Store Settings"); LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings"); @@ -517,14 +518,18 @@ namespace LanguageNarrow_en { LSTR MSG_STOP_PRINT = _UxGT("Stop Print"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Power Outage"); LSTR MSG_RESUME_BED_TEMP = _UxGT("Resume Bed Temp"); - LSTR MSG_HOST_START_PRINT = _UxGT("Host Start"); - LSTR MSG_PRINTING_OBJECT = _UxGT("Print Obj"); - LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Obj"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Obj {"); - LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Job"); - LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Print"); - LSTR MSG_TURN_OFF = _UxGT("Turn off now"); - LSTR MSG_END_LOOPS = _UxGT("End Loops"); + + #if LCD_WIDTH < 20 || !HAS_DWIN_E3V2 + LSTR MSG_HOST_START_PRINT = _UxGT("Host Start"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Print Obj"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Obj"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Obj {"); + LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Job"); + LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Print"); + LSTR MSG_TURN_OFF = _UxGT("Turn off now"); + LSTR MSG_END_LOOPS = _UxGT("End Loops"); + #endif + LSTR MSG_NO_MEDIA = _UxGT("No ") MEDIA_TYPE_EN; LSTR MSG_DWELL = _UxGT("Sleep..."); LSTR MSG_USERWAIT = _UxGT("Click to Resume..."); @@ -679,26 +684,13 @@ namespace LanguageNarrow_en { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); - LSTR MSG_COLORS_GET = _UxGT("Get Color"); // ProUI - LSTR MSG_COLORS_SELECT = _UxGT("Select Colors"); // ProUI - LSTR MSG_COLORS_APPLIED = _UxGT("Colors applied"); // ProUI - LSTR MSG_COLORS_RED = _UxGT("Red"); // ProUI / JyersUI - LSTR MSG_COLORS_GREEN = _UxGT("Green"); // ProUI / JyersUI - LSTR MSG_COLORS_BLUE = _UxGT("Blue"); // ProUI / JyersUI - LSTR MSG_COLORS_WHITE = _UxGT("White"); // ProUI - LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI - LSTR MSG_SOUND_ENABLE = _UxGT("Enable sound"); // ProUI - LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen"); // ProUI - LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Printer is Locked,"); // ProUI - LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll to unlock."); // ProUI - LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait for reboot."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No Media"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Please Preheat"); // ProUI - - LSTR MSG_INFO_PRINT_COUNT = _UxGT("Prints"); - LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); - LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); - LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded"); + #if LCD_WIDTH < 20 || !HAS_DWIN_E3V2 + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Prints"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded"); + #endif + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); @@ -715,11 +707,11 @@ namespace LanguageNarrow_en { LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("RESUME OPTIONS:"); LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purge more"); LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continue"); - LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Purge or Continue?"); // ProUI + LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Purge or Continue?"); // ProUI LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor"); LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm"); - LSTR MSG_EXTRUDER_MIN_TEMP = _UxGT("Extruder Min Temp."); // ProUI + LSTR MSG_EXTRUDER_MIN_TEMP = _UxGT("Extruder Min Temp."); // ProUI LSTR MSG_FANCHECK = _UxGT("Fan Tacho Check"); LSTR MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); @@ -785,6 +777,40 @@ namespace LanguageNarrow_en { LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Remember to Save!"); LSTR MSG_PASSWORD_REMOVED = _UxGT("Password Removed"); + LSTR MSG_COLORS_GET = _UxGT("Get Color"); // ProUI + LSTR MSG_COLORS_SELECT = _UxGT("Select Colors"); // ProUI + LSTR MSG_COLORS_APPLIED = _UxGT("Colors applied"); // ProUI + LSTR MSG_COLORS_RED = _UxGT("Red"); // ProUI / JyersUI + LSTR MSG_COLORS_GREEN = _UxGT("Green"); // ProUI / JyersUI + LSTR MSG_COLORS_BLUE = _UxGT("Blue"); // ProUI / JyersUI + LSTR MSG_COLORS_WHITE = _UxGT("White"); // ProUI + + LSTR MSG_SCREEN_BACKGROUND = _UxGT("Screen Background"); // ProUI + LSTR MSG_CURSOR = _UxGT("Cursor"); // ProUI + LSTR MSG_TITLE_BACKGROUND = _UxGT("Title Background"); // ProUI + LSTR MSG_TITLE_TEXT = _UxGT("Title Text"); // ProUI + LSTR MSG_TEXT = _UxGT("Text"); // ProUI + LSTR MSG_SELECTED = _UxGT("Selected"); // ProUI + LSTR MSG_SPLIT_LINE = _UxGT("Split Line"); // ProUI + LSTR MSG_HIGHLIGHT = _UxGT("Highlight"); // ProUI + LSTR MSG_STATUS_BACKGROUND = _UxGT("Status Background"); // ProUI + LSTR MSG_STATUS_TEXT = _UxGT("Status Text"); // ProUI + LSTR MSG_POPUP_BACKGROUND = _UxGT("Popup Background"); // ProUI + LSTR MSG_POPUP_TEXT = _UxGT("Popup Text"); // ProUI + LSTR MSG_ALERT_BACKGROUND = _UxGT("Alert Background"); // ProUI + LSTR MSG_ALERT_TEXT = _UxGT("Alert Text"); // ProUI + LSTR MSG_PERCENT_TEXT = _UxGT("Percent Text"); // ProUI + LSTR MSG_BAR_FILL = _UxGT("Bar Fill"); // ProUI + LSTR MSG_INDICATOR_VALUE = _UxGT("Indicator value"); // ProUI + LSTR MSG_COORDINATE_VALUE = _UxGT("Coordinate value"); // ProUI + + LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI + LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen"); // ProUI + LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Printer is Locked,"); // ProUI + LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll to unlock."); // ProUI + LSTR MSG_LOWER = _UxGT("Lower"); // ProUI + LSTR MSG_RAISE = _UxGT("Raise"); // ProUI + // Filament Change screens show up to 2 lines on a 3-line display LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Click to continue")); LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); @@ -850,6 +876,7 @@ namespace LanguageNarrow_en { LSTR MSG_XATC_UPDATE_Z_OFFSET = _UxGT("Update Z-Offset to "); LSTR MSG_SOUND = _UxGT("Sound"); + LSTR MSG_SOUND_ENABLE = _UxGT("Enable sound"); // ProUI LSTR MSG_TOP_LEFT = _UxGT("Top Left"); LSTR MSG_BOTTOM_LEFT = _UxGT("Bottom Left"); @@ -909,7 +936,27 @@ namespace LanguageNarrow_en { namespace LanguageWide_en { using namespace LanguageNarrow_en; #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 - LSTR MSG_LIVE_MOVE = _UxGT("Live Movement"); + LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait for reboot."); // ProUI + LSTR MSG_EXIT_TO_MAIN_MENU = _UxGT("Exit to Main Menu"); // ProUI + + LSTR MSG_DISABLE_MANUAL_TRAMMING = _UxGT("Disable manual tramming"); // ProUI + LSTR MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); // ProUI + LSTR MSG_TRAMMING_WIZARD_START = _UxGT("Tramming Wizard Start"); // ProUI + LSTR MSG_CORNERS_LEVELED = _UxGT("Corners leveled"); // ProUI + LSTR MSG_CORNERS_NOT_LEVELED = _UxGT("Corners not leveled"); // ProUI + LSTR MSG_KNOB_ADJUSTMENT_REQUIRED = _UxGT("Knob adjustment required");// ProUI + LSTR MSG_PROBE_FOR_Z_VALUE = _UxGT("Probe for Z Value"); // ProUI + LSTR MSG_ZERO_CURRENT_POINT = _UxGT("Zero Current Point"); // ProUI + LSTR MSG_CALCULATING_AVERAGE = _UxGT("Calculating average"); // ProUI + LSTR MSG_AND_RELATIVE_HEIGHTS = _UxGT("and relative heights"); // ProUI + LSTR MSG_TOLERANCE_ACHIEVED = _UxGT("Tolerance achieved!"); // ProUI + + LSTR MSG_POSITION_UNKNOWN = _UxGT("WARNING: Current position unknown. Home axes."); + LSTR MSG_POSITION_UNKNOWN_Z = _UxGT("WARNING: Z position unknown, move Z to home"); + + LSTR MSG_OUTAGE_RECOVERY2 = _UxGT("It looks like the last"); + LSTR MSG_OUTAGE_RECOVERY3 = _UxGT("file was interrupted."); + LSTR MSG_HOST_START_PRINT = _UxGT("Start Host Print"); LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); @@ -918,13 +965,18 @@ namespace LanguageWide_en { LSTR MSG_MEDIA_MENU = _UxGT("Select from ") MEDIA_TYPE_EN; LSTR MSG_TURN_OFF = _UxGT("Turn off the printer"); LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops"); - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No media inserted."); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Please preheat the hot end."); // ProUI - LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Reset Print Count"); // ProUI + + LSTR MSG_MEDIA_NOT_INSERTED = MEDIA_TYPE_EN _UxGT(" not inserted."); // ProUI + LSTR MSG_PLEASE_PREHEAT = _UxGT("Please preheat hotend."); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Print Count"); + LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Reset Print Count"); // ProUI LSTR MSG_INFO_PRINT_TIME = _UxGT("Print Time"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded Total"); + + LSTR MSG_MPC_TARGET = _UxGT("MPC target: Celsius"); // ProUI + LSTR MSG_PID_TARGET = _UxGT("PID target: Celsius"); // ProUI + LSTR MSG_TARGET = _UxGT("Target: Celsius"); // ProUI #endif } diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index d9c83ed4152d..33cb97ca6ccc 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -670,8 +670,6 @@ namespace LanguageNarrow_it { LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Stamp. bloccata,"); // ProUI LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll x sbloccare."); // ProUI LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Attendere fino al riavvio."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No supporto"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Prerisc. ugello."); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Stampe"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Durata"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index e30b1fb562f9..8acfac3554aa 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -776,24 +776,24 @@ namespace LanguageNarrow_ru { LSTR MSG_RESET_STATS = _UxGT("Сбросить статистику печати?"); LSTR MSG_FAN_SPEED_FAULT = _UxGT("Сбой скорости кулера"); - LSTR MSG_COLORS_GET = _UxGT("Получить цвет"); // ProUI - LSTR MSG_COLORS_SELECT = _UxGT("Выбрать цвета"); // ProUI - LSTR MSG_COLORS_APPLIED = _UxGT("Цвета применены"); // ProUI - LSTR MSG_COLORS_RED = _UxGT("Красный"); // ProUI / JyersUI - LSTR MSG_COLORS_GREEN = _UxGT("Зелёный"); // ProUI / JyersUI - LSTR MSG_COLORS_BLUE = _UxGT("Синий"); // ProUI / JyersUI - LSTR MSG_COLORS_WHITE = _UxGT("Белый"); // ProUI - LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI - LSTR MSG_SOUND_ENABLE = _UxGT("Включить звук"); // ProUI - LSTR MSG_LOCKSCREEN = _UxGT("Блокировать экран"); // ProUI - LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Принтер заблокирован,"); // ProUI - LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Крутить для разблокировки."); // ProUI - LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Ждите перезагрузки."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Нет носителя."); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Нагрейте сопло."); // ProUI - LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Сбросить счетчик"); // ProUI - LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Прочистить или продолжить?"); // ProUI - LSTR MSG_EXTRUDER_MIN_TEMP = _UxGT("Миню темп. экструдера."); // ProUI + LSTR MSG_COLORS_GET = _UxGT("Получить цвет"); // ProUI + LSTR MSG_COLORS_SELECT = _UxGT("Выбрать цвета"); // ProUI + LSTR MSG_COLORS_APPLIED = _UxGT("Цвета применены"); // ProUI + LSTR MSG_COLORS_RED = _UxGT("Красный"); // ProUI / JyersUI + LSTR MSG_COLORS_GREEN = _UxGT("Зелёный"); // ProUI / JyersUI + LSTR MSG_COLORS_BLUE = _UxGT("Синий"); // ProUI / JyersUI + LSTR MSG_COLORS_WHITE = _UxGT("Белый"); // ProUI + LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI + LSTR MSG_SOUND_ENABLE = _UxGT("Включить звук"); // ProUI + LSTR MSG_LOCKSCREEN = _UxGT("Блокировать экран"); // ProUI + LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Принтер заблокирован,"); // ProUI + LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Крутить для разблокировки."); // ProUI + LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Ждите перезагрузки."); // ProUI + LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Нет носителя."); // ProUI + LSTR MSG_PLEASE_PREHEAT = _UxGT("Нагрейте сопло."); // ProUI + LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Сбросить счетчик"); // ProUI + LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Прочистить или продолжить?"); // ProUI + LSTR MSG_EXTRUDER_MIN_TEMP = _UxGT("Миню темп. экструдера."); // ProUI LSTR MSG_FANCHECK = _UxGT("Пров.тахометра кулера"); LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Уберите и кликните..."); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 97463290154a..e95271d72ffd 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -646,8 +646,6 @@ namespace LanguageNarrow_sk { LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Tlačiareň je uzamknutá,"); // ProUI LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("potiahnite pre odomknutie."); // ProUI LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Prosím čakajte do reštartu."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Žiadna karta"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Prosím zahrejte"); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Tlače"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Čas"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 3f925d04db9b..428ce643ad15 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -670,8 +670,6 @@ namespace LanguageNarrow_tr { LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Yazıcı Kilitlendi,"); // ProUI LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Açmak için kaydırın."); // ProUI LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Y.Başlatma bekleyin."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Medya Yok"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Ön Isıtma Lütfen"); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Süre"); @@ -896,9 +894,9 @@ namespace LanguageWide_tr { LSTR MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır"); LSTR MSG_TURN_OFF = _UxGT("Yazıcıyı kapat"); LSTR MSG_END_LOOPS = _UxGT("Tekrr Döngüler Bitir"); - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Ortam yerleştirilmedi."); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Lütfen önce hotend'i ısıtın."); // ProUI - LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Baskı Sayısını Sıfırla"); // ProUI + LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Ortam yerleştirilmedi."); // ProUI + LSTR MSG_PLEASE_PREHEAT = _UxGT("Lütfen önce hotend'i ısıtın."); // ProUI + LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Baskı Sayısını Sıfırla"); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı Sayısı"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Toplam Baskı Süresi"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun Baskı Süresi"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 5010aff70351..4b47abf25a27 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -548,8 +548,7 @@ namespace LanguageNarrow_uk { LSTR MSG_LOCKSCREEN = _UxGT("Блокувати екран"); // ProUI //MSG_LOCKSCREEN_LOCKED //MSG_LOCKSCREEN_UNLOCK - LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Перезавантаж..."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Немає носія"); // ProUI + LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Носій не вставлений"); // ProUI LSTR MSG_PLEASE_PREHEAT = _UxGT("Нагрійте хотенд"); // ProUI LSTR MSG_INFO_PRINT_COUNT = _UxGT("Друків"); @@ -759,7 +758,6 @@ namespace LanguageWide_uk { LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Вимк"); LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Увімк"); LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Час простою хотенду"); - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Носій не вставлений"); LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Перезавантаження..."); LSTR MSG_INFO_PRINT_COUNT = _UxGT("Кількість друків"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Час друку"); diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 616414a0277e..dcaa88201af6 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -778,7 +778,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/, const_float_t z_min_p // Stop the probe before it goes too low to prevent damage. // For known Z probe below the expected trigger point, otherwise -10mm lower. - const float z_probe_low_point = zoffs + z_min_point -float((!axis_is_trusted(Z_AXIS)) * 10); + const float z_probe_low_point = zoffs + z_min_point - float((!axis_is_trusted(Z_AXIS)) * 10); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe Low Point: ", z_probe_low_point); // Double-probing does a fast probe followed by a slow probe diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h index d1077cd5d0e0..58ac40c79741 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -238,7 +238,7 @@ #define BEEPER_PIN EXP1_01_PIN #endif -#elif ENABLED(DWIN_CREALITY_LCD) +#elif ENABLED(HAS_DWIN_E3V2) // DWIN ENCODER LCD #define BTN_ENC EXP1_05_PIN diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index 44d818b62400..a9f7115412c0 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -23,15 +23,22 @@ opt_disable DWIN_CREALITY_LCD PIDTEMP opt_enable DWIN_MARLINUI_LANDSCAPE LCD_ENDSTOP_TEST AUTO_BED_LEVELING_UBL BLTOUCH Z_SAFE_HOMING MPCTEMP MPC_AUTOTUNE exec_test $1 $2 "Ender-3 V2 - MarlinUI (UBL+BLTOUCH, MPCTEMP, LCD_ENDSTOP_TEST)" "$3" +use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" +opt_disable DWIN_CREALITY_LCD +opt_enable DWIN_LCD_PROUI +opt_add NO_AUTO_ASSIGN_WARNING +exec_test $1 $2 "Ender-3 V2 - ProUI (Default)" "$3" + use_example_configs "Creality/Ender-3 S1/STM32F1" opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CANCEL_OBJECTS FWRETRACT EVENT_GCODE_SD_ABORT opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU SET_PROGRESS_MANUALLY SET_PROGRESS_PERCENT STATUS_MESSAGE_SCROLLING \ SOUND_MENU_ITEM PRINTCOUNTER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_SENSOR \ - BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU LCD_BED_TRAMMING \ + BLTOUCH Z_SAFE_HOMING AUTO_BED_LEVELING_UBL MESH_EDIT_MENU LCD_BED_TRAMMING BED_TRAMMING_USE_PROBE BED_TRAMMING_INCLUDE_CENTER \ LIMITED_MAX_FR_EDITING LIMITED_MAX_ACCEL_EDITING LIMITED_JERK_EDITING BAUD_RATE_GCODE \ - CASE_LIGHT_ENABLE CASE_LIGHT_MENU CASE_LIGHT_NO_BRIGHTNESS -opt_set PREHEAT_3_LABEL '"CUSTOM"' PREHEAT_3_TEMP_HOTEND 240 PREHEAT_3_TEMP_BED 60 PREHEAT_3_FAN_SPEED 128 BOOTSCREEN_TIMEOUT 1100 CASE_LIGHT_PIN 4 -exec_test $1 $2 "Ender-3 S1 - ProUI (PIDTEMP)" "$3" + CASE_LIGHT_ENABLE CASE_LIGHT_MENU CASE_LIGHT_NO_BRIGHTNESS BABYSTEP_ZPROBE_OFFSET EMERGENCY_PARSER +opt_set PREHEAT_3_LABEL '"CUSTOM"' PREHEAT_3_TEMP_HOTEND 240 PREHEAT_3_TEMP_BED 60 PREHEAT_3_FAN_SPEED 128 BOOTSCREEN_TIMEOUT 1100 CASE_LIGHT_PIN 4 \ + LCD_BACKLIGHT_TIMEOUT_MINS 10 +exec_test $1 $2 "Ender-3 S1 - ProUI (UBL+PIDTEMP)" "$3" restore_configs opt_set MOTHERBOARD BOARD_CREALITY_V452 SERIAL_PORT 1 From 6dee114062c64a6f338dd35f0295beb2d351bef8 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Wed, 29 May 2024 03:32:26 -0400 Subject: [PATCH 18/35] revert ui_api.h --- Marlin/src/lcd/extui/ui_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 09c74256b9b0..7065e21f8f81 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -69,7 +69,7 @@ namespace ExtUI { enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 }; #if HAS_PID_HEATING - enum pidresult_t : uint8_t { PID_STARTED, PIDTEMPBED, PID_BED_STARTED, PIDTEMPCHAMBER, PID_CHAMBER_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; + enum pidresult_t : uint8_t { PID_STARTED, PID_BED_STARTED, PID_CHAMBER_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; #endif #if ENABLED(MPC_AUTOTUNE) enum mpcresult_t : uint8_t { MPC_STARTED, MPC_TEMP_ERROR, MPC_INTERRUPTED, MPC_DONE }; From 94df08238b036967abbb151d6345cdb6f61bd358 Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Wed, 29 May 2024 03:35:08 -0400 Subject: [PATCH 19/35] Update DGUSScreenHandler.cpp --- Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index 7155b90e815e..b8ca57aba8a8 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -315,9 +315,10 @@ void DGUSScreenHandler::filamentRunout(const ExtUI::extruder_t extruder) { #endif #if ENABLED(PIDTEMPCHAMBER) case ExtUI::PID_CHAMBER_STARTED: - setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); - break; #endif + setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); + break; + case ExtUI::PID_BAD_HEATER_ID: setStatusMessage(GET_TEXT_F(MSG_PID_BAD_HEATER_ID)); break; From 6e33ae48a7ada421e44ee7a33e12ba431c158ced Mon Sep 17 00:00:00 2001 From: Andrew <18502096+classicrocker883@users.noreply.github.com> Date: Wed, 29 May 2024 03:36:10 -0400 Subject: [PATCH 20/35] remove space DGUSScreenHandler.cpp --- Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index b8ca57aba8a8..c547c3cb100f 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -318,7 +318,6 @@ void DGUSScreenHandler::filamentRunout(const ExtUI::extruder_t extruder) { #endif setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; - case ExtUI::PID_BAD_HEATER_ID: setStatusMessage(GET_TEXT_F(MSG_PID_BAD_HEATER_ID)); break; From 62dab773b9dab2493d94a96c4c2a1fac08b8c4d3 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Wed, 29 May 2024 12:26:26 -0400 Subject: [PATCH 21/35] update PID tuning - revert some, update tests --- Marlin/src/MarlinCore.cpp | 2 ++ Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/lcd/e3v2/proui/dwin.h | 8 ++++---- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 12 +++--------- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 12 +++--------- .../lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp | 12 +++--------- Marlin/src/lcd/extui/example/example.cpp | 12 +++--------- .../lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 12 +++--------- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 12 +++--------- buildroot/tests/STM32F103RE_creality | 3 ++- 10 files changed, 27 insertions(+), 60 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 42c614ad5861..97dd5c5f98b7 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -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 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 8446a1acf05d..d33bcd96f95a 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2948,7 +2948,7 @@ /** * Bed Probe dependencies */ -#if ANY(MESH_BED_LEVELING, HAS_BED_PROBE) +#if ANY(BABYSTEPPING, PROBE_SELECTED) #ifndef PROBE_OFFSET_ZMIN #define PROBE_OFFSET_ZMIN -20 #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index c98bf749aa2c..f0ee998c2505 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -75,11 +75,10 @@ enum processID : uint8_t { #if ANY(HAS_PID_HEATING, MPC_AUTOTUNE) enum tempcontrol_t : uint8_t { - AUTOTUNE_DONE, #if HAS_PID_HEATING - OPTITEM(PIDTEMP, PIDTEMP_START) - OPTITEM(PIDTEMPBED, PIDTEMPBED_START) - OPTITEM(PIDTEMPCHAMBER, PIDTEMPCHAMBER_START) + PIDTEMP_START = 1, + PIDTEMPBED_START, + PIDTEMPCHAMBER_START, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, @@ -89,6 +88,7 @@ enum processID : uint8_t { MPC_TEMP_ERROR, MPC_INTERRUPTED, #endif + AUTOTUNE_DONE = 0 }; #endif diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index 532f1f0f8f33..4dc8d146232c 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -195,15 +195,9 @@ namespace ExtUI { void onPIDTuning(const pidresult_t rst) { // Called for temperature PID tuning result switch (rst) { - #if ENABLED(PIDTEMP) - case PID_STARTED: dwinPIDTuning(PIDTEMP_START); break; - #endif - #if ENABLED(PIDTEMPBED) - case PID_BED_STARTED: dwinPIDTuning(PIDTEMPBED_START); break; - #endif - #if ENABLED(PIDTEMPCHAMBER) - case PID_CHAMBER_STARTED: dwinPIDTuning(PIDTEMPCHAMBER_START); break; - #endif + case PID_STARTED: dwinPIDTuning(PIDTEMP_START); break; + case PID_BED_STARTED: dwinPIDTuning(PIDTEMPBED_START); break; + case PID_CHAMBER_STARTED: dwinPIDTuning(PIDTEMPCHAMBER_START); break; case PID_BAD_HEATER_ID: dwinPIDTuning(tempcontrol_t(PID_BAD_HEATER_ID)); break; case PID_TEMP_TOO_HIGH: dwinPIDTuning(tempcontrol_t(PID_TEMP_TOO_HIGH)); break; case PID_TUNING_TIMEOUT: dwinPIDTuning(tempcontrol_t(PID_TUNING_TIMEOUT)); break; diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 01e5dcdaa32f..adc78caf071b 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -176,15 +176,9 @@ namespace ExtUI { void onPIDTuning(const pidresult_t rst) { // Called for temperature PID tuning result switch (rst) { - #if ENABLED(PIDTEMP) - case PID_STARTED: - #endif - #if ENABLED(PIDTEMPBED) - case PID_BED_STARTED: - #endif - #if ENABLED(PIDTEMPCHAMBER) - case PID_CHAMBER_STARTED: - #endif + case PID_STARTED: + case PID_BED_STARTED: + case PID_CHAMBER_STARTED: screen.setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case PID_BAD_HEATER_ID: diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index c547c3cb100f..bb31a1d71ad7 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -307,15 +307,9 @@ void DGUSScreenHandler::filamentRunout(const ExtUI::extruder_t extruder) { void DGUSScreenHandler::pidTuning(const ExtUI::pidresult_t rst) { switch (rst) { - #if ENABLED(PIDTEMP) - case ExtUI::PID_STARTED: - #endif - #if ENABLED(PIDTEMPBED) - case ExtUI::PID_BED_STARTED: - #endif - #if ENABLED(PIDTEMPCHAMBER) - case ExtUI::PID_CHAMBER_STARTED: - #endif + case ExtUI::PID_STARTED: + case ExtUI::PID_BED_STARTED: + case ExtUI::PID_CHAMBER_STARTED: setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case ExtUI::PID_BAD_HEATER_ID: diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index f62bbf6dbdd4..05d47301490f 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -161,15 +161,9 @@ namespace ExtUI { void onPIDTuning(const pidresult_t rst) { // Called for temperature PID tuning result switch (rst) { - #if ENABLED(PIDTEMP) - case PID_STARTED: - #endif - #if ENABLED(PIDTEMPBED) - case PID_BED_STARTED: - #endif - #if ENABLED(PIDTEMPCHAMBER) - case PID_CHAMBER_STARTED: break; - #endif + case PID_STARTED: + case PID_BED_STARTED: + case PID_CHAMBER_STARTED: break; case PID_BAD_HEATER_ID: break; case PID_TEMP_TOO_HIGH: break; case PID_TUNING_TIMEOUT: break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp index f6d0da3a6725..93a83e21f8ab 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -179,15 +179,9 @@ namespace ExtUI { // Called for temperature PID tuning result //SERIAL_ECHOLNPGM("OnPIDTuning:", rst); switch (rst) { - #if ENABLED(PIDTEMP) - case PID_STARTED: - #endif - #if ENABLED(PIDTEMPBED) - case PID_BED_STARTED: - #endif - #if ENABLED(PIDTEMPCHAMBER) - case PID_CHAMBER_STARTED: - #endif + case PID_STARTED: + case PID_BED_STARTED: + case PID_CHAMBER_STARTED: StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case PID_BAD_HEATER_ID: diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index 3ad0c6169c41..3ed4678a4154 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -108,15 +108,9 @@ namespace ExtUI { // Called for temperature PID tuning result //SERIAL_ECHOLNPGM("OnPIDTuning:", rst); switch (rst) { - #if ENABLED(PIDTEMP) - case PID_STARTED: - #endif - #if ENABLED(PIDTEMPBED) - case PID_BED_STARTED: - #endif - #if ENABLED(PIDTEMPCHAMBER) - case PID_CHAMBER_STARTED: - #endif + case PID_STARTED: + case PID_BED_STARTED: + case PID_CHAMBER_STARTED: set_lcd_error(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case PID_BAD_HEATER_ID: diff --git a/buildroot/tests/STM32F103RE_creality b/buildroot/tests/STM32F103RE_creality index a9f7115412c0..1b6e4cec78c8 100755 --- a/buildroot/tests/STM32F103RE_creality +++ b/buildroot/tests/STM32F103RE_creality @@ -25,8 +25,9 @@ exec_test $1 $2 "Ender-3 V2 - MarlinUI (UBL+BLTOUCH, MPCTEMP, LCD_ENDSTOP_TEST)" use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI" opt_disable DWIN_CREALITY_LCD -opt_enable DWIN_LCD_PROUI +opt_enable DWIN_LCD_PROUI PID_EDIT_MENU PID_AUTOTUNE_MENU opt_add NO_AUTO_ASSIGN_WARNING +opt_set BOOTSCREEN_TIMEOUT 1100 exec_test $1 $2 "Ender-3 V2 - ProUI (Default)" "$3" use_example_configs "Creality/Ender-3 S1/STM32F1" From 1d6eea6881e7eadced216d3be78659f1c92980af Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 8 Jun 2024 05:30:24 -0400 Subject: [PATCH 22/35] update dwin.cpp drawMainArea() - MPC_STARTED --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 12ffcdac5b65..d8402f4e870b 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1232,7 +1232,7 @@ void drawMainArea() { #if ENABLED(PIDTEMP) case PIDTEMP_START: drawHPlot(); break; #elif ENABLED(MPCTEMP) - case MPCTEMP_START: drawHPlot(); break; + case MPC_STARTED: drawHPlot(); break; #endif #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: drawBPlot(); break; From 813e4575caa3ee7965923ee95f31f4823d895090 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 8 Jun 2024 05:35:01 -0400 Subject: [PATCH 23/35] update proui ExtUI onMPCTuning --- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index 4dc8d146232c..15aeb0b2483e 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -216,9 +216,9 @@ namespace ExtUI { void onMPCTuning(const mpcresult_t rst) { // Called for temperature MPC tuning result switch (rst) { - case MPC_STARTED: dwinMPCTuning(MPC_STARTED); break; - case MPC_TEMP_ERROR: dwinMPCTuning(MPC_TEMP_ERROR); break; - case MPC_INTERRUPTED: dwinMPCTuning(MPC_INTERRUPTED); break; + case MPC_STARTED: dwinMPCTuning(tempcontrol_t(MPC_STARTED)); break; + case MPC_TEMP_ERROR: dwinMPCTuning(tempcontrol_t(MPC_TEMP_ERROR)); break; + case MPC_INTERRUPTED: dwinMPCTuning(tempcontrol_t(MPC_INTERRUPTED)); break; case MPC_DONE: dwinMPCTuning(AUTOTUNE_DONE); break; } } From 9c5407d8efa8c17e50c93feb0c54ea97a5fb548b Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sun, 11 Aug 2024 06:56:05 -0400 Subject: [PATCH 24/35] revert ExtUI / EXTENSIBLE_UI --- Marlin/src/MarlinCore.cpp | 6 +-- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 1 + Marlin/src/feature/pause.cpp | 3 ++ Marlin/src/gcode/bedlevel/abl/G29.cpp | 23 ++++++++++-- Marlin/src/gcode/bedlevel/abl/M421.cpp | 3 ++ Marlin/src/gcode/bedlevel/mbl/G29.cpp | 3 ++ Marlin/src/gcode/bedlevel/ubl/M421.cpp | 3 ++ Marlin/src/gcode/calibrate/G28.cpp | 6 ++- Marlin/src/gcode/calibrate/M48.cpp | 7 +++- Marlin/src/gcode/config/M302.cpp | 3 ++ Marlin/src/gcode/control/M997.cpp | 3 ++ Marlin/src/gcode/feature/powerloss/M1000.cpp | 2 + Marlin/src/gcode/lcd/M0_M1.cpp | 10 +++-- Marlin/src/gcode/probe/G30.cpp | 2 +- Marlin/src/gcode/sd/M1001.cpp | 2 + Marlin/src/gcode/sd/M524.cpp | 8 +++- Marlin/src/gcode/temp/M303.cpp | 4 ++ Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 38 +++++++++++++++---- Marlin/src/lcd/e3v2/proui/dwin.h | 3 +- Marlin/src/lcd/e3v2/proui/dwin_popup.h | 1 - Marlin/src/lcd/marlinui.h | 4 +- Marlin/src/module/probe.cpp | 9 ++--- Marlin/src/module/settings.cpp | 39 +++++++++++++++++--- Marlin/src/module/stepper.cpp | 1 + Marlin/src/module/temperature.cpp | 22 ++++++++++- 27 files changed, 169 insertions(+), 41 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 90b7e671834a..c07a2cd349d0 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1598,13 +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()); - #elif ENABLED(DWIN_LCD_PROUI) - SETUP_RUN(ExtUI::onStartup()); #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 diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 4637bf87e828..4e43f2e601ab 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -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()); } } diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 74a4f236c0a9..90ca251f36c4 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -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" @@ -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) { diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 6ff09b3a7a23..3342d394d35b 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -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) @@ -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 @@ -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); @@ -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()); @@ -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 } @@ -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); @@ -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 @@ -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(); @@ -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); diff --git a/Marlin/src/gcode/bedlevel/abl/M421.cpp b/Marlin/src/gcode/bedlevel/abl/M421.cpp index f66d0231901e..1348f0bd5aba 100644 --- a/Marlin/src/gcode/bedlevel/abl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/abl/M421.cpp @@ -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 /** @@ -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])); } } diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 6d23de4f77b4..94642f1fdddc 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -141,6 +141,7 @@ void GcodeSuite::G29() { queue.inject(F("G29S2")); + TERN_(DWIN_LCD_PROUI, dwinLevelingStart()); TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart()); return; @@ -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); } @@ -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 diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index 99ba3ce19b46..b0781de11e24 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -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 /** @@ -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 } } diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 0ab1ca610578..55698c942bd4 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -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) @@ -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! @@ -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(); diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 910395e5617c..a7802626b085 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -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)) { @@ -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 diff --git a/Marlin/src/gcode/config/M302.cpp b/Marlin/src/gcode/config/M302.cpp index 0648f3edca50..dfe95cc4d4f8 100644 --- a/Marlin/src/gcode/config/M302.cpp +++ b/Marlin/src/gcode/config/M302.cpp @@ -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" @@ -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)); } diff --git a/Marlin/src/gcode/control/M997.cpp b/Marlin/src/gcode/control/M997.cpp index c651961902f4..f42e7093cb96 100644 --- a/Marlin/src/gcode/control/M997.cpp +++ b/Marlin/src/gcode/control/M997.cpp @@ -26,6 +26,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_LCD_PROUI) + #include "../../lcd/e3v2/proui/dwin.h" #endif /** @@ -33,6 +35,7 @@ */ void GcodeSuite::M997() { + TERN_(DWIN_LCD_PROUI, dwinRebootScreen()); TERN_(EXTENSIBLE_UI, ExtUI::onFirmwareFlash()); flashFirmware(parser.intval('S')); diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index c70bf7667ff8..7d4f43243ec7 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -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) diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index c600bd5da659..77c795eff76e 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -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) @@ -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 diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index e736a99ec809..874206032f84 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -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 diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index a00ca6122845..c49909646eaa 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -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) diff --git a/Marlin/src/gcode/sd/M524.cpp b/Marlin/src/gcode/sd/M524.cpp index 61185b7e0bed..80252062d6c0 100644 --- a/Marlin/src/gcode/sd/M524.cpp +++ b/Marlin/src/gcode/sd/M524.cpp @@ -29,6 +29,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_LCD_PROUI) + #include "../../lcd/marlinui.h" #endif /** @@ -36,7 +38,11 @@ */ 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 diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index 730ec65ba439..fcef87241895 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -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 /** @@ -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; } @@ -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)); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 573cfb0d3c75..e8b4ca4e3035 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -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 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c73260d75373..752c61087767 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3050,7 +3050,7 @@ * Advanced Pause - Filament Change */ #if ENABLED(ADVANCED_PAUSE_FEATURE) - #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI, DWIN_LCD_PROUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) #define M600_PURGE_MORE_RESUMABLE 1 // UI provides some way to Purge More / Resume #endif #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 396da85629af..63681429a6b1 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1044,7 +1044,7 @@ void hmiSDCardUpdate() { currentMenu = nullptr; drawPrintFileMenu(); } - if (!DWIN_lcd_sd_status && sdPrinting()) ExtUI::stopPrint(); // Media removed while printing + if (!DWIN_lcd_sd_status && sdPrinting()) ui.abort_print(); // Media removed while printing } } @@ -1168,8 +1168,8 @@ void hmiMainMenu() { // Pause or Stop popup void onClickPauseOrStop() { switch (select_print.now) { - case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ExtUI::pausePrint(); break; // Confirm pause - case PRINT_STOP: if (hmiFlag.select_flag) ExtUI::stopPrint(); break; // Stop confirmed then abort print + case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ui.pause_print(); break; // Confirm pause + case PRINT_STOP: if (hmiFlag.select_flag) ui.abort_print(); break; // Stop confirmed then abort print default: break; } return gotoPrintProcess(); @@ -1203,7 +1203,7 @@ void hmiPrinting() { case PRINT_SETUP: drawTuneMenu(); break; case PRINT_PAUSE_RESUME: if (printingIsPaused()) { // If printer is already in pause - ExtUI::resumePrint(); + ui.resume_print(); break; } else @@ -1551,9 +1551,12 @@ void dwinLevelingDone() { } #if HAS_MESH - void dwinMeshUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval) { + void dwinMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { + ui.set_status(TS("X:", p_float_t(xpos, 1), " Y:", p_float_t(ypos, 1), " Z:", p_float_t(zval, 3))); + } + void dwinPointUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval) { ui.set_status( - &MString<32>(GET_TEXT_F(MSG_PROBING_POINT), ' ', cpos, '/', tpos, F(" Z="), p_float_t(zval, 2)) + TS(GET_TEXT_F(MSG_PROBING_POINT), F(" "), cpos, F("/"), tpos, F(" Z="), p_float_t(zval, 2)) ); } #endif @@ -1865,7 +1868,7 @@ void dwinSetColorDefaults() { hmiData.colorCoordinate = defColorCoordinate; } -static_assert(ExtUI::eeprom_data_size >= sizeof(hmi_data_t), "Insufficient space in EEPROM for UI parameters"); +static_assert(EXTUI_EEPROM_DATA_SIZE >= sizeof(hmi_data_t), "Insufficient space in EEPROM for UI parameters"); void dwinSetDataDefaults() { dwinSetColorDefaults(); @@ -1964,6 +1967,27 @@ void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const) { dwinUpdateLCD(); } +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { + if (mode != PAUSE_MODE_SAME) pause_mode = mode; + switch (message) { + case PAUSE_MESSAGE_PARKING: dwinPopupPause(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break; // M125 + case PAUSE_MESSAGE_CHANGING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break; // pause_print (M125, M600) + case PAUSE_MESSAGE_WAITING: dwinPopupPause(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING), BTN_Continue); break; + case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break; + case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break; + case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702 + case PAUSE_MESSAGE_PURGE: dwinPopupPause(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break; + case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break; + case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break; + case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break; + case PAUSE_MESSAGE_HEATING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break; + case PAUSE_MESSAGE_STATUS: hmiReturnScreen(); break; // Exit from Pause, Load and Unload + default: break; + } + } +#endif + void dwinRebootScreen() { dwinFrameClear(COLOR_BG_BLACK); dwinJPGShowAndCache(0); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index f0ee998c2505..0b067166f9fc 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -279,7 +279,8 @@ void dwinCheckStatusMessage(); void dwinHomingStart(); void dwinHomingDone(); #if HAS_MESH - void dwinMeshUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval); + void dwinMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval); + void dwinPointUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval); #endif void dwinLevelingStart(); void dwinLevelingDone(); diff --git a/Marlin/src/lcd/e3v2/proui/dwin_popup.h b/Marlin/src/lcd/e3v2/proui/dwin_popup.h index b9efa6737fb7..7d6a5c81b369 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_popup.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_popup.h @@ -29,7 +29,6 @@ * Date: 2022/02/28 */ -#include "dwinui.h" #include "dwin.h" typedef void (*popupDrawFunc_t)(); diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 96484442feda..27d5c7342473 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -50,7 +50,7 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "e3v2/creality/dwin.h" #elif ENABLED(DWIN_LCD_PROUI) - #include "e3v2/proui/dwin.h" + #include "e3v2/proui/dwin_popup.h" #endif #if ALL(HAS_STATUS_MESSAGE, IS_DWIN_MARLINUI) @@ -765,7 +765,7 @@ class MarlinUI { static bool use_click() { return false; } #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) + #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder); #else static void _pause_show_message() {} diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index dcaa88201af6..f707713d7c85 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -96,6 +96,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_LCD_PROUI) + #include "../lcd/e3v2/proui/dwin_popup.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -374,11 +376,8 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #endif TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_fstr)); - #if ENABLED(DWIN_LCD_PROUI) - ExtUI::onUserConfirmRequired(ICON_BLTouch, ds_fstr, FPSTR(CONTINUE_STR)); - #elif ENABLED(EXTENSIBLE_UI) - ExtUI::onUserConfirmRequired(ds_fstr); - #endif + TERN_(DWIN_LCD_PROUI, dwinPopupContinue(ICON_BLTouch, ds_fstr, nullptr)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_fstr)); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index a553d56745ad..3b0ca7f11979 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -75,15 +75,13 @@ #include "../feature/z_stepper_align.h" #endif -#if ENABLED(DWIN_LCD_PROUI) - #include "../lcd/e3v2/proui/dwin.h" - #include "../lcd/e3v2/proui/bedlevel_tools.h" -#endif - #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "../lcd/e3v2/jyersui/dwin.h" +#elif ENABLED(DWIN_LCD_PROUI) + #include "../lcd/e3v2/proui/dwin.h" + #include "../lcd/e3v2/proui/bedlevel_tools.h" #endif #if ENABLED(HOST_PROMPT_SUPPORT) @@ -548,6 +546,8 @@ typedef struct SettingsDataStruct { // #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) uint8_t dwin_settings[jyersDWIN.eeprom_data_size]; + #elif ENABLED(DWIN_LCD_PROUI) + uint8_t dwin_data[EXTUI_EEPROM_DATA_SIZE]; #endif // @@ -1638,6 +1638,18 @@ void MarlinSettings::postprocess() { } #endif + // + // DWIN UI User Data + // + #if ENABLED(DWIN_LCD_PROUI) + { + _FIELD_TEST(dwin_data); + char dwin_data[EXTUI_EEPROM_DATA_SIZE] = { 0 }; + dwinCopySettingsTo(dwin_data); + EEPROM_WRITE(dwin_data); + } + #endif + // // Case Light Brightness // @@ -2736,6 +2748,18 @@ void MarlinSettings::postprocess() { } #endif + // + // DWIN ProUI User Data + // + #if ENABLED(DWIN_LCD_PROUI) + { + const char dwin_data[EXTUI_EEPROM_DATA_SIZE] = { 0 }; + _FIELD_TEST(dwin_data); + EEPROM_READ(dwin_data); + if (!validating) dwinCopySettingsFrom(dwin_data); + } + #endif + // // Case Light Brightness // @@ -3677,6 +3701,11 @@ void MarlinSettings::reset() { // TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings()); + // + // Ender-3 V2 with ProUI + // + TERN_(DWIN_LCD_PROUI, dwinSetDataDefaults()); + // // Model predictive control // diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index bc658e50da56..4c810b162154 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -575,6 +575,7 @@ void Stepper::enable_axis(const AxisEnum axis) { */ bool Stepper::disable_axis(const AxisEnum axis) { mark_axis_disabled(axis); + TERN_(DWIN_LCD_PROUI, set_axis_never_homed(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095 // This scheme prevents shared steppers being disabled. It should consider several axes at once // and keep a count of how many times each ENA pin has been set. diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index f617d8391a88..d8b2c370a21a 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -52,6 +52,8 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_LCD_PROUI) + #include "../lcd/e3v2/proui/dwin.h" #endif #if ENABLED(EXTENSIBLE_UI) @@ -721,6 +723,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_FAN_LOGIC, fan_update_ms = next_temp_ms + fan_update_interval_ms); + TERN_(DWIN_LCD_PROUI, dwinPIDTuning(TERN_(PIDTEMPCHAMBER, ischamber ? PIDTEMPCHAMBER_START :) TERN_(PIDTEMPBED, isbed ? PIDTEMPBED_START :) TERN(PIDTEMP, PIDTEMP_START, AUTOTUNE_DONE))); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED : isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED)); if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) { @@ -818,6 +821,7 @@ volatile bool Temperature::raw_temps_ready = false; #endif if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) { SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); + TERN_(DWIN_LCD_PROUI, dwinPIDTuning(PID_TEMP_TOO_HIGH)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TEMP_TOO_HIGH)); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH))); break; @@ -855,6 +859,7 @@ volatile bool Temperature::raw_temps_ready = false; #endif if ((ms - _MIN(t1, t2)) > MIN_TO_MS(PID_AUTOTUNE_MAX_CYCLE_MINS)) { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); + TERN_(DWIN_LCD_PROUI, dwinPIDTuning(PID_TUNING_TIMEOUT)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TUNING_TIMEOUT)); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TIMEOUT))); SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT); @@ -913,6 +918,7 @@ volatile bool Temperature::raw_temps_ready = false; EXIT_M303: TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPIDTuningDone(oldcolor)); + TERN_(DWIN_LCD_PROUI, dwinPIDTuning(AUTOTUNE_DONE)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_DONE)); TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true); return; @@ -1126,6 +1132,7 @@ volatile bool Temperature::raw_temps_ready = false; // Ensure we don't drift too far from the window between the last sampled temp and the target temperature if (!WITHIN(current_temp, get_sample_3_temp() - 15.0f, hotend.target + 15.0f)) { SERIAL_ECHOLNPGM(STR_MPC_TEMPERATURE_ERROR); + TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_TEMP_ERROR)); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_TEMP_ERROR)); wait_for_heatup = false; return FAILED; @@ -1164,6 +1171,7 @@ volatile bool Temperature::raw_temps_ready = false; if (!wait_for_heatup) { SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_INTERRUPTED); + TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_INTERRUPTED)); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_INTERRUPTED)); return MeasurementState::CANCELLED; } @@ -1192,7 +1200,12 @@ volatile bool Temperature::raw_temps_ready = false; // Determine ambient temperature. SERIAL_ECHOLNPGM(STR_MPC_COOLING_TO_AMBIENT); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_STARTED)); - TERN(DWIN_LCD_PROUI, LCD_ALERTMESSAGE(MSG_MPC_COOLING_TO_AMBIENT), LCD_MESSAGE(MSG_COOLING)); + #if ENABLED(DWIN_LCD_PROUI) + dwinMPCTuning(MPC_STARTED); + LCD_ALERTMESSAGE(MSG_MPC_COOLING_TO_AMBIENT); + #else + LCD_MESSAGE(MSG_COOLING); + #endif if (tuner.measure_ambient_temp() != MPC_autotuner::MeasurementState::SUCCESS) return; hotend.modeled_ambient_temp = tuner.get_ambient_temp(); @@ -1292,6 +1305,7 @@ volatile bool Temperature::raw_temps_ready = false; } SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_FINISHED); + TERN_(DWIN_LCD_PROUI, dwinMPCTuning(AUTOTUNE_DONE)); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_DONE)); SERIAL_ECHOLNPGM("MPC_BLOCK_HEAT_CAPACITY ", mpc.block_heat_capacity); @@ -1535,6 +1549,7 @@ void Temperature::_temp_error( void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) { #if HAS_HOTEND || HAS_HEATED_BED TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(1)); + TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 1);) TERN_(EXTENSIBLE_UI, ExtUI::onMaxTempError(heater_id)); #endif _TEMP_ERROR(heater_id, F(STR_T_MAXTEMP), MSG_ERR_MAXTEMP, deg); @@ -1543,6 +1558,7 @@ void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) { #if HAS_HOTEND || HAS_HEATED_BED TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); + TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 0);) TERN_(EXTENSIBLE_UI, ExtUI::onMinTempError(heater_id)); #endif _TEMP_ERROR(heater_id, F(STR_T_MINTEMP), MSG_ERR_MINTEMP, deg); @@ -1769,6 +1785,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T start_watching_hotend(e); // If temp reached, turn off elapsed check else { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); + TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(e, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(e)); _TEMP_ERROR(e, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, temp); } @@ -1800,6 +1817,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T start_watching_bed(); // If temp reached, turn off elapsed check else { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); + TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(H_BED, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(H_BED)); _TEMP_ERROR(H_BED, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, deg); } @@ -3253,6 +3271,7 @@ void Temperature::init() { case TRRunaway: TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); + TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id)); _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current); break; @@ -3260,6 +3279,7 @@ void Temperature::init() { #if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR) case TRMalfunction: TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); + TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id)); _TEMP_ERROR(heater_id, F(STR_T_THERMAL_MALFUNCTION), MSG_ERR_TEMP_MALFUNCTION, current); break; From cd9fb39941d43676250bac40bb30193ecfd77ebc Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 10 Oct 2024 00:57:59 -0400 Subject: [PATCH 25/35] revert some changes --- Marlin/src/feature/pause.cpp | 3 - Marlin/src/gcode/bedlevel/abl/G29.cpp | 8 +- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 11 +- Marlin/src/gcode/lcd/M0_M1.cpp | 4 +- Marlin/src/gcode/sd/M1001.cpp | 2 - Marlin/src/gcode/sd/M524.cpp | 8 +- Marlin/src/gcode/temp/M303.cpp | 2 - Marlin/src/lcd/e3v2/proui/dwin.cpp | 69 +++----- Marlin/src/lcd/e3v2/proui/dwin.h | 13 +- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 33 ++-- Marlin/src/lcd/marlinui.h | 2 +- Marlin/src/module/probe.cpp | 5 +- Marlin/src/module/settings.cpp | 193 ++++++++++------------ Marlin/src/module/stepper.cpp | 3 +- Marlin/src/module/temperature.cpp | 22 +-- 15 files changed, 151 insertions(+), 227 deletions(-) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 3c1e2a44d9c5..38ba0d66df9b 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -62,8 +62,6 @@ #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" @@ -533,7 +531,6 @@ 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) { diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 1e3920915cfa..687cb2adc972 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -51,9 +51,6 @@ #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) @@ -84,7 +81,7 @@ static void pre_g29_return(const bool retry, const bool did) { } #if DISABLED(G29_RETRY_AND_RECOVER) if (!retry || did) { - TERN_(HAS_DWIN_E3V2_BASIC, dwinLevelingDone()); + TERN_(DWIN_CREALITY_LCD, dwinLevelingDone()); TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone()); } #endif @@ -434,10 +431,9 @@ 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_(DWIN_LCD_PROUI, dwinLevelingStart()); TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart()); if (!faux) { diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 94642f1fdddc..44d52ee7db44 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -84,8 +84,7 @@ void GcodeSuite::G29() { TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); - int8_t ix, iy; - ix = iy = 0; + int8_t ix = 0, iy = 0; switch (state) { case MeshReport: @@ -167,8 +166,11 @@ 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)); + #if ENABLED(DWIN_LCD_PROUI) + dwinPointUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z); + #else if ENABLED(EXTENSIBLE_UI) + ExtUI::onMeshUpdate(ix, iy, current_position.z); + #endif SET_SOFT_ENDSTOP_LOOSE(false); } // If there's another point to sample, move there with optional lift. @@ -234,7 +236,6 @@ 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 diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 77c795eff76e..373053b5d4ff 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -35,8 +35,6 @@ #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) @@ -65,7 +63,7 @@ void GcodeSuite::M0_M1() { #endif } - #elif ENABLED(DWIN_LCD_PROUI) + #elif ENABLED(DWIN_LCD_PROUI) // ProUI with icon, string, button title if (parser.string_arg) dwinPopupContinue(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT)); diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index c49909646eaa..a00ca6122845 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -49,8 +49,6 @@ #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) diff --git a/Marlin/src/gcode/sd/M524.cpp b/Marlin/src/gcode/sd/M524.cpp index 80252062d6c0..61185b7e0bed 100644 --- a/Marlin/src/gcode/sd/M524.cpp +++ b/Marlin/src/gcode/sd/M524.cpp @@ -29,8 +29,6 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../../lcd/marlinui.h" #endif /** @@ -38,11 +36,7 @@ */ void GcodeSuite::M524() { - #if ENABLED(DWIN_LCD_PROUI) - - ui.abort_print(); - - #elif ENABLED(EXTENSIBLE_UI) + #if ENABLED(EXTENSIBLE_UI) ExtUI::stopPrint(); // Calls ui.abort_print() which does the same as below diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index fcef87241895..e56a4eab3af1 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -31,8 +31,6 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../../lcd/e3v2/proui/dwin.h" #endif /** diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 2b0aa7e024c7..b6cf3c983428 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1044,7 +1044,7 @@ void hmiSDCardUpdate() { currentMenu = nullptr; drawPrintFileMenu(); } - if (!DWIN_lcd_sd_status && sdPrinting()) ui.abort_print(); // Media removed while printing + if (!DWIN_lcd_sd_status && sdPrinting()) ExtUI::stopPrint(); // Media removed while printing } } @@ -1168,8 +1168,8 @@ void hmiMainMenu() { // Pause or Stop popup void onClickPauseOrStop() { switch (select_print.now) { - case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ui.pause_print(); break; // Confirm pause - case PRINT_STOP: if (hmiFlag.select_flag) ui.abort_print(); break; // Stop confirmed then abort print + case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ExtUI::pausePrint(); break; // Confirm pause + case PRINT_STOP: if (hmiFlag.select_flag) ExtUI::stopPrint(); break; // Stop confirmed then abort print default: break; } return gotoPrintProcess(); @@ -1203,7 +1203,7 @@ void hmiPrinting() { case PRINT_SETUP: drawTuneMenu(); break; case PRINT_PAUSE_RESUME: if (printingIsPaused()) { // If printer is already in pause - ui.resume_print(); + ExtUI::resumePrint(); break; } else @@ -1230,17 +1230,17 @@ void drawMainArea() { case ID_PlotProcess: switch (hmiValue.tempControl) { #if ENABLED(PIDTEMP) - case PIDTEMP_START: drawHPlot(); break; + case PIDTEMP_START: drawHotendPlot(); break; #elif ENABLED(MPCTEMP) - case MPC_STARTED: drawHPlot(); break; + case MPC_STARTED: drawHotendPlot(); break; #endif #if ENABLED(PIDTEMPBED) - case PIDTEMPBED_START: drawBPlot(); break; + case PIDTEMPBED_START: drawBedPlot(); break; #endif #if ENABLED(PIDTEMPCHAMBER) - case PIDTEMPCHAMBER_START: drawCPlot(); break; + case PIDTEMPCHAMBER_START: drawChamberPlot(); break; #endif - default: break; + default: break; } break; #endif case ID_Popup: popupDraw(); break; @@ -1554,11 +1554,13 @@ void dwinLevelingDone() { void dwinMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { ui.set_status(TS("X:", p_float_t(xpos, 1), " Y:", p_float_t(ypos, 1), " Z:", p_float_t(zval, 3))); } - void dwinPointUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval) { - ui.set_status( - TS(GET_TEXT_F(MSG_PROBING_POINT), F(" "), cpos, F("/"), tpos, F(" Z="), p_float_t(zval, 2)) - ); - } + #if ENABLED(MESH_BED_LEVELING) + void dwinPointUpdate(const int8_t cpos, const int8_t tpos, const_float_t zval) { + ui.set_status( + TS(GET_TEXT_F(MSG_PROBING_POINT), F(" "), cpos, F("/"), tpos, F(" Z="), p_float_t(zval, 2)) + ); + } + #endif #endif // PID/MPC process @@ -1663,14 +1665,14 @@ void dwinLevelingDone() { DWINUI::drawButton(BTN_Continue, 86, 305); } - void drawHPlot() { + void drawHotendPlot() { TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START)); TERN_(MPCTEMP, dwinDrawPlot(MPC_STARTED)); } - void drawBPlot() { + void drawBedPlot() { TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START)); } - void drawCPlot() { + void drawChamberPlot() { TERN_(PIDTEMPCHAMBER, dwinDrawPlot(PIDTEMPCHAMBER_START)); } @@ -1967,27 +1969,6 @@ void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const) { dwinUpdateLCD(); } -#if ENABLED(ADVANCED_PAUSE_FEATURE) - void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { - if (mode != PAUSE_MODE_SAME) pause_mode = mode; - switch (message) { - case PAUSE_MESSAGE_PARKING: dwinPopupPause(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break; // M125 - case PAUSE_MESSAGE_CHANGING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break; // pause_print (M125, M600) - case PAUSE_MESSAGE_WAITING: dwinPopupPause(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING), BTN_Continue); break; - case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break; - case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break; - case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702 - case PAUSE_MESSAGE_PURGE: dwinPopupPause(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break; - case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break; - case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break; - case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break; - case PAUSE_MESSAGE_HEATING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break; - case PAUSE_MESSAGE_STATUS: hmiReturnScreen(); break; // Exit from Pause, Load and Unload - default: break; - } - } -#endif - void dwinRebootScreen() { dwinFrameClear(COLOR_BG_BLACK); dwinJPGShowAndCache(0); @@ -3134,10 +3115,10 @@ void drawPrepareMenu() { MENU_ITEM(ICON_Cool, MSG_COOLDOWN, onDrawCooldown, doCoolDown); #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) #if ANY(PIDTEMP, MPCTEMP) - MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHotendPlot); #endif - TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot)); - TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawCPlot)); + TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBedPlot)); + TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawChamberPlot)); #endif MENU_ITEM(ICON_Language, MSG_UI_LANGUAGE, onDrawLanguage, setLanguage); } @@ -3468,10 +3449,10 @@ void drawTuneMenu() { #endif #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) #if ANY(PIDTEMP, MPCTEMP) - MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHotendPlot); #endif - TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot)); - TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawCPlot)); + TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBedPlot)); + TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawChamberPlot)); #endif #if ENABLED(CASE_LIGHT_MENU) EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 0b067166f9fc..d8ab111b8d9f 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -276,6 +276,7 @@ void updateVariable(); void dwinInitScreen(); void dwinHandleScreen(); void dwinCheckStatusMessage(); +void dwinDrawStatusMessage(); void dwinHomingStart(); void dwinHomingDone(); #if HAS_MESH @@ -317,9 +318,15 @@ void dwinRebootScreen(); #endif #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) void dwinDrawPlot(tempcontrol_t result); - void drawHPlot(); - void drawBPlot(); - void drawCPlot(); + #if ENABLED(PIDTEMP) + void drawHotendPlot(); + #endif + #if ENABLED(PIDTEMPBED) + void drawBedPlot(); + #endif + #if ENABLED(PIDTEMPCHAMBER) + void drawChamberPlot(); + #endif #endif // Menu drawing functions diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index 84719ab223d6..a61a25c29bd5 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -43,7 +43,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(DWIN_LCD_PROUI) +#if ALL(DWIN_LCD_PROUI, EXTENSIBLE_UI) #include "dwin_popup.h" @@ -59,9 +59,7 @@ #endif namespace ExtUI { - void onStartup() { dwinInitScreen(); } - void onIdle() {} void onPrinterKilled(FSTR_P const error, FSTR_P const component) {} @@ -80,6 +78,7 @@ namespace ExtUI { } void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} + void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} @@ -93,9 +92,8 @@ namespace ExtUI { void onUserConfirmRequired(const char * const cstr) { // TODO: A version of this method that takes an icon and button title, // or implement some kind of ExtUI enum. - dwinPopupContinue(ICON_Continue_1, cstr, GET_TEXT_F(MSG_USERWAIT)); + dwinPopupConfirm(ICON_Continue_1, cstr, GET_TEXT_F(MSG_USERWAIT)); } - // For fancy LCDs include an icon ID, message, and translated button title void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) { dwinPopupConfirm(icon, cstr, fBtn); @@ -104,8 +102,6 @@ namespace ExtUI { dwinPopupConfirm(icon, fstr, fBtn); } - void onStatusChanged(const char * const) { dwinCheckStatusMessage(); } - #if ENABLED(ADVANCED_PAUSE_FEATURE) void onPauseMode(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { if (mode != PAUSE_MODE_SAME) pause_mode = mode; @@ -127,6 +123,12 @@ namespace ExtUI { } #endif + void onStatusChanged(const char * const msg) { + UNUSED(msg); + dwinCheckStatusMessage(); + dwinDrawStatusMessage(); + } + void onHomingStart() { dwinHomingStart(); } void onHomingDone() { dwinHomingDone(); } @@ -147,11 +149,13 @@ namespace ExtUI { void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. + DONE_BUZZ(success); } void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. + DONE_BUZZ(success); } #if HAS_LEVELING @@ -164,11 +168,8 @@ namespace ExtUI { #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { - const int16_t idx = ypos * (GRID_MAX_POINTS_X) + xpos; - dwinMeshUpdate(_MIN(idx, GRID_MAX_POINTS), int(GRID_MAX_POINTS), zval); - dwinRedrawScreen(); + dwinMeshUpdate(xpos, ypos, zval); } - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { // Called to indicate a special condition } @@ -179,7 +180,7 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) - void onSetPowerLoss(const bool onoff) { + void onSetPowerLoss(const bool) { // Called when power-loss is enabled/disabled } void onPowerLoss() { @@ -209,14 +210,11 @@ namespace ExtUI { case PID_TEMP_TOO_HIGH: dwinPIDTuning(tempcontrol_t(PID_TEMP_TOO_HIGH)); break; case PID_TUNING_TIMEOUT: dwinPIDTuning(tempcontrol_t(PID_TUNING_TIMEOUT)); break; case PID_DONE: dwinPIDTuning(AUTOTUNE_DONE); break; - } } - void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) { dwinStartM303(count, hid, temp); } - #endif #if ENABLED(MPC_AUTOTUNE) @@ -238,10 +236,9 @@ namespace ExtUI { void onSteppersDisabled() {} void onSteppersEnabled() {} void onAxisDisabled(const axis_t axis) { - set_axis_untrusted(AxisEnum(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095 + set_axis_never_homed(AxisEnum(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095 } void onAxisEnabled(const axis_t) {} - } // ExtUI -#endif // DWIN_LCD_PROUI +#endif // DWIN_LCD_PROUI && EXTENSIBLE_UI diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 27d5c7342473..0c472a8c4c21 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -765,7 +765,7 @@ class MarlinUI { static bool use_click() { return false; } #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) + #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder); #else static void _pause_show_message() {} diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 089f9a731c98..cc34badad6da 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -96,8 +96,6 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../lcd/e3v2/proui/dwin_popup.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -376,7 +374,6 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #endif TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_fstr)); - TERN_(DWIN_LCD_PROUI, dwinPopupContinue(ICON_BLTouch, ds_fstr, nullptr)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_fstr)); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); @@ -779,7 +776,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/, const_float_t z_min_p // Stop the probe before it goes too low to prevent damage. // For known Z probe below the expected trigger point, otherwise -10mm lower. - const float z_probe_low_point = zoffs + z_min_point - float((!axis_is_trusted(Z_AXIS)) * 10); + const float z_probe_low_point = zoffs + z_min_point -float((!axis_is_trusted(Z_AXIS)) * 10); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe Low Point: ", z_probe_low_point); // Double-probing does a fast probe followed by a slow probe diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 5c6e66c10164..61ad4fc05551 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -79,8 +79,9 @@ #include "../lcd/extui/ui_api.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "../lcd/e3v2/jyersui/dwin.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../lcd/e3v2/proui/dwin.h" +#endif + +#if ALL(DWIN_LCD_PROUI, AUTO_BED_LEVELING_UBL) #include "../lcd/e3v2/proui/bedlevel_tools.h" #endif @@ -552,8 +553,6 @@ typedef struct SettingsDataStruct { // #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) uint8_t dwin_settings[jyersDWIN.eeprom_data_size]; - #elif ENABLED(DWIN_LCD_PROUI) - uint8_t dwin_data[EXTUI_EEPROM_DATA_SIZE]; #endif // @@ -1645,25 +1644,13 @@ void MarlinSettings::postprocess() { // #if ENABLED(EXTENSIBLE_UI) { + _FIELD_TEST(extui_data); char extui_data[ExtUI::eeprom_data_size] = { 0 }; ExtUI::onStoreSettings(extui_data); - _FIELD_TEST(extui_data); EEPROM_WRITE(extui_data); } #endif - // - // JyersUI DWIN User Data - // - #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) - { - _FIELD_TEST(dwin_settings); - char dwin_settings[jyersDWIN.eeprom_data_size] = { 0 }; - jyersDWIN.saveSettings(dwin_settings); - EEPROM_WRITE(dwin_settings); - } - #endif - // // DWIN UI User Data // @@ -1676,6 +1663,18 @@ void MarlinSettings::postprocess() { } #endif + // + // JyersUI DWIN User Data + // + #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + { + _FIELD_TEST(dwin_settings); + char dwin_settings[jyersDWIN.eeprom_data_size] = { 0 }; + jyersDWIN.saveSettings(dwin_settings); + EEPROM_WRITE(dwin_settings); + } + #endif + // // Case Light Brightness // @@ -2779,6 +2778,18 @@ void MarlinSettings::postprocess() { } #endif + // + // DWIN ProUI User Data + // + #if ENABLED(DWIN_LCD_PROUI) + { + const char dwin_data[EXTUI_EEPROM_DATA_SIZE] = { 0 }; + _FIELD_TEST(dwin_data); + EEPROM_READ(dwin_data); + if (!validating) dwinCopySettingsFrom(dwin_data); + } + #endif + // // JyersUI User Data // @@ -2791,18 +2802,6 @@ void MarlinSettings::postprocess() { } #endif - // - // DWIN ProUI User Data - // - #if ENABLED(DWIN_LCD_PROUI) - { - const char dwin_data[EXTUI_EEPROM_DATA_SIZE] = { 0 }; - _FIELD_TEST(dwin_data); - EEPROM_READ(dwin_data); - if (!validating) dwinCopySettingsFrom(dwin_data); - } - #endif - // // Case Light Brightness // @@ -3145,95 +3144,82 @@ void MarlinSettings::postprocess() { void MarlinSettings::store_mesh(const int8_t slot) { - #if ENABLED(AUTO_BED_LEVELING_UBL) - const int16_t a = calc_num_meshes(); - if (!WITHIN(slot, 0, a - 1)) { - ubl_invalid_slot(a); - DEBUG_ECHOLNPGM("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot); - DEBUG_EOL(); - return; - } - - int pos = mesh_slot_offset(slot); - uint16_t crc = 0; - - #if ENABLED(OPTIMIZED_MESH_STORAGE) - int16_t z_mesh_store[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; - bedlevel.set_store_from_mesh(bedlevel.z_values, z_mesh_store); - uint8_t * const src = (uint8_t*)&z_mesh_store; - #else - uint8_t * const src = (uint8_t*)&bedlevel.z_values; - #endif - - // Write crc to MAT along with other data, or just tack on to the beginning or end - persistentStore.access_start(); - const bool status = persistentStore.write_data(pos, src, MESH_STORE_SIZE, &crc); - persistentStore.access_finish(); + const int16_t a = calc_num_meshes(); + if (!WITHIN(slot, 0, a - 1)) { + ubl_invalid_slot(a); + DEBUG_ECHOLNPGM("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot); + DEBUG_EOL(); + return; + } - if (status) SERIAL_ECHOLNPGM("?Unable to save mesh data."); - else DEBUG_ECHOLNPGM("Mesh saved in slot ", slot); + int pos = mesh_slot_offset(slot); + uint16_t crc = 0; + #if ENABLED(OPTIMIZED_MESH_STORAGE) + int16_t z_mesh_store[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + bedlevel.set_store_from_mesh(bedlevel.z_values, z_mesh_store); + uint8_t * const src = (uint8_t*)&z_mesh_store; #else + uint8_t * const src = (uint8_t*)&bedlevel.z_values; + #endif - // Other mesh types + // Write crc to MAT along with other data, or just tack on to the beginning or end + persistentStore.access_start(); + const bool status = persistentStore.write_data(pos, src, MESH_STORE_SIZE, &crc); + persistentStore.access_finish(); + + if (status) SERIAL_ECHOLNPGM("?Unable to save mesh data."); + else DEBUG_ECHOLNPGM("Mesh saved in slot ", slot); - #endif } void MarlinSettings::load_mesh(const int8_t slot, void * const into/*=nullptr*/) { - #if ENABLED(AUTO_BED_LEVELING_UBL) - - const int16_t a = settings.calc_num_meshes(); + const int16_t a = settings.calc_num_meshes(); - if (!WITHIN(slot, 0, a - 1)) { - ubl_invalid_slot(a); - return; - } - - int pos = mesh_slot_offset(slot); - uint16_t crc = 0; - #if ENABLED(OPTIMIZED_MESH_STORAGE) - int16_t z_mesh_store[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; - uint8_t * const dest = (uint8_t*)&z_mesh_store; - #else - uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&bedlevel.z_values; - #endif - - persistentStore.access_start(); - uint16_t status = persistentStore.read_data(pos, dest, MESH_STORE_SIZE, &crc); - persistentStore.access_finish(); + if (!WITHIN(slot, 0, a - 1)) { + ubl_invalid_slot(a); + return; + } - #if ENABLED(OPTIMIZED_MESH_STORAGE) - if (into) { - float z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; - bedlevel.set_mesh_from_store(z_mesh_store, z_values); - memcpy(into, z_values, sizeof(z_values)); - } - else - bedlevel.set_mesh_from_store(z_mesh_store, bedlevel.z_values); - #endif + int pos = mesh_slot_offset(slot); + uint16_t crc = 0; + #if ENABLED(OPTIMIZED_MESH_STORAGE) + int16_t z_mesh_store[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + uint8_t * const dest = (uint8_t*)&z_mesh_store; + #else + uint8_t * const dest = into ? (uint8_t*)into : (uint8_t*)&bedlevel.z_values; + #endif - #if ENABLED(DWIN_LCD_PROUI) - status = !bedLevelTools.meshValidate(); - if (status) { - bedlevel.invalidate(); - LCD_MESSAGE(MSG_UBL_MESH_INVALID); - } - else - ui.status_printf(0, GET_TEXT_F(MSG_MESH_LOADED), bedlevel.storage_slot); - #endif + persistentStore.access_start(); + uint16_t status = persistentStore.read_data(pos, dest, MESH_STORE_SIZE, &crc); + persistentStore.access_finish(); - if (status) SERIAL_ECHOLNPGM("?Unable to load mesh data."); - else DEBUG_ECHOLNPGM("Mesh loaded from slot ", slot); + #if ENABLED(OPTIMIZED_MESH_STORAGE) + if (into) { + float z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + bedlevel.set_mesh_from_store(z_mesh_store, z_values); + memcpy(into, z_values, sizeof(z_values)); + } + else + bedlevel.set_mesh_from_store(z_mesh_store, bedlevel.z_values); + #endif - EEPROM_FINISH(); + #if ENABLED(DWIN_LCD_PROUI) + status = !bedLevelTools.meshValidate(); + if (status) { + bedlevel.invalidate(); + LCD_MESSAGE(MSG_UBL_MESH_INVALID); + } + else + ui.status_printf(0, GET_TEXT_F(MSG_MESH_LOADED), bedlevel.storage_slot); + #endif - #else + if (status) SERIAL_ECHOLNPGM("?Unable to load mesh data."); + else DEBUG_ECHOLNPGM("Mesh loaded from slot ", slot); - // Other mesh types + EEPROM_FINISH(); - #endif } //void MarlinSettings::delete_mesh() { return; } @@ -3779,11 +3765,6 @@ void MarlinSettings::reset() { // TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings()); - // - // Ender-3 V2 with ProUI - // - TERN_(DWIN_LCD_PROUI, dwinSetDataDefaults()); - // // Model predictive control // diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 92dcef025f93..6c4f6bef88a1 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -575,7 +575,7 @@ void Stepper::enable_axis(const AxisEnum axis) { */ bool Stepper::disable_axis(const AxisEnum axis) { mark_axis_disabled(axis); - TERN_(DWIN_LCD_PROUI, set_axis_never_homed(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095 + TERN_(EXTENSIBLE_UI, ExtUI::onAxisDisabled(ExtUI::axis_to_axis_t(axis))); // This scheme prevents shared steppers being disabled. It should consider several axes at once // and keep a count of how many times each ENA pin has been set. @@ -589,7 +589,6 @@ bool Stepper::disable_axis(const AxisEnum axis) { MAIN_AXIS_MAP(_CASE_DISABLE) default: break; } - TERN_(EXTENSIBLE_UI, ExtUI::onAxisDisabled(ExtUI::axis_to_axis_t(axis))); } return can_disable; diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 81dd64ba0cc3..5c11df2c6a27 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -52,8 +52,6 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "../lcd/e3v2/creality/dwin.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../lcd/e3v2/proui/dwin.h" #endif #if ENABLED(EXTENSIBLE_UI) @@ -769,7 +767,6 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_FAN_LOGIC, fan_update_ms = next_temp_ms + fan_update_interval_ms); - TERN_(DWIN_LCD_PROUI, dwinPIDTuning(TERN_(PIDTEMPCHAMBER, ischamber ? PIDTEMPCHAMBER_START :) TERN_(PIDTEMPBED, isbed ? PIDTEMPBED_START :) TERN(PIDTEMP, PIDTEMP_START, AUTOTUNE_DONE))); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED : isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED)); if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) { @@ -867,7 +864,6 @@ volatile bool Temperature::raw_temps_ready = false; #endif if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) { SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); - TERN_(DWIN_LCD_PROUI, dwinPIDTuning(PID_TEMP_TOO_HIGH)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TEMP_TOO_HIGH)); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH))); break; @@ -905,7 +901,6 @@ volatile bool Temperature::raw_temps_ready = false; #endif if ((ms - _MIN(t1, t2)) > MIN_TO_MS(PID_AUTOTUNE_MAX_CYCLE_MINS)) { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); - TERN_(DWIN_LCD_PROUI, dwinPIDTuning(PID_TUNING_TIMEOUT)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TUNING_TIMEOUT)); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TIMEOUT))); SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT); @@ -964,7 +959,6 @@ volatile bool Temperature::raw_temps_ready = false; EXIT_M303: TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPIDTuningDone(oldcolor)); - TERN_(DWIN_LCD_PROUI, dwinPIDTuning(AUTOTUNE_DONE)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_DONE)); TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true); return; @@ -1178,7 +1172,6 @@ volatile bool Temperature::raw_temps_ready = false; // Ensure we don't drift too far from the window between the last sampled temp and the target temperature if (!WITHIN(current_temp, get_sample_3_temp() - 15.0f, hotend.target + 15.0f)) { SERIAL_ECHOLNPGM(STR_MPC_TEMPERATURE_ERROR); - TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_TEMP_ERROR)); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_TEMP_ERROR)); wait_for_heatup = false; return FAILED; @@ -1217,7 +1210,6 @@ volatile bool Temperature::raw_temps_ready = false; if (!wait_for_heatup) { SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_INTERRUPTED); - TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_INTERRUPTED)); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_INTERRUPTED)); return MeasurementState::CANCELLED; } @@ -1246,12 +1238,7 @@ volatile bool Temperature::raw_temps_ready = false; // Determine ambient temperature. SERIAL_ECHOLNPGM(STR_MPC_COOLING_TO_AMBIENT); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_STARTED)); - #if ENABLED(DWIN_LCD_PROUI) - dwinMPCTuning(MPC_STARTED); - LCD_ALERTMESSAGE(MSG_MPC_COOLING_TO_AMBIENT); - #else - LCD_MESSAGE(MSG_COOLING); - #endif + TERN(DWIN_LCD_PROUI, LCD_ALERTMESSAGE(MSG_MPC_COOLING_TO_AMBIENT), LCD_MESSAGE(MSG_COOLING)); if (tuner.measure_ambient_temp() != MPC_autotuner::MeasurementState::SUCCESS) return; hotend.modeled_ambient_temp = tuner.get_ambient_temp(); @@ -1351,7 +1338,6 @@ volatile bool Temperature::raw_temps_ready = false; } SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_FINISHED); - TERN_(DWIN_LCD_PROUI, dwinMPCTuning(AUTOTUNE_DONE)); TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_DONE)); SERIAL_ECHOLNPGM("MPC_BLOCK_HEAT_CAPACITY ", mpc.block_heat_capacity); @@ -1595,7 +1581,6 @@ void Temperature::_temp_error( void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) { #if HAS_HOTEND || HAS_HEATED_BED TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(1)); - TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 1);) TERN_(EXTENSIBLE_UI, ExtUI::onMaxTempError(heater_id)); #endif _TEMP_ERROR(heater_id, F(STR_T_MAXTEMP), MSG_ERR_MAXTEMP, deg); @@ -1604,7 +1589,6 @@ void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) { #if HAS_HOTEND || HAS_HEATED_BED TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); - TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 0);) TERN_(EXTENSIBLE_UI, ExtUI::onMinTempError(heater_id)); #endif _TEMP_ERROR(heater_id, F(STR_T_MINTEMP), MSG_ERR_MINTEMP, deg); @@ -1831,7 +1815,6 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T start_watching_hotend(e); // If temp reached, turn off elapsed check else { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); - TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(e, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(e)); _TEMP_ERROR(e, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, temp); } @@ -1863,7 +1846,6 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T start_watching_bed(); // If temp reached, turn off elapsed check else { TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); - TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(H_BED, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(H_BED)); _TEMP_ERROR(H_BED, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, deg); } @@ -3317,7 +3299,6 @@ void Temperature::init() { case TRRunaway: TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); - TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id)); _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current); break; @@ -3325,7 +3306,6 @@ void Temperature::init() { #if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR) case TRMalfunction: TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); - TERN_(DWIN_LCD_PROUI, dwinPopupTemperature(heater_id, 0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id)); _TEMP_ERROR(heater_id, F(STR_T_THERMAL_MALFUNCTION), MSG_ERR_TEMP_MALFUNCTION, current); break; From 303a45b71d87d510544ef83f6ef4fc23dfc350aa Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 10 Oct 2024 01:19:07 -0400 Subject: [PATCH 26/35] revert more changes --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 1 - Marlin/src/gcode/bedlevel/abl/M421.cpp | 1 - Marlin/src/gcode/bedlevel/mbl/G29.cpp | 1 - Marlin/src/gcode/bedlevel/ubl/M421.cpp | 1 - Marlin/src/gcode/calibrate/G28.cpp | 2 +- Marlin/src/gcode/config/M302.cpp | 1 - Marlin/src/gcode/control/M997.cpp | 1 - Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/temp/M303.cpp | 2 -- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 8 ++++++++ 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 3f59147e8d77..362a994faa5b 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -787,7 +787,6 @@ 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)); #if ENABLED(SOVOL_SV06_RTS) diff --git a/Marlin/src/gcode/bedlevel/abl/M421.cpp b/Marlin/src/gcode/bedlevel/abl/M421.cpp index 1348f0bd5aba..216ff9f74b04 100644 --- a/Marlin/src/gcode/bedlevel/abl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/abl/M421.cpp @@ -61,7 +61,6 @@ 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])); } } diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 44d52ee7db44..5d438dcee068 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -140,7 +140,6 @@ void GcodeSuite::G29() { queue.inject(F("G29S2")); - TERN_(DWIN_LCD_PROUI, dwinLevelingStart()); TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart()); return; diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index b0781de11e24..cdf43f71ed9a 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -68,7 +68,6 @@ 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 } } diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 4fb62e487f98..ac90756ded8d 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -249,7 +249,7 @@ void GcodeSuite::G28() { set_and_report_grblstate(M_HOMING); #endif - TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingStart()); + TERN_(DWIN_CREALITY_LCD, dwinHomingStart()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart()); planner.synchronize(); // Wait for planner moves to finish! diff --git a/Marlin/src/gcode/config/M302.cpp b/Marlin/src/gcode/config/M302.cpp index dfe95cc4d4f8..d4a42e21e87d 100644 --- a/Marlin/src/gcode/config/M302.cpp +++ b/Marlin/src/gcode/config/M302.cpp @@ -53,7 +53,6 @@ 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)); } diff --git a/Marlin/src/gcode/control/M997.cpp b/Marlin/src/gcode/control/M997.cpp index f42e7093cb96..9b233ac2c0f8 100644 --- a/Marlin/src/gcode/control/M997.cpp +++ b/Marlin/src/gcode/control/M997.cpp @@ -35,7 +35,6 @@ */ void GcodeSuite::M997() { - TERN_(DWIN_LCD_PROUI, dwinRebootScreen()); TERN_(EXTENSIBLE_UI, ExtUI::onFirmwareFlash()); flashFirmware(parser.intval('S')); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 32125752554b..a353fe507de7 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -309,7 +309,7 @@ void GcodeSuite::dwell(millis_t time) { #endif } - TERN_(HAS_DWIN_E3V2_BASIC, dwinLevelingDone()); + TERN_(DWIN_CREALITY_LCD, dwinLevelingDone()); TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone()); } diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index e56a4eab3af1..730ec65ba439 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -66,7 +66,6 @@ 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; } @@ -77,7 +76,6 @@ 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)); diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index a61a25c29bd5..4789425ed89b 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -58,6 +58,10 @@ #include "../../../feature/powerloss.h" #endif +#if HAS_MESH + #include "meshviewer.h" +#endif + namespace ExtUI { void onStartup() { dwinInitScreen(); } void onIdle() {} @@ -173,6 +177,10 @@ namespace ExtUI { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { // Called to indicate a special condition } + void onMeshUpdate(const xy_int8_t xypos, const_float_t zval) { + // Called to indicate a special condition + meshViewer.drawMeshPoint(xypos.x, xypos.y, zval); + } #endif #if ENABLED(PREVENT_COLD_EXTRUSION) From 5b69d43e1bedca2a2ac81fc8c941c39bc50b5217 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Fri, 11 Oct 2024 01:11:45 -0400 Subject: [PATCH 27/35] language_en.h --- Marlin/src/lcd/language/language_en.h | 54 ++++++++++----------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index daea4e4dc1f2..02782da712e9 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -763,6 +763,26 @@ namespace LanguageNarrow_en { LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait for reboot."); // ProUI LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No Media"); // ProUI LSTR MSG_PLEASE_PREHEAT = _UxGT("Please Preheat"); // ProUI + LSTR MSG_SCREEN_BACKGROUND = _UxGT("Screen Background"); // ProUI + LSTR MSG_CURSOR = _UxGT("Cursor"); // ProUI + LSTR MSG_TITLE_BACKGROUND = _UxGT("Title Background"); // ProUI + LSTR MSG_TITLE_TEXT = _UxGT("Title Text"); // ProUI + LSTR MSG_TEXT = _UxGT("Text"); // ProUI + LSTR MSG_SELECTED = _UxGT("Selected"); // ProUI + LSTR MSG_SPLIT_LINE = _UxGT("Split Line"); // ProUI + LSTR MSG_HIGHLIGHT = _UxGT("Highlight"); // ProUI + LSTR MSG_STATUS_BACKGROUND = _UxGT("Status Background"); // ProUI + LSTR MSG_STATUS_TEXT = _UxGT("Status Text"); // ProUI + LSTR MSG_POPUP_BACKGROUND = _UxGT("Popup Background"); // ProUI + LSTR MSG_POPUP_TEXT = _UxGT("Popup Text"); // ProUI + LSTR MSG_ALERT_BACKGROUND = _UxGT("Alert Background"); // ProUI + LSTR MSG_ALERT_TEXT = _UxGT("Alert Text"); // ProUI + LSTR MSG_PERCENT_TEXT = _UxGT("Percent Text"); // ProUI + LSTR MSG_BAR_FILL = _UxGT("Bar Fill"); // ProUI + LSTR MSG_INDICATOR_VALUE = _UxGT("Indicator value"); // ProUI + LSTR MSG_COORDINATE_VALUE = _UxGT("Coordinate value"); // ProUI + LSTR MSG_LOWER = _UxGT("Lower"); // ProUI + LSTR MSG_RAISE = _UxGT("Raise"); // ProUI // Prusa MMU 2 LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOOSE FILAMENT"); @@ -856,40 +876,6 @@ namespace LanguageNarrow_en { LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Remember to Save!"); LSTR MSG_PASSWORD_REMOVED = _UxGT("Password Removed"); - LSTR MSG_COLORS_GET = _UxGT("Get Color"); // ProUI - LSTR MSG_COLORS_SELECT = _UxGT("Select Colors"); // ProUI - LSTR MSG_COLORS_APPLIED = _UxGT("Colors applied"); // ProUI - LSTR MSG_COLORS_RED = _UxGT("Red"); // ProUI / JyersUI - LSTR MSG_COLORS_GREEN = _UxGT("Green"); // ProUI / JyersUI - LSTR MSG_COLORS_BLUE = _UxGT("Blue"); // ProUI / JyersUI - LSTR MSG_COLORS_WHITE = _UxGT("White"); // ProUI - - LSTR MSG_SCREEN_BACKGROUND = _UxGT("Screen Background"); // ProUI - LSTR MSG_CURSOR = _UxGT("Cursor"); // ProUI - LSTR MSG_TITLE_BACKGROUND = _UxGT("Title Background"); // ProUI - LSTR MSG_TITLE_TEXT = _UxGT("Title Text"); // ProUI - LSTR MSG_TEXT = _UxGT("Text"); // ProUI - LSTR MSG_SELECTED = _UxGT("Selected"); // ProUI - LSTR MSG_SPLIT_LINE = _UxGT("Split Line"); // ProUI - LSTR MSG_HIGHLIGHT = _UxGT("Highlight"); // ProUI - LSTR MSG_STATUS_BACKGROUND = _UxGT("Status Background"); // ProUI - LSTR MSG_STATUS_TEXT = _UxGT("Status Text"); // ProUI - LSTR MSG_POPUP_BACKGROUND = _UxGT("Popup Background"); // ProUI - LSTR MSG_POPUP_TEXT = _UxGT("Popup Text"); // ProUI - LSTR MSG_ALERT_BACKGROUND = _UxGT("Alert Background"); // ProUI - LSTR MSG_ALERT_TEXT = _UxGT("Alert Text"); // ProUI - LSTR MSG_PERCENT_TEXT = _UxGT("Percent Text"); // ProUI - LSTR MSG_BAR_FILL = _UxGT("Bar Fill"); // ProUI - LSTR MSG_INDICATOR_VALUE = _UxGT("Indicator value"); // ProUI - LSTR MSG_COORDINATE_VALUE = _UxGT("Coordinate value"); // ProUI - - LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI - LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen"); // ProUI - LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Printer is Locked,"); // ProUI - LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll to unlock."); // ProUI - LSTR MSG_LOWER = _UxGT("Lower"); // ProUI - LSTR MSG_RAISE = _UxGT("Raise"); // ProUI - // Filament Change screens show up to 2 lines on a 3-line display LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Click to continue")); LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); From 6f521deebeef26bea3b85b1e59531400c0141cf1 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Fri, 11 Oct 2024 01:24:06 -0400 Subject: [PATCH 28/35] language_en.h --- Marlin/src/lcd/language/language_en.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 02782da712e9..8e6400fc6c73 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -941,7 +941,6 @@ namespace LanguageNarrow_en { LSTR MSG_XATC_UPDATE_Z_OFFSET = _UxGT("Update Z-Offset to "); LSTR MSG_SOUND = _UxGT("Sound"); - LSTR MSG_SOUND_ENABLE = _UxGT("Enable sound"); // ProUI LSTR MSG_TOP_LEFT = _UxGT("Top Left"); LSTR MSG_BOTTOM_LEFT = _UxGT("Bottom Left"); From b2ac2cb5b0ed7224daf0b3b907cff0c57296f6dd Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Fri, 11 Oct 2024 22:24:58 -0400 Subject: [PATCH 29/35] fix typo #else if => #elif error --- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 5d438dcee068..7e9d3690bbb3 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -167,7 +167,7 @@ void GcodeSuite::G29() { bedlevel.set_zigzag_z(mbl_probe_index - 1, current_position.z); #if ENABLED(DWIN_LCD_PROUI) dwinPointUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z); - #else if ENABLED(EXTENSIBLE_UI) + #elif ENABLED(EXTENSIBLE_UI) ExtUI::onMeshUpdate(ix, iy, current_position.z); #endif SET_SOFT_ENDSTOP_LOOSE(false); From ed2a165e6e424b2e7385a26a566d17a8a59e50cd Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 12 Oct 2024 05:29:22 -0400 Subject: [PATCH 30/35] include bed_mesh_t --- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index 4789425ed89b..a5d32aebd576 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -59,6 +59,7 @@ #endif #if HAS_MESH + #include "../../../feature/bedlevel/bedlevel.h" #include "meshviewer.h" #endif From 9628f3771560ccc4583d60e466507a69b1c6326b Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 31 Oct 2024 06:29:28 -0400 Subject: [PATCH 31/35] update PID/MPC ExtUI --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 50 +++++++++++------------ Marlin/src/lcd/e3v2/proui/dwin.h | 13 +++--- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 46 +++++++++------------ 3 files changed, 52 insertions(+), 57 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index cd514173e2b5..9b2a09b53c07 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -440,7 +440,7 @@ void popupPauseOrStop() { } #if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER - void dwinPopupTemperature(const int_fast8_t heater_id, const uint8_t state) { + void dwinPopupTemperature(const heater_id_t heater_id, const uint8_t state) { hmiSaveProcessID(ID_WaitResponse); if (hmiIsChinese()) { DWINUI::clearMainArea(); @@ -1233,15 +1233,15 @@ void drawMainArea() { case ID_PlotProcess: switch (hmiValue.tempControl) { #if ENABLED(PIDTEMP) - case PIDTEMP_START: drawHotendPlot(); break; + case PID_STARTED: drawHotendPlot(); break; #elif ENABLED(MPCTEMP) case MPC_STARTED: drawHotendPlot(); break; #endif #if ENABLED(PIDTEMPBED) - case PIDTEMPBED_START: drawBedPlot(); break; + case PID_BED_STARTED: drawBedPlot(); break; #endif #if ENABLED(PIDTEMPCHAMBER) - case PIDTEMPCHAMBER_START: drawChamberPlot(); break; + case PID_CHAMBER_STARTED: drawChamberPlot(); break; #endif default: break; } break; @@ -1311,16 +1311,16 @@ void eachMomentUpdate() { #endif #if PROUI_TUNING_GRAPH if (checkkey == ID_PIDProcess) { - TERN_(PIDTEMP, if (hmiValue.tempControl == PIDTEMP_START) plot.update(thermalManager.wholeDegHotend(0))); - TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) plot.update(thermalManager.wholeDegBed())); - TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PIDTEMPCHAMBER_START) plot.update(thermalManager.wholeDegChamber())); + TERN_(PIDTEMP, if (hmiValue.tempControl == PID_STARTED) plot.update(thermalManager.wholeDegHotend(0))); + TERN_(PIDTEMPBED, if (hmiValue.tempControl == PID_BED_STARTED) plot.update(thermalManager.wholeDegBed())); + TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PID_CHAMBER_STARTED) plot.update(thermalManager.wholeDegChamber())); } TERN_(MPCTEMP, if (checkkey == ID_MPCProcess) plot.update(thermalManager.wholeDegHotend(0))); #if ENABLED(PROUI_ITEM_PLOT) if (checkkey == ID_PlotProcess) { - TERN_(PIDTEMP, if (hmiValue.tempControl == PIDTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); }) - TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) { plot.update(thermalManager.wholeDegBed()); }) - TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PIDTEMPCHAMBER_START) { plot.update(thermalManager.wholeDegChamber()); }) + TERN_(PIDTEMP, if (hmiValue.tempControl == PID_STARTED) { plot.update(thermalManager.wholeDegHotend(0)); }) + TERN_(PIDTEMPBED, if (hmiValue.tempControl == PID_BED_STARTED) { plot.update(thermalManager.wholeDegBed()); }) + TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PID_CHAMBER_STARTED) { plot.update(thermalManager.wholeDegChamber()); }) TERN_(MPCTEMP, if (hmiValue.tempControl == MPC_STARTED) { plot.update(thermalManager.wholeDegHotend(0)); }) if (hmiFlag.abort_flag || hmiFlag.pause_flag || print_job_timer.isPaused()) { hmiReturnScreen(); @@ -1590,7 +1590,7 @@ void dwinLevelingDone() { break; #endif #if ENABLED(PIDTEMP) - case PIDTEMP_START: + case PID_STARTED: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_PID_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_NOZZLE)); @@ -1599,7 +1599,7 @@ void dwinLevelingDone() { break; #endif #if ENABLED(PIDTEMPBED) - case PIDTEMPBED_START: + case PID_BED_STARTED: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_PID_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_BED)); @@ -1608,7 +1608,7 @@ void dwinLevelingDone() { break; #endif #if ENABLED(PIDTEMPCHAMBER) - case PIDTEMPCHAMBER_START: + case PID_CHAMBER_STARTED: DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE)); DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, GET_TEXT_F(MSG_PID_TARGET)); DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_CHAMBER)); @@ -1636,7 +1636,7 @@ void dwinLevelingDone() { #if ENABLED(MPCTEMP) case MPC_STARTED: #elif ENABLED(PIDTEMP) - case PIDTEMP_START: + case PID_STARTED: #endif title.showCaption(GET_TEXT_F(MSG_HOTEND_TEMP_GRAPH)); DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, GET_TEXT_F(MSG_TEMP_NOZZLE)); @@ -1644,7 +1644,7 @@ void dwinLevelingDone() { _target = thermalManager.degTargetHotend(0); break; #if ENABLED(PIDTEMPBED) - case PIDTEMPBED_START: + case PID_BED_STARTED: title.showCaption(GET_TEXT_F(MSG_BED_TEMP_GRAPH)); DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, GET_TEXT_F(MSG_TEMP_BED)); _maxtemp = BED_MAX_TARGET; @@ -1652,7 +1652,7 @@ void dwinLevelingDone() { break; #endif #if ENABLED(PIDTEMPCHAMBER) - case PIDTEMPCHAMBER_START: + case PID_CHAMBER_STARTED: title.showCaption(GET_TEXT_F(MSG_CHAMBER_TEMP_GRAPH)); DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, GET_TEXT_F(MSG_TEMP_CHAMBER)); _maxtemp = CHAMBER_MAX_TARGET; @@ -1669,14 +1669,14 @@ void dwinLevelingDone() { } void drawHotendPlot() { - TERN_(PIDTEMP, dwinDrawPlot(PIDTEMP_START)); + TERN_(PIDTEMP, dwinDrawPlot(PID_STARTED)); TERN_(MPCTEMP, dwinDrawPlot(MPC_STARTED)); } void drawBedPlot() { - TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START)); + TERN_(PIDTEMPBED, dwinDrawPlot(PID_BED_STARTED)); } void drawChamberPlot() { - TERN_(PIDTEMPCHAMBER, dwinDrawPlot(PIDTEMPCHAMBER_START)); + TERN_(PIDTEMPCHAMBER, dwinDrawPlot(PID_CHAMBER_STARTED)); } #endif // PROUI_ITEM_PLOT @@ -1705,7 +1705,7 @@ void dwinLevelingDone() { hmiValue.tempControl = result; switch (result) { #if ENABLED(PIDTEMP) - case PIDTEMP_START: + case PID_STARTED: hmiSaveProcessID(ID_PIDProcess); #if PROUI_TUNING_GRAPH dwinDrawPIDMPCPopup(); @@ -1715,7 +1715,7 @@ void dwinLevelingDone() { break; #endif #if ENABLED(PIDTEMPBED) - case PIDTEMPBED_START: + case PID_BED_STARTED: hmiSaveProcessID(ID_PIDProcess); #if PROUI_TUNING_GRAPH dwinDrawPIDMPCPopup(); @@ -1725,7 +1725,7 @@ void dwinLevelingDone() { break; #endif #if ENABLED(PIDTEMPCHAMBER) - case PIDTEMPCHAMBER_START: + case PID_CHAMBER_STARTED: hmiSaveProcessID(ID_PIDProcess); #if PROUI_TUNING_GRAPH dwinDrawPIDMPCPopup(); @@ -1746,7 +1746,7 @@ void dwinLevelingDone() { checkkey = last_checkkey; dwinPopupContinue(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_TEMP_TOO_HIGH)); break; - case AUTOTUNE_DONE: + case PID_DONE: checkkey = last_checkkey; dwinPopupConfirm(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_BUTTON_DONE)); break; @@ -1782,7 +1782,7 @@ void dwinLevelingDone() { dwinPopupContinue(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), F(STR_MPC_AUTOTUNE_INTERRUPTED)); ui.reset_alert_level(); break; - case AUTOTUNE_DONE: + case MPC_DONE: checkkey = last_checkkey; dwinPopupConfirm(ICON_TempTooLow, GET_TEXT_F(MSG_MPC_AUTOTUNE), GET_TEXT_F(MSG_BUTTON_DONE)); ui.reset_alert_level(); @@ -1849,7 +1849,7 @@ void dwinPrintAborted() { #if HAS_FILAMENT_SENSOR // Filament Runout process - void dwinFilamentRunout(const uint8_t extruder) { LCD_MESSAGE(MSG_RUNOUT_SENSOR); } + void dwinFilamentRunout() { LCD_MESSAGE(MSG_RUNOUT_SENSOR); } #endif void dwinSetColorDefaults() { diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index 4dea6e6ffa7d..df612eb63702 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -76,19 +76,20 @@ enum processID : uint8_t { enum tempcontrol_t : uint8_t { #if HAS_PID_HEATING - PIDTEMP_START = 1, - PIDTEMPBED_START, - PIDTEMPCHAMBER_START, + PID_DONE = 0, + PID_STARTED, + PID_BED_STARTED, + PID_CHAMBER_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, #endif #if ENABLED(MPC_AUTOTUNE) + MPC_DONE = 0, MPC_STARTED, MPC_TEMP_ERROR, MPC_INTERRUPTED, #endif - AUTOTUNE_DONE = 0 }; #endif @@ -178,7 +179,7 @@ typedef struct { typedef struct { rgb_t color; // Color #if ANY(HAS_PID_HEATING, MPCTEMP) - tempcontrol_t tempControl = AUTOTUNE_DONE; + tempcontrol_t tempControl = PID_DONE; #endif uint8_t select = 0; // Auxiliary selector variable AxisEnum axis = X_AXIS; // Axis Select @@ -291,7 +292,7 @@ void dwinPrintResume(); void dwinPrintFinished(); void dwinPrintAborted(); #if HAS_FILAMENT_SENSOR - void dwinFilamentRunout(const uint8_t extruder); + void dwinFilamentRunout(); #endif void dwinPrintHeader(const char * const cstr=nullptr); void dwinSetColorDefaults(); diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index a5d32aebd576..098ae8fd9443 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -90,7 +90,8 @@ namespace ExtUI { #if HAS_FILAMENT_SENSOR void onFilamentRunout(const extruder_t extruder) { - dwinFilamentRunout(extruder); + UNUSED(extruder); + dwinFilamentRunout(); } #endif @@ -142,10 +143,10 @@ namespace ExtUI { void onFactoryReset() { dwinSetDataDefaults(); } // Copy settings to EEPROM buffer for write - void onStoreSettings(char *buff) { dwinCopySettingsTo(buff); } + void onStoreSettings(char *buff) { dwinCopySettingsTo(static_cast(buff)); } // Get settings from loaded EEPROM data - void onLoadSettings(const char *buff) { dwinCopySettingsFrom(buff); } + void onLoadSettings(const char *buff) { dwinCopySettingsFrom(static_cast(buff)); } void onPostprocessSettings() { // Called after loading or resetting stored settings @@ -204,22 +205,7 @@ namespace ExtUI { #if HAS_PID_HEATING void onPIDTuning(const pidresult_t rst) { // Called for temperature PID tuning result - switch (rst) { - default: break; - #if ENABLED(PIDTEMP) - case PID_STARTED: dwinPIDTuning(PIDTEMP_START); break; - #endif - #if ENABLED(PIDTEMPBED) - case PID_BED_STARTED: dwinPIDTuning(PIDTEMPBED_START); break; - #endif - #if ENABLED(PIDTEMPCHAMBER) - case PID_CHAMBER_STARTED: dwinPIDTuning(PIDTEMPCHAMBER_START); break; - #endif - case PID_BAD_HEATER_ID: dwinPIDTuning(tempcontrol_t(PID_BAD_HEATER_ID)); break; - case PID_TEMP_TOO_HIGH: dwinPIDTuning(tempcontrol_t(PID_TEMP_TOO_HIGH)); break; - case PID_TUNING_TIMEOUT: dwinPIDTuning(tempcontrol_t(PID_TUNING_TIMEOUT)); break; - case PID_DONE: dwinPIDTuning(AUTOTUNE_DONE); break; - } + dwinPIDTuning(tempcontrol_t(rst)); } void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) { dwinStartM303(count, hid, temp); @@ -229,12 +215,7 @@ namespace ExtUI { #if ENABLED(MPC_AUTOTUNE) void onMPCTuning(const mpcresult_t rst) { // Called for temperature MPC tuning result - switch (rst) { - case MPC_STARTED: dwinMPCTuning(tempcontrol_t(MPC_STARTED)); break; - case MPC_TEMP_ERROR: dwinMPCTuning(tempcontrol_t(MPC_TEMP_ERROR)); break; - case MPC_INTERRUPTED: dwinMPCTuning(tempcontrol_t(MPC_INTERRUPTED)); break; - case MPC_DONE: dwinMPCTuning(AUTOTUNE_DONE); break; - } + dwinMPCTuning(tempcontrol_t(rst)); } #endif @@ -244,7 +225,20 @@ namespace ExtUI { void onSteppersDisabled() {} void onSteppersEnabled() {} - void onAxisDisabled(const axis_t axis) { + void onAxisDisabled(const axis_t a) { + AxisEnum axis; + switch (a) { + TERN_(HAS_X_AXIS, case X:) + default: axis = X_AXIS; + OPTCODE(HAS_Y_AXIS, case Y: axis = Y_AXIS) + OPTCODE(HAS_Z_AXIS, case Z: axis = Z_AXIS) + OPTCODE(HAS_I_AXIS, case I: axis = I_AXIS) + OPTCODE(HAS_J_AXIS, case J: axis = J_AXIS) + OPTCODE(HAS_K_AXIS, case K: axis = K_AXIS) + OPTCODE(HAS_U_AXIS, case U: axis = U_AXIS) + OPTCODE(HAS_V_AXIS, case V: axis = V_AXIS) + OPTCODE(HAS_W_AXIS, case W: axis = W_AXIS) + } set_axis_never_homed(AxisEnum(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095 } void onAxisEnabled(const axis_t) {} From 30a10a7ecd3f95160982213e1d4d19e2ebe37a9f Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Thu, 31 Oct 2024 06:37:52 -0400 Subject: [PATCH 32/35] revert some changes --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 1 - Marlin/src/gcode/bedlevel/abl/G29.cpp | 9 ++------- Marlin/src/gcode/bedlevel/abl/M421.cpp | 2 -- Marlin/src/gcode/bedlevel/ubl/M421.cpp | 2 -- Marlin/src/gcode/config/M302.cpp | 2 -- Marlin/src/gcode/control/M997.cpp | 2 -- Marlin/src/gcode/feature/powerloss/M1000.cpp | 2 -- Marlin/src/gcode/probe/G30.cpp | 2 +- 8 files changed, 3 insertions(+), 19 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 4e43f2e601ab..4637bf87e828 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1267,7 +1267,6 @@ 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()); } } diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 362a994faa5b..448ca36b4735 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -329,7 +329,6 @@ 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); @@ -435,6 +434,7 @@ G29_TYPE GcodeSuite::G29() { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling"); points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points #endif + TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart()); if (!faux) { @@ -448,11 +448,7 @@ G29_TYPE GcodeSuite::G29() { rts.gotoPage(ID_ABL_HeatWait_L, ID_ABL_HeatWait_D); #endif if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, - #if ENABLED(EXTENSIBLE_UI) - ExtUI::getLevelingBedTemp() - #else - LEVELING_BED_TEMP - #endif + TERN(EXTENSIBLE_UI, ExtUI::getLevelingBedTemp(), LEVELING_BED_TEMP) ); #endif } @@ -580,7 +576,6 @@ 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); diff --git a/Marlin/src/gcode/bedlevel/abl/M421.cpp b/Marlin/src/gcode/bedlevel/abl/M421.cpp index 216ff9f74b04..f66d0231901e 100644 --- a/Marlin/src/gcode/bedlevel/abl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/abl/M421.cpp @@ -33,8 +33,6 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../../../lcd/e3v2/proui/dwin.h" #endif /** diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index cdf43f71ed9a..99ba3ce19b46 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -33,8 +33,6 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../../../lcd/e3v2/proui/dwin.h" #endif /** diff --git a/Marlin/src/gcode/config/M302.cpp b/Marlin/src/gcode/config/M302.cpp index d4a42e21e87d..0648f3edca50 100644 --- a/Marlin/src/gcode/config/M302.cpp +++ b/Marlin/src/gcode/config/M302.cpp @@ -28,8 +28,6 @@ #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" diff --git a/Marlin/src/gcode/control/M997.cpp b/Marlin/src/gcode/control/M997.cpp index 9b233ac2c0f8..c651961902f4 100644 --- a/Marlin/src/gcode/control/M997.cpp +++ b/Marlin/src/gcode/control/M997.cpp @@ -26,8 +26,6 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" -#elif ENABLED(DWIN_LCD_PROUI) - #include "../../lcd/e3v2/proui/dwin.h" #endif /** diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index 7d4f43243ec7..c70bf7667ff8 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -39,8 +39,6 @@ #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) diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index f5f40b94cd82..29d6c1ad2ba7 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -34,7 +34,7 @@ #include "../../feature/probe_temp_comp.h" #endif -#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI) +#if ANY(DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI) #define VERBOSE_SINGLE_PROBE #endif From c4fbc09e476cb6d7f68d2fd6d2a54a22754ce0b1 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Mon, 4 Nov 2024 05:17:53 -0500 Subject: [PATCH 33/35] revert settings.cpp --- Marlin/src/module/settings.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 2fca98259d14..a9b1e3f5f383 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1666,18 +1666,6 @@ void MarlinSettings::postprocess() { } #endif - // - // DWIN UI User Data - // - #if ENABLED(DWIN_LCD_PROUI) - { - _FIELD_TEST(dwin_data); - char dwin_data[EXTUI_EEPROM_DATA_SIZE] = { 0 }; - dwinCopySettingsTo(dwin_data); - EEPROM_WRITE(dwin_data); - } - #endif - // // JyersUI DWIN User Data // @@ -2801,18 +2789,6 @@ void MarlinSettings::postprocess() { } #endif - // - // DWIN ProUI User Data - // - #if ENABLED(DWIN_LCD_PROUI) - { - const char dwin_data[EXTUI_EEPROM_DATA_SIZE] = { 0 }; - _FIELD_TEST(dwin_data); - EEPROM_READ(dwin_data); - if (!validating) dwinCopySettingsFrom(dwin_data); - } - #endif - // // JyersUI User Data // From 7dfd495352f26cb22a53eb7758d52d9bfa3e71e5 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Fri, 8 Nov 2024 22:47:30 -0500 Subject: [PATCH 34/35] ProUI updates --- Marlin/src/lcd/e3v2/common/dwin_set.h | 1 + Marlin/src/lcd/e3v2/common/limits.h | 4 ++-- Marlin/src/lcd/e3v2/proui/dwin.cpp | 26 ++++++++++++++++++-------- Marlin/src/lcd/e3v2/proui/dwin.h | 4 +++- Marlin/src/lcd/language/language_it.h | 1 + 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Marlin/src/lcd/e3v2/common/dwin_set.h b/Marlin/src/lcd/e3v2/common/dwin_set.h index f32d0e6d9e43..66e17404f2a8 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_set.h +++ b/Marlin/src/lcd/e3v2/common/dwin_set.h @@ -140,6 +140,7 @@ #define ICON_ProbeOffsetZ ICON_StepZ #define ICON_PIDNozzle ICON_HotendTemp #define ICON_PIDBed ICON_BedTemp +#define ICON_PIDChamber ICON_PrintSize #define ICON_FWRetract ICON_StepE #define ICON_FWRetLength ICON_StepE #define ICON_FWRetSpeed ICON_Setspeed diff --git a/Marlin/src/lcd/e3v2/common/limits.h b/Marlin/src/lcd/e3v2/common/limits.h index 409b735dc898..dffae474e205 100644 --- a/Marlin/src/lcd/e3v2/common/limits.h +++ b/Marlin/src/lcd/e3v2/common/limits.h @@ -115,9 +115,9 @@ constexpr xyze_float_t max_steps_edit_values = constexpr xyz_uint_t min_homing_edit_values = NUM_AXIS_ARRAY_1(MIN_HOMING_EDIT_VALUE); #ifdef DEFAULT_MAX_MULTIPLIER - constexpr xyz_uint_t default_homing = HOMING_FEEDRATE_MM_M; + constexpr xyz_ulong_t default_homing = HOMING_FEEDRATE_MM_M; #endif - constexpr xyz_uint_t max_homing_edit_values = + constexpr xyz_ulong_t max_homing_edit_values = #ifdef DEFAULT_MAX_MULTIPLIER default_homing * DEFAULT_MAX_MULTIPLIER #else diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 9b2a09b53c07..00381ce7860b 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2683,7 +2683,7 @@ void applyMaxAccel() { planner.set_max_acceleration(hmiValue.axis, menuData.valu default: break; } } - void applyHomingFR() { updateHomingFR(HMI_value.axis, MenuData.Value); } + void applyHomingFR() { updateHomingFR(hmiValue.axis, menuData.value); } #if HAS_X_AXIS void setHomingX() { hmiValue.axis = X_AXIS; setIntOnClick(min_homing_edit_values.x, max_homing_edit_values.x, homing_feedrate_mm_m.x, applyHomingFR); } #endif @@ -3143,7 +3143,7 @@ void drawPrepareMenu() { MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHotendPlot); #endif TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBedPlot)); - TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawChamberPlot)); + TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDChamber, MSG_CHAMBER_TEMP_GRAPH, onDrawMenuItem, drawChamberPlot)); #endif MENU_ITEM(ICON_Language, MSG_UI_LANGUAGE, onDrawLanguage, setLanguage); } @@ -3477,7 +3477,7 @@ void drawTuneMenu() { MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHotendPlot); #endif TERN_(PIDTEMPBED, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBedPlot)); - TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawChamberPlot)); + TERN_(PIDTEMPCHAMBER, MENU_ITEM(ICON_PIDChamber, MSG_CHAMBER_TEMP_GRAPH, onDrawMenuItem, drawChamberPlot)); #endif #if ENABLED(CASE_LIGHT_MENU) EDIT_ITEM(ICON_CaseLight, MSG_CASE_LIGHT, onDrawChkbMenu, setCaseLight, &caselight.on); @@ -3816,15 +3816,15 @@ void drawMaxAccelMenu() { if (SET_MENU(homingFRMenu, MSG_HOMING_FEEDRATE, 4)) { BACK_ITEM(drawMotionMenu); #if HAS_X_AXIS - static uint16_t xhome = static_cast(homing_feedrate_mm_m.x); + uint16_t xhome = static_cast(homing_feedrate_mm_m.x); EDIT_ITEM(ICON_MaxSpeedJerkX, MSG_HOMING_FEEDRATE_X, onDrawPIntMenu, setHomingX, &xhome); #endif #if HAS_Y_AXIS - static uint16_t yhome = static_cast(homing_feedrate_mm_m.y); + uint16_t yhome = static_cast(homing_feedrate_mm_m.y); EDIT_ITEM(ICON_MaxSpeedJerkY, MSG_HOMING_FEEDRATE_Y, onDrawPIntMenu, setHomingY, &yhome); #endif #if HAS_Z_AXIS - static uint16_t zhome = static_cast(homing_feedrate_mm_m.z); + uint16_t zhome = static_cast(homing_feedrate_mm_m.z); EDIT_ITEM(ICON_MaxSpeedJerkZ, MSG_HOMING_FEEDRATE_Z, onDrawPIntMenu, setHomingZ, &zhome); #endif } @@ -4219,10 +4219,20 @@ void drawMaxAccelMenu() { #endif // AUTO_BED_LEVELING_UBL #if HAS_MESH - + #if ENABLED(AUTO_BED_LEVELING_3POINT) + #define TITLE_MSG MSG_3POINT_LEVELING + #elif ENABLED(AUTO_BED_LEVELING_LINEAR) + #define TITLE_MSG MSG_LINEAR_LEVELING + #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) + #define TITLE_MSG MSG_BILINEAR_LEVELING + #elif ENABLED(AUTO_BED_LEVELING_UBL) + #define TITLE_MSG MSG_UBL_LEVELING + #else + #define TITLE_MSG MSG_MESH_LEVELING + #endif void drawMeshSetMenu() { checkkey = ID_Menu; - if (SET_MENU(meshMenu, MSG_MESH_LEVELING, 14)) { + if (SET_MENU(meshMenu, TITLE_MSG, 14)) { BACK_ITEM(drawAdvancedSettingsMenu); #if ENABLED(PREHEAT_BEFORE_LEVELING) EDIT_ITEM(ICON_Temperature, MSG_UBL_SET_TEMP_BED, onDrawPIntMenu, setBedLevT, &hmiData.bedLevT); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/src/lcd/e3v2/proui/dwin.h index df612eb63702..3f5a48cc5a03 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/Marlin/src/lcd/e3v2/proui/dwin.h @@ -178,8 +178,10 @@ typedef struct { typedef struct { rgb_t color; // Color - #if ANY(HAS_PID_HEATING, MPCTEMP) + #if HAS_PID_HEATING tempcontrol_t tempControl = PID_DONE; + #elif ENABLED(MPC_AUTOTUNE) + tempcontrol_t tempControl = MPC_DONE; #endif uint8_t select = 0; // Auxiliary selector variable AxisEnum axis = X_AXIS; // Axis Select diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 005f0b45a465..56a6cc72d64d 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -468,6 +468,7 @@ namespace LanguageNarrow_it { LSTR MSG_SCREEN_TIMEOUT = _UxGT("Timeout LCD (m)"); LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Grafico temp.ugello"); LSTR MSG_BED_TEMP_GRAPH = _UxGT("Grafico temp.piatto"); + LSTR MSG_CHAMBER_TEMP_GRAPH = _UxGT("Grafico temp.camera"); LSTR MSG_BRIGHTNESS_OFF = _UxGT("Spegni retroillum."); LSTR MSG_STORE_EEPROM = _UxGT("Salva impostazioni"); LSTR MSG_LOAD_EEPROM = _UxGT("Carica impostazioni"); From f38206821264526c9df70ecd8f2aac039522f4d9 Mon Sep 17 00:00:00 2001 From: classicrocker883 Date: Sat, 9 Nov 2024 00:23:30 -0500 Subject: [PATCH 35/35] revert some ProUI stuff --- Marlin/src/gcode/lcd/M0_M1.cpp | 4 ++-- Marlin/src/lcd/e3v2/proui/proui_extui.cpp | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 373053b5d4ff..703016b1ad12 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -66,9 +66,9 @@ void GcodeSuite::M0_M1() { #elif ENABLED(DWIN_LCD_PROUI) // ProUI with icon, string, button title if (parser.string_arg) - dwinPopupContinue(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT)); + ExtUI::onUserConfirmRequired(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT)); else - dwinPopupContinue(ICON_Stop_1, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT)); + ExtUI::onUserConfirmRequired(ICON_Stop_1, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT)); #elif ENABLED(EXTENSIBLE_UI) // ExtUI with icon, string, button title diff --git a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp index 098ae8fd9443..89230098d57b 100644 --- a/Marlin/src/lcd/e3v2/proui/proui_extui.cpp +++ b/Marlin/src/lcd/e3v2/proui/proui_extui.cpp @@ -143,25 +143,23 @@ namespace ExtUI { void onFactoryReset() { dwinSetDataDefaults(); } // Copy settings to EEPROM buffer for write - void onStoreSettings(char *buff) { dwinCopySettingsTo(static_cast(buff)); } + void onStoreSettings(char *buff) { dwinCopySettingsTo(buff); } // Get settings from loaded EEPROM data - void onLoadSettings(const char *buff) { dwinCopySettingsFrom(static_cast(buff)); } + void onLoadSettings(const char *buff) { dwinCopySettingsFrom(buff); } void onPostprocessSettings() { // Called after loading or resetting stored settings } - void onSettingsStored(const bool success) { + void onSettingsStored(const bool) { // Called after the entire EEPROM has been written, // whether successful or not. - DONE_BUZZ(success); } - void onSettingsLoaded(const bool success) { + void onSettingsLoaded(const bool) { // Called after the entire EEPROM has been read, // whether successful or not. - DONE_BUZZ(success); } #if HAS_LEVELING