🧑‍💻 Misc. LCD cleanup

This commit is contained in:
Scott Lahteine 2022-05-12 20:13:59 -05:00
parent 38f4d8abfc
commit 1e749e4f48
32 changed files with 105 additions and 92 deletions

View file

@ -321,6 +321,10 @@ bool pin_is_protected(const pin_t pin) {
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
bool printer_busy() {
return planner.movesplanned() || printingIsActive();
}
/** /**
* A Print Job exists when the timer is running or SD is printing * A Print Job exists when the timer is running or SD is printing
*/ */

View file

@ -61,6 +61,8 @@ bool printJobOngoing();
bool printingIsPaused(); bool printingIsPaused();
void startOrResumeJob(); void startOrResumeJob();
bool printer_busy();
extern bool wait_for_heatup; extern bool wait_for_heatup;
#if HAS_RESUME_CONTINUE #if HAS_RESUME_CONTINUE

View file

@ -83,7 +83,6 @@ private:
static bool smart_fill_one(const xy_uint8_t &pos, const xy_uint8_t &dir) { static bool smart_fill_one(const xy_uint8_t &pos, const xy_uint8_t &dir) {
return smart_fill_one(pos.x, pos.y, dir.x, dir.y); return smart_fill_one(pos.x, pos.y, dir.x, dir.y);
} }
static void smart_fill_mesh();
#if ENABLED(UBL_DEVEL_DEBUGGING) #if ENABLED(UBL_DEVEL_DEBUGGING)
static void g29_what_command(); static void g29_what_command();
@ -106,6 +105,7 @@ public:
static void set_all_mesh_points_to_value(const_float_t value); static void set_all_mesh_points_to_value(const_float_t value);
static void adjust_mesh_to_mean(const bool cflag, const_float_t value); static void adjust_mesh_to_mean(const bool cflag, const_float_t value);
static bool sanity_check(); static bool sanity_check();
static void smart_fill_mesh();
static void G29() __O0; // O0 for no optimization static void G29() __O0; // O0 for no optimization
static void smart_fill_wlsf(const_float_t ) __O2; // O2 gives smaller code than Os on A2560 static void smart_fill_wlsf(const_float_t ) __O2; // O2 gives smaller code than Os on A2560

View file

@ -42,7 +42,7 @@ void GcodeSuite::M73() {
#if ENABLED(DWIN_LCD_PROUI) #if ENABLED(DWIN_LCD_PROUI)
DWIN_Progress_Update(); DWIN_M73();
#else #else

View file

@ -1917,7 +1917,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* LCD_BED_LEVELING requirements * LCD_BED_LEVELING requirements
*/ */
#if ENABLED(LCD_BED_LEVELING) #if ENABLED(LCD_BED_LEVELING)
#if NONE(HAS_MARLINUI_MENU, DWIN_CREALITY_LCD, DWIN_LCD_PROUI) #if !HAS_MARLINUI_MENU
#error "LCD_BED_LEVELING is not supported by the selected LCD controller." #error "LCD_BED_LEVELING is not supported by the selected LCD controller."
#elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL) #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL)
#error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING." #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."

View file

@ -33,7 +33,7 @@
//#define USE_STRING_HEADINGS //#define USE_STRING_HEADINGS
//#define USE_STRING_TITLES //#define USE_STRING_TITLES
#if ENABLED(LCD_BED_LEVELING) && DISABLED(PROBE_MANUALLY) && ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) #if DISABLED(PROBE_MANUALLY) && ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
#define HAS_ONESTEP_LEVELING 1 #define HAS_ONESTEP_LEVELING 1
#endif #endif
@ -1366,8 +1366,6 @@ void HMI_Move_Z() {
#if HAS_ZOFFSET_ITEM #if HAS_ZOFFSET_ITEM
bool printer_busy() { return planner.movesplanned() || printingIsActive(); }
void HMI_Zoffset() { void HMI_Zoffset() {
EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); EncoderState encoder_diffState = Encoder_ReceiveAnalyze();
if (encoder_diffState == ENCODER_DIFF_NO) return; if (encoder_diffState == ENCODER_DIFF_NO) return;

View file

@ -432,7 +432,7 @@ void Draw_Back_First(const bool is_sel=true) {
//PopUps //PopUps
void Popup_window_PauseOrStop() { void Popup_window_PauseOrStop() {
if (HMI_IsChinese()) { if (HMI_IsChinese()) {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
@ -451,7 +451,7 @@ void Popup_window_PauseOrStop() {
void Popup_Window_ETempTooLow() { void Popup_Window_ETempTooLow() {
if (HMI_IsChinese()) { if (HMI_IsChinese()) {
HMI_SaveProcessID(WaitResponse); HMI_SaveProcessID(WaitResponse);
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105); DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105);
DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240);
@ -469,7 +469,7 @@ void Popup_window_PauseOrStop() {
void DWIN_Popup_Temperature(const bool toohigh) { void DWIN_Popup_Temperature(const bool toohigh) {
HMI_SaveProcessID(WaitResponse); HMI_SaveProcessID(WaitResponse);
if (HMI_IsChinese()) { if (HMI_IsChinese()) {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
if (toohigh) { if (toohigh) {
DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165); DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165);
@ -579,13 +579,13 @@ void Draw_Print_ProgressBar() {
void Draw_Print_ProgressElapsed() { void Draw_Print_ProgressElapsed() {
char buf[10]; char buf[10];
duration_t elapsed = print_job_timer.duration(); // print timer duration_t elapsed = print_job_timer.duration(); // print timer
sprintf_P(buf, PSTR("%02i:%02i"), (uint16_t)(elapsed.value / 3600), ((uint16_t)elapsed.value % 3600) / 60); sprintf_P(buf, PSTR("%02i:%02i "), (uint16_t)(elapsed.value / 3600), ((uint16_t)elapsed.value % 3600) / 60);
DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 47, 192, buf); DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 47, 192, buf);
} }
void Draw_Print_ProgressRemain() { void Draw_Print_ProgressRemain() {
char buf[10]; char buf[10];
sprintf_P(buf, PSTR("%02i:%02i"), (uint16_t)(_remain_time / 3600), ((uint16_t)_remain_time % 3600) / 60); sprintf_P(buf, PSTR("%02i:%02i "), (uint16_t)(_remain_time / 3600), ((uint16_t)_remain_time % 3600) / 60);
DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 181, 192, buf); DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 181, 192, buf);
} }
@ -612,7 +612,7 @@ void Draw_PrintProcess() {
Title.FrameCopy(30, 1, 42, 14); // "Printing" Title.FrameCopy(30, 1, 42, 14); // "Printing"
else else
Title.ShowCaption(GET_TEXT_F(MSG_PRINTING)); Title.ShowCaption(GET_TEXT_F(MSG_PRINTING));
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
DWIN_Print_Header(sdprint ? card.longest_filename() : nullptr); DWIN_Print_Header(sdprint ? card.longest_filename() : nullptr);
Draw_Print_Labels(); Draw_Print_Labels();
DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); DWINUI::Draw_Icon(ICON_PrintTime, 15, 173);
@ -641,7 +641,7 @@ void Draw_PrintDone() {
_remain_time = 0; _remain_time = 0;
Title.ShowCaption(GET_TEXT_F(MSG_PRINT_DONE)); Title.ShowCaption(GET_TEXT_F(MSG_PRINT_DONE));
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
DWIN_Print_Header(nullptr); DWIN_Print_Header(nullptr);
Draw_Print_ProgressBar(); Draw_Print_ProgressBar();
Draw_Print_Labels(); Draw_Print_Labels();
@ -663,7 +663,7 @@ void Goto_PrintDone() {
} }
void Draw_Main_Menu() { void Draw_Main_Menu() {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
if (HMI_IsChinese()) if (HMI_IsChinese())
Title.FrameCopy(2, 2, 26, 13); // "Home" etc Title.FrameCopy(2, 2, 26, 13); // "Home" etc
else else
@ -933,7 +933,7 @@ void Redraw_SD_List() {
select_file.reset(); select_file.reset();
index_file = MROWS; index_file = MROWS;
DWINUI::ClearMenuArea(); // Leave title bar unchanged DWINUI::ClearMainArea(); // Leave title bar unchanged
Draw_Back_First(); Draw_Back_First();
@ -1041,7 +1041,7 @@ void DWIN_Draw_Dashboard() {
} }
void Draw_Info_Menu() { void Draw_Info_Menu() {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Back_First(); Draw_Back_First();
if (HMI_IsChinese()) if (HMI_IsChinese())
Title.FrameCopy(30, 17, 28, 13); // "Info" Title.FrameCopy(30, 17, 28, 13); // "Info"
@ -1107,7 +1107,7 @@ void HMI_MainMenu() {
case PAGE_PRINT: case PAGE_PRINT:
checkkey = SelectFile; checkkey = SelectFile;
card.mount(); card.mount();
delay(300); safe_delay(300);
Draw_Print_File_Menu(); Draw_Print_File_Menu();
break; break;
case PAGE_PREPARE: Draw_Prepare_Menu(); break; case PAGE_PREPARE: Draw_Prepare_Menu(); break;
@ -1349,8 +1349,8 @@ void HMI_Init() {
void EachMomentUpdate() { void EachMomentUpdate() {
static millis_t next_var_update_ms = 0, next_rts_update_ms = 0, next_status_update_ms = 0; static millis_t next_var_update_ms = 0, next_rts_update_ms = 0, next_status_update_ms = 0;
const millis_t ms = millis(); const millis_t ms = millis();
if (ELAPSED(ms, next_var_update_ms)) { if (ELAPSED(ms, next_var_update_ms)) {
next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL;
update_variable(); update_variable();
@ -1439,7 +1439,7 @@ void EachMomentUpdate() {
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)
void Popup_PowerLossRecovery() { void Popup_PowerLossRecovery() {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
if (HMI_IsChinese()) { if (HMI_IsChinese()) {
DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115); DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115);
@ -1478,7 +1478,7 @@ void EachMomentUpdate() {
void Goto_PowerLossRecovery() { void Goto_PowerLossRecovery() {
recovery.dwin_flag = false; recovery.dwin_flag = false;
LCD_MESSAGE_F(GET_TEXT_F(MSG_CONTINUE_PRINT_JOB)); LCD_MESSAGE(MSG_CONTINUE_PRINT_JOB);
Goto_Popup(Popup_PowerLossRecovery, onClick_PowerLossRecovery); Goto_Popup(Popup_PowerLossRecovery, onClick_PowerLossRecovery);
} }
@ -1581,15 +1581,15 @@ void DWIN_PidTuning(pidresult_t result) {
break; break;
case PID_BAD_EXTRUDER_NUM: case PID_BAD_EXTRUDER_NUM:
checkkey = last_checkkey; checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooLow, F("PID Autotune failed!"), F("Bad extruder")); DWIN_Popup_Confirm(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_BAD_EXTRUDER_NUM));
break; break;
case PID_TUNING_TIMEOUT: case PID_TUNING_TIMEOUT:
checkkey = last_checkkey; checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooHigh, F("Error"), GET_TEXT_F(MSG_PID_TIMEOUT)); DWIN_Popup_Confirm(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), GET_TEXT_F(MSG_PID_TIMEOUT));
break; break;
case PID_TEMP_TOO_HIGH: case PID_TEMP_TOO_HIGH:
checkkey = last_checkkey; checkkey = last_checkkey;
DWIN_Popup_Confirm(ICON_TempTooHigh, F("PID Autotune failed!"), F("Temperature too high")); DWIN_Popup_Confirm(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_TEMP_TOO_HIGH));
break; break;
case PID_DONE: case PID_DONE:
checkkey = last_checkkey; checkkey = last_checkkey;
@ -1637,7 +1637,7 @@ void DWIN_Print_Finished() {
HMI_flag.pause_flag = false; HMI_flag.pause_flag = false;
wait_for_heatup = false; wait_for_heatup = false;
planner.finish_and_disable(); planner.finish_and_disable();
thermalManager.cooldown(); thermalManager.cooldown();
Goto_PrintDone(); Goto_PrintDone();
} }
@ -1652,8 +1652,8 @@ void DWIN_Print_Aborted() {
} }
// Progress Bar update // Progress Bar update
void DWIN_Progress_Update() {
if (parser.seenval('P')) _percent_done = parser.byteval('P'); if (parser.seenval('P')) _percent_done = parser.byteval('P');
void DWIN_M73() {
if (parser.seenval('R')) { if (parser.seenval('R')) {
_remain_time = parser.ulongval('R') * 60; _remain_time = parser.ulongval('R') * 60;
HMI_flag.remain_flag = true; HMI_flag.remain_flag = true;
@ -1707,11 +1707,11 @@ void DWIN_SetDataDefaults() {
TERN_(BAUD_RATE_GCODE, SetBaud250K()); TERN_(BAUD_RATE_GCODE, SetBaud250K());
} }
void DWIN_StoreSettings(char *buff) { void DWIN_CopySettingsTo(char * const buff) {
memcpy(buff, &HMI_data, _MIN(sizeof(HMI_data), eeprom_data_size)); memcpy(buff, &HMI_data, _MIN(sizeof(HMI_data), eeprom_data_size));
} }
void DWIN_LoadSettings(const char *buff) { void DWIN_CopySettingsFrom(const char * const buff) {
// (void *)-> Avoid Warning when save data different from uintX_t in HMI_data_t struct // (void *)-> Avoid Warning when save data different from uintX_t in HMI_data_t struct
memcpy((void *)&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size)); memcpy((void *)&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size));
dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
@ -1729,6 +1729,7 @@ void DWIN_LoadSettings(const char *buff) {
// Apply Led Color // Apply Led Color
leds.set_color(HMI_data.Led_Color); leds.set_color(HMI_data.Led_Color);
#endif #endif
} }
// Initialize or re-initialize the LCD // Initialize or re-initialize the LCD
@ -1773,10 +1774,10 @@ void DWIN_RebootScreen() {
DWIN_JPG_ShowAndCache(0); DWIN_JPG_ShowAndCache(0);
DWINUI::Draw_CenteredString(Color_White, 220, GET_TEXT_F(MSG_PLEASE_WAIT_REBOOT)); DWINUI::Draw_CenteredString(Color_White, 220, GET_TEXT_F(MSG_PLEASE_WAIT_REBOOT));
DWIN_UpdateLCD(); DWIN_UpdateLCD();
delay(500); safe_delay(500);
} }
void DWIN_Redraw_screen() { void DWIN_RedrawScreen() {
Draw_Main_Area(); Draw_Main_Area();
hash_changed = true; hash_changed = true;
DWIN_DrawStatusMessage(); DWIN_DrawStatusMessage();
@ -1898,13 +1899,13 @@ void Goto_ConfirmToPrint() {
void ReadEeprom() { void ReadEeprom() {
const bool success = settings.load(); const bool success = settings.load();
DWIN_Redraw_screen(); DWIN_RedrawScreen();
HMI_AudioFeedback(success); HMI_AudioFeedback(success);
} }
void ResetEeprom() { void ResetEeprom() {
settings.reset(); settings.reset();
DWIN_Redraw_screen(); DWIN_RedrawScreen();
HMI_AudioFeedback(); HMI_AudioFeedback();
} }
#endif #endif
@ -1947,7 +1948,7 @@ void SetHome() {
} }
#if HAS_ZOFFSET_ITEM #if HAS_ZOFFSET_ITEM
bool printer_busy() { return planner.movesplanned() || printingIsActive(); }
void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); } void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); }
void LiveZOffset() { void LiveZOffset() {
last_zoffset = dwin_zoffset; last_zoffset = dwin_zoffset;
@ -2066,7 +2067,7 @@ void SetPID(celsius_t t, heater_id_t h) {
void ApplyBrightness() { ui.set_brightness(MenuData.Value); } void ApplyBrightness() { ui.set_brightness(MenuData.Value); }
void LiveBrightness() { DWIN_LCD_Brightness(MenuData.Value); } void LiveBrightness() { DWIN_LCD_Brightness(MenuData.Value); }
void SetBrightness() { SetIntOnClick(LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.brightness, ApplyBrightness, LiveBrightness); } void SetBrightness() { SetIntOnClick(LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.brightness, ApplyBrightness, LiveBrightness); }
void TurnOffBacklight() { HMI_SaveProcessID(WaitResponse); ui.set_brightness(0); DWIN_Redraw_screen(); } void TurnOffBacklight() { HMI_SaveProcessID(WaitResponse); ui.set_brightness(0); DWIN_RedrawScreen(); }
#endif #endif
#if ENABLED(CASE_LIGHT_MENU) #if ENABLED(CASE_LIGHT_MENU)
@ -2170,7 +2171,7 @@ void SetPID(celsius_t t, heater_id_t h) {
void RestoreDefaultsColors() { void RestoreDefaultsColors() {
DWIN_SetColorDefaults(); DWIN_SetColorDefaults();
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color); DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
DWIN_Redraw_screen(); DWIN_RedrawScreen();
} }
void SelColor() { void SelColor() {
@ -2981,7 +2982,7 @@ void Draw_Prepare_Menu() {
} }
void Draw_Tramming_Menu() { void Draw_Tramming_Menu() {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
checkkey = Menu; checkkey = Menu;
if (!TrammingMenu) TrammingMenu = new MenuClass(); if (!TrammingMenu) TrammingMenu = new MenuClass();
if (CurrentMenu != TrammingMenu) { if (CurrentMenu != TrammingMenu) {

View file

@ -114,14 +114,14 @@ void Goto_Info_Menu();
void Goto_PowerLossRecovery(); void Goto_PowerLossRecovery();
void Goto_ConfirmToPrint(); void Goto_ConfirmToPrint();
void DWIN_Draw_Dashboard(const bool with_update); // Status Area void DWIN_Draw_Dashboard(const bool with_update); // Status Area
void Draw_Main_Area(); // Redraw main area; void Draw_Main_Area(); // Redraw main area
void DWIN_Redraw_screen(); // Redraw all screen elements void DWIN_RedrawScreen(); // Redraw all screen elements
void HMI_MainMenu(); // Main process screen void HMI_MainMenu(); // Main process screen
void HMI_SelectFile(); // File page void HMI_SelectFile(); // File page
void HMI_Printing(); // Print page void HMI_Printing(); // Print page
void HMI_ReturnScreen(); // Return to previous screen before popups void HMI_ReturnScreen(); // Return to previous screen before popups
void ApplyExtMinT(); void ApplyExtMinT();
void HMI_SetLanguageCache(); // Set the languaje image cache void HMI_SetLanguageCache(); // Set the language image cache
void RebootPrinter(); void RebootPrinter();
#if ENABLED(BAUD_RATE_GCODE) #if ENABLED(BAUD_RATE_GCODE)
void HMI_SetBaudRate(); void HMI_SetBaudRate();
@ -158,12 +158,12 @@ void DWIN_Print_Aborted();
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
void DWIN_FilamentRunout(const uint8_t extruder); void DWIN_FilamentRunout(const uint8_t extruder);
#endif #endif
void DWIN_Progress_Update(); void DWIN_M73();
void DWIN_Print_Header(const char *text); void DWIN_Print_Header(const char *text);
void DWIN_SetColorDefaults(); void DWIN_SetColorDefaults();
void DWIN_ApplyColor(); void DWIN_ApplyColor();
void DWIN_StoreSettings(char *buff); void DWIN_CopySettingsTo(char * const buff);
void DWIN_LoadSettings(const char *buff); void DWIN_CopySettingsFrom(const char * const buff);
void DWIN_SetDataDefaults(); void DWIN_SetDataDefaults();
void DWIN_RebootScreen(); void DWIN_RebootScreen();

View file

@ -80,7 +80,7 @@
#define HAS_ESDIAG 1 #define HAS_ESDIAG 1
#if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS) #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
#define Def_Leds_Color LEDColorWhite() #define Def_Leds_Color LEDColorWhite()
#endif #endif
#if ENABLED(CASELIGHT_USES_BRIGHTNESS) #if ENABLED(CASELIGHT_USES_BRIGHTNESS)

View file

@ -50,7 +50,7 @@ inline void Draw_Popup_Bkgd() {
template<typename T, typename U> template<typename T, typename U>
void DWIN_Draw_Popup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t button=0) { void DWIN_Draw_Popup(const uint8_t icon, T amsg1=nullptr, U amsg2=nullptr, uint8_t button=0) {
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
if (icon) DWINUI::Draw_Icon(icon, 101, 105); if (icon) DWINUI::Draw_Icon(icon, 101, 105);
if (amsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, amsg1); if (amsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, amsg1);

View file

@ -304,7 +304,7 @@ void DWINUI::Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t
} }
// Clear Menu by filling the menu area with background color // Clear Menu by filling the menu area with background color
void DWINUI::ClearMenuArea() { void DWINUI::ClearMainArea() {
DWIN_Draw_Rectangle(1, backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1); DWIN_Draw_Rectangle(1, backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1);
} }

View file

@ -593,7 +593,7 @@ namespace DWINUI {
// Clear Menu by filling the area with background color // Clear Menu by filling the area with background color
// Area (0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - 1) // Area (0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - 1)
void ClearMenuArea(); void ClearMainArea();
// Clear MenuItems array and free MenuItems elements // Clear MenuItems array and free MenuItems elements
void MenuItemsClear(); void MenuItemsClear();

View file

@ -71,7 +71,7 @@ void draw_es_state(const bool is_hit) {
void ESDiagClass::Draw() { void ESDiagClass::Draw() {
Title.ShowCaption(F("End-stops Diagnostic")); Title.ShowCaption(F("End-stops Diagnostic"));
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
DWINUI::Draw_Button(BTN_Continue, 86, 250); DWINUI::Draw_Button(BTN_Continue, 86, 250);
DWINUI::cursor.y = 80; DWINUI::cursor.y = 80;

View file

@ -50,11 +50,10 @@ void LockScreenClass::init() {
} }
void LockScreenClass::draw() { void LockScreenClass::draw() {
Title.SetCaption(PSTR("Lock Screen")); DWINUI::ClearMainArea();
DWINUI::ClearMenuArea();
DWINUI::Draw_Icon(ICON_LOGO, 71, 120); // CREALITY logo DWINUI::Draw_Icon(ICON_LOGO, 71, 120); // CREALITY logo
DWINUI::Draw_CenteredString(Color_White, 180, F("Printer is Locked,")); DWINUI::Draw_CenteredString(Color_White, 180, GET_TEXT_F(MSG_LOCKSCREEN_LOCKED));
DWINUI::Draw_CenteredString(Color_White, 200, F("Scroll to unlock.")); DWINUI::Draw_CenteredString(Color_White, 200, GET_TEXT_F(MSG_LOCKSCREEN_UNLOCK));
DWINUI::Draw_CenteredString(Color_White, 240, F("-> | <-")); DWINUI::Draw_CenteredString(Color_White, 240, F("-> | <-"));
DWIN_Draw_Box(1, HMI_data.Barfill_Color, 0, 260, DWIN_WIDTH, 20); DWIN_Draw_Box(1, HMI_data.Barfill_Color, 0, 260, DWIN_WIDTH, 20);
DWIN_Draw_VLine(Color_Yellow, lock_pos * DWIN_WIDTH / 255, 260, 20); DWIN_Draw_VLine(Color_Yellow, lock_pos * DWIN_WIDTH / 255, 260, 20);

View file

@ -67,7 +67,7 @@ void MeshViewerClass::DrawMesh(bed_mesh_t zval, const uint8_t sizex, const uint8
max = (float)maxz / 100; max = (float)maxz / 100;
min = (float)minz / 100; min = (float)minz / 100;
avg = avg / (100 * sizex * sizey); avg = avg / (100 * sizex * sizey);
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
DWIN_Draw_Rectangle(0, HMI_data.SplitLine_Color, px(0), py(0), px(sizex - 1), py(sizey - 1)); DWIN_Draw_Rectangle(0, HMI_data.SplitLine_Color, px(0), py(0), px(sizex - 1), py(sizey - 1));
LOOP_S_L_N(x, 1, sizex - 1) DrawMeshVLine(x); LOOP_S_L_N(x, 1, sizex - 1) DrawMeshVLine(x);
LOOP_S_L_N(y, 1, sizey - 1) DrawMeshHLine(y); LOOP_S_L_N(y, 1, sizey - 1) DrawMeshHLine(y);
@ -90,7 +90,7 @@ void MeshViewerClass::DrawMesh(bed_mesh_t zval, const uint8_t sizex, const uint8
sprintf_P(str_1, PSTR("-.%02i"), -zmesh[x][y]); sprintf_P(str_1, PSTR("-.%02i"), -zmesh[x][y]);
break; break;
case 0: case 0:
DWIN_Draw_String(false, font6x12, DWINUI::textcolor, DWINUI::backcolor, px(x) - 4, py(y) - 6, "0");; DWIN_Draw_String(false, font6x12, DWINUI::textcolor, DWINUI::backcolor, px(x) - 4, py(y) - 6, "0");
break; break;
case 1 ... 99: case 1 ... 99:
sprintf_P(str_1, PSTR(".%02i"), zmesh[x][y]); sprintf_P(str_1, PSTR(".%02i"), zmesh[x][y]);
@ -107,13 +107,16 @@ void MeshViewerClass::DrawMesh(bed_mesh_t zval, const uint8_t sizex, const uint8
} }
void MeshViewerClass::Draw(bool withsave /*= false*/) { void MeshViewerClass::Draw(bool withsave /*= false*/) {
Title.ShowCaption(F("Mesh Viewer")); Title.ShowCaption(GET_TEXT_F(MSG_MESH_VIEWER));
DrawMesh(Z_VALUES_ARR, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y); DrawMesh(Z_VALUES_ARR, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y);
if (withsave) { if (withsave) {
DWINUI::Draw_Button(BTN_Save, 26, 305); DWINUI::Draw_Button(BTN_Save, 26, 305);
DWINUI::Draw_Button(BTN_Continue, 146, 305); DWINUI::Draw_Button(BTN_Continue, 146, 305);
Draw_Select_Highlight(HMI_flag.select_flag, 305); Draw_Select_Highlight(HMI_flag.select_flag, 305);
} else DWINUI::Draw_Button(BTN_Continue, 86, 305); }
else
DWINUI::Draw_Button(BTN_Continue, 86, 305);
char str_1[6], str_2[6] = ""; char str_1[6], str_2[6] = "";
ui.status_printf(0, F("Mesh minZ: %s, maxZ: %s"), ui.status_printf(0, F("Mesh minZ: %s, maxZ: %s"),
dtostrf(min, 1, 2, str_1), dtostrf(min, 1, 2, str_1),

View file

@ -50,7 +50,7 @@ void PrintStatsClass::Draw() {
constexpr int8_t MRG = 30; constexpr int8_t MRG = 30;
Title.ShowCaption(GET_TEXT_F(MSG_INFO_STATS_MENU)); Title.ShowCaption(GET_TEXT_F(MSG_INFO_STATS_MENU));
DWINUI::ClearMenuArea(); DWINUI::ClearMainArea();
Draw_Popup_Bkgd(); Draw_Popup_Bkgd();
DWINUI::Draw_Button(BTN_Continue, 86, 250); DWINUI::Draw_Button(BTN_Continue, 86, 250);
printStatistics ps = print_job_timer.getStats(); printStatistics ps = print_job_timer.getStats();

View file

@ -329,8 +329,8 @@ namespace Language_de {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
LSTR MSG_PID_CYCLE = _UxGT("PID Zyklus"); LSTR MSG_PID_CYCLE = _UxGT("PID Zyklus");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID Tuning fertig"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID Tuning fertig");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune fehlge. Falscher Extruder"); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune fehlge.! Falscher Extruder");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune fehlge. Temperatur zu hoch."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune fehlge.! Temperatur zu hoch.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autotune fehlge.! Timeout."); LSTR MSG_PID_TIMEOUT = _UxGT("Autotune fehlge.! Timeout.");
LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("teste Wärmeverlust"); LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("teste Wärmeverlust");
LSTR MSG_MPC_AUTOTUNE = _UxGT("Autotune MPC"); LSTR MSG_MPC_AUTOTUNE = _UxGT("Autotune MPC");

View file

@ -54,6 +54,7 @@ namespace Language_en {
LSTR MSG_YES = _UxGT("YES"); LSTR MSG_YES = _UxGT("YES");
LSTR MSG_NO = _UxGT("NO"); LSTR MSG_NO = _UxGT("NO");
LSTR MSG_BACK = _UxGT("Back"); LSTR MSG_BACK = _UxGT("Back");
LSTR MSG_ERROR = _UxGT("Error");
LSTR MSG_MEDIA_ABORTING = _UxGT("Aborting..."); LSTR MSG_MEDIA_ABORTING = _UxGT("Aborting...");
LSTR MSG_MEDIA_INSERTED = MEDIA_TYPE_EN _UxGT(" Inserted"); LSTR MSG_MEDIA_INSERTED = MEDIA_TYPE_EN _UxGT(" Inserted");
LSTR MSG_MEDIA_REMOVED = MEDIA_TYPE_EN _UxGT(" Removed"); LSTR MSG_MEDIA_REMOVED = MEDIA_TYPE_EN _UxGT(" Removed");
@ -346,8 +347,11 @@ namespace Language_en {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
LSTR MSG_PID_CYCLE = _UxGT("PID Cycles"); LSTR MSG_PID_CYCLE = _UxGT("PID Cycles");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("PID Autotune failed!");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); LSTR MSG_BAD_EXTRUDER_NUM = _UxGT("Bad extruder.");
LSTR MSG_TEMP_TOO_HIGH = _UxGT("Temperature too high.");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed! Bad extruder.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed! Temperature too high.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout.");
LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss"); LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss");
LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Autotune"); LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Autotune");
@ -629,6 +633,9 @@ namespace Language_en {
LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness");
LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER");
LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen");
LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Printer is Locked,");
LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll to unlock.");
#if LCD_WIDTH >= 20 || HAS_DWIN_E3V2 #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2
LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No media inserted."); LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No media inserted.");
LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait until reboot. "); LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait until reboot. ");

View file

@ -261,9 +261,9 @@ namespace Language_gl {
LSTR MSG_PID_AUTOTUNE = _UxGT("Auto-Sint. PID"); LSTR MSG_PID_AUTOTUNE = _UxGT("Auto-Sint. PID");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("Auto-Sint. PID *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("Auto-Sint. PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Fin Auto-Sint PID"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Fin Auto-Sint PID");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-Sint. fallida. Extrusor danado."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-Sint. fallida! Extrusor danado.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-Sint. fallida. Temperatura moi alta."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-Sint. fallida! Temperatura moi alta.");
LSTR MSG_PID_TIMEOUT = _UxGT("Auto-Sint. fallida. Tempo excedido."); LSTR MSG_PID_TIMEOUT = _UxGT("Auto-Sint. fallida! Tempo excedido.");
LSTR MSG_SELECT = _UxGT("Escolla"); LSTR MSG_SELECT = _UxGT("Escolla");
LSTR MSG_SELECT_E = _UxGT("Escolla *"); LSTR MSG_SELECT_E = _UxGT("Escolla *");
LSTR MSG_ACC = _UxGT("Acel"); LSTR MSG_ACC = _UxGT("Acel");

View file

@ -309,8 +309,8 @@ namespace Language_hu {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID hangolás *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID hangolás *");
LSTR MSG_PID_CYCLE = _UxGT("PID ciklus"); LSTR MSG_PID_CYCLE = _UxGT("PID ciklus");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID hangolás kész"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID hangolás kész");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba. Rossz adagoló."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba! Rossz adagoló.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba. Magas hömérséklet."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba! Magas hömérséklet.");
LSTR MSG_PID_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés."); LSTR MSG_PID_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés.");
LSTR MSG_SELECT = _UxGT("Kiválaszt"); LSTR MSG_SELECT = _UxGT("Kiválaszt");
LSTR MSG_SELECT_E = _UxGT("Kiválaszt *"); LSTR MSG_SELECT_E = _UxGT("Kiválaszt *");

View file

@ -343,8 +343,8 @@ namespace Language_it {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("Calib.PID *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("Calib.PID *");
LSTR MSG_PID_CYCLE = _UxGT("Ciclo PID"); LSTR MSG_PID_CYCLE = _UxGT("Ciclo PID");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita. Estrusore errato."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita! Estrusore errato.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita. Temperatura troppo alta."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita! Temperatura troppo alta.");
LSTR MSG_PID_TIMEOUT = _UxGT("Calibrazione fallita! Tempo scaduto."); LSTR MSG_PID_TIMEOUT = _UxGT("Calibrazione fallita! Tempo scaduto.");
LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss"); LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss");
LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Autotune"); LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Autotune");

View file

@ -260,8 +260,8 @@ namespace Language_ro {
LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed! Bad extruder.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed! Temperature too high.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout.");
LSTR MSG_SELECT = _UxGT("Select"); LSTR MSG_SELECT = _UxGT("Select");
LSTR MSG_SELECT_E = _UxGT("Select *"); LSTR MSG_SELECT_E = _UxGT("Select *");

View file

@ -390,8 +390,8 @@ namespace Language_ru {
LSTR MSG_PID_AUTOTUNE = _UxGT("Автоподбор PID"); LSTR MSG_PID_AUTOTUNE = _UxGT("Автоподбор PID");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("Автоподбор PID *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("Автоподбор PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Подбор PID выполнен"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Подбор PID выполнен");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Сбой автоподбора. Плохой экструдер."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Сбой автоподбора! Плохой экструдер.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Сбой автоподбора. Температура повышена."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Сбой автоподбора! Температура повышена.");
LSTR MSG_PID_TIMEOUT = _UxGT("Сбой автоподбора! Завершение времени."); LSTR MSG_PID_TIMEOUT = _UxGT("Сбой автоподбора! Завершение времени.");
LSTR MSG_SELECT = _UxGT("Выбор"); LSTR MSG_SELECT = _UxGT("Выбор");

View file

@ -337,8 +337,8 @@ namespace Language_sk {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("Kalibrácia PID *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("Kalibrácia PID *");
LSTR MSG_PID_CYCLE = _UxGT("Cykly PID"); LSTR MSG_PID_CYCLE = _UxGT("Cykly PID");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Kal. PID dokončená"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Kal. PID dokončená");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-kal. zlyhala. Zlý extrúder."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-kal. zlyhala! Zlý extrúder.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-kal. zlyhala. Príliš vysoká tepl."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-kal. zlyhala! Príliš vysoká tepl.");
LSTR MSG_PID_TIMEOUT = _UxGT("Auto-kal. zlyhala! Čas vypršal."); LSTR MSG_PID_TIMEOUT = _UxGT("Auto-kal. zlyhala! Čas vypršal.");
LSTR MSG_SELECT = _UxGT("Vybrať"); LSTR MSG_SELECT = _UxGT("Vybrať");
LSTR MSG_SELECT_E = _UxGT("Vybrať *"); LSTR MSG_SELECT_E = _UxGT("Vybrať *");

View file

@ -290,8 +290,8 @@ namespace Language_sv {
LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autojustera"); LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autojustera");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autojustera *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autojustera *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autojustera misslyckad. Dålig extruder."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autojustera misslyckad! Dålig extruder.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autojustera misslyckad. Temperatur för hög."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autojustera misslyckad! Temperatur för hög.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autojustera misslyckad! Tidsgräns."); LSTR MSG_PID_TIMEOUT = _UxGT("Autojustera misslyckad! Tidsgräns.");
LSTR MSG_SELECT = _UxGT("Välj"); LSTR MSG_SELECT = _UxGT("Välj");
LSTR MSG_SELECT_E = _UxGT("Välj *"); LSTR MSG_SELECT_E = _UxGT("Välj *");

View file

@ -395,8 +395,8 @@ namespace Language_uk {
LSTR MSG_PID_AUTOTUNE = _UxGT("Автопідбір PID"); LSTR MSG_PID_AUTOTUNE = _UxGT("Автопідбір PID");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("Автопідбір PID *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("Автопідбір PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Підбір PID виконано"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Підбір PID виконано");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Збій автопідбору. Поганий екструдер."); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Збій автопідбору! Поганий екструдер.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Збій автопідбору. Температура завищена."); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Збій автопідбору! Температура завищена.");
LSTR MSG_PID_TIMEOUT = _UxGT("Збій автопідбору! Вичерпан час."); LSTR MSG_PID_TIMEOUT = _UxGT("Збій автопідбору! Вичерпан час.");
LSTR MSG_SELECT = _UxGT("Вибрати"); LSTR MSG_SELECT = _UxGT("Вибрати");

View file

@ -260,8 +260,8 @@ namespace Language_zh_CN {
LSTR MSG_PID_AUTOTUNE = _UxGT("自动PID"); LSTR MSG_PID_AUTOTUNE = _UxGT("自动PID");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("自动PID *"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("自动PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID调整完成"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID调整完成");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败. 坏的挤出机"); LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败! 坏的挤出机");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败. 温度太高"); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败! 温度太高");
LSTR MSG_PID_TIMEOUT = _UxGT("自动调失败! 超时"); LSTR MSG_PID_TIMEOUT = _UxGT("自动调失败! 超时");
LSTR MSG_SELECT = _UxGT("选择"); // "Select" LSTR MSG_SELECT = _UxGT("选择"); // "Select"
LSTR MSG_SELECT_E = _UxGT("选择 *"); LSTR MSG_SELECT_E = _UxGT("选择 *");

View file

@ -163,10 +163,6 @@ void MenuEditItemBase::goto_edit_screen(
#include "../../MarlinCore.h" #include "../../MarlinCore.h"
bool printer_busy() {
return planner.movesplanned() || printingIsActive();
}
/** /**
* General function to go directly to a screen * General function to go directly to a screen
*/ */

View file

@ -30,7 +30,6 @@
extern int8_t encoderLine, encoderTopLine, screen_items; extern int8_t encoderLine, encoderTopLine, screen_items;
void scroll_screen(const uint8_t limit, const bool is_menu); void scroll_screen(const uint8_t limit, const bool is_menu);
bool printer_busy();
typedef void (*selectFunc_t)(); typedef void (*selectFunc_t)();

View file

@ -230,7 +230,7 @@
* Mesh Z Offset: --- (Req: MESH_BED_LEVELING) * Mesh Z Offset: --- (Req: MESH_BED_LEVELING)
* Z Probe Offset: --- (Req: HAS_BED_PROBE, Opt: BABYSTEP_ZPROBE_OFFSET) * Z Probe Offset: --- (Req: HAS_BED_PROBE, Opt: BABYSTEP_ZPROBE_OFFSET)
* Level Bed > * Level Bed >
* Level Corners > (if homed) * Bed Tramming > (if homed)
* Load Settings (Req: EEPROM_SETTINGS) * Load Settings (Req: EEPROM_SETTINGS)
* Save Settings (Req: EEPROM_SETTINGS) * Save Settings (Req: EEPROM_SETTINGS)
*/ */

View file

@ -54,11 +54,11 @@
#endif #endif
// IO ops // IO ops
#define IIC_SCL_0() WRITE(IIC_EEPROM_SCL, LOW) #define IIC_SCL_0() WRITE(IIC_EEPROM_SCL, LOW)
#define IIC_SCL_1() WRITE(IIC_EEPROM_SCL, HIGH) #define IIC_SCL_1() WRITE(IIC_EEPROM_SCL, HIGH)
#define IIC_SDA_0() WRITE(IIC_EEPROM_SDA, LOW) #define IIC_SDA_0() WRITE(IIC_EEPROM_SDA, LOW)
#define IIC_SDA_1() WRITE(IIC_EEPROM_SDA, HIGH) #define IIC_SDA_1() WRITE(IIC_EEPROM_SDA, HIGH)
#define READ_SDA() READ(IIC_EEPROM_SDA) #define READ_SDA() READ(IIC_EEPROM_SDA)
// //
// Simple IIC interface via libmaple // Simple IIC interface via libmaple

View file

@ -1517,7 +1517,7 @@ void MarlinSettings::postprocess() {
{ {
_FIELD_TEST(dwin_data); _FIELD_TEST(dwin_data);
char dwin_data[eeprom_data_size] = { 0 }; char dwin_data[eeprom_data_size] = { 0 };
DWIN_StoreSettings(dwin_data); DWIN_CopySettingsTo(dwin_data);
EEPROM_WRITE(dwin_data); EEPROM_WRITE(dwin_data);
} }
#endif #endif
@ -2493,7 +2493,7 @@ void MarlinSettings::postprocess() {
const char dwin_data[eeprom_data_size] = { 0 }; const char dwin_data[eeprom_data_size] = { 0 };
_FIELD_TEST(dwin_data); _FIELD_TEST(dwin_data);
EEPROM_READ(dwin_data); EEPROM_READ(dwin_data);
if (!validating) DWIN_LoadSettings(dwin_data); if (!validating) DWIN_CopySettingsFrom(dwin_data);
} }
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
{ {
@ -2929,7 +2929,6 @@ void MarlinSettings::reset() {
#endif #endif
#endif #endif
TERN_(DWIN_LCD_PROUI, DWIN_SetDataDefaults());
TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings()); TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings());
// //
@ -3304,6 +3303,11 @@ void MarlinSettings::reset() {
// //
TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings()); TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings());
//
// Ender-3 V2 with ProUI
//
TERN_(DWIN_LCD_PROUI, DWIN_SetDataDefaults());
// //
// Model predictive control // Model predictive control
// //