🧑‍💻 Misc. LCD cleanup

This commit is contained in:
Scott Lahteine 2022-05-12 20:13:59 -05:00
parent 0805f9bf3f
commit cb4ad020af
35 changed files with 109 additions and 91 deletions

View File

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

View File

@ -61,6 +61,8 @@ bool printJobOngoing();
bool printingIsPaused();
void startOrResumeJob();
bool printer_busy();
extern bool wait_for_heatup;
#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) {
return smart_fill_one(pos.x, pos.y, dir.x, dir.y);
}
static void smart_fill_mesh();
#if ENABLED(UBL_DEVEL_DEBUGGING)
static void g29_what_command();
@ -106,6 +105,7 @@ public:
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 bool sanity_check();
static void smart_fill_mesh();
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

View File

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

View File

@ -1836,7 +1836,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* LCD_BED_LEVELING requirements
*/
#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."
#elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL)
#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_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
#endif
@ -1366,8 +1366,6 @@ void HMI_Move_Z() {
#if HAS_ZOFFSET_ITEM
bool printer_busy() { return planner.movesplanned() || printingIsActive(); }
void HMI_Zoffset() {
EncoderState encoder_diffState = Encoder_ReceiveAnalyze();
if (encoder_diffState == ENCODER_DIFF_NO) return;

View File

@ -432,7 +432,7 @@ void Draw_Back_First(const bool is_sel=true) {
//PopUps
void Popup_window_PauseOrStop() {
if (HMI_IsChinese()) {
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
Draw_Popup_Bkgd();
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);
@ -451,7 +451,7 @@ void Popup_window_PauseOrStop() {
void Popup_Window_ETempTooLow() {
if (HMI_IsChinese()) {
HMI_SaveProcessID(WaitResponse);
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
Draw_Popup_Bkgd();
DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105);
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) {
HMI_SaveProcessID(WaitResponse);
if (HMI_IsChinese()) {
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
Draw_Popup_Bkgd();
if (toohigh) {
DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165);
@ -579,13 +579,13 @@ void Draw_Print_ProgressBar() {
void Draw_Print_ProgressElapsed() {
char buf[10];
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);
}
void Draw_Print_ProgressRemain() {
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);
}
@ -612,7 +612,7 @@ void Draw_PrintProcess() {
Title.FrameCopy(30, 1, 42, 14); // "Printing"
else
Title.ShowCaption(GET_TEXT_F(MSG_PRINTING));
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
DWIN_Print_Header(sdprint ? card.longest_filename() : nullptr);
Draw_Print_Labels();
DWINUI::Draw_Icon(ICON_PrintTime, 15, 173);
@ -641,7 +641,7 @@ void Draw_PrintDone() {
_remain_time = 0;
Title.ShowCaption(GET_TEXT_F(MSG_PRINT_DONE));
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
DWIN_Print_Header(nullptr);
Draw_Print_ProgressBar();
Draw_Print_Labels();
@ -663,7 +663,7 @@ void Goto_PrintDone() {
}
void Draw_Main_Menu() {
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
if (HMI_IsChinese())
Title.FrameCopy(2, 2, 26, 13); // "Home" etc
else
@ -933,7 +933,7 @@ void Redraw_SD_List() {
select_file.reset();
index_file = MROWS;
DWINUI::ClearMenuArea(); // Leave title bar unchanged
DWINUI::ClearMainArea(); // Leave title bar unchanged
Draw_Back_First();
@ -1041,7 +1041,7 @@ void DWIN_Draw_Dashboard() {
}
void Draw_Info_Menu() {
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
Draw_Back_First();
if (HMI_IsChinese())
Title.FrameCopy(30, 17, 28, 13); // "Info"
@ -1107,7 +1107,7 @@ void HMI_MainMenu() {
case PAGE_PRINT:
checkkey = SelectFile;
card.mount();
delay(300);
safe_delay(300);
Draw_Print_File_Menu();
break;
case PAGE_PREPARE: Draw_Prepare_Menu(); break;
@ -1349,8 +1349,8 @@ void HMI_Init() {
void EachMomentUpdate() {
static millis_t next_var_update_ms = 0, next_rts_update_ms = 0, next_status_update_ms = 0;
const millis_t ms = millis();
if (ELAPSED(ms, next_var_update_ms)) {
next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL;
update_variable();
@ -1439,7 +1439,7 @@ void EachMomentUpdate() {
#if ENABLED(POWER_LOSS_RECOVERY)
void Popup_PowerLossRecovery() {
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
Draw_Popup_Bkgd();
if (HMI_IsChinese()) {
DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 115);
@ -1478,7 +1478,7 @@ void EachMomentUpdate() {
void Goto_PowerLossRecovery() {
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);
}
@ -1581,15 +1581,15 @@ void DWIN_PidTuning(pidresult_t result) {
break;
case PID_BAD_EXTRUDER_NUM:
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;
case PID_TUNING_TIMEOUT:
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;
case PID_TEMP_TOO_HIGH:
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;
case PID_DONE:
checkkey = last_checkkey;
@ -1637,7 +1637,7 @@ void DWIN_Print_Finished() {
HMI_flag.pause_flag = false;
wait_for_heatup = false;
planner.finish_and_disable();
thermalManager.cooldown();
thermalManager.cooldown();
Goto_PrintDone();
}
@ -1652,7 +1652,7 @@ void DWIN_Print_Aborted() {
}
// Progress Bar update
void DWIN_Progress_Update() {
void DWIN_M73() {
if (parser.seenval('P')) _percent_done = parser.byteval('P');
if (parser.seenval('R')) {
_remain_time = parser.ulongval('R') * 60;
@ -1707,11 +1707,11 @@ void DWIN_SetDataDefaults() {
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));
}
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
memcpy((void *)&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size));
dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z);
@ -1729,6 +1729,7 @@ void DWIN_LoadSettings(const char *buff) {
// Apply Led Color
leds.set_color(HMI_data.Led_Color);
#endif
}
// Initialize or re-initialize the LCD
@ -1773,10 +1774,10 @@ void DWIN_RebootScreen() {
DWIN_JPG_ShowAndCache(0);
DWINUI::Draw_CenteredString(Color_White, 220, GET_TEXT_F(MSG_PLEASE_WAIT_REBOOT));
DWIN_UpdateLCD();
delay(500);
safe_delay(500);
}
void DWIN_Redraw_screen() {
void DWIN_RedrawScreen() {
Draw_Main_Area();
hash_changed = true;
DWIN_DrawStatusMessage();
@ -1898,13 +1899,13 @@ void Goto_ConfirmToPrint() {
void ReadEeprom() {
const bool success = settings.load();
DWIN_Redraw_screen();
DWIN_RedrawScreen();
HMI_AudioFeedback(success);
}
void ResetEeprom() {
settings.reset();
DWIN_Redraw_screen();
DWIN_RedrawScreen();
HMI_AudioFeedback();
}
#endif
@ -1947,7 +1948,7 @@ void SetHome() {
}
#if HAS_ZOFFSET_ITEM
bool printer_busy() { return planner.movesplanned() || printingIsActive(); }
void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); }
void LiveZOffset() {
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 LiveBrightness() { DWIN_LCD_Brightness(MenuData.Value); }
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
#if ENABLED(CASE_LIGHT_MENU)
@ -2170,7 +2171,7 @@ void SetPID(celsius_t t, heater_id_t h) {
void RestoreDefaultsColors() {
DWIN_SetColorDefaults();
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
DWIN_Redraw_screen();
DWIN_RedrawScreen();
}
void SelColor() {
@ -2981,7 +2982,7 @@ void Draw_Prepare_Menu() {
}
void Draw_Tramming_Menu() {
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
checkkey = Menu;
if (!TrammingMenu) TrammingMenu = new MenuClass();
if (CurrentMenu != TrammingMenu) {

View File

@ -115,7 +115,7 @@ void Goto_PowerLossRecovery();
void Goto_ConfirmToPrint();
void DWIN_Draw_Dashboard(const bool with_update); // Status 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_SelectFile(); // File page
void HMI_Printing(); // Print page
@ -158,12 +158,12 @@ void DWIN_Print_Aborted();
#if HAS_FILAMENT_SENSOR
void DWIN_FilamentRunout(const uint8_t extruder);
#endif
void DWIN_Progress_Update();
void DWIN_M73();
void DWIN_Print_Header(const char *text);
void DWIN_SetColorDefaults();
void DWIN_ApplyColor();
void DWIN_StoreSettings(char *buff);
void DWIN_LoadSettings(const char *buff);
void DWIN_CopySettingsTo(char * const buff);
void DWIN_CopySettingsFrom(const char * const buff);
void DWIN_SetDataDefaults();
void DWIN_RebootScreen();

View File

@ -80,7 +80,7 @@
#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()
#endif
#if ENABLED(CASELIGHT_USES_BRIGHTNESS)

View File

@ -50,7 +50,7 @@ inline void Draw_Popup_Bkgd() {
template<typename T, typename U>
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();
if (icon) DWINUI::Draw_Icon(icon, 101, 105);
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
void DWINUI::ClearMenuArea() {
void DWINUI::ClearMainArea() {
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
// Area (0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - 1)
void ClearMenuArea();
void ClearMainArea();
// Clear MenuItems array and free MenuItems elements
void MenuItemsClear();

View File

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

View File

@ -50,11 +50,10 @@ void LockScreenClass::init() {
}
void LockScreenClass::draw() {
Title.SetCaption(PSTR("Lock Screen"));
DWINUI::ClearMenuArea();
DWINUI::ClearMainArea();
DWINUI::Draw_Icon(ICON_LOGO, 71, 120); // CREALITY logo
DWINUI::Draw_CenteredString(Color_White, 180, F("Printer is Locked,"));
DWINUI::Draw_CenteredString(Color_White, 200, F("Scroll to unlock."));
DWINUI::Draw_CenteredString(Color_White, 180, GET_TEXT_F(MSG_LOCKSCREEN_LOCKED));
DWINUI::Draw_CenteredString(Color_White, 200, GET_TEXT_F(MSG_LOCKSCREEN_UNLOCK));
DWINUI::Draw_CenteredString(Color_White, 240, F("-> | <-"));
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);

View File

@ -67,7 +67,7 @@ void MeshViewerClass::DrawMesh(bed_mesh_t zval, const uint8_t sizex, const uint8
max = (float)maxz / 100;
min = (float)minz / 100;
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));
LOOP_S_L_N(x, 1, sizex - 1) DrawMeshVLine(x);
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]);
break;
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;
case 1 ... 99:
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*/) {
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);
if (withsave) {
DWINUI::Draw_Button(BTN_Save, 26, 305);
DWINUI::Draw_Button(BTN_Continue, 146, 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] = "";
ui.status_printf(0, F("Mesh minZ: %s, maxZ: %s"),
dtostrf(min, 1, 2, str_1),

View File

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

View File

@ -326,8 +326,8 @@ namespace Language_de {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
LSTR MSG_PID_CYCLE = _UxGT("PID Zyklus");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID Tuning fertig");
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_BAD_EXTRUDER_NUM = _UxGT("Autotune fehlge.! Falscher Extruder");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune fehlge.! Temperatur zu hoch.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autotune fehlge.! Timeout.");
LSTR MSG_SELECT = _UxGT("Auswählen");
LSTR MSG_SELECT_E = _UxGT("Auswählen *");

View File

@ -54,6 +54,7 @@ namespace Language_en {
LSTR MSG_YES = _UxGT("YES");
LSTR MSG_NO = _UxGT("NO");
LSTR MSG_BACK = _UxGT("Back");
LSTR MSG_ERROR = _UxGT("Error");
LSTR MSG_MEDIA_ABORTING = _UxGT("Aborting...");
LSTR MSG_MEDIA_INSERTED = MEDIA_TYPE_EN _UxGT(" Inserted");
LSTR MSG_MEDIA_REMOVED = MEDIA_TYPE_EN _UxGT(" Removed");
@ -340,8 +341,11 @@ namespace Language_en {
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
LSTR MSG_PID_CYCLE = _UxGT("PID Cycles");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
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_AUTOTUNE_FAILED = _UxGT("PID Autotune failed!");
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_SELECT = _UxGT("Select");
LSTR MSG_SELECT_E = _UxGT("Select *");
@ -599,6 +603,9 @@ namespace Language_en {
LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness");
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
LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No media inserted.");
LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait until reboot. ");
@ -617,7 +624,6 @@ namespace Language_en {
LSTR MSG_COLORS_WHITE = _UxGT("White");
LSTR MSG_UI_LANGUAGE = _UxGT("UI Language");
LSTR MSG_SOUND_ENABLE = _UxGT("Enable sound");
LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen");
#else
LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No Media");
LSTR MSG_PLEASE_PREHEAT = _UxGT("Please Preheat");

View File

@ -261,9 +261,9 @@ namespace Language_gl {
LSTR MSG_PID_AUTOTUNE = _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_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_TIMEOUT = _UxGT("Auto-Sint. fallida. Tempo excedido.");
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_TIMEOUT = _UxGT("Auto-Sint. fallida! Tempo excedido.");
LSTR MSG_SELECT = _UxGT("Escolla");
LSTR MSG_SELECT_E = _UxGT("Escolla *");
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_CYCLE = _UxGT("PID ciklus");
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_TEMP_TOO_HIGH = _UxGT("Hangolási hiba. Magas hömérséklet.");
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_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés.");
LSTR MSG_SELECT = _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_CYCLE = _UxGT("Ciclo PID");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita");
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_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita! Estrusore errato.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita! Temperatura troppo alta.");
LSTR MSG_PID_TIMEOUT = _UxGT("Calibrazione fallita! Tempo scaduto.");
LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss");
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_E = _UxGT("PID Autotune *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
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_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_SELECT = _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_E = _UxGT("Автоподбор PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Подбор PID выполнен");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Сбой автоподбора. Плохой экструдер.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Сбой автоподбора. Температура повышена.");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Сбой автоподбора! Плохой экструдер.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Сбой автоподбора! Температура повышена.");
LSTR MSG_PID_TIMEOUT = _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_CYCLE = _UxGT("Cykly PID");
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_TEMP_TOO_HIGH = _UxGT("Auto-kal. zlyhala. Príliš vysoká tepl.");
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_TIMEOUT = _UxGT("Auto-kal. zlyhala! Čas vypršal.");
LSTR MSG_SELECT = _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_E = _UxGT("PID Autojustera *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
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_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_TIMEOUT = _UxGT("Autojustera misslyckad! Tidsgräns.");
LSTR MSG_SELECT = _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_E = _UxGT("Автопідбір PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Підбір PID виконано");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Збій автопідбору. Поганий екструдер.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Збій автопідбору. Температура завищена.");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Збій автопідбору! Поганий екструдер.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Збій автопідбору! Температура завищена.");
LSTR MSG_PID_TIMEOUT = _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_E = _UxGT("自动PID *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID调整完成");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败. 坏的挤出机");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败. 温度太高");
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败! 坏的挤出机");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败! 温度太高");
LSTR MSG_PID_TIMEOUT = _UxGT("自动调失败! 超时");
LSTR MSG_SELECT = _UxGT("选择"); // "Select"
LSTR MSG_SELECT_E = _UxGT("选择 *");

View File

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

View File

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

View File

@ -29,6 +29,7 @@
#if HAS_MARLINUI_MENU
#include "menu_item.h"
#include "../../MarlinCore.h"
#include "../../module/planner.h"
#if DISABLED(NO_VOLUMETRICS)

View File

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

View File

@ -30,6 +30,8 @@
#include "menu_item.h"
#include "../../MarlinCore.h"
#if HAS_FILAMENT_SENSOR
#include "../../feature/runout.h"
#endif

View File

@ -35,6 +35,9 @@
#if HAS_FILAMENT_SENSOR
#include "../../feature/runout.h"
#endif
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
#include "../../MarlinCore.h"
#endif
//
// Change Filament > Change/Unload/Load Filament

View File

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

View File

@ -1478,7 +1478,7 @@ void MarlinSettings::postprocess() {
{
_FIELD_TEST(dwin_data);
char dwin_data[eeprom_data_size] = { 0 };
DWIN_StoreSettings(dwin_data);
DWIN_CopySettingsTo(dwin_data);
EEPROM_WRITE(dwin_data);
}
#endif
@ -2426,7 +2426,7 @@ void MarlinSettings::postprocess() {
const char dwin_data[eeprom_data_size] = { 0 };
_FIELD_TEST(dwin_data);
EEPROM_READ(dwin_data);
if (!validating) DWIN_LoadSettings(dwin_data);
if (!validating) DWIN_CopySettingsFrom(dwin_data);
}
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
{
@ -2843,7 +2843,6 @@ void MarlinSettings::reset() {
#endif
#endif
TERN_(DWIN_LCD_PROUI, DWIN_SetDataDefaults());
TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings());
//
@ -3214,6 +3213,11 @@ void MarlinSettings::reset() {
//
TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings());
//
// Ender-3 V2 with ProUI
//
TERN_(DWIN_LCD_PROUI, DWIN_SetDataDefaults());
postprocess();
#if EITHER(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE)