From 108f0b0cf55cd5acd840837bd8bd50a488ee4a56 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 29 Jan 2024 22:31:49 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20LCD=20Code?= =?UTF-8?q?=20patches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 70 +- Marlin/src/lcd/HD44780/marlinui_HD44780.h | 2 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 10 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h | 1 - Marlin/src/lcd/dogm/HAL_LCD_com_defines.h | 5 +- Marlin/src/lcd/dogm/fontdata/langdata_ro.h | 8 +- Marlin/src/lcd/dogm/lcdprint_u8g.cpp | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.h | 23 +- Marlin/src/lcd/dogm/status/chamber.h | 48 +- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 5 +- .../lcd/dogm/status_screen_lite_ST7920.cpp | 6 +- .../lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp | 20 +- Marlin/src/lcd/dogm/u8g_fontutf8.cpp | 2 +- Marlin/src/lcd/dogm/u8g_fontutf8.h | 2 +- Marlin/src/lcd/e3v2/common/dwin_font.h | 12 +- Marlin/src/lcd/e3v2/common/encoder.cpp | 9 +- Marlin/src/lcd/e3v2/common/encoder.h | 2 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 4 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 16 +- Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp | 8 +- Marlin/src/lcd/e3v2/marlinui/dwin_string.h | 2 +- Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 2 +- .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 2 +- Marlin/src/lcd/e3v2/proui/dwin.cpp | 5 +- Marlin/src/lcd/e3v2/proui/dwin_defines.h | 4 +- Marlin/src/lcd/e3v2/proui/dwinui.h | 3 +- Marlin/src/lcd/e3v2/proui/gcode_preview.cpp | 2 +- Marlin/src/lcd/e3v2/proui/gcode_preview.h | 24 +- Marlin/src/lcd/e3v2/proui/plot.h | 2 +- .../extui/anycubic_chiron/chiron_extui.cpp | 16 +- .../extui/anycubic_i3mega/anycubic_extui.cpp | 17 +- Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp | 2 +- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 16 +- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 6 +- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 6 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 8 +- .../extui/dgus/origin/DGUSScreenHandler.cpp | 6 +- .../lcd/extui/dgus_reloaded/DGUSDisplay.cpp | 4 +- .../extui/dgus_reloaded/DGUSScreenHandler.cpp | 8 +- .../extui/dgus_reloaded/DGUSSetupHandler.cpp | 2 +- .../extui/dgus_reloaded/config/DGUS_Addr.h | 26 +- .../dgus_reloaded/config/DGUS_Constants.h | 4 +- .../dgus_reloaded/definition/DGUS_VPList.cpp | 2 +- .../dgus_reloaded/dgus_reloaded_extui.cpp | 16 +- Marlin/src/lcd/extui/example/example.cpp | 16 +- .../bioprinter/main_menu.cpp | 2 +- .../cocoa_press/_bootscreen_landscape.h | 133 +++ .../cocoa_press/about_screen.cpp | 116 +++ .../cocoa_press/about_screen.h | 33 + .../cocoa_press/cocoa_press_bitmap.h | 248 ++++++ .../cocoa_press/cocoa_press_ui.h | 84 +- .../cocoa_press/files_screen.cpp | 18 +- .../cocoa_press/leveling_menu.cpp | 59 +- .../cocoa_press/load_chocolate.cpp | 37 +- .../cocoa_press/main_menu.cpp | 19 +- .../ftdi_eve_touch_ui/cocoa_press/main_menu.h | 1 + .../cocoa_press/preheat_menu.cpp | 58 +- .../cocoa_press/preheat_screen.cpp | 32 +- .../ftdi_eve_touch_ui/cocoa_press/screens.h | 8 +- .../cocoa_press/statistics_screen.cpp | 82 ++ .../cocoa_press/statistics_screen.h | 32 + .../cocoa_press/status_screen.cpp | 339 ++++--- .../cocoa_press/status_screen.h | 20 +- .../cocoa_press/z_offset_screen.cpp | 59 ++ .../cocoa_press/z_offset_screen.h | 32 + .../cocoa_press/z_offset_wizard.cpp | 162 ++++ .../cocoa_press/z_offset_wizard.h | 43 + .../ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 21 +- .../ftdi_eve_lib/basic/commands.cpp | 8 + .../ftdi_eve_lib/basic/commands.h | 1 + .../ftdi_eve_touch_ui/ftdi_eve_lib/compat.h | 7 +- .../extended/circular_progress.cpp | 16 +- .../ftdi_eve_lib/extended/unicode/unicode.cpp | 8 - .../ftdi_eve_lib/extended/unicode/unicode.h | 1 - .../ftdi_eve_lib/scripts/file2cpp.py | 2 +- .../ftdi_eve_lib/scripts/font2cpp.py | 2 +- .../ftdi_eve_lib/scripts/img2cpp.py | 8 +- .../ftdi_eve_lib/scripts/svg2cpp.py | 116 ++- .../generic/bed_mesh_edit_screen.cpp | 8 +- .../generic/bed_mesh_view_screen.cpp | 9 +- .../generic/bed_mesh_view_screen.h | 2 +- .../ftdi_eve_touch_ui/generic/boot_screen.cpp | 2 +- .../generic/endstop_state_screen.cpp | 14 +- .../generic/filament_runout_screen.cpp | 4 +- .../generic/language_menu.cpp | 2 + .../generic/leveling_menu.cpp | 6 +- .../ftdi_eve_touch_ui/generic/main_menu.cpp | 36 +- .../generic/move_axis_screen.cpp | 16 +- .../generic/move_axis_screen.h | 8 +- .../generic/status_screen.cpp | 8 +- .../generic/temperature_screen.cpp | 2 +- .../ftdi_eve_touch_ui/language/language_en.h | 5 +- .../extui/ftdi_eve_touch_ui/pin_mappings.h | 14 +- .../lcd/extui/ftdi_eve_touch_ui/screen_data.h | 2 + .../lcd/extui/ftdi_eve_touch_ui/screens.cpp | 4 + .../extui/ftdi_eve_touch_ui/theme/bitmaps.h | 263 +++--- .../theme/bootscreen_logo_portrait.h | 41 - .../extui/ftdi_eve_touch_ui/theme/sounds.cpp | 41 +- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 25 +- Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp | 20 +- Marlin/src/lcd/extui/mks_ui/SPI_TFT.h | 10 +- .../mks_ui/draw_acceleration_settings.cpp | 6 +- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 2 + .../lcd/extui/mks_ui/draw_error_message.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp | 2 +- .../src/lcd/extui/mks_ui/draw_number_key.cpp | 12 +- .../src/lcd/extui/mks_ui/draw_print_file.cpp | 6 +- Marlin/src/lcd/extui/mks_ui/draw_ui.h | 10 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 73 +- Marlin/src/lcd/extui/mks_ui/pic_manager.cpp | 42 +- Marlin/src/lcd/extui/mks_ui/pic_manager.h | 4 +- .../extui/mks_ui/tft_lvgl_configuration.cpp | 48 +- .../lcd/extui/mks_ui/tft_lvgl_configuration.h | 6 +- .../lcd/extui/mks_ui/tft_multi_language.cpp | 6 +- .../src/lcd/extui/mks_ui/tft_multi_language.h | 2 +- .../src/lcd/extui/mks_ui/wifiSerial_STM32.cpp | 8 +- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 825 +++++++++--------- Marlin/src/lcd/extui/mks_ui/wifi_module.h | 8 +- Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp | 48 +- .../src/lcd/extui/nextion/nextion_extui.cpp | 16 +- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 12 +- Marlin/src/lcd/extui/ui_api.cpp | 20 +- Marlin/src/lcd/extui/ui_api.h | 10 +- Marlin/src/lcd/language/language_an.h | 2 +- Marlin/src/lcd/language/language_bg.h | 2 +- Marlin/src/lcd/language/language_ca.h | 2 +- Marlin/src/lcd/language/language_cz.h | 6 +- Marlin/src/lcd/language/language_da.h | 2 +- Marlin/src/lcd/language/language_de.h | 8 +- Marlin/src/lcd/language/language_el.h | 2 +- Marlin/src/lcd/language/language_el_gr.h | 2 +- Marlin/src/lcd/language/language_en.h | 20 +- Marlin/src/lcd/language/language_es.h | 6 +- Marlin/src/lcd/language/language_eu.h | 2 +- Marlin/src/lcd/language/language_fi.h | 2 +- Marlin/src/lcd/language/language_fr.h | 6 +- Marlin/src/lcd/language/language_gl.h | 6 +- Marlin/src/lcd/language/language_hr.h | 2 +- Marlin/src/lcd/language/language_hu.h | 14 +- Marlin/src/lcd/language/language_it.h | 11 +- Marlin/src/lcd/language/language_jp_kana.h | 2 +- Marlin/src/lcd/language/language_ko_KR.h | 2 +- Marlin/src/lcd/language/language_nl.h | 2 +- Marlin/src/lcd/language/language_pl.h | 10 +- Marlin/src/lcd/language/language_pt.h | 2 +- Marlin/src/lcd/language/language_pt_br.h | 4 +- Marlin/src/lcd/language/language_ro.h | 6 +- Marlin/src/lcd/language/language_ru.h | 21 +- Marlin/src/lcd/language/language_sk.h | 10 +- Marlin/src/lcd/language/language_sv.h | 8 +- Marlin/src/lcd/language/language_test.h | 12 +- Marlin/src/lcd/language/language_tr.h | 10 +- Marlin/src/lcd/language/language_uk.h | 8 +- Marlin/src/lcd/language/language_vi.h | 2 +- Marlin/src/lcd/language/language_zh_CN.h | 6 +- Marlin/src/lcd/language/language_zh_TW.h | 10 +- Marlin/src/lcd/lcdprint.cpp | 6 +- Marlin/src/lcd/lcdprint.h | 12 +- Marlin/src/lcd/marlinui.cpp | 44 +- Marlin/src/lcd/marlinui.h | 23 +- Marlin/src/lcd/menu/menu.cpp | 8 +- Marlin/src/lcd/menu/menu.h | 32 +- Marlin/src/lcd/menu/menu_advanced.cpp | 32 +- Marlin/src/lcd/menu/menu_backlash.cpp | 6 +- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 4 +- ..._bed_corners.cpp => menu_bed_tramming.cpp} | 94 +- Marlin/src/lcd/menu/menu_cancelobject.cpp | 2 +- Marlin/src/lcd/menu/menu_configuration.cpp | 10 +- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 2 +- Marlin/src/lcd/menu/menu_filament.cpp | 11 +- Marlin/src/lcd/menu/menu_game.cpp | 2 +- Marlin/src/lcd/menu/menu_info.cpp | 2 +- Marlin/src/lcd/menu/menu_item.h | 34 +- Marlin/src/lcd/menu/menu_language.cpp | 6 +- Marlin/src/lcd/menu/menu_led.cpp | 2 +- Marlin/src/lcd/menu/menu_main.cpp | 22 +- Marlin/src/lcd/menu/menu_media.cpp | 11 +- Marlin/src/lcd/menu/menu_mixer.cpp | 2 +- Marlin/src/lcd/menu/menu_mmu2.cpp | 2 +- Marlin/src/lcd/menu/menu_motion.cpp | 4 +- Marlin/src/lcd/menu/menu_power_monitor.cpp | 2 +- Marlin/src/lcd/menu/menu_probe_offset.cpp | 6 +- Marlin/src/lcd/menu/menu_spindle_laser.cpp | 2 +- Marlin/src/lcd/menu/menu_temperature.cpp | 6 +- ..._tramming.cpp => menu_tramming_wizard.cpp} | 0 Marlin/src/lcd/menu/menu_tune.cpp | 2 +- Marlin/src/lcd/menu/menu_x_twist.cpp | 6 +- Marlin/src/lcd/tft/canvas.cpp | 2 +- Marlin/src/lcd/tft/tft.h | 16 +- Marlin/src/lcd/tft/tft_queue.cpp | 6 +- Marlin/src/lcd/tft/tft_string.cpp | 8 +- Marlin/src/lcd/tft/tft_string.h | 2 +- Marlin/src/lcd/tft_io/tft_io.h | 4 +- Marlin/src/lcd/touch/touch_buttons.cpp | 2 +- Marlin/src/lcd/{fontutils.cpp => utf8.cpp} | 23 +- Marlin/src/lcd/{fontutils.h => utf8.h} | 4 +- Marlin/src/sd/cardreader.cpp | 4 +- buildroot/share/dwin/bin/DWIN_ICO.py | 191 ++-- .../000-ICON_BootLogo.jpg | Bin .../001-ICON_OpenSourceFirmware.jpg | Bin .../{icons-2 => icons-3}/002-ICON_GitHub.jpg | Bin .../{icons-2 => icons-3}/003-ICON_Website.jpg | Bin .../004-ICON_Copyright.jpg | Bin .../000-ICON_LOGO_Marlin.jpg | Bin .../001-ICON_HotendOff.jpg | Bin .../002-ICON_HotendOn.jpg | Bin .../{icons-3 => icons-4}/003-ICON_BedOff.jpg | Bin .../{icons-3 => icons-4}/004-ICON_BedOn.jpg | Bin .../{icons-3 => icons-4}/005-ICON_Fan0.jpg | Bin .../{icons-3 => icons-4}/006-ICON_Fan1.jpg | Bin .../{icons-3 => icons-4}/007-ICON_Fan2.jpg | Bin .../{icons-3 => icons-4}/008-ICON_Fan3.jpg | Bin .../{icons-3 => icons-4}/009-ICON_Halted.jpg | Bin .../010-ICON_Question.jpg | Bin .../{icons-3 => icons-4}/011-ICON_Alert.jpg | Bin .../012-ICON_RotateCW.jpg | Bin .../013-ICON_RotateCCW.jpg | Bin .../{icons-3 => icons-4}/014-ICON_UpArrow.jpg | Bin .../015-ICON_DownArrow.jpg | Bin .../000-ICON_LOGO_Creality.jpg | Bin .../{icons-6 => icons-7}/001-ICON_Print_0.jpg | Bin .../{icons-6 => icons-7}/002-ICON_Print_1.jpg | Bin .../003-ICON_Prepare_0.jpg | Bin .../004-ICON_Prepare_1.jpg | Bin .../005-ICON_Control_0.jpg | Bin .../006-ICON_Control_1.jpg | Bin .../007-ICON_Leveling_0.jpg | Bin .../008-ICON_Leveling_1.jpg | Bin .../009-ICON_HotendTemp.jpg | Bin .../{icons-6 => icons-7}/010-ICON_BedTemp.jpg | Bin .../{icons-6 => icons-7}/011-ICON_Speed.jpg | Bin .../{icons-6 => icons-7}/012-ICON_Zoffset.jpg | Bin .../{icons-6 => icons-7}/013-ICON_Back.jpg | Bin .../{icons-6 => icons-7}/014-ICON_File.jpg | Bin .../015-ICON_PrintTime.jpg | Bin .../016-ICON_RemainTime.jpg | Bin .../{icons-6 => icons-7}/017-ICON_Setup_0.jpg | Bin .../{icons-6 => icons-7}/018-ICON_Setup_1.jpg | Bin .../{icons-6 => icons-7}/019-ICON_Pause_0.jpg | Bin .../{icons-6 => icons-7}/020-ICON_Pause_1.jpg | Bin .../021-ICON_Continue_0.jpg | Bin .../022-ICON_Continue_1.jpg | Bin .../{icons-6 => icons-7}/023-ICON_Stop_0.jpg | Bin .../{icons-6 => icons-7}/024-ICON_Stop_1.jpg | Bin .../{icons-6 => icons-7}/025-ICON_Bar.jpg | Bin .../{icons-6 => icons-7}/026-ICON_More.jpg | Bin .../{icons-6 => icons-7}/027-ICON_Axis.jpg | Bin .../028-ICON_CloseMotor.jpg | Bin .../{icons-6 => icons-7}/029-ICON_Homing.jpg | Bin .../{icons-6 => icons-7}/030-ICON_SetHome.jpg | Bin .../031-ICON_PLAPreheat.jpg | Bin .../032-ICON_ABSPreheat.jpg | Bin .../{icons-6 => icons-7}/033-ICON_Cool.jpg | Bin .../034-ICON_Language.jpg | Bin .../{icons-6 => icons-7}/035-ICON_MoveX.jpg | Bin .../{icons-6 => icons-7}/036-ICON_MoveY.jpg | Bin .../{icons-6 => icons-7}/037-ICON_MoveZ.jpg | Bin .../038-ICON_Extruder.jpg | Bin .../040-ICON_Temperature.jpg | Bin .../{icons-6 => icons-7}/041-ICON_Motion.jpg | Bin .../042-ICON_WriteEEPROM.jpg | Bin .../043-ICON_ReadEEPROM.jpg | Bin .../044-ICON_ResetEEPROM.jpg} | Bin .../{icons-6 => icons-7}/045-ICON_Info.jpg | Bin .../046-ICON_SetEndTemp.jpg | Bin .../047-ICON_SetBedTemp.jpg | Bin .../048-ICON_FanSpeed.jpg | Bin .../049-ICON_SetPLAPreheat.jpg | Bin .../050-ICON_SetABSPreheat.jpg | Bin .../051-ICON_MaxSpeed.jpg | Bin .../052-ICON_MaxAccelerated.jpg | Bin .../{icons-6 => icons-7}/053-ICON_MaxJerk.jpg | Bin .../{icons-6 => icons-7}/054-ICON_Step.jpg | Bin .../055-ICON_PrintSize.jpg | Bin .../{icons-6 => icons-7}/056-ICON_Version.jpg | Bin .../{icons-6 => icons-7}/057-ICON_Contact.jpg | Bin .../058-ICON_StockConfiguraton.jpg | Bin .../059-ICON_MaxSpeedX.jpg | Bin .../060-ICON_MaxSpeedY.jpg | Bin .../061-ICON_MaxSpeedZ.jpg | Bin .../062-ICON_MaxSpeedE.jpg | Bin .../{icons-6 => icons-7}/063-ICON_MaxAccX.jpg | Bin .../{icons-6 => icons-7}/064-ICON_MaxAccY.jpg | Bin .../{icons-6 => icons-7}/065-ICON_MaxAccZ.jpg | Bin .../{icons-6 => icons-7}/066-ICON_MaxAccE.jpg | Bin .../067-ICON_MaxSpeedJerkX.jpg | Bin .../068-ICON_MaxSpeedJerkY.jpg | Bin .../069-ICON_MaxSpeedJerkZ.jpg | Bin .../070-ICON_MaxSpeedJerkE.jpg | Bin .../{icons-6 => icons-7}/071-ICON_StepX.jpg | Bin .../{icons-6 => icons-7}/072-ICON_StepY.jpg | Bin .../{icons-6 => icons-7}/073-ICON_StepZ.jpg | Bin .../{icons-6 => icons-7}/074-ICON_StepE.jpg | Bin .../075-ICON_Setspeed.jpg | Bin .../076-ICON_SetZOffset.jpg | Bin .../077-ICON_Rectangle.jpg | Bin .../{icons-6 => icons-7}/078-ICON_BLTouch.jpg | Bin .../079-ICON_TempTooLow.jpg | Bin .../080-ICON_AutoLeveling.jpg | Bin .../081-ICON_TempTooHigh.jpg | Bin .../082-ICON_NoTips_C.jpg | Bin .../083-ICON_NoTips_E.jpg | Bin .../084-ICON_Continue_C.jpg | Bin .../085-ICON_Continue_E.jpg | Bin .../086-ICON_Cancel_C.jpg | Bin .../087-ICON_Cancel_E.jpg | Bin .../088-ICON_Confirm_C.jpg | Bin .../089-ICON_Confirm_E.jpg | Bin .../{icons-6 => icons-7}/090-ICON_Info_0.jpg | Bin .../{icons-6 => icons-7}/091-ICON_Info_1.jpg | Bin buildroot/share/dwin/make_jpgs.sh | 42 +- 312 files changed, 3026 insertions(+), 1860 deletions(-) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/_bootscreen_landscape.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_bitmap.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.h mode change 100644 => 100755 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py delete mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h rename Marlin/src/lcd/menu/{menu_bed_corners.cpp => menu_bed_tramming.cpp} (83%) rename Marlin/src/lcd/menu/{menu_tramming.cpp => menu_tramming_wizard.cpp} (100%) rename Marlin/src/lcd/{fontutils.cpp => utf8.cpp} (91%) rename Marlin/src/lcd/{fontutils.h => utf8.h} (97%) rename buildroot/share/dwin/{icons-2 => icons-3}/000-ICON_BootLogo.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/001-ICON_OpenSourceFirmware.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/002-ICON_GitHub.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/003-ICON_Website.jpg (100%) rename buildroot/share/dwin/{icons-2 => icons-3}/004-ICON_Copyright.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/000-ICON_LOGO_Marlin.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/001-ICON_HotendOff.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/002-ICON_HotendOn.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/003-ICON_BedOff.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/004-ICON_BedOn.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/005-ICON_Fan0.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/006-ICON_Fan1.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/007-ICON_Fan2.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/008-ICON_Fan3.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/009-ICON_Halted.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/010-ICON_Question.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/011-ICON_Alert.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/012-ICON_RotateCW.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/013-ICON_RotateCCW.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/014-ICON_UpArrow.jpg (100%) rename buildroot/share/dwin/{icons-3 => icons-4}/015-ICON_DownArrow.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/000-ICON_LOGO_Creality.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/001-ICON_Print_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/002-ICON_Print_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/003-ICON_Prepare_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/004-ICON_Prepare_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/005-ICON_Control_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/006-ICON_Control_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/007-ICON_Leveling_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/008-ICON_Leveling_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/009-ICON_HotendTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/010-ICON_BedTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/011-ICON_Speed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/012-ICON_Zoffset.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/013-ICON_Back.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/014-ICON_File.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/015-ICON_PrintTime.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/016-ICON_RemainTime.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/017-ICON_Setup_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/018-ICON_Setup_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/019-ICON_Pause_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/020-ICON_Pause_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/021-ICON_Continue_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/022-ICON_Continue_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/023-ICON_Stop_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/024-ICON_Stop_1.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/025-ICON_Bar.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/026-ICON_More.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/027-ICON_Axis.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/028-ICON_CloseMotor.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/029-ICON_Homing.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/030-ICON_SetHome.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/031-ICON_PLAPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/032-ICON_ABSPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/033-ICON_Cool.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/034-ICON_Language.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/035-ICON_MoveX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/036-ICON_MoveY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/037-ICON_MoveZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/038-ICON_Extruder.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/040-ICON_Temperature.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/041-ICON_Motion.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/042-ICON_WriteEEPROM.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/043-ICON_ReadEEPROM.jpg (100%) rename buildroot/share/dwin/{icons-6/044-ICON_ResumeEEPROM.jpg => icons-7/044-ICON_ResetEEPROM.jpg} (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/045-ICON_Info.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/046-ICON_SetEndTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/047-ICON_SetBedTemp.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/048-ICON_FanSpeed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/049-ICON_SetPLAPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/050-ICON_SetABSPreheat.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/051-ICON_MaxSpeed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/052-ICON_MaxAccelerated.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/053-ICON_MaxJerk.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/054-ICON_Step.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/055-ICON_PrintSize.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/056-ICON_Version.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/057-ICON_Contact.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/058-ICON_StockConfiguraton.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/059-ICON_MaxSpeedX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/060-ICON_MaxSpeedY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/061-ICON_MaxSpeedZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/062-ICON_MaxSpeedE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/063-ICON_MaxAccX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/064-ICON_MaxAccY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/065-ICON_MaxAccZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/066-ICON_MaxAccE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/067-ICON_MaxSpeedJerkX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/068-ICON_MaxSpeedJerkY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/069-ICON_MaxSpeedJerkZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/070-ICON_MaxSpeedJerkE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/071-ICON_StepX.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/072-ICON_StepY.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/073-ICON_StepZ.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/074-ICON_StepE.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/075-ICON_Setspeed.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/076-ICON_SetZOffset.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/077-ICON_Rectangle.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/078-ICON_BLTouch.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/079-ICON_TempTooLow.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/080-ICON_AutoLeveling.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/081-ICON_TempTooHigh.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/082-ICON_NoTips_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/083-ICON_NoTips_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/084-ICON_Continue_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/085-ICON_Continue_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/086-ICON_Cancel_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/087-ICON_Cancel_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/088-ICON_Confirm_C.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/089-ICON_Confirm_E.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/090-ICON_Info_0.jpg (100%) rename buildroot/share/dwin/{icons-6 => icons-7}/091-ICON_Info_1.jpg (100%) diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index b8f6875d9a4d..7585ba95631a 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -103,7 +103,7 @@ #elif ENABLED(YHCB2004) - LCD_CLASS lcd(YHCB2004_CLK, 20, 4, YHCB2004_MOSI, YHCB2004_MISO); // CLK, cols, rows, MOSI, MISO + LCD_CLASS lcd(YHCB2004_SCK_PIN, 20, 4, YHCB2004_MOSI_PIN, YHCB2004_MISO_PIN); // CLK, cols, rows, MOSI, MISO #else @@ -521,7 +521,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const else if (axis_should_home(axis)) while (const char c = *value++) lcd_put_lchar(c <= '.' ? c : '?'); else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis)) - lcd_put_u8str(axis == Z_AXIS ? F(" ") : F(" ")); + lcd_put_u8str(TERN0(HAS_Z_AXIS, axis == Z_AXIS) ? F(" ") : F(" ")); else lcd_put_u8str(value); } @@ -537,7 +537,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const */ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) { #if HAS_HEATED_BED - const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0); + const bool isBed = heater_id == H_BED; const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)), t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); #else @@ -546,7 +546,17 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr if (prefix >= 0) lcd_put_lchar(prefix); - lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1)); + if (t1 >= 0) + lcd_put_u8str(ui16tostr3rj(t1)); + else { + #if ENABLED(SHOW_TEMPERATURE_BELOW_ZERO) + char * const str = i16tostr3rj(t1); + lcd_put_u8str(&str[1]); + #else + lcd_put_u8str(F("err")); + #endif + } + lcd_put_u8str(F("/")); #if !HEATER_IDLE_HANDLER @@ -762,9 +772,10 @@ void MarlinUI::draw_status_message(const bool blink) { #define TPOFFSET (LCD_WIDTH - 1) static uint8_t timepos = TPOFFSET - 6; static char buffer[8]; - static lcd_uint_t pc, pr; #if ENABLED(SHOW_PROGRESS_PERCENT) + static lcd_uint_t pc = 0, pr = 2; + inline void setPercentPos(const lcd_uint_t c, const lcd_uint_t r) { pc = c; pr = r; } void MarlinUI::drawPercent() { const uint8_t progress = ui.get_progress_percent(); if (progress) { @@ -926,7 +937,7 @@ void MarlinUI::draw_status_screen() { #if LCD_WIDTH < 20 #if HAS_PRINT_PROGRESS - pc = 0; pr = 2; + TERN_(SHOW_PROGRESS_PERCENT, setPercentPos(0, 2)); rotate_progress(); #endif @@ -952,25 +963,25 @@ void MarlinUI::draw_status_screen() { // Two-component mix / gradient instead of XY - char mixer_messages[12]; - const char *mix_label; + char mixer_messages[15]; + PGM_P mix_label; #if ENABLED(GRADIENT_MIX) if (mixer.gradient.enabled) { mixer.update_mix_from_gradient(); - mix_label = "Gr"; + mix_label = PSTR("Gr"); } else #endif { mixer.update_mix_from_vtool(); - mix_label = "Mx"; + mix_label = PSTR("Mx"); } - sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); + sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); lcd_put_u8str(mixer_messages); #else // !HAS_DUAL_MIXING - const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive()); + const bool show_e_total = TERN1(HAS_X_AXIS, TERN0(LCD_SHOW_E_TOTAL, printingIsActive())); if (show_e_total) { #if ENABLED(LCD_SHOW_E_TOTAL) @@ -981,10 +992,14 @@ void MarlinUI::draw_status_screen() { #endif } else { - const xy_pos_t lpos = current_position.asLogical(); - _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink); - lcd_put_u8str(F(" ")); - _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink); + #if HAS_X_AXIS + const xy_pos_t lpos = current_position.asLogical(); + _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink); + #endif + #if HAS_Y_AXIS + TERN_(HAS_X_AXIS, lcd_put_u8str(F(" "))); + _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink); + #endif } #endif // !HAS_DUAL_MIXING @@ -993,11 +1008,12 @@ void MarlinUI::draw_status_screen() { #endif // LCD_WIDTH >= 20 - lcd_moveto(LCD_WIDTH - 8, 1); - _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); - - #if HAS_LEVELING && !HAS_HEATED_BED - lcd_put_lchar(planner.leveling_active || blink ? '_' : ' '); + #if HAS_Z_AXIS + lcd_moveto(LCD_WIDTH - 8, 1); + _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); + #if HAS_LEVELING && !HAS_HEATED_BED + lcd_put_lchar(planner.leveling_active || blink ? '_' : ' '); + #endif #endif #endif // LCD_HEIGHT > 2 @@ -1013,7 +1029,7 @@ void MarlinUI::draw_status_screen() { #if LCD_WIDTH >= 20 #if HAS_PRINT_PROGRESS - pc = 6; pr = 2; + TERN_(SHOW_PROGRESS_PERCENT, setPercentPos(6, 2)); rotate_progress(); #else char c; @@ -1059,8 +1075,10 @@ void MarlinUI::draw_status_screen() { // // Z Coordinate // - lcd_moveto(LCD_WIDTH - 9, 0); - _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); + #if HAS_Z_AXIS + lcd_moveto(LCD_WIDTH - 9, 0); + _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); + #endif #if HAS_LEVELING && (HAS_MULTI_HOTEND || !HAS_HEATED_BED) lcd_put_lchar(LCD_WIDTH - 1, 0, planner.leveling_active || blink ? '_' : ' '); @@ -1094,7 +1112,7 @@ void MarlinUI::draw_status_screen() { _draw_bed_status(blink); #elif HAS_PRINT_PROGRESS #define DREW_PRINT_PROGRESS 1 - pc = 0; pr = 2; + TERN_(SHOW_PROGRESS_PERCENT, setPercentPos(0, 2)); rotate_progress(); #endif @@ -1102,7 +1120,7 @@ void MarlinUI::draw_status_screen() { // All progress strings // #if HAS_PRINT_PROGRESS && !DREW_PRINT_PROGRESS - pc = LCD_WIDTH - 9; pr = 2; + TERN_(SHOW_PROGRESS_PERCENT, setPercentPos(LCD_WIDTH - 9, 2)); rotate_progress(); #endif #endif // LCD_INFO_SCREEN_STYLE 1 diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.h b/Marlin/src/lcd/HD44780/marlinui_HD44780.h index f9e6dd95954a..b83454845680 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.h +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.h @@ -103,5 +103,5 @@ #endif -#include "../fontutils.h" +#include "../utf8.h" #include "../lcdprint.h" diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 77f9cb8a6a74..b1068982925c 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -864,20 +864,20 @@ void MarlinUI::draw_status_screen() { #if DUAL_MIXING_EXTRUDER lcd_moveto(0, 4); // Two-component mix / gradient instead of XY - char mixer_messages[12]; - const char *mix_label; + char mixer_messages[15]; + PGM_P mix_label; #if ENABLED(GRADIENT_MIX) if (mixer.gradient.enabled) { mixer.update_mix_from_gradient(); - mix_label = "Gr"; + mix_label = PSTR("Gr"); } else #endif { mixer.update_mix_from_vtool(); - mix_label = "Mx"; + mix_label = PSTR("Mx"); } - sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); + sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); lcd_put_u8str(mixer_messages); #endif #endif diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h index c399b907e460..3e447fa19617 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h @@ -57,7 +57,6 @@ class TFTGLCD { extern TFTGLCD lcd; -#include "../fontutils.h" #include "../lcdprint.h" // Use panel encoder - free old encoder pins diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index 6df641315895..059b4eca1df6 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -21,7 +21,9 @@ */ #pragma once -// Use this file to select the com driver for device drivers that are NOT in the U8G library +/** + * Assign custom or standard U8G device drivers + */ #include @@ -114,6 +116,7 @@ #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_ST7920_sw_spi_fn #endif +// U8G_HAL_LINKS is defined for LPC1768/9 and Native envs by -DU8G_HAL_LINKS in platform.ini #ifndef U8G_COM_HAL_SW_SPI_FN #define U8G_COM_HAL_SW_SPI_FN u8g_com_null_fn #endif diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h index 6be486355314..bdd4795f8ba2 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h @@ -7,4 +7,10 @@ #include "langdata.h" -static const uxg_fontinfo_t g_fontinfo_ro[] PROGMEM = {}; +const u8g_fntpgm_uint8_t fontpage_2_131_131[31] U8G_FONT_SECTION("fontpage_2_131_131") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x08,0x00,0x00, + 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x70,0x08,0x78,0x88,0x78}; + +static const uxg_fontinfo_t g_fontinfo_ro[] PROGMEM = { + FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă' +}; diff --git a/Marlin/src/lcd/dogm/lcdprint_u8g.cpp b/Marlin/src/lcd/dogm/lcdprint_u8g.cpp index 9a69ceefa84a..20a7eafb6f61 100644 --- a/Marlin/src/lcd/dogm/lcdprint_u8g.cpp +++ b/Marlin/src/lcd/dogm/lcdprint_u8g.cpp @@ -16,7 +16,7 @@ #include "../marlinui.h" #include "../../MarlinCore.h" -#include "../fontutils.h" +#include "../utf8.h" #include "u8g_fontutf8.h" #include "../lcdprint.h" diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 30439e0a2a3b..eda3673fc2a5 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -47,7 +47,7 @@ #endif #include "../lcdprint.h" -#include "../fontutils.h" +#include "../utf8.h" #include "../../libs/numtostr.h" #include "../marlinui.h" diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index a5db49ee8b18..59df915f496e 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -36,15 +36,20 @@ // RepRapWorld Graphical LCD - - #if !HAS_MEDIA && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) - #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL + #if HAS_MEDIA + #ifdef __SAMD21__ + #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL + #else + // Hardware SPI on DUE + #define U8G_CLASS U8GLIB_ST7920_128X64_4X + #endif #define U8G_PARAM LCD_PINS_RS - #elif HAS_MEDIA && __SAMD21__ - - #define U8G_CLASS U8GLIB_ST7920_128X64_4X + #elif (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) + // Hardware SPI shared with SD Card + #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #define U8G_PARAM LCD_PINS_RS #else + // Software SPI #define U8G_CLASS U8GLIB_ST7920_128X64_4X #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS #endif @@ -63,7 +68,7 @@ #else #define U8G_CLASS U8GLIB_ST7920_128X64_RRD // Adjust stripes with PAGE_HEIGHT in ultralcd_st7920_u8glib_rrd.h #endif - #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS // AVR version ignores these pin settings + #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS // AVR version ignores these pin settings // HAL version uses these pin settings #endif @@ -95,7 +100,7 @@ #define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF) #define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI) - #if (SMART_RAMPS && defined(__SAM3X8E__)) || DOGLCD_SCK != SD_SCK_PIN || DOGLCD_MOSI != SD_MOSI_PIN + #if (SMART_RAMPS && defined(__SAM3X8E__)) || (defined(DOGLCD_SCK) && (DOGLCD_SCK != -1 && DOGLCD_SCK != SD_SCK_PIN)) || (defined(DOGLCD_MOSI) && (DOGLCD_MOSI != -1 && DOGLCD_MOSI != SD_MOSI_PIN)) #define FORCE_SOFT_SPI // SW-SPI #endif @@ -228,7 +233,7 @@ #if ENABLED(FORCE_SOFT_SPI) #define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // SW-SPI #else - #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI + #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI #endif #endif diff --git a/Marlin/src/lcd/dogm/status/chamber.h b/Marlin/src/lcd/dogm/status/chamber.h index 787a90884ae8..9b8cc7a0a063 100644 --- a/Marlin/src/lcd/dogm/status/chamber.h +++ b/Marlin/src/lcd/dogm/status/chamber.h @@ -41,32 +41,32 @@ #ifdef STATUS_CHAMBER_ANIM const unsigned char status_chamber_bmp[] PROGMEM = { - B00011111,B11111111,B11111000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00010000,B00000000,B00001000, - B00011111,B11111111,B11111000, - B00011111,B11111111,B11111000 + B00001111,B11111111,B11111000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001000,B00000000,B00001000, + B00001111,B11111111,B11111000, + B00001111,B11111111,B11111000 }; const unsigned char status_chamber_on_bmp[] PROGMEM = { - B00011111,B11111111,B11111000, - B00010000,B00000000,B00001000, - B00010000,B10000100,B00001000, - B00010000,B01000010,B00001000, - B00010000,B01000010,B00001000, - B00010000,B10000100,B00001000, - B00010001,B00001000,B00001000, - B00010001,B00001000,B00001000, - B00010000,B10000100,B00001000, - B00010000,B00000000,B00001000, - B00011111,B11111111,B11111000, - B00011111,B11111111,B11111000 + B00001111,B11111111,B11111000, + B00001000,B00000000,B00001000, + B00001000,B10000100,B00001000, + B00001000,B01000010,B00001000, + B00001000,B01000010,B00001000, + B00001000,B10000100,B00001000, + B00001001,B00001000,B00001000, + B00001001,B00001000,B00001000, + B00001000,B10000100,B00001000, + B00001000,B00000000,B00001000, + B00001111,B11111111,B11111000, + B00001111,B11111111,B11111000 }; #else diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 6538fd8c64c5..1e2a689b5a84 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -96,9 +96,10 @@ DRAWBIT_HOTEND, DRAWBIT_BED = HOTENDS, DRAWBIT_CHAMBER, - DRAWBIT_CUTTER + DRAWBIT_CUTTER, + DRAWBIT_COUNT }; - IF<(DRAWBIT_CUTTER > 7), uint16_t, uint8_t>::type draw_bits; + bits_t(DRAWBIT_COUNT) draw_bits; #endif #if ANIM_HOTEND diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index d114fdb418f0..8b70db5cdbb1 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -73,7 +73,7 @@ #if ENABLED(LIGHTWEIGHT_UI) #include "../marlinui.h" -#include "../fontutils.h" +#include "../utf8.h" #include "../lcdprint.h" #include "../../libs/duration_t.h" #include "../../module/motion.h" @@ -680,10 +680,10 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { void ST7920_Lite_Status_Screen::draw_progress_string(uint8_t addr, const char *str) { set_ddram_address(addr); begin_data(); - write_str(str, TERN(HOTENDS == 1, 8, 6)); + write_str(str, HOTENDS == 1 ? 8 : 6); } - #define PPOS (DDRAM_LINE_3 + TERN(HOTENDS == 1, 4, 5)) // progress string position, in 16-bit words + constexpr uint8_t PPOS = (DDRAM_LINE_3 + (HOTENDS == 1 ? 4 : 5)); // Progress string position, in 16-bit words #if ENABLED(SHOW_PROGRESS_PERCENT) void MarlinUI::drawPercent() { lightUI.drawPercent(); } diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index ae1531e9f8df..d5f1be18ec95 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -84,19 +84,19 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = { void clear_graphics_DRAM(u8g_t *u8g, u8g_dev_t *dev) { u8g_SetChipSelect(u8g, dev, 1); u8g_Delay(1); - u8g_SetAddress(u8g, dev, 0); // cmd mode - u8g_WriteByte(u8g, dev, 0x08); //display off, cursor+blink off - u8g_WriteByte(u8g, dev, 0x3E); //extended mode + GDRAM active - for (uint8_t y = 0; y < (LCD_PIXEL_HEIGHT) / 2; ++y) { //clear GDRAM - u8g_WriteByte(u8g, dev, 0x80 | y); //set y - u8g_WriteByte(u8g, dev, 0x80); //set x = 0 - u8g_SetAddress(u8g, dev, 1); /* data mode */ - for (uint8_t i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; ++i) //2x width clears both segments + u8g_SetAddress(u8g, dev, 0); // Cmd mode + u8g_WriteByte(u8g, dev, 0x08); // Display off, cursor+blink off + u8g_WriteByte(u8g, dev, 0x3E); // Extended mode + GDRAM active + for (uint8_t y = 0; y < (LCD_PIXEL_HEIGHT) / 2; ++y) { // Clear GDRAM + u8g_WriteByte(u8g, dev, 0x80 | y); // Set y + u8g_WriteByte(u8g, dev, 0x80); // Set x = 0 + u8g_SetAddress(u8g, dev, 1); // Data mode + for (uint8_t i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; ++i) // 2x width clears both segments u8g_WriteByte(u8g, dev, 0); - u8g_SetAddress(u8g, dev, 0); /* cmd mode */ + u8g_SetAddress(u8g, dev, 0); // Cmd mode } - u8g_WriteByte(u8g, dev, 0x0C); //display on, cursor+blink off + u8g_WriteByte(u8g, dev, 0x0C); // Display on, cursor+blink off u8g_SetChipSelect(u8g, dev, 0); } diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.cpp b/Marlin/src/lcd/dogm/u8g_fontutf8.cpp index ce0e77a59884..5d9ef627c985 100644 --- a/Marlin/src/lcd/dogm/u8g_fontutf8.cpp +++ b/Marlin/src/lcd/dogm/u8g_fontutf8.cpp @@ -12,7 +12,7 @@ #if HAS_MARLINUI_U8GLIB #include -#include "../fontutils.h" +#include "../utf8.h" #include "u8g_fontutf8.h" typedef void font_t; diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.h b/Marlin/src/lcd/dogm/u8g_fontutf8.h index 660eb28ffeb3..281894509d6f 100644 --- a/Marlin/src/lcd/dogm/u8g_fontutf8.h +++ b/Marlin/src/lcd/dogm/u8g_fontutf8.h @@ -9,7 +9,7 @@ #pragma once #include -#include "../fontutils.h" +#include "../utf8.h" // the macro to indicate a UTF-8 string // You should to save the C/C++ source in UTF-8 encoding! diff --git a/Marlin/src/lcd/e3v2/common/dwin_font.h b/Marlin/src/lcd/e3v2/common/dwin_font.h index 10bb104d27bc..b92bfcf99c9f 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_font.h +++ b/Marlin/src/lcd/e3v2/common/dwin_font.h @@ -28,13 +28,15 @@ typedef uint8_t fontid_t; * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 */ -#define font6x12 0x00 +#if DISABLED(TJC_DISPLAY) + #define font6x12 0x00 + #define font20x40 0x06 + #define font24x48 0x07 + #define font28x56 0x08 + #define font32x64 0x09 +#endif #define font8x16 0x01 #define font10x20 0x02 #define font12x24 0x03 #define font14x28 0x04 #define font16x32 0x05 -#define font20x40 0x06 -#define font24x48 0x07 -#define font28x56 0x08 -#define font32x64 0x09 diff --git a/Marlin/src/lcd/e3v2/common/encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp index ebcca26c4811..2364458096c8 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -87,7 +87,10 @@ EncoderState Encoder_ReceiveAnalyze() { #if PIN_EXISTS(LCD_LED) //LED_Action(); #endif - if (!ui.backlight) ui.refresh_brightness(); + if (!ui.backlight) { + ui.refresh_brightness(); + return ENCODER_DIFF_NO; + } const bool was_waiting = wait_for_user; wait_for_user = false; return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER; @@ -154,6 +157,10 @@ EncoderState Encoder_ReceiveAnalyze() { temp_diff = 0; } + if (temp_diffState != ENCODER_DIFF_NO) { + TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); + if (!ui.backlight) ui.refresh_brightness(); + } return temp_diffState; } diff --git a/Marlin/src/lcd/e3v2/common/encoder.h b/Marlin/src/lcd/e3v2/common/encoder.h index 3ab8c3bf422b..4401242a0d0d 100644 --- a/Marlin/src/lcd/e3v2/common/encoder.h +++ b/Marlin/src/lcd/e3v2/common/encoder.h @@ -45,7 +45,7 @@ typedef enum { ENCODER_DIFF_ENTER = 3 // click } EncoderState; -#define ENCODER_WAIT_MS 20 +#define ENCODER_WAIT_MS TERN(DWIN_LCD_PROUI, 10, 20) // Encoder initialization void Encoder_Configuration(); diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 9e38bae2b663..7a3e3ff44e09 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -45,7 +45,7 @@ #define JUST_BABYSTEP 1 #endif -#include "../../fontutils.h" +#include "../../utf8.h" #include "../../marlinui.h" #include "../../../sd/cardreader.h" @@ -1273,7 +1273,7 @@ void Goto_MainMenu() { DWIN_Frame_TitleCopy(2, 2, 26, 13); // "Home" etc else { #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_MAIN)); + Draw_Title(GET_TEXT_F(MSG_MAIN_MENU)); #else DWIN_Frame_TitleCopy(0, 2, 40, 11); // "Home" #endif diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index bcfb38cc3e46..a475e24a8271 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -96,7 +96,7 @@ #define MENU_CHAR_LIMIT 24 #define STATUS_Y 352 -#define MAX_PRINT_SPEED 500 +#define MAX_PRINT_SPEED 999 #define MIN_PRINT_SPEED 10 #if HAS_FAN @@ -116,7 +116,7 @@ #endif #if HAS_HOTEND - #define MAX_FLOW_RATE 200 + #define MAX_FLOW_RATE 299 #define MIN_FLOW_RATE 10 #define MAX_E_TEMP (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT) @@ -203,7 +203,7 @@ bool livemove = false; bool liveadjust = false; uint8_t preheatmode = 0; float zoffsetvalue = 0; -uint8_t gridpoint; +grid_count_t gridpoint; float corner_avg; float corner_pos; @@ -416,7 +416,7 @@ class TextScroller { // Draw value text on if (viewer_print_value) { - int8_t offset_x, offset_y = cell_height_px / 2 - 6; + const int8_t offset_y = cell_height_px / 2 - 6; if (isnan(bedlevel.z_values[x][y])) { // undefined DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X")); } @@ -425,7 +425,7 @@ class TextScroller { sprintf_P(buf, PSTR("%s"), dtostrf(abs(bedlevel.z_values[x][y]), 1, 2, str_1)); else sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(bedlevel.z_values[x][y] - (int16_t)bedlevel.z_values[x][y]) * 100)); - offset_x = cell_width_px / 2 - 3 * (strlen(buf)) - 2; + const int8_t offset_x = cell_width_px / 2 - 3 * (strlen(buf)) - 2; if (!(GRID_MAX_POINTS_X < 10)) DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, F(".")); DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, buf); @@ -810,8 +810,8 @@ void CrealityDWINClass::Draw_SD_Item(const uint8_t item, const uint8_t row) { else { card.selectFileByIndexSorted(item - 1); char * const filename = card.longest_filename(); - size_t max = MENU_CHAR_LIMIT; - size_t pos = strlen(filename), len = pos; + constexpr uint8_t max = MENU_CHAR_LIMIT; + uint8_t pos = strlen(filename), len = pos; if (!card.flag.filenameIsDir) while (pos && filename[pos] != '.') pos--; len = pos; @@ -832,7 +832,7 @@ void CrealityDWINClass::Draw_SD_List(const bool removed/*=false*/) { scrollpos = 0; process = File; if (card.isMounted() && !removed) { - for (uint8_t i = 0; i < _MIN(card.get_num_Files() + 1, TROWS); ++i) + for (int16_t i = 0; i < _MIN(card.get_num_items() + 1, TROWS); ++i) Draw_SD_Item(i, i); } else { diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp index 38a8eafe2366..10a478f75650 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp @@ -25,7 +25,7 @@ #if IS_DWIN_MARLINUI #include "dwin_string.h" -//#include "../../fontutils.h" +//#include "../../utf8.h" char DWIN_String::data[]; uint16_t DWIN_String::span; @@ -44,7 +44,7 @@ uint8_t read_byte(const uint8_t *byte) { return *byte; } * Add a string, applying substitutions for the following characters: * * $ displays the clipped string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -57,9 +57,9 @@ void DWIN_String::add(const char *tpl, const int8_t index, const char *cstr/*=nu if (wc > 255) wc |= 0x0080; const uint8_t ch = uint8_t(wc & 0x00FF); - if (ch == '=' || ch == '~' || ch == '*') { + if (ch == '{' || ch == '~' || ch == '*') { if (index >= 0) { - int8_t inum = index + ((ch == '=') ? 0 : LCD_FIRST_TOOL); + int8_t inum = index + ((ch == '{') ? 0 : LCD_FIRST_TOOL); if (ch == '*') add_character('E'); if (inum >= 10) { add_character('0' + (inum / 10)); inum %= 10; } add_character('0' + inum); diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h index ed79c45b1fbc..e61382e1578a 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h @@ -23,7 +23,7 @@ // TODO: Make AVR-compatible with separate ROM / RAM string methods -#include "../../fontutils.h" +#include "../../utf8.h" #include "../../marlinui.h" #include diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp index 032a9a5ab6a9..b3c474d5bcdb 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -30,7 +30,7 @@ //#include "../../lcdprint.h" #include "lcdprint_dwin.h" -#include "../../fontutils.h" +#include "../../utf8.h" #include "../../../libs/numtostr.h" #include "../../marlinui.h" diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp index 9e4dabd4dd02..ac31506d6eca 100644 --- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -29,7 +29,7 @@ #include "dwin_string.h" #include "lcdprint_dwin.h" -#include "../../fontutils.h" +#include "../../utf8.h" #include "../../../libs/numtostr.h" #include "../../marlinui.h" diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index c1b2f61472b1..a399cd1e9727 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -62,7 +62,7 @@ #warning "MESH_EDIT_MENU is recommended with ProUI." #endif -#include "../../fontutils.h" +#include "../../utf8.h" #include "../../marlinui.h" #include "../../../sd/cardreader.h" @@ -1003,9 +1003,8 @@ void Draw_Print_File_Menu() { if (card.isMounted()) { if (SET_MENU(FileMenu, MSG_MEDIA_MENU, nr_sd_menu_items() + 1)) { BACK_ITEM(Goto_Main_Menu); - for (uint8_t i = 0; i < nr_sd_menu_items(); ++i) { + for (uint8_t i = 0; i < nr_sd_menu_items(); ++i) MenuItemAdd(onDrawFileName, onClickSDItem); - } } UpdateMenu(FileMenu); TERN_(DASH_REDRAW, DWIN_RedrawDash()); diff --git a/Marlin/src/lcd/e3v2/proui/dwin_defines.h b/Marlin/src/lcd/e3v2/proui/dwin_defines.h index 90413a90aab2..f983332a7066 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin_defines.h +++ b/Marlin/src/lcd/e3v2/proui/dwin_defines.h @@ -19,6 +19,8 @@ * along with this program. If not, see . * */ +#pragma once + /** * DWIN general defines and data structs for PRO UI * Author: Miguel A. Risco-Castillo (MRISCOC) @@ -26,8 +28,6 @@ * Date: 2022/08/08 */ -#pragma once - //#define DEBUG_DWIN 1 //#define NEED_HEX_PRINT 1 diff --git a/Marlin/src/lcd/e3v2/proui/dwinui.h b/Marlin/src/lcd/e3v2/proui/dwinui.h index 55345a789985..5eb739571761 100644 --- a/Marlin/src/lcd/e3v2/proui/dwinui.h +++ b/Marlin/src/lcd/e3v2/proui/dwinui.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * DWIN Enhanced implementation for PRO UI @@ -27,8 +28,6 @@ * Date: 2022/07/05 */ -#pragma once - #include "../../../inc/MarlinConfigPre.h" #include "../common/dwin_set.h" diff --git a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp index 850bec60b08a..ec3c612f8e21 100644 --- a/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp +++ b/Marlin/src/lcd/e3v2/proui/gcode_preview.cpp @@ -21,7 +21,7 @@ */ /** - * DWIN g-code thumbnail preview + * DWIN G-code thumbnail preview * Author: Miguel A. Risco-Castillo * version: 3.1.2 * Date: 2022/09/03 diff --git a/Marlin/src/lcd/e3v2/proui/gcode_preview.h b/Marlin/src/lcd/e3v2/proui/gcode_preview.h index c1949c5abc12..2452797d0c62 100644 --- a/Marlin/src/lcd/e3v2/proui/gcode_preview.h +++ b/Marlin/src/lcd/e3v2/proui/gcode_preview.h @@ -1,12 +1,13 @@ /** - * DWIN g-code thumbnail preview - * Author: Miguel A. Risco-Castillo - * version: 3.1.2 - * Date: 2022/09/03 + * Marlin 3D Printer Firmware + * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the License, or + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -14,14 +15,19 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * For commercial applications additional licenses can be requested */ - #pragma once +/** + * DWIN G-code thumbnail preview + * Author: Miguel A. Risco-Castillo + * version: 3.1.2 + * Date: 2022/09/03 + */ + void Preview_DrawFromSD(); void Preview_Invalidate(); bool Preview_Valid(); diff --git a/Marlin/src/lcd/e3v2/proui/plot.h b/Marlin/src/lcd/e3v2/proui/plot.h index ea15255fe53a..d071ff372328 100644 --- a/Marlin/src/lcd/e3v2/proui/plot.h +++ b/Marlin/src/lcd/e3v2/proui/plot.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * DWIN Single var plot @@ -41,7 +42,6 @@ * * For commercial applications additional licenses can be requested */ -#pragma once #include "dwinui.h" diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp index 75061c162a7a..70ca6b37daf6 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp @@ -49,7 +49,7 @@ namespace ExtUI { void onMediaError() { Chiron.MediaEvent(AC_media_error); } void onMediaRemoved() { Chiron.MediaEvent(AC_media_removed); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { #if ENABLED(SPEAKER) ::tone(BEEPER_PIN, frequency, duration); #endif @@ -94,20 +94,22 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } - #if HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval); @@ -120,6 +122,12 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } // Called on resume from power-loss void onPowerLossResume() { Chiron.PowerLossRecovery(); } #endif diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp index 40a670b5b073..36b4147b30a6 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp @@ -41,7 +41,7 @@ namespace ExtUI { void onMediaInserted() { AnycubicTFT.OnSDCardStateChange(true); } void onMediaError() { AnycubicTFT.OnSDCardError(); } void onMediaRemoved() { AnycubicTFT.OnSDCardStateChange(false); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { TERN_(SPEAKER, ::tone(BEEPER_PIN, frequency, duration)); } void onPrintTimerStarted() { AnycubicTFT.OnPrintTimerStarted(); } @@ -81,21 +81,22 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } - #if HAS_MESH - + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated } @@ -106,6 +107,12 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } void onPowerLossResume() { // Called on resume from power-loss } diff --git a/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp index 0eb95bb041ba..977de4f6bb3f 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp @@ -227,7 +227,7 @@ void DGUSDisplay::ProcessRx() { } } -size_t DGUSDisplay::GetFreeTxBuffer() { return SERIAL_GET_TX_BUFFER_FREE(); } +size_t DGUSDisplay::GetFreeTxBuffer() { return LCD_SERIAL_TX_BUFFER_FREE(); } void DGUSDisplay::WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen) { LCD_SERIAL.write(DGUS_HEADER1); diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 607d5f46ea13..b40cd5cab574 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -52,7 +52,7 @@ namespace ExtUI { void onMediaError() { TERN_(HAS_MEDIA, ScreenHandler.SDCardError()); } void onMediaRemoved() { TERN_(HAS_MEDIA, ScreenHandler.SDCardRemoved()); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} @@ -102,20 +102,22 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } - #if HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated } @@ -126,6 +128,12 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } void onPowerLossResume() { // Called on resume from power-loss IF_DISABLED(DGUS_LCD_UI_MKS, ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS)); diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index be07cc0fa738..7c906bfba049 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -190,7 +190,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", C(axiscode)); char buf[6] = "G28 X"; buf[4] = axiscode; //DEBUG_ECHOPGM(" ", buf); @@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", C(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { //DEBUG_ECHOPGM(" G91"); @@ -237,7 +237,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", C(axiscode)); return; } diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index 9dfd4884aa8d..e6ab4af2f81b 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -190,7 +190,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", C(axiscode)); char buf[6] = "G28 X"; buf[4] = axiscode; //DEBUG_ECHOPGM(" ", buf); @@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", C(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { //DEBUG_ECHOPGM(" G91"); @@ -237,7 +237,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", C(axiscode)); return; } diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index c34105f15767..121d88c8a119 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -429,7 +429,7 @@ void DGUSScreenHandlerMKS::LanguageChange(DGUS_VP_Variable &var, void *val_ptr) } #if ENABLED(MESH_BED_LEVELING) - uint8_t mesh_point_count = GRID_MAX_POINTS; + grid_count_t mesh_point_count = GRID_MAX_POINTS; #endif void DGUSScreenHandlerMKS::Level_Ctrl(DGUS_VP_Variable &var, void *val_ptr) { @@ -825,7 +825,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", C(axiscode)); // char buf[6] = "G28 X"; // buf[4] = axiscode; @@ -847,7 +847,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", C(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { @@ -885,7 +885,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", C(axiscode)); return; } diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index 8b522bf92a04..b717fa607bb9 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -190,7 +190,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", C(axiscode)); char buf[6] = "G28 X"; buf[4] = axiscode; //DEBUG_ECHOPGM(" ", buf); @@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", C(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { //DEBUG_ECHOPGM(" G91"); @@ -237,7 +237,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", C(axiscode)); return; } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp index 15b3f5adcde4..d3b6b43a1b13 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp @@ -366,8 +366,8 @@ void DGUSDisplay::ProcessRx() { } size_t DGUSDisplay::GetFreeTxBuffer() { - #ifdef LCD_SERIAL_GET_TX_BUFFER_FREE - return LCD_SERIAL_GET_TX_BUFFER_FREE(); + #ifdef LCD_SERIAL_TX_BUFFER_FREE + return LCD_SERIAL_TX_BUFFER_FREE(); #else return SIZE_MAX; #endif diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index 7d73b1c0d5b7..48b9e2b8a446 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -138,7 +138,7 @@ void DGUSScreenHandler::Loop() { if (current_screen == DGUS_Screen::LEVELING_PROBING && IsPrinterIdle()) { dgus_display.PlaySound(3); - SetStatusMessage(ExtUI::getMeshValid() ? F("Probing successful") : F("Probing failed")); + SetStatusMessage(ExtUI::getLevelingIsValid() ? F("Probing successful") : F("Probing failed")); MoveToScreen(DGUS_Screen::LEVELING_AUTOMATIC); return; @@ -200,7 +200,7 @@ void DGUSScreenHandler::StoreSettings(char *buff) { data.initialized = true; data.volume = dgus_display.GetVolume(); data.brightness = dgus_display.GetBrightness(); - data.abl_okay = (ExtUI::getLevelingActive() && ExtUI::getMeshValid()); + data.abl_okay = (ExtUI::getLevelingActive() && ExtUI::getLevelingIsValid()); memcpy(buff, &data, sizeof(data)); } @@ -216,7 +216,7 @@ void DGUSScreenHandler::LoadSettings(const char *buff) { dgus_display.SetBrightness(data.initialized ? data.brightness : DGUS_DEFAULT_BRIGHTNESS); if (data.initialized) { - leveling_active = (data.abl_okay && ExtUI::getMeshValid()); + leveling_active = (data.abl_okay && ExtUI::getLevelingIsValid()); ExtUI::setLevelingActive(leveling_active); } } @@ -257,7 +257,7 @@ void DGUSScreenHandler::MeshUpdate(const int8_t xpos, const int8_t ypos) { uint8_t point = ypos * GRID_MAX_POINTS_X + xpos; probing_icons[point < 16 ? 0 : 1] |= (1U << (point % 16)); - if (xpos >= GRID_MAX_POINTS_X - 1 && ypos >= GRID_MAX_POINTS_Y - 1 && !ExtUI::getMeshValid()) + if (xpos >= GRID_MAX_POINTS_X - 1 && ypos >= GRID_MAX_POINTS_Y - 1 && !ExtUI::getLevelingIsValid()) probing_icons[0] = probing_icons[1] = 0; TriggerFullUpdate(); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp index c83b01f9e328..8ff215603a30 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp @@ -148,7 +148,7 @@ bool DGUSSetupHandler::LevelingOffset() { } bool DGUSSetupHandler::LevelingAutomatic() { - if (ExtUI::getMeshValid()) { + if (ExtUI::getLevelingIsValid()) { dgus_screen_handler.leveling_active = true; ExtUI::setLevelingActive(true); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h index 0eea6416a240..3fd6d16f5bbd 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h @@ -21,19 +21,19 @@ */ #pragma once -constexpr uint8_t DGUS_LINE_LEN = 32; -constexpr uint8_t DGUS_STATUS_LEN = 32; -constexpr uint8_t DGUS_FILE_COUNT = 5; -constexpr uint8_t DGUS_FILENAME_LEN = 32; -constexpr uint8_t DGUS_ELLAPSED_LEN = 15; -constexpr uint8_t DGUS_LEVEL_GRID_SIZE = 25; -constexpr uint8_t DGUS_MACHINE_LEN = 24; -constexpr uint8_t DGUS_BUILDVOLUME_LEN = 24; -constexpr uint8_t DGUS_VERSION_LEN = 16; -constexpr uint8_t DGUS_PRINTTIME_LEN = 24; -constexpr uint8_t DGUS_LONGESTPRINT_LEN = 24; -constexpr uint8_t DGUS_FILAMENTUSED_LEN = 24; -constexpr uint8_t DGUS_GCODE_LEN = 32; +#define DGUS_LINE_LEN 32 +#define DGUS_STATUS_LEN 32 +#define DGUS_FILE_COUNT 5 +#define DGUS_FILENAME_LEN 32 +#define DGUS_ELAPSED_LEN 15 +#define DGUS_LEVEL_GRID_SIZE 25 +#define DGUS_MACHINE_LEN 24 +#define DGUS_BUILDVOLUME_LEN 24 +#define DGUS_VERSION_LEN 16 +#define DGUS_PRINTTIME_LEN 24 +#define DGUS_LONGESTPRINT_LEN 24 +#define DGUS_FILAMENTUSED_LEN 24 +#define DGUS_GCODE_LEN 32 enum class DGUS_Addr : uint16_t { MESSAGE_Line1 = 0x1100, // 0x1100 - 0x111F diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h index 846fd1594216..dda3c888fe18 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h @@ -25,7 +25,9 @@ #include "DGUS_Addr.h" -static_assert((DGUS_LEVEL_GRID_SIZE == GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y), "DGUS_LEVEL_GRID_SIZE incompatible with current mesh."); +#if DGUS_LEVEL_GRID_SIZE != GRID_MAX_POINTS + #error "DGUS_LEVEL_GRID_SIZE is incompatible with current mesh." +#endif #ifndef DGUS_DEFAULT_VOLUME #define DGUS_DEFAULT_VOLUME 50 diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp index fdf821f54806..2a211db7ac78 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp @@ -178,7 +178,7 @@ const struct DGUS_VP vp_list[] PROGMEM = { nullptr, &DGUSTxHandler::PositionZ), VP_HELPER(DGUS_Addr::STATUS_Ellapsed, - DGUS_ELLAPSED_LEN, + DGUS_ELAPSED_LEN, VPFLAG_AUTOUPLOAD, nullptr, nullptr, diff --git a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp index f11f90cf79c9..9a57fac54634 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp @@ -54,7 +54,7 @@ namespace ExtUI { void onMediaError() { TERN_(HAS_MEDIA, dgus_screen_handler.SDCardError()); } void onMediaRemoved() { TERN_(HAS_MEDIA, dgus_screen_handler.SDCardRemoved()); } - void onPlayTone(const uint16_t frequency, const uint16_t duration) { + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { dgus_screen_handler.PlayTone(frequency, duration); } @@ -100,18 +100,20 @@ namespace ExtUI { void onPostprocessSettings() {} - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { dgus_screen_handler.ConfigurationStoreWritten(success); } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { dgus_screen_handler.ConfigurationStoreRead(success); } - #if HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { dgus_screen_handler.MeshUpdate(xpos, ypos); } @@ -123,6 +125,12 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } void onPowerLossResume() { // Called on resume from power-loss dgus_screen_handler.PowerLossResume(); diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index e00b84a28a58..99499eadbf8b 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -50,7 +50,7 @@ namespace ExtUI { void onMediaInserted() {} void onMediaError() {} void onMediaRemoved() {} - void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} @@ -88,20 +88,22 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } - #if HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated } @@ -112,6 +114,12 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } void onPowerLossResume() { // Called on resume from power-loss } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp index edae2cb04295..8de81a98ae2c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp @@ -43,7 +43,7 @@ void MainMenu::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { CommandProcessor cmd; cmd.cmd(COLOR_RGB(bg_text_enabled)) - .font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_MAIN)) + .font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_MAIN_MENU)) .colors(normal_btn) .font(font_medium) .tag(2).button(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME)) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/_bootscreen_landscape.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/_bootscreen_landscape.h new file mode 100644 index 000000000000..fed407326b17 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/_bootscreen_landscape.h @@ -0,0 +1,133 @@ + +/**************************************************************************** + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/** + * This file was auto-generated using "svg2cpp.pl" + * + * The encoding consists of x,y pairs with the min and max scaled to + * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the + * start of a new closed path. + */ +#pragma once + +constexpr float x_min = 0.000000; + +constexpr float x_max = 480.000000; + +constexpr float y_min = 0.000000; + +constexpr float y_max = 272.000000; + +const PROGMEM uint16_t outline[] = { + 0x8278, 0xC8E7, 0x7714, 0xC659, 0x6D20, 0xC0EF, 0x64D1, 0xB8D4, 0x5E5F, 0xAE2F, + 0x5AF5, 0xA493, 0x58F2, 0x99F6, 0x5886, 0x8B4E, 0x590F, 0x7956, 0x5997, 0x69F3, + 0x5B46, 0x5E96, 0x5E92, 0x5430, 0x6363, 0x4AF8, 0x69A4, 0x4327, 0x6F5B, 0x3E4A, + 0x7871, 0x3979, 0x82A1, 0x371E, 0x8CBB, 0x3756, 0x95A1, 0x3997, 0x9D90, 0x3D88, + 0xA50B, 0x43B6, 0xA6BC, 0x46C9, 0xA776, 0x4A42, 0xA669, 0x6D96, 0xA54B, 0x71E5, + 0xA030, 0x7B45, 0x9ECB, 0x7CC5, 0x9B2C, 0x7E1D, 0x9717, 0x7C80, 0x9521, 0x7B11, + 0x8FAD, 0x77D6, 0x8A1D, 0x7607, 0x82E0, 0x7609, 0x7CDD, 0x7812, 0x77F3, 0x7C15, + 0x75EF, 0x7EC5, 0x7830, 0x8278, 0x7D94, 0x8772, 0x847F, 0x8A0B, 0x8B98, 0x89F7, + 0x9127, 0x8806, 0x96AB, 0x849C, 0x9C6D, 0x81F2, 0x9F8E, 0x82E5, 0xA22C, 0x85FF, + 0xA63C, 0x8D9E, 0xA78B, 0x931F, 0xA68F, 0xB5E2, 0xA5D0, 0xB944, 0xA430, 0xBC3E, + 0x9E55, 0xC146, 0x94CA, 0xC660, 0x8A75, 0xC8DB, 0x8278, 0xC8E7, 0x8278, 0xC8E7 +}; + +const PROGMEM uint16_t shadow[] = { + 0x8699, 0x52F4, 0x807A, 0x5409, 0x7A89, 0x576A, 0x7583, 0x5D79, 0x7227, 0x6695, + 0x714B, 0x70C7, 0x71C8, 0x75DB, 0x730A, 0x7A69, 0x7496, 0x7A0E, 0x7601, 0x787F, + 0x78EF, 0x7565, 0x80E9, 0x7178, 0x8924, 0x7108, 0x914E, 0x7393, 0x9914, 0x789A, + 0x9B62, 0x792D, 0x9D8A, 0x7823, 0xA0FE, 0x72DA, 0xA34C, 0x6DC9, 0xA3D7, 0x6766, + 0xA42B, 0x5E98, 0xA3FD, 0x55F8, 0xA279, 0x55CE, 0xA12E, 0x578E, 0x9FE2, 0x59BB, + 0x9E59, 0x5AD8, 0x9AAC, 0x5AE1, 0x9728, 0x58ED, 0x9019, 0x54A3, 0x8699, 0x52F4, + 0x8699, 0x52F4, 0xFFFF, 0x5CA3, 0x849F, 0x5B93, 0x8686, 0x5B52, 0x896F, 0x5B3F, + 0x8FA9, 0x5C60, 0x9D67, 0x6003, 0xA994, 0x6582, 0xB393, 0x6C3B, 0xBAC7, 0x7604, + 0xC0E2, 0x8047, 0xC3D1, 0x8AB3, 0xC3DC, 0x94FB, 0xC14A, 0x9C85, 0xBD52, 0xA35D, + 0xB6C2, 0xA41B, 0xABC2, 0xA460, 0xA092, 0xA416, 0x9C7C, 0xA33E, 0x9B91, 0xA20E, + 0x9C3C, 0x9618, 0xA353, 0x8992, 0xA62E, 0x7CED, 0xA4E9, 0x7097, 0x9FA2, 0x6ADE, + 0x9B4F, 0x65A4, 0x9557, 0x6117, 0x8DDF, 0x5D63, 0x850D, 0x5CA3, 0x849F, 0x5CA3, + 0x849F +}; + +const PROGMEM uint16_t highlight[] = { + 0x861C, 0x5348, 0x8243, 0x53C6, 0x7EBF, 0x5693, 0x7C12, 0x5B55, 0x7ABE, 0x61B3, + 0x7AFC, 0x6656, 0x7C42, 0x6A49, 0x7FB1, 0x7163, 0x862A, 0x7090, 0x8C99, 0x717A, + 0x92E2, 0x740A, 0x98E8, 0x782A, 0x9AB3, 0x7852, 0x9C22, 0x7665, 0x9E0C, 0x7087, + 0x9E69, 0x65BE, 0x9C07, 0x5BDE, 0x9319, 0x568D, 0x8E92, 0x544E, 0x89E2, 0x534D, + 0x861C, 0x5348, 0x861C, 0x5348, 0xFFFF, 0x6B6A, 0x9CA0, 0x69D9, 0x9F11, 0x695E, + 0xA2AD, 0x6A25, 0xAA51, 0x6DB0, 0xBBAA, 0x785A, 0xC170, 0x8372, 0xC3D0, 0x8E9F, + 0xC2E2, 0x9987, 0xBEBD, 0x9CAB, 0xBCE9, 0x9EFE, 0xB9D2, 0x9E63, 0xB379, 0x9CE9, + 0xAD92, 0x98DE, 0xA2B8, 0x8D7F, 0xA5FA, 0x81FE, 0xA636, 0x76A6, 0xA32E, 0x6BC5, + 0x9CA0, 0x6B6A, 0x9CA0, 0x6B6A, 0x9CA0 +}; + +const PROGMEM uint16_t stroke[] = { + 0x8282, 0xC890, 0x7A14, 0xC6FB, 0x7257, 0xC3D9, 0x6B6A, 0xBF38, 0x6569, 0xB928, + 0x5E84, 0xADEC, 0x5B1E, 0xA460, 0x5926, 0x99F8, 0x58A5, 0x90C0, 0x59B6, 0x6B3D, + 0x5B4C, 0x5F6C, 0x5EA3, 0x549E, 0x63A2, 0x4B13, 0x6A2E, 0x430B, 0x71D8, 0x3D0C, + 0x7A7A, 0x3923, 0x83D5, 0x3761, 0x8DAA, 0x37DB, 0x98A8, 0x3B38, 0xA283, 0x4193, + 0xA638, 0x4620, 0xA741, 0x4B64, 0xA6C5, 0x5D20, 0xA613, 0x6E81, 0xA43A, 0x738A, + 0xA01F, 0x7AE8, 0x9DE9, 0x7D0E, 0x9B69, 0x7DBD, 0x9629, 0x7B6D, 0x905C, 0x77C9, + 0x8A94, 0x75BF, 0x8402, 0x7587, 0x7E52, 0x76FE, 0x79CA, 0x79CE, 0x75B1, 0x7EC7, + 0x780B, 0x82C0, 0x7C5E, 0x8702, 0x8193, 0x89A9, 0x8702, 0x8AA4, 0x8C76, 0x8A18, + 0x91F2, 0x8803, 0x977B, 0x8464, 0x9C8C, 0x825E, 0x9EAF, 0x82C4, 0xA0FC, 0x84BC, + 0xA3C6, 0x8965, 0xA6CF, 0x8FEF, 0xA756, 0x9463, 0xA6DA, 0xA612, 0xA5DF, 0xB86B, + 0xA414, 0xBBE7, 0xA03D, 0xBF7C, 0x9648, 0xC56A, 0x8B45, 0xC86E, 0x8282, 0xC890, + 0x8282, 0xC890, 0xFFFF, 0x89EE, 0xC221, 0x9395, 0xBFE8, 0x9C6D, 0xBB4F, 0xA047, + 0xB837, 0xA298, 0xB561, 0xA30A, 0xAA1F, 0xA34B, 0x9D6D, 0xA204, 0x9E54, 0x9820, + 0xA474, 0x960F, 0xA542, 0x886E, 0xA808, 0x803F, 0xA783, 0x785E, 0xA57C, 0x703C, + 0xA168, 0x691E, 0x9BB9, 0x623D, 0x92BA, 0x5D27, 0x8795, 0x5C9D, 0x868D, 0x5C4D, + 0x90BE, 0x5DBC, 0x9E89, 0x6126, 0xA944, 0x6630, 0xB207, 0x6CB0, 0xB914, 0x6E6F, + 0xBA8C, 0x7080, 0xBC05, 0x78E3, 0xC016, 0x8263, 0xC21E, 0x89EE, 0xC221, 0x89EE, + 0xC221, 0xFFFF, 0x8CBB, 0xA14B, 0x9726, 0x9E32, 0xA086, 0x9855, 0xA324, 0x95C0, + 0xA39A, 0x92E9, 0xA121, 0x8DC2, 0x9E86, 0x8984, 0x9C63, 0x88AD, 0x98A6, 0x8A73, + 0x8FB6, 0x8F97, 0x86EE, 0x90FB, 0x804C, 0x8FBC, 0x7A84, 0x8C98, 0x7476, 0x85CD, + 0x706D, 0x7C88, 0x6EAA, 0x7064, 0x6EFF, 0x6929, 0x7056, 0x624A, 0x73DB, 0x59D0, + 0x76F3, 0x5586, 0x7AA5, 0x523E, 0x83F8, 0x4E97, 0x8B83, 0x4EA9, 0x9221, 0x50DF, + 0x98F7, 0x552D, 0x9C44, 0x56AE, 0x9DAF, 0x5652, 0xA12C, 0x5116, 0xA370, 0x4C6E, + 0xA381, 0x4A6D, 0xA10D, 0x4772, 0x985F, 0x41B3, 0x8EB8, 0x3E71, 0x8631, 0x3DA9, + 0x7DFC, 0x3EA4, 0x7645, 0x4159, 0x6F3D, 0x45BB, 0x6952, 0x4B6F, 0x646A, 0x529B, + 0x60B0, 0x5AA7, 0x5E57, 0x6375, 0x5D39, 0x6ED1, 0x5E1E, 0x7B35, 0x6120, 0x8666, + 0x6620, 0x9016, 0x6D01, 0x97F7, 0x7747, 0x9E7A, 0x83D9, 0xA18C, 0x8CBB, 0xA14B, + 0x8CBB, 0xA14B, 0xFFFF, 0x7481, 0x77DA, 0x793F, 0x7317, 0x7EE3, 0x701D, 0x8044, + 0x6FBD, 0x81B4, 0x6F76, 0x846C, 0x6F18, 0x8E1D, 0x7044, 0x97FF, 0x75D2, 0x9B2B, + 0x772F, 0x9DAF, 0x75F3, 0xA26D, 0x6D0E, 0xA2E9, 0x62B8, 0xA33C, 0x583A, 0xA31E, + 0x573E, 0xA252, 0x5871, 0x9FC0, 0x5BDB, 0x9CD5, 0x5D2A, 0x9751, 0x5AEC, 0x914A, + 0x5720, 0x8B83, 0x5519, 0x83E3, 0x5506, 0x7ECB, 0x56B4, 0x7A0F, 0x59E9, 0x765D, + 0x5E9D, 0x73CE, 0x64A3, 0x727C, 0x6BCF, 0x7286, 0x72FD, 0x73A3, 0x78D6, 0x7481, + 0x77DA, 0x7481, 0x77DA +}; + +const PROGMEM uint16_t surface[] = { + 0x8CBB, 0xA14B, 0x9726, 0x9E32, 0xA086, 0x9855, 0xA324, 0x95C0, 0xA39A, 0x92E9, + 0xA121, 0x8DC2, 0x9E86, 0x8984, 0x9C63, 0x88AD, 0x98A6, 0x8A73, 0x8FB6, 0x8F97, + 0x86EE, 0x90FB, 0x804C, 0x8FBC, 0x7A84, 0x8C98, 0x7476, 0x85CD, 0x706D, 0x7C88, + 0x6EAA, 0x7064, 0x6EFF, 0x6929, 0x7056, 0x624A, 0x73DB, 0x59D0, 0x76F3, 0x5586, + 0x7AA5, 0x523E, 0x83F8, 0x4E97, 0x8B83, 0x4EA9, 0x9221, 0x50DF, 0x98F7, 0x552D, + 0x9C44, 0x56AE, 0x9DAF, 0x5652, 0xA12C, 0x5116, 0xA370, 0x4C6E, 0xA381, 0x4A6D, + 0xA10D, 0x4772, 0x985F, 0x41B3, 0x8EB8, 0x3E71, 0x8631, 0x3DA9, 0x7DFC, 0x3EA4, + 0x7645, 0x4159, 0x6F3D, 0x45BB, 0x6952, 0x4B6F, 0x646A, 0x529B, 0x60B0, 0x5AA7, + 0x5E57, 0x6375, 0x5D39, 0x6ED1, 0x5E1E, 0x7B35, 0x6120, 0x8666, 0x6620, 0x9016, + 0x6D01, 0x97F7, 0x7747, 0x9E7A, 0x83D9, 0xA18C, 0x8CBB, 0xA14B, 0x8CBB, 0xA14B +}; + +//#define LOGO_BACKGROUND 0xF05A22 +#define LOGO_BACKGROUND 0xFFFFFF + +#define LOGO_PAINT_PATHS \ + LOGO_PAINT_PATH(0xF27121, surface) \ + LOGO_PAINT_PATH(0x6B2C1B, shadow) \ + LOGO_PAINT_PATH(0xBC3E26, highlight) \ + LOGO_PAINT_PATH(0x3C2215, stroke) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.cpp new file mode 100644 index 000000000000..1de0fbd4a584 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.cpp @@ -0,0 +1,116 @@ +/******************** + * about_screen.cpp * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" + +#ifdef COCOA_ABOUT_SCREEN + +#define GRID_COLS 4 +#define GRID_ROWS 8 + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +void AboutScreen::onEntry() { + BaseScreen::onEntry(); + sound.play(chimes, PLAY_ASYNCHRONOUS); +} + +void AboutScreen::onRedraw(draw_mode_t) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + + #define HEADING_POS BTN_POS(1,1), BTN_SIZE(4,2) + #define FW_VERS_POS BTN_POS(1,3), BTN_SIZE(4,1) + #define FW_INFO_POS BTN_POS(1,4), BTN_SIZE(4,1) + #define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,3) + #define STATS_POS BTN_POS(1,8), BTN_SIZE(2,1) + #define BACK_POS BTN_POS(3,8), BTN_SIZE(2,1) + + char about_str[1 + + strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) + #ifdef TOOLHEAD_NAME + + strlen_P(TOOLHEAD_NAME) + #endif + ]; + #ifdef TOOLHEAD_NAME + // If MSG_ABOUT_TOUCH_PANEL_2 has %s, substitute in the toolhead name. + // But this is optional, so squelch the compiler warning here. + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wformat-extra-args" + sprintf_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2), TOOLHEAD_NAME); + #pragma GCC diagnostic pop + #else + strcpy_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)); + #endif + + draw_text_box(cmd, HEADING_POS, + #ifdef MACHINE_NAME + F(MACHINE_NAME) + #else + GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_1) + #endif + , OPT_CENTER, font_xlarge + ); + #if ALL(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) + cmd.tag(3); + #endif + draw_text_box(cmd, FW_VERS_POS, + #ifdef TOUCH_UI_VERSION + F(TOUCH_UI_VERSION) + #else + FPSTR(getFirmwareName_str()) + #endif + , OPT_CENTER, font_medium); + cmd.tag(0); + draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium); + draw_text_box(cmd, LICENSE_POS, GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); + + cmd.font(font_medium); + #if ENABLED(PRINTCOUNTER) + cmd.colors(normal_btn) + .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)); + #endif + cmd.colors(action_btn) + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); +} + +bool AboutScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + #if ENABLED(PRINTCOUNTER) + case 2: GOTO_SCREEN(StatisticsScreen); break; + #endif + #if ALL(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) + case 3: GOTO_SCREEN(DeveloperMenu); break; + #endif + default: return false; + } + return true; +} + +#endif // COCOA_ABOUT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.h new file mode 100644 index 000000000000..2e9bc1827e1a --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.h @@ -0,0 +1,33 @@ +/****************** + * about_screen.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_ABOUT_SCREEN +#define COCOA_ABOUT_SCREEN_CLASS AboutScreen + +class AboutScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_bitmap.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_bitmap.h new file mode 100644 index 000000000000..18fbed9a525c --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_bitmap.h @@ -0,0 +1,248 @@ +const unsigned char cocoa_press_ui[2941] PROGMEM = { + 0x78, 0x9C, 0xED, 0xDD, 0x3B, 0x96, 0xA3, 0xC8, 0xB6, 0x00, 0xD0, 0xC9, + 0x68, 0x28, 0x1A, 0x0A, 0x06, 0x3D, 0x8F, 0x34, 0x24, 0x83, 0x59, 0x94, + 0x91, 0x8E, 0x0C, 0x30, 0x34, 0x86, 0x32, 0xCA, 0x2A, 0x03, 0x23, 0x99, + 0x42, 0x8D, 0xE0, 0x62, 0xE8, 0x0A, 0x21, 0x20, 0x22, 0xF8, 0x54, 0xF6, + 0xBA, 0x6F, 0x3D, 0xA5, 0x52, 0x7B, 0x1B, 0xDD, 0x29, 0x50, 0xA0, 0xA0, + 0xD7, 0x39, 0xC4, 0x0F, 0xE8, 0xCB, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, + 0xFF, 0x48, 0x5B, 0xFF, 0x2E, 0xCB, 0xBA, 0x6E, 0x1F, 0x5D, 0x0F, 0xF8, + 0x62, 0xDA, 0xF2, 0xB0, 0xDF, 0xEF, 0x06, 0xFB, 0xBC, 0xA8, 0x1F, 0x5D, + 0x23, 0xF8, 0x2A, 0xCA, 0xEC, 0x96, 0x15, 0xFB, 0x2C, 0x3B, 0x1C, 0xB2, + 0xAC, 0x4F, 0x94, 0xFD, 0x41, 0x8A, 0xC0, 0xE5, 0x72, 0xDA, 0x77, 0xD9, + 0xF0, 0xFE, 0xEB, 0xCF, 0xE4, 0xFD, 0xD0, 0x65, 0xCC, 0xBE, 0x7C, 0x74, + 0xD5, 0xE0, 0xC1, 0xEA, 0x6B, 0x76, 0x64, 0x3F, 0xFF, 0xCC, 0xBD, 0x5F, + 0x77, 0xE4, 0x8F, 0xAE, 0x1D, 0x3C, 0x54, 0x71, 0xCD, 0x8E, 0x5F, 0x0B, + 0xD9, 0x71, 0xCF, 0x90, 0xD3, 0xA3, 0xEB, 0x07, 0x0F, 0x94, 0xEF, 0xF6, + 0xEF, 0x2B, 0xD9, 0xD1, 0x25, 0xC8, 0xEE, 0xB0, 0x5E, 0xB4, 0x29, 0x8F, + 0x79, 0x96, 0xE5, 0xC7, 0x72, 0x71, 0x9C, 0x52, 0x17, 0xC7, 0xEC, 0x3A, + 0x9C, 0x29, 0xAA, 0xD5, 0xD9, 0xB0, 0xA6, 0xDA, 0x2C, 0x7F, 0xEA, 0xF7, + 0xAE, 0x96, 0xAF, 0xCA, 0xAB, 0x8F, 0x8D, 0x53, 0xBB, 0x1D, 0xA5, 0x1C, + 0x54, 0xE9, 0xB4, 0x5C, 0x53, 0x0D, 0x7B, 0x66, 0xBB, 0x2E, 0x6D, 0x55, + 0x06, 0xAA, 0xF4, 0xCC, 0xAE, 0x15, 0xCB, 0x96, 0xAA, 0x5D, 0x75, 0xA7, + 0x9C, 0x6F, 0x9C, 0x32, 0x4F, 0xE6, 0xB0, 0xDB, 0x4F, 0x8D, 0xC7, 0xAF, + 0xF7, 0x6E, 0x6C, 0xBE, 0xCF, 0xDE, 0x86, 0xA1, 0xC8, 0xAF, 0xFD, 0xAE, + 0x58, 0x2B, 0x59, 0x77, 0x41, 0x32, 0xA8, 0xD2, 0xBD, 0x65, 0xB0, 0xF3, + 0xD8, 0xFC, 0xFB, 0xF2, 0xD5, 0x5F, 0xCB, 0x1F, 0xFB, 0x9D, 0xDB, 0x09, + 0x72, 0xCE, 0xB2, 0xD5, 0x03, 0x45, 0xBB, 0x92, 0x1A, 0xC4, 0xFB, 0xB2, + 0xF0, 0x3F, 0xC2, 0x47, 0xBE, 0x56, 0x28, 0x38, 0xE7, 0x42, 0x86, 0x7C, + 0x0B, 0x45, 0x90, 0x1E, 0xEF, 0xD3, 0xF4, 0x6E, 0x37, 0x5C, 0xEF, 0xB6, + 0x5F, 0xB7, 0xAC, 0xE5, 0xC7, 0x31, 0x8E, 0xA0, 0x3C, 0x0A, 0xBD, 0x3A, + 0x89, 0xAF, 0x85, 0x4E, 0xDA, 0x66, 0xF9, 0x8F, 0x8D, 0xF8, 0xBC, 0x6B, + 0xD7, 0x77, 0x05, 0x4E, 0xC9, 0x81, 0x82, 0x80, 0x4E, 0xEB, 0x18, 0x1E, + 0xA8, 0x4D, 0xF6, 0x05, 0x8D, 0x68, 0xB5, 0x5A, 0x28, 0x3E, 0xA3, 0xC5, + 0x9C, 0xE6, 0xB9, 0x7C, 0xEC, 0xA7, 0xF4, 0xD8, 0xDF, 0xE6, 0x77, 0x7F, + 0x74, 0xDE, 0xB2, 0xEE, 0x43, 0x76, 0xE8, 0x12, 0x66, 0x79, 0xFC, 0xD1, + 0x64, 0xA9, 0x70, 0x20, 0x5F, 0xCD, 0xF6, 0x1E, 0x93, 0xF2, 0x6D, 0x3E, + 0xFB, 0x4A, 0xB0, 0xF7, 0xFC, 0xD7, 0xF2, 0xC1, 0x6F, 0x6C, 0x9E, 0x60, + 0x91, 0x1E, 0x68, 0xEA, 0x13, 0xA5, 0xF9, 0x11, 0xC6, 0x7A, 0x9A, 0x1F, + 0xF9, 0x6A, 0xA9, 0xA9, 0x4C, 0x92, 0xF0, 0xDB, 0x79, 0xCB, 0x53, 0xC8, + 0x77, 0xC3, 0xD8, 0xE3, 0xDA, 0x93, 0x1A, 0xB2, 0xA3, 0xD7, 0xA5, 0xC8, + 0x75, 0xD3, 0x6E, 0x71, 0x86, 0x37, 0x8D, 0x9F, 0x38, 0x52, 0x66, 0x91, + 0x37, 0x0F, 0xF0, 0x7F, 0x5D, 0x7E, 0x36, 0x0C, 0x3A, 0xCC, 0x23, 0x7E, + 0xC1, 0x2C, 0x3F, 0xA6, 0x9F, 0x99, 0xFF, 0xCA, 0x74, 0xA4, 0xF4, 0xFC, + 0xA6, 0xDA, 0xA7, 0x79, 0xBD, 0x7A, 0xB8, 0x59, 0x8F, 0x91, 0xA7, 0xD3, + 0xEE, 0xF6, 0x53, 0xEB, 0xB1, 0xCF, 0xB2, 0xB7, 0x1F, 0xA1, 0xB7, 0xEB, + 0x96, 0x95, 0xFC, 0x38, 0x64, 0x33, 0xD3, 0xF7, 0xE6, 0x6D, 0x4B, 0x27, + 0x6A, 0x87, 0x8E, 0x5B, 0xFB, 0x97, 0x92, 0x6F, 0x76, 0x3D, 0x6E, 0xD7, + 0x76, 0xC4, 0xE6, 0xF9, 0x31, 0xC6, 0xED, 0x3C, 0x3F, 0xA6, 0x23, 0xA5, + 0x55, 0xA8, 0xD7, 0x0A, 0x4D, 0x59, 0x90, 0x9E, 0xD2, 0x56, 0xAD, 0x78, + 0x0E, 0xC5, 0xD8, 0x7C, 0xBC, 0x77, 0xE9, 0x91, 0xFD, 0x88, 0xBD, 0x75, + 0xF9, 0xF1, 0x7B, 0xA1, 0xDC, 0xD0, 0xB7, 0xC9, 0x6F, 0x13, 0x35, 0x75, + 0x11, 0xC7, 0xC3, 0x10, 0x29, 0xC7, 0x2E, 0xAA, 0x9A, 0x71, 0xD0, 0xDA, + 0xFC, 0x8F, 0xE5, 0xE3, 0x81, 0x78, 0xD0, 0x85, 0xDB, 0x3C, 0xC3, 0x31, + 0xF0, 0xDB, 0xFB, 0x81, 0xC6, 0xAE, 0x52, 0x3D, 0x96, 0x6E, 0xAB, 0xF4, + 0x48, 0xED, 0xDA, 0x91, 0x4F, 0x63, 0xBE, 0xB4, 0xE7, 0x3C, 0xFA, 0xC6, + 0x3D, 0xC5, 0xAE, 0x27, 0xD4, 0x14, 0x99, 0xE6, 0xE3, 0x5B, 0xC8, 0x76, + 0x51, 0xF3, 0x91, 0xE6, 0xC7, 0x8F, 0x2E, 0x3F, 0x96, 0xBA, 0x2F, 0xF7, + 0x70, 0x1A, 0x2F, 0xF9, 0x4D, 0x11, 0xCC, 0x0C, 0x0D, 0x97, 0xD8, 0x21, + 0x42, 0x86, 0xA1, 0x46, 0x31, 0x2B, 0x3F, 0x6E, 0x69, 0x8B, 0xE0, 0x56, + 0x96, 0x66, 0xA5, 0x7C, 0xDC, 0x43, 0xBB, 0x25, 0x51, 0x35, 0x04, 0xEB, + 0xAA, 0x22, 0xA8, 0x68, 0x19, 0x07, 0x7D, 0x1D, 0x7C, 0xBC, 0x27, 0xC8, + 0x38, 0xE9, 0xB4, 0x9A, 0x1F, 0xC7, 0xB0, 0x6A, 0x75, 0x39, 0x9D, 0x75, + 0x5C, 0xA2, 0x92, 0x1E, 0xDF, 0xC1, 0x7E, 0xEC, 0x5E, 0xDD, 0xD2, 0x23, + 0xE9, 0x5F, 0xAD, 0xE6, 0x47, 0x35, 0x0B, 0xF8, 0xD0, 0x31, 0x0E, 0xEF, + 0xCB, 0x98, 0x0E, 0x63, 0xF4, 0x9D, 0x37, 0xCB, 0x17, 0x6B, 0xE5, 0xC3, + 0x19, 0xA1, 0x3E, 0x1C, 0x3F, 0x8E, 0x1B, 0xC7, 0x09, 0x0E, 0x76, 0x0A, + 0xCA, 0x8C, 0x87, 0x09, 0xF3, 0x23, 0xD9, 0xF5, 0xB7, 0xFC, 0x58, 0xE8, + 0x73, 0x36, 0x6B, 0x25, 0x78, 0x5A, 0xF5, 0x2E, 0xBB, 0xA7, 0xC7, 0xCF, + 0x3E, 0x3F, 0xD2, 0x06, 0xA4, 0xCB, 0x8F, 0x85, 0x89, 0xFC, 0xE3, 0x66, + 0x2C, 0xCC, 0xAF, 0xF6, 0x75, 0x12, 0xF1, 0xC5, 0x27, 0xCA, 0x87, 0xD3, + 0x61, 0x69, 0xF9, 0xCB, 0x90, 0xA2, 0xC3, 0xBF, 0xD6, 0x85, 0xF9, 0x71, + 0x3F, 0xF2, 0x90, 0xF0, 0x61, 0x7E, 0x5C, 0x3E, 0x9B, 0x1F, 0x45, 0x7C, + 0x8C, 0x49, 0x3B, 0x3F, 0x6D, 0x9E, 0xDC, 0xEF, 0x31, 0x3F, 0xDE, 0xEF, + 0xF9, 0xD1, 0xFF, 0x73, 0x6C, 0x47, 0xAE, 0xE9, 0xB1, 0x5F, 0x28, 0x97, + 0xAD, 0x5D, 0x44, 0x3B, 0xF5, 0x42, 0x04, 0x25, 0xED, 0xC5, 0x66, 0xF3, + 0xF1, 0xB1, 0x50, 0x3E, 0x9F, 0xC5, 0xDE, 0xB1, 0xDF, 0x50, 0xAF, 0x44, + 0xEB, 0x68, 0x21, 0x3F, 0x86, 0x71, 0x4C, 0x98, 0x1F, 0x51, 0xAE, 0x5C, + 0x36, 0xF2, 0x63, 0x18, 0xA9, 0x14, 0xB3, 0xE5, 0x8D, 0xFB, 0x0E, 0x03, + 0x8F, 0xEF, 0xA3, 0x8C, 0xDB, 0x8F, 0xE0, 0xF1, 0x8F, 0xDD, 0x6D, 0xAA, + 0xB7, 0x9B, 0xE2, 0x5D, 0x88, 0xBD, 0x66, 0xED, 0x1A, 0x7A, 0x53, 0x2D, + 0x84, 0x56, 0xDC, 0x60, 0xB4, 0x9B, 0xE5, 0xCF, 0x0B, 0xE5, 0xCB, 0xD9, + 0xB6, 0x21, 0x43, 0xB7, 0x32, 0x6D, 0xFA, 0xE5, 0x53, 0x78, 0xE4, 0xA1, + 0x41, 0x0C, 0x73, 0xA2, 0x6F, 0x11, 0xA7, 0x36, 0x2B, 0x9E, 0xBF, 0x0A, + 0x6B, 0x3A, 0x6E, 0x3C, 0x26, 0xF5, 0x9F, 0x26, 0x0C, 0x4A, 0x6B, 0xE7, + 0xDF, 0xC3, 0x69, 0x9A, 0xDE, 0xDD, 0xED, 0x6E, 0x4B, 0x82, 0xF9, 0xA9, + 0xAA, 0xEB, 0xDF, 0xE5, 0xF1, 0xB6, 0xF6, 0xD1, 0x6D, 0x59, 0x6A, 0x24, + 0xD2, 0x8B, 0x6D, 0xAC, 0x4C, 0x42, 0xAD, 0x13, 0xE7, 0x4C, 0x13, 0xC7, + 0x69, 0x62, 0x29, 0xBF, 0x66, 0xBF, 0x38, 0x0E, 0xCC, 0x8F, 0x5B, 0x55, + 0xB9, 0x44, 0xF9, 0x31, 0x8C, 0xFB, 0x93, 0x83, 0xD6, 0x75, 0x5D, 0xE5, + 0xE9, 0xA5, 0x3F, 0xCE, 0x8F, 0xB0, 0xE1, 0x0A, 0x96, 0x2E, 0xF3, 0x38, + 0x43, 0x82, 0x39, 0x6F, 0x6B, 0x83, 0xDF, 0xC2, 0x69, 0x17, 0xCC, 0x5F, + 0xC5, 0x0F, 0x7B, 0x34, 0xC5, 0xAD, 0x31, 0x59, 0x5C, 0x3C, 0xDF, 0xCE, + 0x8F, 0x62, 0x16, 0x52, 0x69, 0x89, 0xED, 0xF2, 0xA7, 0x85, 0xFC, 0x9A, + 0x95, 0x18, 0xD3, 0xA2, 0x4F, 0x94, 0xF5, 0x7B, 0xB0, 0xFA, 0xDA, 0xE4, + 0x45, 0x51, 0x0C, 0xB3, 0xC6, 0x63, 0xEC, 0xCE, 0xD7, 0x3F, 0xA6, 0x62, + 0x71, 0x7E, 0x44, 0x95, 0x09, 0xEF, 0x0D, 0x88, 0xF3, 0x20, 0x5C, 0x3A, + 0xF4, 0x64, 0xD9, 0x37, 0x50, 0xEC, 0x82, 0xF5, 0x8F, 0xD9, 0x93, 0x1E, + 0x75, 0x51, 0x2C, 0xC7, 0xDD, 0x67, 0xE2, 0x3B, 0x5E, 0xEE, 0x8E, 0xFB, + 0x4C, 0xF7, 0xF2, 0x2B, 0xED, 0xC7, 0xBC, 0x2F, 0xB5, 0xF0, 0x8B, 0x63, + 0x74, 0xF6, 0x8D, 0xC2, 0xFA, 0x3D, 0xF8, 0xF3, 0xF5, 0xC1, 0x71, 0xE0, + 0x30, 0xCB, 0x8F, 0x20, 0xA6, 0x37, 0xF2, 0x23, 0x2A, 0x17, 0xEF, 0x09, + 0x7F, 0xCC, 0x30, 0xE4, 0xF9, 0x1D, 0x76, 0xE3, 0x00, 0xE4, 0x4F, 0xB6, + 0xDB, 0xA7, 0x43, 0xCE, 0xBA, 0xFE, 0xCF, 0x62, 0xB1, 0x8F, 0x24, 0xD0, + 0x62, 0x4B, 0xFD, 0xA3, 0x38, 0xE6, 0xFF, 0xFD, 0xF8, 0x25, 0xDD, 0x76, + 0x9E, 0x42, 0x70, 0x33, 0x57, 0x17, 0xF2, 0x63, 0x4A, 0xA5, 0x34, 0x3F, + 0xCE, 0x41, 0xB1, 0x38, 0x3F, 0xD2, 0xEE, 0x52, 0xB5, 0xB6, 0xAB, 0x09, + 0x16, 0xD1, 0xDD, 0x9F, 0xF8, 0xF4, 0x8E, 0xBB, 0xA9, 0x01, 0xE9, 0x56, + 0x08, 0xC3, 0xC1, 0x46, 0x7B, 0xEB, 0x60, 0x2D, 0x3E, 0x3D, 0xD8, 0x6E, + 0x5E, 0x21, 0xCF, 0x0B, 0xE1, 0xD1, 0x87, 0xCD, 0xD8, 0xA6, 0x6C, 0x96, + 0xAF, 0x17, 0xCA, 0x17, 0xC9, 0xC5, 0xBA, 0x3F, 0x5E, 0xD1, 0x3D, 0x9A, + 0xF1, 0x97, 0x60, 0x4C, 0xF3, 0x23, 0xE8, 0xF7, 0x25, 0xF9, 0x11, 0x45, + 0xFA, 0xFD, 0x14, 0xCB, 0xEA, 0x66, 0x7E, 0xD8, 0x29, 0x43, 0x92, 0x5F, + 0x6E, 0x8A, 0x85, 0x5F, 0xE2, 0x39, 0xFD, 0xB3, 0xDB, 0x4F, 0x23, 0xF4, + 0x3F, 0xD7, 0xD6, 0x64, 0x7F, 0xAC, 0xBA, 0x26, 0xA3, 0xAD, 0x4F, 0xDD, + 0xC3, 0xE7, 0xDD, 0xFD, 0xBB, 0x8B, 0x09, 0x92, 0xC5, 0xE1, 0x1E, 0x1B, + 0x42, 0x6B, 0x63, 0x53, 0x96, 0x84, 0xFB, 0xD2, 0xD1, 0x4F, 0xF3, 0x4D, + 0x45, 0xF2, 0x39, 0xB0, 0xFA, 0x98, 0x7C, 0x92, 0x1F, 0xE1, 0x51, 0xD3, + 0xF6, 0x23, 0xEC, 0xEF, 0xAD, 0xCE, 0xEF, 0x8E, 0x86, 0x0C, 0x99, 0x25, + 0x4F, 0x3B, 0xFC, 0xE4, 0x46, 0x61, 0x9E, 0x42, 0xDE, 0xDD, 0x9F, 0x3B, + 0x25, 0xC8, 0xAF, 0x6C, 0xE1, 0xF9, 0x8F, 0xA5, 0x28, 0x5E, 0x5D, 0x24, + 0xEB, 0x8F, 0x3A, 0x0B, 0x8F, 0xF4, 0xFB, 0xF7, 0xCF, 0xE7, 0x85, 0xC2, + 0x97, 0x71, 0x1E, 0x28, 0x08, 0xD7, 0xB4, 0xFC, 0xC2, 0xFD, 0xBD, 0x6B, + 0xA7, 0x18, 0xE6, 0x47, 0xF2, 0x24, 0xE2, 0x30, 0x0C, 0x6A, 0x9B, 0x34, + 0xFD, 0x3E, 0x93, 0x1F, 0xC3, 0x57, 0x16, 0xA6, 0xAA, 0xFE, 0xD6, 0xA6, + 0xF1, 0x24, 0xF2, 0xDB, 0x1C, 0xEE, 0x94, 0x20, 0x7F, 0x7E, 0xBD, 0xBF, + 0x75, 0xCF, 0x0F, 0xEE, 0xB3, 0xC3, 0xCF, 0xF1, 0xAE, 0xF7, 0x85, 0x4B, + 0xF3, 0x10, 0x9F, 0x53, 0xB8, 0xB5, 0xC5, 0x74, 0x1D, 0xBD, 0x87, 0xC7, + 0xD4, 0xBF, 0x18, 0xA6, 0x44, 0x67, 0xE5, 0x83, 0xBB, 0x97, 0x4E, 0x53, + 0xF9, 0x2A, 0x2D, 0x5F, 0xA7, 0xE5, 0xE7, 0x83, 0xEE, 0xD5, 0x60, 0x8C, + 0xD6, 0x07, 0x17, 0xCF, 0x62, 0xFA, 0xC5, 0x60, 0x36, 0x62, 0x23, 0x3F, + 0xEA, 0xE1, 0xA7, 0xCA, 0x34, 0x3F, 0xC6, 0xFC, 0x9D, 0x1D, 0x8E, 0xA7, + 0xF4, 0xCF, 0x6D, 0x55, 0x30, 0x7C, 0xC0, 0x76, 0xE6, 0x7D, 0xB1, 0x01, + 0x19, 0x66, 0x32, 0x87, 0x88, 0xE8, 0x42, 0x65, 0x0A, 0xF0, 0xE1, 0x72, + 0x7D, 0x4F, 0x9F, 0x85, 0x9E, 0xC8, 0x21, 0x29, 0xDF, 0x7D, 0xA5, 0x4C, + 0xCB, 0x1F, 0x56, 0xCB, 0xCF, 0xD3, 0x63, 0xB5, 0x83, 0xF5, 0xA9, 0xFC, + 0x98, 0xDF, 0x12, 0xB3, 0x9E, 0x1F, 0xE5, 0xF8, 0x94, 0xEE, 0x74, 0x6B, + 0xF0, 0x58, 0xAB, 0x2A, 0x2C, 0x6C, 0x95, 0xF0, 0xD9, 0x1D, 0x6F, 0x77, + 0x95, 0x5C, 0xC7, 0xE1, 0x87, 0xB5, 0xF4, 0xF8, 0xB9, 0xDC, 0xC1, 0x1A, + 0x17, 0xC9, 0x0E, 0x55, 0x5D, 0x9F, 0x8B, 0x24, 0x1E, 0xC6, 0x3B, 0xD2, + 0x8B, 0x73, 0x5D, 0x97, 0xE3, 0xAA, 0x40, 0x50, 0x7E, 0xEC, 0x20, 0xE5, + 0x41, 0xF9, 0xB1, 0x09, 0xA8, 0xFE, 0x52, 0xBE, 0x2F, 0x9D, 0xDF, 0xDF, + 0x9D, 0x90, 0x8E, 0xDD, 0x63, 0x9F, 0xCB, 0x8F, 0x2A, 0x4E, 0xD7, 0x31, + 0xC4, 0xAF, 0xBF, 0xDF, 0x1B, 0x77, 0xF4, 0x7D, 0xB1, 0xE3, 0xB5, 0xDA, + 0xE9, 0x6D, 0x94, 0xF7, 0x5F, 0x3A, 0xD7, 0xB3, 0x9B, 0xE5, 0x79, 0x52, + 0x55, 0x7F, 0xD7, 0xD5, 0x7E, 0x18, 0x6D, 0xCC, 0x1A, 0x8F, 0x6E, 0x0A, + 0xEB, 0x9F, 0xA5, 0x92, 0x0B, 0x3D, 0x9C, 0x20, 0x08, 0x17, 0x9E, 0x7E, + 0x5A, 0x9C, 0x90, 0x8A, 0x15, 0xDB, 0xE5, 0xEB, 0xA4, 0xF0, 0x18, 0x98, + 0x0B, 0x87, 0x4F, 0x7F, 0xE8, 0xAF, 0xCB, 0x9C, 0xFD, 0x9F, 0xD3, 0x8C, + 0xC3, 0xEC, 0x11, 0xAD, 0x61, 0xC7, 0xEC, 0xC1, 0xB0, 0xE4, 0x6E, 0x95, + 0xA5, 0xD3, 0xE1, 0x49, 0xB5, 0xF7, 0xBB, 0x12, 0x6F, 0x77, 0x5E, 0xED, + 0x0F, 0xD1, 0x6B, 0x7E, 0x7E, 0xBE, 0xDF, 0xF2, 0x66, 0xBF, 0x5B, 0x9E, + 0xA7, 0x9C, 0x3F, 0x3E, 0x1E, 0x06, 0xE1, 0x42, 0x78, 0x27, 0xF3, 0x3C, + 0x0B, 0x0F, 0x20, 0x16, 0x9B, 0x47, 0x9F, 0xDD, 0xEE, 0x3E, 0x26, 0x44, + 0x91, 0xEE, 0x0F, 0x7D, 0x32, 0x3F, 0xD2, 0x06, 0x64, 0x96, 0x1F, 0xF5, + 0xCA, 0xF6, 0xB1, 0xD2, 0xE9, 0x8B, 0x20, 0x0C, 0xCF, 0xBF, 0x81, 0xFD, + 0x78, 0x5B, 0x7B, 0xD6, 0xBF, 0x71, 0x37, 0xCB, 0xDE, 0x0E, 0xB7, 0x17, + 0xF0, 0xEE, 0xEE, 0xAF, 0xE3, 0x5D, 0x7D, 0xBF, 0xCF, 0xEC, 0x1A, 0x1F, + 0xE5, 0xD1, 0x2C, 0xC0, 0x67, 0x73, 0x5D, 0xB3, 0xF2, 0x87, 0xCD, 0xBD, + 0xF3, 0xF7, 0x8E, 0x8C, 0x9F, 0xFB, 0xD8, 0x5E, 0xE9, 0x60, 0x7D, 0x32, + 0x3F, 0xD2, 0x29, 0xE7, 0xB5, 0xFC, 0x98, 0xBD, 0x75, 0x65, 0x3C, 0x5A, + 0xFA, 0xC6, 0x15, 0xEB, 0xE7, 0xDF, 0x40, 0x15, 0x3C, 0xF6, 0xF1, 0x36, + 0x64, 0xC5, 0x90, 0x1A, 0x37, 0xEB, 0xEF, 0xBF, 0x2A, 0x37, 0xE3, 0x21, + 0xEE, 0x40, 0x1D, 0x16, 0x2E, 0xA6, 0x49, 0xF9, 0x64, 0x80, 0x1D, 0x5F, + 0x8E, 0xA3, 0x3B, 0x01, 0xD3, 0x79, 0xA3, 0xCD, 0xB9, 0xD8, 0x72, 0xE9, + 0xE0, 0xBD, 0x8F, 0x30, 0xC2, 0xD3, 0x06, 0x64, 0x2D, 0x3F, 0xE2, 0x8A, + 0xE5, 0xC1, 0x18, 0xBC, 0x89, 0xAE, 0x09, 0xDE, 0x5B, 0xFC, 0x2D, 0xDC, + 0x1B, 0x90, 0xE9, 0x89, 0xF3, 0xBB, 0xFB, 0xD3, 0x51, 0xAB, 0xEF, 0x67, + 0xE8, 0xB4, 0xC5, 0x56, 0x38, 0x04, 0x7B, 0xD3, 0x3B, 0xC1, 0x07, 0xA7, + 0x4F, 0x96, 0x3F, 0xC4, 0xB9, 0xD7, 0x5F, 0xF7, 0x83, 0xC8, 0x3C, 0x05, + 0x71, 0x9E, 0xEA, 0xC7, 0xD3, 0xCB, 0x7D, 0x9D, 0x5B, 0x40, 0x0F, 0xC7, + 0x3E, 0xC6, 0x5F, 0x5C, 0x6D, 0x27, 0x2E, 0xED, 0x54, 0xED, 0xA4, 0xD6, + 0xF5, 0x58, 0xC8, 0x8B, 0xEF, 0xBF, 0x89, 0xBA, 0x4F, 0x90, 0xF4, 0xB9, + 0xDA, 0xF1, 0xF1, 0xC1, 0x6B, 0x7E, 0x6C, 0x75, 0x14, 0x9A, 0xAA, 0x2C, + 0x8A, 0x53, 0xB5, 0xD2, 0xD5, 0xAE, 0xAF, 0x7B, 0x4F, 0xD5, 0x56, 0xA8, + 0x6C, 0x97, 0xFF, 0xE8, 0xCB, 0xCF, 0xE7, 0x49, 0x9B, 0x26, 0x2E, 0xD1, + 0xA6, 0x1B, 0xB6, 0xBE, 0x1C, 0xEF, 0x0A, 0x96, 0x70, 0xE2, 0x2F, 0x36, + 0x91, 0x85, 0x6A, 0x2F, 0xBE, 0x14, 0xB5, 0xAE, 0x4E, 0xEB, 0xE7, 0xC3, + 0xF3, 0x29, 0x76, 0x8B, 0x2F, 0x66, 0xF8, 0x64, 0x7E, 0xC0, 0x37, 0xD7, + 0x27, 0xC8, 0x72, 0x7E, 0xBC, 0xAD, 0xBD, 0xBF, 0x04, 0x5E, 0x45, 0x97, + 0x20, 0xFB, 0xB5, 0x0E, 0xD6, 0x75, 0xC4, 0xFE, 0xE8, 0xFA, 0xC1, 0x43, + 0x75, 0xFF, 0x7B, 0x9C, 0xE5, 0x04, 0xC9, 0x36, 0x5E, 0x4F, 0x0D, 0xAF, + 0xA2, 0xB8, 0xBD, 0x8D, 0x3A, 0x4E, 0x91, 0xB7, 0xFE, 0xFD, 0xBB, 0x46, + 0x1F, 0x70, 0xE9, 0x9F, 0x36, 0x1F, 0x16, 0x3D, 0xEE, 0x2B, 0x21, 0xFB, + 0xDC, 0xD8, 0x03, 0x6E, 0x9A, 0x22, 0x0F, 0xFF, 0xF7, 0x1F, 0xBB, 0xFD, + 0x3F, 0x9A, 0x0E, 0x88, 0xD4, 0x65, 0x51, 0x1C, 0x8B, 0xA2, 0xD8, 0x5C, + 0xB4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xBE, 0x8A, 0xB6, 0x69, 0xDA, 0x47, 0xD7, 0x01, 0xBE, 0xA2, 0xB6, + 0x3A, 0x66, 0x37, 0x87, 0xB2, 0x79, 0x74, 0x5D, 0xE0, 0x6B, 0x69, 0x8B, + 0x2C, 0x3B, 0x56, 0xF5, 0x55, 0xD5, 0xFD, 0xA5, 0x15, 0x81, 0x49, 0x99, + 0x65, 0xD5, 0xF4, 0xE9, 0x9C, 0x65, 0xA7, 0xC7, 0xD5, 0x05, 0xBE, 0x98, + 0x63, 0x56, 0xC6, 0x1B, 0xAA, 0xEC, 0xF8, 0x98, 0x9A, 0xC0, 0x97, 0x73, + 0xC8, 0xEA, 0x74, 0x53, 0x93, 0xE5, 0xFA, 0x58, 0x70, 0xE9, 0x5A, 0x8F, + 0x71, 0x40, 0x7E, 0xCE, 0xF3, 0x7B, 0xC3, 0xD1, 0xE6, 0x87, 0x47, 0xD5, + 0x07, 0xBE, 0x90, 0x32, 0x68, 0x3D, 0xBA, 0xF9, 0xAB, 0xA2, 0xFF, 0xB3, + 0x19, 0xFE, 0x80, 0x17, 0xD6, 0x04, 0x23, 0xF3, 0xFA, 0x36, 0xBF, 0x7B, + 0xFF, 0x70, 0x9E, 0xF7, 0xBA, 0xE0, 0xD5, 0x1C, 0xF3, 0xE9, 0xEF, 0xA6, + 0xCB, 0x8F, 0x71, 0x64, 0x7E, 0xD4, 0xC3, 0xE2, 0xD5, 0x7D, 0x44, 0xAD, + 0x44, 0x91, 0x05, 0xE3, 0xF2, 0x0F, 0x0D, 0x08, 0xAF, 0xAE, 0xC8, 0xA3, + 0x8F, 0x4D, 0x98, 0x12, 0x47, 0x23, 0x10, 0x5E, 0x5C, 0xBA, 0xF2, 0x11, + 0xAA, 0xB2, 0xFF, 0xBF, 0x7A, 0xC0, 0x17, 0xD4, 0x64, 0x1F, 0xD3, 0xDF, + 0x1F, 0x75, 0x5D, 0x55, 0x55, 0xB8, 0x53, 0x07, 0x8B, 0x97, 0x76, 0x9E, + 0x9A, 0x88, 0xA6, 0xBF, 0x3D, 0x31, 0x5C, 0x38, 0x0F, 0x6F, 0x3A, 0x81, + 0xD7, 0x53, 0x4E, 0xC3, 0x8F, 0x2A, 0xCF, 0xBB, 0xFC, 0x08, 0x53, 0xC2, + 0x00, 0x84, 0xD7, 0x76, 0x0A, 0x9B, 0x8B, 0x8F, 0x2E, 0x3F, 0xC2, 0xDB, + 0x4A, 0x0A, 0xF9, 0xC1, 0x4B, 0x2B, 0xC2, 0xFC, 0x28, 0xAF, 0xE9, 0x11, + 0x4D, 0x67, 0xC9, 0x0F, 0x5E, 0x5B, 0x19, 0xE6, 0xC3, 0x61, 0xBA, 0xBB, + 0xA4, 0xA7, 0x7F, 0xC5, 0x6B, 0x8B, 0xA6, 0x70, 0xBB, 0xF1, 0x47, 0x34, + 0x63, 0xB5, 0x35, 0xF9, 0x0B, 0xDF, 0x5F, 0x1D, 0x8C, 0x37, 0xEA, 0xB4, + 0x7B, 0x75, 0x31, 0xBF, 0xCB, 0x8B, 0x0B, 0xE6, 0xAB, 0x8A, 0xE0, 0xE6, + 0xC4, 0x9B, 0xDA, 0xFA, 0x20, 0x2F, 0xEE, 0x38, 0x0D, 0xD0, 0xBB, 0xEE, + 0x55, 0x79, 0x39, 0x4F, 0x0B, 0x86, 0x85, 0x87, 0x08, 0x79, 0x71, 0xE7, + 0xB1, 0x83, 0xD5, 0x76, 0xB3, 0xBB, 0xCD, 0x25, 0x9B, 0x1A, 0x0D, 0xCB, + 0x83, 0xBC, 0xBC, 0x71, 0xC6, 0xAA, 0x1F, 0x7E, 0x04, 0x8F, 0xA2, 0x9F, + 0x74, 0xAF, 0x78, 0x79, 0xE7, 0xE1, 0xE9, 0xDA, 0x6E, 0xF5, 0xE3, 0x50, + 0x4C, 0x23, 0xF4, 0x56, 0xF3, 0x01, 0x97, 0xC3, 0x3D, 0x23, 0xAA, 0xDB, + 0xED, 0x57, 0xF9, 0x6C, 0x3B, 0xBC, 0xB2, 0x76, 0xB8, 0x25, 0xB1, 0x1B, + 0x9F, 0x1F, 0xC6, 0xE9, 0xDE, 0x22, 0xF3, 0x1A, 0x45, 0xE8, 0x06, 0x1E, + 0x7D, 0x82, 0xB4, 0xA7, 0x62, 0x5A, 0xEF, 0x28, 0xAC, 0x7D, 0xC0, 0x4D, + 0x9D, 0xE5, 0x49, 0x5B, 0xD1, 0x1E, 0xA5, 0x07, 0xDC, 0x35, 0x79, 0xFC, + 0x42, 0xD1, 0x32, 0xD3, 0xB9, 0x82, 0xC9, 0x75, 0x70, 0x3E, 0x74, 0xAE, + 0xEA, 0x22, 0x73, 0xDF, 0x15, 0xC4, 0xCA, 0x6C, 0x54, 0x7A, 0xB5, 0x28, + 0xA4, 0xDA, 0xBA, 0x3A, 0x9D, 0xCA, 0x5A, 0xCF, 0x0A, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xF4, 0x5F, 0xC3, 0x54, 0x94, + 0x5A +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h index 5704371131c6..6219f825dbe3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h @@ -1,52 +1,32 @@ -/**************************************************************************** - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -/** - * This file was auto-generated using "svg2cpp.py" - * - * The encoding consists of x,y pairs with the min and max scaled to - * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the - * start of a new closed path. - */ -#pragma once - -constexpr float x_min = 0.000000; -constexpr float x_max = 480.000000; -constexpr float y_min = 0.000000; -constexpr float y_max = 272.000000; - -const PROGMEM uint16_t menu_btn[] = {0x0AAA, 0x0E1E, 0x6D54, 0x0E1E, 0x6D54, 0x2F0E, 0x0AAA, 0x2F0E, 0x0AAA, 0x0E1E}; -const PROGMEM uint16_t print_btn[] = {0x47FF, 0xCF0D, 0x7FFF, 0xCF0D, 0x7FFF, 0xEFFE, 0x47FF, 0xEFFE, 0x47FF, 0xCF0D}; -const PROGMEM uint16_t load_chocolate_btn[] = {0x0AAA, 0x3878, 0x6D54, 0x3878, 0x6D54, 0x5968, 0x0AAA, 0x5968, 0x0AAA, 0x3878}; -const PROGMEM uint16_t extrude_btn[] = {0x0AAA, 0x5E1D, 0x6D54, 0x5E1D, 0x6D54, 0x7F0E, 0x0AAA, 0x7F0E, 0x0AAA, 0x5E1D}; -const PROGMEM uint16_t preheat_chocolate_btn[] = {0x0AAA, 0x83C2, 0x6D54, 0x83C2, 0x6D54, 0xA4B3, 0x0AAA, 0xA4B3, 0x0AAA, 0x83C2}; -const PROGMEM uint16_t media_btn[] = {0x0AAA, 0xCF0D, 0x42AA, 0xCF0D, 0x42AA, 0xEFFE, 0x0AAA, 0xEFFE, 0x0AAA, 0xCF0D}; -const PROGMEM uint16_t pause_btn[] = {0x8554, 0xCF0D, 0xBD53, 0xCF0D, 0xBD53, 0xEFFE, 0x8554, 0xEFFE, 0x8554, 0xCF0D}; -const PROGMEM uint16_t print_time_hms[] = {0xC59E, 0xAEA0, 0xF510, 0xAEA0, 0xF510, 0xC52D, 0xC59E, 0xC52D, 0xC59E, 0xAEA0}; -const PROGMEM uint16_t file_name[] = {0x0B0E, 0xAECD, 0xBCEF, 0xAECD, 0xBCEF, 0xC4AB, 0x0B0E, 0xC4AB, 0x0B0E, 0xAECD}; -const PROGMEM uint16_t chocolate_label[] = {0x75C1, 0x1369, 0xF4FE, 0x1369, 0xF4FE, 0x2AB1, 0x75C1, 0x2AB1, 0x75C1, 0x1369}; -const PROGMEM uint16_t h0_label[] = {0x8304, 0x4BEB, 0xB271, 0x4BEB, 0xB271, 0x63B0, 0x8304, 0x63B0, 0x8304, 0x4BEB}; -const PROGMEM uint16_t h0_temp[] = {0x8304, 0x7190, 0xB271, 0x7190, 0xB271, 0x8955, 0x8304, 0x8955, 0x8304, 0x7190}; -const PROGMEM uint16_t h1_label[] = {0xBB04, 0x4BEB, 0xEA71, 0x4BEB, 0xEA71, 0x63B0, 0xBB04, 0x63B0, 0xBB04, 0x4BEB}; -const PROGMEM uint16_t h1_temp[] = {0xBB04, 0x7190, 0xEA71, 0x7190, 0xEA71, 0x8956, 0xBB04, 0x8956, 0xBB04, 0x7190}; -const PROGMEM uint16_t stop_btn[] = {0xC2A9, 0xCF0D, 0xF553, 0xCF0D, 0xF553, 0xEFFE, 0xC2A9, 0xEFFE, 0xC2A9, 0xCF0D}; -const PROGMEM uint16_t load_screen_extrude[] = {0x382C, 0x8B02, 0x4188, 0x8B02, 0x4188, 0xAC4A, 0x4637, 0xAC4A, 0x3CDA, 0xBCEE, 0x337D, 0xAC4A, 0x382C, 0xAC4A, 0x382C, 0x8B02}; -const PROGMEM uint16_t load_screen_retract[] = {0x382C, 0x7A5D, 0x4188, 0x7A5D, 0x4188, 0x5915, 0x4637, 0x5915, 0x3CDA, 0x4871, 0x337E, 0x5915, 0x382C, 0x5915, 0x382C, 0x7A5D}; -const PROGMEM uint16_t load_screen_back_btn[] = {0x1555, 0xCA58, 0xEAA8, 0xCA58, 0xEAA8, 0xEFFE, 0x1555, 0xEFFE, 0x1555, 0xCA58}; -const PROGMEM uint16_t load_screen_unload_btn[] = {0x67FF, 0x70F0, 0xEAA8, 0x70F0, 0xEAA8, 0x9695, 0x67FF, 0x9695, 0x67FF, 0x70F0}; -const PROGMEM uint16_t load_screen_start_stop_btn[] = {0x67FF, 0x9B4A, 0xEAA8, 0x9B4A, 0xEAA8, 0xC0EF, 0x67FF, 0xC0EF, 0x67FF, 0x9B4A}; -const PROGMEM uint16_t load_screen_load_btn[] = {0x67FF, 0x4696, 0xEAA8, 0x4696, 0xEAA8, 0x6C3B, 0x67FF, 0x6C3B, 0x67FF, 0x4696}; -const PROGMEM uint16_t load_screen_continuous[] = {0x67FF, 0x1787, 0xEAA8, 0x1787, 0xEAA8, 0x3D2C, 0x67FF, 0x3D2C, 0x67FF, 0x1787}; -const PROGMEM uint16_t load_screen_increment[] = {0x1555, 0x1787, 0x62A9, 0x1787, 0x62A9, 0x3D2C, 0x1555, 0x3D2C, 0x1555, 0x1787}; +const PROGMEM uint16_t menu_btn[] = {0x0AAC, 0x0DF3, 0x6D54, 0x0DF3, 0x6D54, 0x2E89, 0x0AAC, 0x2E89, 0x0AAC, 0x0DF3}; +const PROGMEM uint16_t print_btn[] = {0x4800, 0xCCCC, 0x7FFF, 0xCCCC, 0x7FFF, 0xED62, 0x4800, 0xED62, 0x4800, 0xCCCC}; +const PROGMEM uint16_t load_chocolate_btn[] = {0x0AAC, 0x37D8, 0x6D54, 0x37D8, 0x6D54, 0x586E, 0x0AAC, 0x586E, 0x0AAC, 0x37D8}; +const PROGMEM uint16_t preheat_chocolate_btn[] = {0x0AAC, 0x5D15, 0x6D54, 0x5D15, 0x6D54, 0x7DAB, 0x0AAC, 0x7DAB, 0x0AAC, 0x5D15}; +const PROGMEM uint16_t extrude_btn[] = {0x0AAC, 0x8252, 0x6D54, 0x8252, 0x6D54, 0xA2E8, 0x0AAC, 0xA2E8, 0x0AAC, 0x8252}; +const PROGMEM uint16_t media_btn[] = {0x0AAC, 0xCCCC, 0x42AA, 0xCCCC, 0x42AA, 0xED62, 0x0AAC, 0xED62, 0x0AAC, 0xCCCC}; +const PROGMEM uint16_t pause_btn[] = {0x8554, 0xCCCC, 0xBD53, 0xCCCC, 0xBD53, 0xED62, 0x8554, 0xED62, 0x8554, 0xCCCC}; +const PROGMEM uint16_t print_time_hms[] = {0xAB02, 0x82EE, 0xE4F8, 0x82EE, 0xE4F8, 0xA24C, 0xAB02, 0xA24C, 0xAB02, 0x82EE}; +const PROGMEM uint16_t print_time_pct[] = {0x7386, 0x82E2, 0xA500, 0x82E2, 0xA500, 0xA258, 0x7386, 0xA258, 0x7386, 0x82E2}; +const PROGMEM uint16_t file_name[] = {0x0B08, 0xA830, 0xF4F5, 0xA830, 0xF4F5, 0xC784, 0x0B08, 0xC784, 0x0B08, 0xA830}; +const PROGMEM uint16_t h0_label[] = {0x85B6, 0x3884, 0xAF9B, 0x3884, 0xAF9B, 0x57C1, 0x85B6, 0x57C1, 0x85B6, 0x3884}; +const PROGMEM uint16_t h0_temp[] = {0x85B6, 0x5DC1, 0xAF9B, 0x5DC1, 0xAF9B, 0x7CFF, 0x85B6, 0x7CFF, 0x85B6, 0x5DC1}; +const PROGMEM uint16_t h1_label[] = {0xBB0B, 0x3884, 0xE4EF, 0x3884, 0xE4EF, 0x57C1, 0xBB0B, 0x57C1, 0xBB0B, 0x3884}; +const PROGMEM uint16_t h1_temp[] = {0xBB0B, 0x5DC1, 0xE4EF, 0x5DC1, 0xE4EF, 0x7CFF, 0xBB0B, 0x7CFF, 0xBB0B, 0x5DC1}; +const PROGMEM uint16_t stop_btn[] = {0xC2A8, 0xCCCC, 0xF551, 0xCCCC, 0xF551, 0xED62, 0xC2A8, 0xED62, 0xC2A8, 0xCCCC}; +const PROGMEM uint16_t z_wizard_heading[] = {0x5332, 0x0FFF, 0xB331, 0x0FFF, 0xB331, 0x2AAA, 0x5332, 0x2AAA, 0x5332, 0x0FFF}; +const PROGMEM uint16_t z_wizard_plus_btn[] = {0x9CCB, 0x3AAA, 0xAFFE, 0x3AAA, 0xAFFE, 0x5554, 0x9CCB, 0x5554, 0x9CCB, 0x3AAA}; +const PROGMEM uint16_t z_wizard_edit_box[] = {0x0CCC, 0x9FFE, 0x5332, 0x9FFE, 0x5332, 0xC553, 0x0CCC, 0xC553, 0x0CCC, 0x9FFE}; +const PROGMEM uint16_t z_wizard_inc1_btn[] = {0x5998, 0xA016, 0x8998, 0xA016, 0x8998, 0xC553, 0x5998, 0xC553, 0x5998, 0xA016}; +const PROGMEM uint16_t z_wizard_inc2_btn[] = {0x8FFE, 0xA016, 0xBFFE, 0xA016, 0xBFFE, 0xC553, 0x8FFE, 0xC553, 0x8FFE, 0xA016}; +const PROGMEM uint16_t z_wizard_inc3_btn[] = {0xC664, 0xA016, 0xF664, 0xA016, 0xF664, 0xC553, 0xC664, 0xC553, 0xC664, 0xA016}; +const PROGMEM uint16_t z_wizard_done_btn[] = {0xBFFE, 0xCFFE, 0xF664, 0xCFFE, 0xF664, 0xF553, 0xBFFE, 0xF553, 0xBFFE, 0xCFFE}; +const PROGMEM uint16_t z_wizard_neg_btn[] = {0x9CCB, 0x5FFF, 0xAFFE, 0x5FFF, 0xAFFE, 0x7AA9, 0x9CCB, 0x7AA9, 0x9CCB, 0x5FFF}; +const PROGMEM uint16_t z_wizard_diagram[] = {0x6D65, 0x4DBE, 0x6D65, 0x6015, 0x7ADB, 0x6015, 0x7F1F, 0x6C6A, 0x8303, 0x6C6A, 0x8747, 0x6015, 0x94BE, 0x6015, 0x94BE, 0x4DBE, 0x6D65, 0x4DBE, 0xFFFF, 0x0D06, 0x8527, 0x0D06, 0x9554, 0xF664, 0x9554, 0xF664, 0x8527, 0x0D06, 0x8527}; +const PROGMEM uint16_t load_screen_extrude[] = {0x382D, 0x897E, 0x4189, 0x897E, 0x4189, 0xAA6A, 0x4638, 0xAA6A, 0x3CDB, 0xBAE0, 0x337F, 0xAA6A, 0x382D, 0xAA6A, 0x382D, 0x897E}; +const PROGMEM uint16_t load_screen_retract[] = {0x382D, 0x7908, 0x4189, 0x7908, 0x4189, 0x581C, 0x4638, 0x581C, 0x3CDB, 0x47A6, 0x337F, 0x581C, 0x382D, 0x581C, 0x382D, 0x7908}; +const PROGMEM uint16_t load_screen_back_btn[] = {0x1556, 0xC825, 0xEAA7, 0xC825, 0xEAA7, 0xED62, 0x1556, 0xED62, 0x1556, 0xC825}; +const PROGMEM uint16_t load_screen_unload_btn[] = {0x67FF, 0x6FB4, 0xEAA7, 0x6FB4, 0xEAA7, 0x94F1, 0x67FF, 0x94F1, 0x67FF, 0x6FB4}; +const PROGMEM uint16_t load_screen_start_stop_btn[] = {0x67FF, 0x9998, 0xEAA7, 0x9998, 0xEAA7, 0xBED6, 0x67FF, 0xBED6, 0x67FF, 0x9998}; +const PROGMEM uint16_t load_screen_load_btn[] = {0x67FF, 0x45CF, 0xEAA7, 0x45CF, 0xEAA7, 0x6B0C, 0x67FF, 0x6B0C, 0x67FF, 0x45CF}; +const PROGMEM uint16_t load_screen_continuous[] = {0x67FF, 0x1743, 0xEAA7, 0x1743, 0xEAA7, 0x3C80, 0x67FF, 0x3C80, 0x67FF, 0x1743}; +const PROGMEM uint16_t load_screen_increment[] = {0x1556, 0x1743, 0x62AA, 0x1743, 0x62AA, 0x3C80, 0x1556, 0x3C80, 0x1556, 0x1743}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp index 581c3374288b..f7c7035761fd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp @@ -77,7 +77,7 @@ const char *FilesScreen::getSelectedFilename(bool shortName) { } void FilesScreen::drawSelectedFile() { - if(mydata.selected_tag == 0xFF) return; + if (mydata.selected_tag == 0xFF) return; FileList files; files.seek(getSelectedFileIndex(), true); mydata.flags.is_dir = files.isDir(); @@ -171,13 +171,10 @@ void FilesScreen::drawFooter() { cmd.colors(normal_btn) .font(font_medium) .colors(normal_btn) - .enabled(!mydata.flags.is_root) - .tag(245).button(BTN2_POS, F("Up Dir")) + .tag(mydata.flags.is_root ? 240 : 245).button(BTN2_POS, F("Back")) .colors(action_btn); - if (mydata.flags.is_empty) - cmd.tag(240).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_DONE)); - else if (has_selection && mydata.flags.is_dir) + if (has_selection && mydata.flags.is_dir) cmd.tag(244).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_OPEN)); else cmd.tag(241).enabled(has_selection).button(BTN1_POS, F("Select")); @@ -214,12 +211,9 @@ void FilesScreen::gotoPage(uint8_t page) { bool FilesScreen::onTouchEnd(uint8_t tag) { switch (tag) { - case 240: // Done button, always select first file - { - FileList files; - files.seek(0); - GOTO_PREVIOUS(); - } + case 240: // Back button + card.filename[0] = card.longFilename[0] = '\0'; // Clear file selection + GOTO_PREVIOUS(); return true; case 241: // Select highlighted file GOTO_PREVIOUS(); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index fa31ce155332..820594acaba8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -25,24 +25,31 @@ #if ENABLED(COCOA_LEVELING_MENU) -#if ALL(HAS_BED_PROBE, BLTOUCH) - #include "../../../../feature/bltouch.h" -#endif - using namespace FTDI; using namespace ExtUI; using namespace Theme; -#define GRID_COLS 3 -#define GRID_ROWS 5 -#define BED_MESH_TITLE_POS BTN_POS(1,1), BTN_SIZE(3,1) -#define PROBE_BED_POS BTN_POS(1,2), BTN_SIZE(1,1) -#define SHOW_MESH_POS BTN_POS(2,2), BTN_SIZE(1,1) -#define EDIT_MESH_POS BTN_POS(3,2), BTN_SIZE(1,1) -#define BLTOUCH_TITLE_POS BTN_POS(1,3), BTN_SIZE(3,1) -#define BLTOUCH_RESET_POS BTN_POS(1,4), BTN_SIZE(1,1) -#define BLTOUCH_TEST_POS BTN_POS(2,4), BTN_SIZE(1,1) -#define BACK_POS BTN_POS(1,5), BTN_SIZE(3,1) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + #define GRID_COLS 3 + #define GRID_ROWS 6 + #define BED_MESH_TITLE_POS BTN_POS(1,1), BTN_SIZE(3,1) + #define WARNING_POS BTN_POS(1,2), BTN_SIZE(3,2) + #define PROBE_BED_POS BTN_POS(1,4), BTN_SIZE(1,1) + #define SHOW_MESH_POS BTN_POS(2,4), BTN_SIZE(1,1) + #define EDIT_MESH_POS BTN_POS(3,4), BTN_SIZE(1,1) + #define BACK_POS BTN_POS(1,6), BTN_SIZE(3,1) +#else + #define GRID_COLS 2 + #define GRID_ROWS 6 + #define BED_MESH_TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) + #define WARNING_POS BTN_POS(1,2), BTN_SIZE(2,2) + #define PROBE_BED_POS BTN_POS(1,4), BTN_SIZE(1,1) + #define SHOW_MESH_POS BTN_POS(2,4), BTN_SIZE(1,1) + #define BACK_POS BTN_POS(1,6), BTN_SIZE(2,1) + + // Hide the editor button if motion to grid point not supported + #define EDIT_MESH_POS BTN_POS(4,7), BTN_SIZE(1,1) +#endif void LevelingMenu::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { @@ -57,38 +64,26 @@ void LevelingMenu::onRedraw(draw_mode_t what) { cmd.font(font_large) .cmd(COLOR_RGB(bg_text_enabled)) .text(BED_MESH_TITLE_POS, GET_TEXT_F(MSG_BED_LEVELING)) - #if ENABLED(BLTOUCH) - .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) - #endif .font(font_medium).colors(normal_btn) .tag(2).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) .enabled(ENABLED(HAS_MESH)) .tag(3).button(SHOW_MESH_POS, GET_TEXT_F(MSG_MESH_VIEW)) .enabled(ENABLED(HAS_MESH)) .tag(4).button(EDIT_MESH_POS, GET_TEXT_F(MSG_EDIT_MESH)) - #undef GRID_COLS - #define GRID_COLS 2 - #if ENABLED(BLTOUCH) - .tag(5).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET)) - .tag(6).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST)) - #endif - #undef GRID_COLS - #define GRID_COLS 3 .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + draw_text_box(cmd, WARNING_POS, F("Remove chocolate cartridge before probing. This reduces the possibility of damaging a part."), OPT_CENTER, font_medium); } } bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - case 2: BedMeshViewScreen::doProbe(); break; + case 2: SaveSettingsDialogBox::settingsChanged(); injectCommands(F(BED_LEVELING_COMMANDS)); break; case 3: BedMeshViewScreen::show(); break; - case 4: BedMeshEditScreen::show(); break; - #if ENABLED(BLTOUCH) - case 5: injectCommands(F("M280 P0 S60")); break; - case 6: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; - #endif + case 4: SaveSettingsDialogBox::settingsChanged(); BedMeshEditScreen::show(); break; default: return false; } return true; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp index 95ddf7d387f7..c7870eeaf8c4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp @@ -54,11 +54,10 @@ void LoadChocolateScreen::draw_buttons(draw_mode_t what) { cmd.tag(3).colors(mydata.repeat_tag == 6 ? action_btn : normal_btn).button(x, y, h, v, GET_TEXT_F(MSG_LOAD)); ui.bounds(POLY(load_screen_start_stop_btn), x, y, h, v); - if(mydata.repeat_tag == 0) { - cmd.colors(normal_btn).enabled(false); - } else { - cmd.colors(mydata.repeating ? action_btn : normal_btn).enabled(true); - } + if (mydata.repeat_tag == 0) + cmd.colors(normal_btn).enabled(false); + else + cmd.colors(mydata.repeating ? action_btn : normal_btn).enabled(true); cmd.tag(4).button(x, y, h, v, GET_TEXT_F(MSG_START_STOP)); ui.bounds(POLY(load_screen_back_btn), x, y, h, v); @@ -115,24 +114,16 @@ void LoadChocolateScreen::onRedraw(draw_mode_t what) { } bool LoadChocolateScreen::onTouchStart(uint8_t tag) { - if(tag != 4) { - mydata.repeating = false; - } + if (tag != 4) mydata.repeating = false; return true; } bool LoadChocolateScreen::onTouchEnd(uint8_t tag) { using namespace ExtUI; switch (tag) { - case 2: - mydata.repeat_tag = 5; - break; - case 3: - mydata.repeat_tag = 6; - break; - case 4: - mydata.repeating = !mydata.repeating; - break; + case 2: mydata.repeat_tag = 5; break; + case 3: mydata.repeat_tag = 6; break; + case 4: mydata.repeating = !mydata.repeating; break; case 1: GOTO_PREVIOUS(); break; } return true; @@ -153,12 +144,8 @@ bool LoadChocolateScreen::onTouchHeld(uint8_t tag) { #define UI_INCREMENT_AXIS(axis) UI_INCREMENT(AxisPosition_mm, axis); #define UI_DECREMENT_AXIS(axis) UI_DECREMENT(AxisPosition_mm, axis); switch (tag) { - case 5: - UI_INCREMENT_AXIS(E0); - break; - case 6: - UI_DECREMENT_AXIS(E0); - break; + case 5: UI_INCREMENT_AXIS(E0); break; + case 6: UI_DECREMENT_AXIS(E0); break; default: return false; } #undef UI_DECREMENT_AXIS @@ -170,10 +157,10 @@ void LoadChocolateScreen::onIdle() { reset_menu_timeout(); if (mydata.repeating) onTouchHeld(mydata.repeat_tag); if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { - if (!EventLoop::is_touch_held()) - onRefresh(); + if (!EventLoop::is_touch_held()) onRefresh(); refresh_timer.start(); } BaseScreen::onIdle(); } + #endif // COCOA_LOAD_CHOCOLATE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp index 2f231278f2d8..14dc8c533fa7 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp @@ -23,6 +23,7 @@ #include "../config.h" #include "../screens.h" +#include "../../../../module/stepper.h" #ifdef COCOA_MAIN_MENU @@ -34,13 +35,13 @@ using namespace Theme; #define ZPROBE_ZOFFSET_POS BTN_POS(1,1), BTN_SIZE(1,1) #define MOVE_XYZ_POS BTN_POS(1,2), BTN_SIZE(1,1) -#define TEMPERATURE_POS BTN_POS(2,1), BTN_SIZE(1,1) +#define LEVELING_POS BTN_POS(2,1), BTN_SIZE(1,1) #define MOVE_E_POS BTN_POS(2,2), BTN_SIZE(1,1) #define SPEED_POS BTN_POS(1,3), BTN_SIZE(1,1) #define FLOW_POS BTN_POS(2,3), BTN_SIZE(1,1) -#define ADVANCED_SETTINGS_POS BTN_POS(1,4), BTN_SIZE(1,1) +#define TEMPERATURE_POS BTN_POS(1,4), BTN_SIZE(1,1) #define DISABLE_STEPPERS_POS BTN_POS(2,4), BTN_SIZE(1,1) -#define LEVELING_POS BTN_POS(1,5), BTN_SIZE(1,1) +#define ADVANCED_SETTINGS_POS BTN_POS(1,5), BTN_SIZE(1,1) #define ABOUT_PRINTER_POS BTN_POS(2,5), BTN_SIZE(1,1) #define BACK_POS BTN_POS(1,6), BTN_SIZE(2,1) @@ -63,6 +64,10 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag( 6).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) .tag( 7).button(FLOW_POS, GET_TEXT_F(MSG_FLOW)) .tag( 8).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) + .enabled(stepper.axis_is_enabled(X_AXIS) || + stepper.axis_is_enabled(Y_AXIS) || + stepper.axis_is_enabled(Z_AXIS) || + stepper.axis_is_enabled(E0_AXIS)) .tag( 9).button(DISABLE_STEPPERS_POS, GET_TEXT_F(MSG_DISABLE_STEPPERS)) .enabled(ENABLED(HAS_LEVELING)) .tag(10).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) @@ -97,4 +102,12 @@ bool MainMenu::onTouchEnd(uint8_t tag) { return true; } +void MainMenu::onIdle() { + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + if (!EventLoop::is_touch_held()) + onRefresh(); + refresh_timer.start(); + } +} + #endif // COCOA_MAIN_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h index 460bb4b81a70..85dcbd07e6a5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h @@ -30,4 +30,5 @@ class MainMenu : public BaseScreen, public CachedScreen { public: static void onRedraw(draw_mode_t); static bool onTouchEnd(uint8_t tag); + static void onIdle(); }; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp index 2fabb81ee4db..ff11b6e0d9a8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp @@ -32,40 +32,24 @@ using namespace Theme; #define GRID_ROWS 5 void PreheatMenu::onRedraw(draw_mode_t what) { - const int16_t w = TERN0(COCOA_PRESS_EXTRA_HEATER, has_extra_heater()) ? BTN_W(1) : BTN_W(2); - const int16_t h = BTN_H(1); - if (what & BACKGROUND) { CommandProcessor cmd; cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) .cmd(CLEAR(true,true,true)) - .tag(0) .cmd(COLOR_RGB(bg_text_enabled)) .font(Theme::font_medium) - .text( BTN_POS(1,1), w, h, GET_TEXT_F(MSG_SELECT_CHOCOLATE_TYPE)); - #if ENABLED(COCOA_PRESS_EXTRA_HEATER) - if (has_extra_heater()) { - cmd.text( BTN_POS(2,1), w, h, GET_TEXT_F(MSG_EXTERNAL)); - } - #endif + .tag(0).text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_SELECT_CHOCOLATE_TYPE)); } if (what & FOREGROUND) { CommandProcessor cmd; cmd.font(Theme::font_medium) .colors(normal_btn) - .tag(2).button(BTN_POS(1,2), w, h, F("Dark Chocolate")) - .tag(3).button(BTN_POS(1,3), w, h, F("Milk Chocolate")) - .tag(4).button(BTN_POS(1,4), w, h, F("White Chocolate")); - #if ENABLED(COCOA_PRESS_EXTRA_HEATER) - if (has_extra_heater()) { - cmd.tag(5).button(BTN_POS(2,2), w, h, F("Dark Chocolate")) - .tag(6).button(BTN_POS(2,3), w, h, F("Milk Chocolate")) - .tag(7).button(BTN_POS(2,4), w, h, F("White Chocolate")); - } - #endif - cmd.colors(action_btn) - .tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); + .tag(2).button(BTN_POS(1,2), BTN_SIZE(2,1), F("Dark Chocolate")) + .tag(3).button(BTN_POS(1,3), BTN_SIZE(2,1), F("Milk Chocolate")) + .tag(4).button(BTN_POS(1,4), BTN_SIZE(2,1), F("White Chocolate")) + .colors(action_btn) + .tag(1).button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -73,38 +57,20 @@ bool PreheatMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; case 2: - #ifdef COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_INT_SCRIPT - injectCommands(F(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_INT_SCRIPT)); + #ifdef COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_SCRIPT + injectCommands(F(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 3: - #ifdef COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_INT_SCRIPT - injectCommands(F(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_INT_SCRIPT)); + #ifdef COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_SCRIPT + injectCommands(F(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 4: - #ifdef COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_INT_SCRIPT - injectCommands(F(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_INT_SCRIPT)); - #endif - GOTO_SCREEN(PreheatTimerScreen); - break; - case 5: - #ifdef COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_EXT_SCRIPT - injectCommands(F(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_EXT_SCRIPT)); - #endif - GOTO_SCREEN(PreheatTimerScreen); - break; - case 6: - #ifdef COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_EXT_SCRIPT - injectCommands(F(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_EXT_SCRIPT)); - #endif - GOTO_SCREEN(PreheatTimerScreen); - break; - case 7: - #ifdef COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_EXT_SCRIPT - injectCommands(F(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_EXT_SCRIPT)); + #ifdef COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_SCRIPT + injectCommands(F(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp index c4e9d971f6a7..9641b1f9c6a4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp @@ -89,20 +89,20 @@ void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, FSTR_P lab cmd.tag(0) .font(font_small); if (what & BACKGROUND) { - cmd.text( SUB_POS(1,1), SUB_SIZE(9,1), label) - .button(SUB_POS(1,2), SUB_SIZE(5,1), F(""), OPT_FLAT); + cmd.text( SUB_POS(1,1), SUB_SIZE(9,1), label) + .button(SUB_POS(1,2), SUB_SIZE(5,1), F(""), OPT_FLAT); } if (what & FOREGROUND) { - char str[32]; - dtostrf(value, 5, 1, str); - strcat_P(str, PSTR(" ")); - strcat_P(str, (const char*) GET_TEXT_F(MSG_UNITS_C)); - - cmd.text(SUB_POS(1,2), SUB_SIZE(5,1), str) - .font(font_medium) - .tag(tag ).button(SUB_POS(6,2), SUB_SIZE(2,1), F("-")) - .tag(tag+1).button(SUB_POS(8,2), SUB_SIZE(2,1), F("+")); + char str[32]; + dtostrf(value, 5, 1, str); + strcat_P(str, PSTR(" ")); + strcat_P(str, (const char*) GET_TEXT_F(MSG_UNITS_C)); + + cmd.text(SUB_POS(1,2), SUB_SIZE(5,1), str) + .font(font_medium) + .tag(tag ).button(SUB_POS(6,2), SUB_SIZE(2,1), F("-")) + .tag(tag+1).button(SUB_POS(8,2), SUB_SIZE(2,1), F("+")); } } @@ -116,7 +116,9 @@ void PreheatTimerScreen::onRedraw(draw_mode_t what) { draw_interaction_buttons(what); draw_adjuster(what, 2, GET_TEXT_F(MSG_NOZZLE), getTargetTemp_celsius(E0), NOZZLE_ADJ_POS); draw_adjuster(what, 4, GET_TEXT_F(MSG_BODY), getTargetTemp_celsius(E1), BODY_ADJ_POS); - draw_adjuster(what, 6, GET_TEXT_F(MSG_CHAMBER), getTargetTemp_celsius(CHAMBER), CHAMBER_ADJ_POS); + #if HAS_HEATED_CHAMBER + draw_adjuster(what, 6, GET_TEXT_F(MSG_CHAMBER), getTargetTemp_celsius(CHAMBER), CHAMBER_ADJ_POS); + #endif } bool PreheatTimerScreen::onTouchHeld(uint8_t tag) { @@ -126,8 +128,10 @@ bool PreheatTimerScreen::onTouchHeld(uint8_t tag) { case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; case 4: UI_DECREMENT(TargetTemp_celsius, E1); break; case 5: UI_INCREMENT(TargetTemp_celsius, E1); break; - case 6: UI_DECREMENT(TargetTemp_celsius, CHAMBER); break; - case 7: UI_INCREMENT(TargetTemp_celsius, CHAMBER); break; + #if HAS_HEATED_CHAMBER + case 6: UI_DECREMENT(TargetTemp_celsius, CHAMBER); break; + case 7: UI_INCREMENT(TargetTemp_celsius, CHAMBER); break; + #endif default: return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h index 11d87f9691a6..162c32b9562b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h @@ -83,7 +83,6 @@ enum { #include "../generic/base_numeric_adjustment_screen.h" #include "../generic/dialog_box_base_class.h" #include "../generic/boot_screen.h" -#include "../generic/about_screen.h" #include "../generic/kill_screen.h" #include "../generic/alert_dialog_box.h" #include "../generic/spinner_dialog_box.h" @@ -104,13 +103,10 @@ enum { #include "../generic/lock_screen.h" #include "../generic/endstop_state_screen.h" #include "../generic/display_tuning_screen.h" -#include "../generic/statistics_screen.h" #include "../generic/stepper_current_screen.h" -#include "../generic/z_offset_screen.h" #include "../generic/bed_mesh_base.h" #include "../generic/bed_mesh_view_screen.h" #include "../generic/bed_mesh_edit_screen.h" -#include "../generic/case_light_screen.h" #include "../generic/linear_advance_screen.h" #include "../generic/move_axis_screen.h" #include "../generic/flow_percent_screen.h" @@ -131,3 +127,7 @@ enum { #include "move_e_screen.h" #include "files_screen.h" #include "confirm_start_print_dialog_box.h" +#include "z_offset_screen.h" +#include "z_offset_wizard.h" +#include "about_screen.h" +#include "statistics_screen.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp new file mode 100644 index 000000000000..df29ac4d2309 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.cpp @@ -0,0 +1,82 @@ +/************************* + * statistics_screen.cpp * + *************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" + +#ifdef COCOA_STATISTICS_SCREEN + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define GRID_COLS 4 +#define GRID_ROWS 7 + +void StatisticsScreen::onRedraw(draw_mode_t what) { + CommandProcessor cmd; + + if (what & BACKGROUND) { + char buffer[21]; + + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0) + + .font(Theme::font_medium) + .text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXT_F(MSG_INFO_STATS_MENU)) + .font(Theme::font_small) + .tag(0) + .text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_PRINT_COUNT), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_COMPLETED_PRINTS), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_PRINT_TIME), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_PRINT_LONGEST), OPT_RIGHTX | OPT_CENTERY) + .text(BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_PRINT_FILAMENT), OPT_RIGHTX | OPT_CENTERY); + // Don't chain the following, it causes strange issues with evaluation ordering! + cmd.text(BTN_POS(3,2), BTN_SIZE(2,1), getTotalPrints_str(buffer)); + cmd.text(BTN_POS(3,3), BTN_SIZE(2,1), getFinishedPrints_str(buffer)); + cmd.text(BTN_POS(3,4), BTN_SIZE(2,1), getTotalPrintTime_str(buffer)); + cmd.text(BTN_POS(3,5), BTN_SIZE(2,1), getLongestPrint_str(buffer)); + + // Express in grams of chocolate rather than mm + const printStatistics stats = print_job_timer.getStats(); + const long gramsChocolate = stats.filamentUsed * 0.53; // 1mm of extrusion is 0.53g + sprintf_P(buffer, PSTR("%ldg"), gramsChocolate); + cmd.text(BTN_POS(3,6), BTN_SIZE(2,1), buffer); + } + + if (what & FOREGROUND) { + cmd.font(Theme::font_medium) + .colors(action_btn) + .tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); + } +} + +bool StatisticsScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + default: return false; + } +} + +#endif // COCOA_STATISTICS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.h new file mode 100644 index 000000000000..9e533570318d --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/statistics_screen.h @@ -0,0 +1,32 @@ +/*********************** + * statistics_screen.h * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_STATISTICS_SCREEN +#define COCOA_STATISTICS_SCREEN_CLASS StatisticsScreen + +class StatisticsScreen : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp index eddf36723977..421d90bf7ffa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp @@ -23,22 +23,30 @@ #include "../config.h" #include "../screens.h" +#include "../screen_data.h" #ifdef COCOA_STATUS_SCREEN #include "cocoa_press_ui.h" +#include "cocoa_press_bitmap.h" #define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) #define ICON_POS(x,y,w,h) x, y, h, h #define TEXT_POS(x,y,w,h) x + h, y, w - h, h -const uint8_t shadow_depth = 5; - using namespace FTDI; using namespace Theme; using namespace ExtUI; -float StatusScreen::increment; +const uint8_t shadow_depth = 5; + +constexpr static StatusScreenData &mydata = screen_data.StatusScreen; + +// Format for background image + +constexpr uint8_t format = RGB332; +constexpr uint16_t bitmap_w = 800; +constexpr uint16_t bitmap_h = 480; void StatusScreen::_format_time(char *outstr, uint32_t time) { const uint8_t hrs = time / 3600, @@ -69,6 +77,64 @@ void StatusScreen::loadBitmaps() { #endif } +void StatusScreen::draw_bkgnd(draw_mode_t what) { + if (what & BACKGROUND) { + constexpr float scale_w = float(FTDI::display_width)/bitmap_w; + constexpr float scale_h = float(FTDI::display_height)/bitmap_h; + uint16_t linestride; + uint32_t color; + switch (format) { + case RGB565: linestride = bitmap_w * 2; color = 0xFFFFFF; break; + case RGB332: linestride = bitmap_w ; color = 0xFFFFFF; break; + case L1: linestride = bitmap_w/8 ; color = 0x000000; break; + case L2: linestride = bitmap_w/4 ; color = 0x000000; break; + case L4: linestride = bitmap_w/2 ; color = 0x000000; break; + case L8: linestride = bitmap_w ; color = 0x000000; break; + } + CommandProcessor cmd; + cmd.cmd(COLOR_RGB(color)) + .cmd(BITMAP_SOURCE(BACKGROUND_OFFSET)) + .tag(0) + .bitmap_layout(format, linestride, bitmap_h) + .bitmap_size(NEAREST, BORDER, BORDER, bitmap_w*scale_w, bitmap_h*scale_h) + .cmd(BITMAP_TRANSFORM_A(uint32_t(float(256)/scale_w))) + .cmd(BITMAP_TRANSFORM_E(uint32_t(float(256)/scale_h))) + .cmd(BEGIN(BITMAPS)) + .cmd(VERTEX2II(0, 0, 0, 0)) + .cmd(BITMAP_TRANSFORM_A(256)) + .cmd(BITMAP_TRANSFORM_E(256)) + .cmd(COLOR_RGB(bg_text_enabled)); + } +} + +void StatusScreen::send_buffer(CommandProcessor &cmd, const void *data, uint16_t len) { + const char *ptr = (const char*) data; + constexpr uint16_t block_size = 512; + char block[block_size]; + for (;len > 0;) { + const uint16_t nBytes = min(len, block_size); + memcpy_P(block, ptr, nBytes); + cmd.write((const void*)block, nBytes); + cmd.execute(); + if(cmd.has_fault()) { + SERIAL_ECHOLNPGM("Recovering from fault: "); + cmd.reset(); + delay(1000); + return; + } + ptr += nBytes; + len -= nBytes; + } +} + +void StatusScreen::load_background(const void *data, uint16_t len) { + CommandProcessor cmd; + cmd.inflate(BACKGROUND_OFFSET) + .execute(); + send_buffer(cmd, data, len); + cmd.wait(); +} + void StatusScreen::draw_time(draw_mode_t what) { CommandProcessor cmd; PolyUI ui(cmd, what); @@ -96,23 +162,27 @@ void StatusScreen::draw_time(draw_mode_t what) { } } - -void StatusScreen::draw_progress(draw_mode_t what) { +void StatusScreen::draw_percent(draw_mode_t what) { CommandProcessor cmd; PolyUI ui(cmd, what); int16_t x, y, w, h; - - cmd.cmd(COLOR_RGB(accent_color_1)); - cmd.font(font_medium); + ui.bounds(POLY(print_time_pct), x, y, w, h); if (what & FOREGROUND) { - // Draw progress bar - ui.bounds(POLY(file_name), x, y, w, h); - const uint16_t bar_width = w * getProgress_percent() / 100; - cmd.tag(8) - .cmd(COLOR_RGB(accent_color_5)) - .rectangle(x, y, bar_width, h); + const uint16_t current_progress = TERN(HAS_PRINT_PROGRESS_PERMYRIAD, getProgress_permyriad(), getProgress_percent() * 100); + char progress_str[10]; + sprintf_P(progress_str, + #if ENABLED(PRINT_PROGRESS_SHOW_DECIMALS) + PSTR("%3d.%02d%%"), uint8_t(current_progress / 100), current_progress % 100 + #else + PSTR("%3d%%"), uint8_t(current_progress / 100) + #endif + ); + + cmd.font(font_medium) + .cmd(COLOR_RGB(bg_text_enabled)) + .text(TEXT_POS(x, y, w, h), progress_str); } } @@ -123,17 +193,8 @@ void StatusScreen::draw_temperature(draw_mode_t what) { int16_t x, y, w, h; if (what & BACKGROUND) { - cmd.cmd(COLOR_RGB(fluid_rgb)); - cmd.font(font_medium).tag(10); - - /*ui.bounds(POLY(temp_lbl), x, y, w, h); - cmd.text(x, y, w, h, F("Temp")); - - ui.bounds(POLY(set_lbl), x, y, w, h); - cmd.text(x, y, w, h, F("Set"));*/ - - ui.bounds(POLY(chocolate_label), x, y, w, h); - cmd.text(x, y, w, h, F("Cocoa Press")); + cmd.cmd(COLOR_RGB(bg_text_enabled)); + cmd.font(font_medium).tag(0); ui.bounds(POLY(h0_label), x, y, w, h); cmd.text(x, y, w, h, GET_TEXT_F(MSG_NOZZLE)); @@ -141,18 +202,6 @@ void StatusScreen::draw_temperature(draw_mode_t what) { ui.bounds(POLY(h1_label), x, y, w, h); cmd.text(x, y, w, h, GET_TEXT_F(MSG_BODY)); - #if ENABLED(COCOA_PRESS_EXTRA_HEATER) - if (has_extra_heater()) { - ui.bounds(POLY(h2_label), x, y, w, h); - cmd.text(x, y, w, h, GET_TEXT_F(MSG_EXTERNAL)); - } - #endif - - #if ENABLED(COCOA_PRESS_CHAMBER_COOLER) - ui.bounds(POLY(h3_label), x, y, w, h); - cmd.text(x, y, w, h, GET_TEXT_F(MSG_CHAMBER)); - #endif - #if ENABLED(TOUCH_UI_USE_UTF8) load_utf8_bitmaps(cmd); // Restore font bitmap handles #endif @@ -160,154 +209,125 @@ void StatusScreen::draw_temperature(draw_mode_t what) { if (what & FOREGROUND) { char str[15]; - cmd.cmd(COLOR_RGB(fluid_rgb)); - - cmd.font(font_large).tag(10); + cmd.font(font_medium).colors(normal_btn).tag(10); // Show the actual temperatures format_temp(str, getActualTemp_celsius(E0)); ui.bounds(POLY(h0_temp), x, y, w, h); - cmd.text(x, y, w, h, str); + cmd.button(x, y, w, h, str); format_temp(str, getActualTemp_celsius(E1)); ui.bounds(POLY(h1_temp), x, y, w, h); - cmd.text(x, y, w, h, str); - - #if ENABLED(COCOA_PRESS_EXTRA_HEATER) - if (has_extra_heater()) { - format_temp(str, getActualTemp_celsius(E2)); - ui.bounds(POLY(h2_temp), x, y, w, h); - cmd.text(x, y, w, h, str); - } - #endif - - #if ENABLED(COCOA_PRESS_CHAMBER_COOLER) - format_temp(str, getActualTemp_celsius(CHAMBER)); - ui.bounds(POLY(h3_temp), x, y, w, h); - cmd.text(x, y, w, h, str); - #endif - - /*// Show the set temperatures - format_temp(str, getTargetTemp_celsius(E0)); - ui.bounds(POLY(h0_set), x, y, w, h); - cmd.text(x, y, w, h, str); - - format_temp(str, getTargetTemp_celsius(E1)); - ui.bounds(POLY(h1_set), x, y, w, h); - cmd.text(x, y, w, h, str); - - #if ENABLED(COCOA_PRESS_EXTRA_HEATER) - if (has_extra_heater()) { - format_temp(str, getTargetTemp_celsius(E2)); - ui.bounds(POLY(h2_set), x, y, w, h); - cmd.text(x, y, w, h, str); - } - #endif - - #if ENABLED(COCOA_PRESS_CHAMBER_COOLER) - format_temp(str, getTargetTemp_celsius(CHAMBER)); - ui.bounds(POLY(h3_set), x, y, w, h); - cmd.text(x, y, w, h, str); - #endif*/ + cmd.button(x, y, w, h, str); } } void StatusScreen::draw_buttons(draw_mode_t what) { - int16_t x, y, w, h; + if (what & FOREGROUND) { + int16_t x, y, w, h; - const bool can_print = !isPrinting() && isMediaInserted() && isFileSelected(); - const bool can_select = !isPrinting() && isMediaInserted(); - const bool sdOrHostPrinting = ExtUI::isPrinting(); - const bool sdOrHostPaused = ExtUI::isPrintingPaused(); + const bool can_print = !isPrinting() && isMediaInserted() && isFileSelected(); + const bool can_select = !isPrinting() && isMediaInserted(); + const bool sdOrHostPrinting = ExtUI::isPrinting(); + const bool sdOrHostPaused = ExtUI::isPrintingPaused(); - CommandProcessor cmd; - PolyUI ui(cmd, what); + CommandProcessor cmd; + PolyUI ui(cmd, what); - cmd.font(font_medium).colors(normal_btn); + cmd.font(font_medium).colors(normal_btn); - ui.bounds(POLY(load_chocolate_btn), x, y, w, h); - cmd.tag(1).button(x, y, w, h, GET_TEXT_F(MSG_LOAD_UNLOAD)); + ui.bounds(POLY(load_chocolate_btn), x, y, w, h); + cmd.tag(1).button(x, y, w, h, GET_TEXT_F(MSG_LOAD_UNLOAD)); - ui.bounds(POLY(extrude_btn), x, y, w, h); - cmd.tag(2).button(x, y, w, h, GET_TEXT_F(MSG_EXTRUDE)); + ui.bounds(POLY(extrude_btn), x, y, w, h); + cmd.tag(2).button(x, y, w, h, GET_TEXT_F(MSG_EXTRUDE)); - ui.bounds(POLY(preheat_chocolate_btn), x, y, w, h); - cmd.tag(3).button(x, y, w, h, GET_TEXT_F(MSG_PREHEAT_CHOCOLATE)); + ui.bounds(POLY(preheat_chocolate_btn), x, y, w, h); + cmd.tag(3).button(x, y, w, h, GET_TEXT_F(MSG_PREHEAT_CHOCOLATE)); - ui.bounds(POLY(menu_btn), x, y, w, h); - cmd.tag(4).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_MENU)); + ui.bounds(POLY(menu_btn), x, y, w, h); + cmd.tag(4).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_MENU)); - ui.bounds(POLY(media_btn), x, y, w, h); - cmd.tag(5).enabled(can_select).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_MEDIA)); + ui.bounds(POLY(media_btn), x, y, w, h); + cmd.tag(5).enabled(can_select).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_MEDIA)); - ui.bounds(POLY(print_btn), x, y, w, h); - cmd.tag(6).colors(action_btn).enabled(can_print).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_PRINT)); + ui.bounds(POLY(print_btn), x, y, w, h); + cmd.tag(6).colors(action_btn).enabled(can_print).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_PRINT)); - ui.bounds(POLY(pause_btn), x, y, w, h); - cmd.tag(sdOrHostPaused ? 8 : 7).enabled(sdOrHostPrinting).button(x, y, w, h, sdOrHostPaused ? GET_TEXT_F(MSG_BUTTON_RESUME) : GET_TEXT_F(MSG_BUTTON_PAUSE)); + ui.bounds(POLY(pause_btn), x, y, w, h); + cmd.tag(sdOrHostPaused ? 8 : 7).enabled(sdOrHostPrinting).button(x, y, w, h, sdOrHostPaused ? GET_TEXT_F(MSG_BUTTON_RESUME) : GET_TEXT_F(MSG_BUTTON_PAUSE)); - ui.bounds(POLY(stop_btn), x, y, w, h); - cmd.tag(9).enabled(sdOrHostPrinting).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_STOP)); + ui.bounds(POLY(stop_btn), x, y, w, h); + cmd.tag(9).enabled(sdOrHostPrinting).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_STOP)); + } } +// When visible, the file name occupies the same space as the status +// message and must be drawn opaque. void StatusScreen::draw_file(draw_mode_t what) { - int16_t x, y, w, h; + if (mydata.gotMessage) return; - CommandProcessor cmd; - PolyUI ui(cmd, what); + if (what & FOREGROUND) { + int16_t x, y, w, h; - ui.bounds(POLY(file_name), x, y, w, h); + CommandProcessor cmd; + PolyUI ui(cmd, what); + ui.bounds(POLY(file_name), x, y, w, h); - if (what & BACKGROUND) { cmd.tag(5) - .cmd(COLOR_RGB(bg_text_enabled)) + .cmd (COLOR_RGB(bg_color)) + .rectangle(x, y, w, h) + .cmd (COLOR_RGB(bg_text_enabled)) .cmd (BITMAP_SOURCE(File_Icon_Info)) .cmd (BITMAP_LAYOUT(File_Icon_Info)) .cmd (BITMAP_SIZE (File_Icon_Info)) .icon(ICON_POS(x, y, w, h), File_Icon_Info, icon_scale); - } - - if (what & FOREGROUND) { - cmd.cmd(COLOR_RGB(bg_text_enabled)); - if(!isMediaInserted()) + if (!isMediaInserted()) draw_text_with_ellipsis(cmd, TEXT_POS(x, y, w, h), F("No media present"), OPT_CENTERY, font_small); - else if(isFileSelected()) { + else if (isFileSelected()) { FileList list; draw_text_with_ellipsis(cmd, TEXT_POS(x, y, w, h), list.filename(), OPT_CENTERY, font_small); - } else + } + else draw_text_with_ellipsis(cmd, TEXT_POS(x, y, w, h), F("No file selected"), OPT_CENTERY, font_small); } } +// The message will be drawn on the background and may be obscured by +// the filename. +void StatusScreen::draw_message(draw_mode_t what, const char *message) { + if (what & BACKGROUND) { + int16_t x, y, w, h; + + CommandProcessor cmd; + PolyUI ui(cmd, what); + ui.bounds(POLY(file_name), x, y, w, h); + + cmd.cmd(COLOR_RGB(bg_text_enabled)); + draw_text_box(cmd, TEXT_POS(x, y, w, h), message, OPT_CENTERY, font_small); + } +} + bool StatusScreen::isFileSelected() { - if(!isMediaInserted()) return false; + if (!isMediaInserted()) return false; FileList list; - if(list.isDir()) return false; + if (list.isDir()) return false; const char *filename = list.filename(); - if(filename[0] == '\0') return false; + if (filename[0] == '\0') return false; return true; } void StatusScreen::onRedraw(draw_mode_t what) { - if (what & BACKGROUND) { - CommandProcessor cmd; - cmd.cmd(CLEAR_COLOR_RGB(bg_color)) - .cmd(CLEAR(true,true,true)) - .tag(0); + if (what & FOREGROUND) { + draw_bkgnd(what); + draw_file(what); + draw_time(what); + draw_percent(what); + draw_temperature(what); + draw_buttons(what); } - - draw_file(what); - draw_time(what); - draw_progress(what); - draw_temperature(what); - draw_buttons(what); -} - -bool StatusScreen::onTouchStart(uint8_t) { - increment = 0; - return true; } bool StatusScreen::onTouchEnd(uint8_t tag) { @@ -352,24 +372,61 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { bool StatusScreen::onTouchHeld(uint8_t tag) { if (tag == 2 && !ExtUI::isMoving()) { - LoadChocolateScreen::setManualFeedrateAndIncrement(1, increment); + float increment; + LoadChocolateScreen::setManualFeedrateAndIncrement(0.25, increment); UI_INCREMENT(AxisPosition_mm, E0); - current_screen.onRefresh(); } return false; } -void StatusScreen::setStatusMessage(FSTR_P) { +void StatusScreen::setStatusMessage(FSTR_P message) { + char buff[strlen_P((const char * const)message)+1]; + strcpy_P(buff, (const char * const) message); + setStatusMessage((const char *) buff); +} + +void StatusScreen::setStatusMessage(const char * const message) { + if (CommandProcessor::is_processing()) { + #if ENABLED(TOUCH_UI_DEBUG) + SERIAL_ECHO_MSG("Cannot update status message, command processor busy"); + #endif + return; + } + + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)); + + const draw_mode_t what = BACKGROUND; + draw_bkgnd(what); + draw_message(what, message); + draw_time(what); + draw_percent(what); + draw_temperature(what); + draw_buttons(what); + + storeBackground(); + + #if ENABLED(TOUCH_UI_DEBUG) + SERIAL_ECHO_MSG("New status message: ", message); + #endif + + mydata.gotMessage = true; + + if (AT_SCREEN(StatusScreen)) + current_screen.onRefresh(); } -void StatusScreen::setStatusMessage(const char * const) { +void StatusScreen::onEntry() { + mydata.gotMessage = false; + load_background(cocoa_press_ui, sizeof(cocoa_press_ui)); } void StatusScreen::onIdle() { reset_menu_timeout(); if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { - if (!EventLoop::is_touch_held()) - onRefresh(); + if (!EventLoop::is_touch_held()) onRefresh(); refresh_timer.start(); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h index 05f99e953d6c..57cf2308ab42 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h @@ -26,31 +26,35 @@ #define COCOA_STATUS_SCREEN #define COCOA_STATUS_SCREEN_CLASS StatusScreen -class StatusScreen : public BaseScreen, public CachedScreen { +struct StatusScreenData { + bool gotMessage; +}; + +class StatusScreen : public BaseScreen, public CachedScreen { private: static void _format_time(char *outstr, uint32_t time); - static float increment; - static bool jog_xy; - static bool fine_motion; - static void draw_time(draw_mode_t what); - static void draw_progress(draw_mode_t what); + static void draw_percent(draw_mode_t what); static void draw_temperature(draw_mode_t what); static void draw_buttons(draw_mode_t what); static void draw_file(draw_mode_t what); + static void draw_message(draw_mode_t what, const char *message); + static void draw_bkgnd(draw_mode_t what); + + static void send_buffer(CommandProcessor &cmd, const void *data, uint16_t len); + static void load_background(const void *data, uint16_t len); static bool isFileSelected(); public: static void loadBitmaps(); - static void unlockMotors(); static void setStatusMessage(const char *); static void setStatusMessage(FSTR_P); static void onRedraw(draw_mode_t); - static bool onTouchStart(uint8_t tag); + static void onEntry(); static bool onTouchHeld(uint8_t tag); static bool onTouchEnd(uint8_t tag); static void onIdle(); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp new file mode 100644 index 000000000000..aeff0d95f8f0 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp @@ -0,0 +1,59 @@ +/*********************** + * z_offset_screen.cpp * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef COCOA_Z_OFFSET_SCREEN + +#include "z_offset_wizard.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void ZOffsetScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXT_F(MSG_UNITS_MM)); + + w.heading( GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm()); + w.increments(); + w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting()); +} + +bool ZOffsetScreen::onTouchHeld(uint8_t tag) { + const int16_t steps = TERN(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z), 0); + const float increment = TERN(BABYSTEPPING, mmFromWholeSteps(steps, Z), getIncrement()); + switch (tag) { + case 2: ZOffsetWizard::runWizard(); break; + case 4: UI_DECREMENT(ZOffset_mm); TERN(BABYSTEPPING, babystepAxis_steps(-steps, Z), UNUSED(steps)); break; + case 5: UI_INCREMENT(ZOffset_mm); TERN(BABYSTEPPING, babystepAxis_steps( steps, Z), UNUSED(steps)); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // COCOA_Z_OFFSET_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.h new file mode 100644 index 000000000000..93a364c109c6 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.h @@ -0,0 +1,32 @@ +/*********************** + * z_offset_screen.h * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_Z_OFFSET_SCREEN +#define COCOA_Z_OFFSET_SCREEN_CLASS ZOffsetScreen + +class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.cpp new file mode 100644 index 000000000000..9672e048d233 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.cpp @@ -0,0 +1,162 @@ +/*********************** + * z_offset_screen.cpp * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef COCOA_Z_OFFSET_WIZARD + +#include "cocoa_press_ui.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) +#define SHEET_THICKNESS 0.1 + +constexpr static ZOffsetWizardData &mydata = screen_data.ZOffsetWizard; + +void ZOffsetWizard::onEntry() { + mydata.increment = 242; + mydata.softEndstopState = getSoftEndstopState(); + BaseNumericAdjustmentScreen::onEntry(); + setSoftEndstopState(false); +} + +void ZOffsetWizard::onExit() { + setSoftEndstopState(mydata.softEndstopState); +} + +void ZOffsetWizard::onRedraw(draw_mode_t what) { + int16_t x, y, w, h; + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0) + .font(font_medium).colors(normal_btn); + + char b[32]; + dtostrf(getZOffset_mm(), 5, 2, b); + strcat_P(b, PSTR(" mm")); + ui.bounds(POLY(z_wizard_edit_box), x, y, w, h); + cmd.tag(0).fgcolor(z_axis).button(x, y, w, h, b); + + #define PREAMBLE(TAG) cmd.tag(TAG).colors(mydata.increment == TAG ? action_btn : normal_btn) + ui.bounds(POLY(z_wizard_inc1_btn), x, y, w, h); + PREAMBLE(241).button(x, y, w, h, F("0.01")); + + ui.bounds(POLY(z_wizard_inc2_btn), x, y, w, h); + PREAMBLE(242).button(x, y, w, h, F("0.1")); + + ui.bounds(POLY(z_wizard_inc3_btn), x, y, w, h); + PREAMBLE(243).button(x, y, w, h, F("1.0")); + + ui.bounds(POLY(z_wizard_neg_btn), x, y, w, h); + cmd.tag(4).colors(action_btn).button(x, y, w, h, F("")); + drawArrow(x, y, w, h, DOWN); + + ui.bounds(POLY(z_wizard_plus_btn), x, y, w, h); + cmd.tag(5).colors(action_btn).button(x, y, w, h, F("")); + drawArrow(x, y, w, h, UP); + + ui.bounds(POLY(z_wizard_done_btn), x, y, w, h); + cmd.tag(1).colors(action_btn).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_DONE)); + + cmd.tag(0); + ui.color(bg_text_enabled); + ui.fill(POLY(z_wizard_diagram)); + + ui.bounds(POLY(z_wizard_heading), x, y, w, h); + cmd.font(font_large) + .text(x, y, w, h, F("Z Probe Wizard")); +} + +float ZOffsetWizard::getIncrement() { + switch (mydata.increment) { + case 241: return 0.01; + case 242: return 0.1; + case 243: return 1.0; + default: return 0.0; + } +} + +void ZOffsetWizard::runWizard() { + // Restore the default Z offset + constexpr float offset[] = NOZZLE_TO_PROBE_OFFSET; + setZOffset_mm(offset[Z_AXIS]); + // Move above probe point + char cmd[64], str[10]; + strcpy_P(cmd, PSTR("G28 Z\nG0 F1000 X")); + dtostrf(TERN(Z_SAFE_HOMING,Z_SAFE_HOMING_X_POINT,X_CENTER), 3, 1, str); + strcat(cmd, str); + strcat_P(cmd, PSTR("Y")); + dtostrf(TERN(Z_SAFE_HOMING,Z_SAFE_HOMING_Y_POINT,Y_CENTER), 3, 1, str); + strcat(cmd, str); + strcat_P(cmd, PSTR("Z")); + dtostrf(SHEET_THICKNESS, 3, 1, str); + strcat(cmd, str); + injectCommands(cmd); + // Show instructions for user. + AlertDialogBox::show(F("\nOn the next screen, adjust the Z Offset so that a sheet of paper can pass between the nozzle and bed with slight resistance.\n\nOnce the printer stops moving, press Okay to begin.\n")); + // Set the destination screen after the dialog box. + current_screen.forget(); + PUSH_SCREEN(ZOffsetWizard); +} + +bool ZOffsetWizard::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + GOTO_PREVIOUS(); + break; + case 4: + case 5: + return onTouchHeld(tag); + case 241 ... 243: + mydata.increment = tag; + break; + default: + return false; + } + return true; +} + +bool ZOffsetWizard::onTouchHeld(uint8_t tag) { + const float increment = TERN(BABYSTEPPING, + mmFromWholeSteps(mmToWholeSteps(getIncrement(), Z), Z), // Round increment to nearest steps + getIncrement() + ); + switch (tag) { + case 4: UI_DECREMENT(ZOffset_mm); UI_DECREMENT(AxisPosition_mm, Z); break; + case 5: UI_INCREMENT(ZOffset_mm); UI_INCREMENT(AxisPosition_mm, Z); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // COCOA_Z_OFFSET_WIZARD diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.h new file mode 100644 index 000000000000..5c02f9803b73 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_wizard.h @@ -0,0 +1,43 @@ +/*********************** + * z_offset_screen.h * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_Z_OFFSET_WIZARD +#define COCOA_Z_OFFSET_WIZARD_CLASS ZOffsetWizard + +struct ZOffsetWizardData : public BaseNumericAdjustmentScreenData { + uint8_t increment; + bool softEndstopState; +}; + +class ZOffsetWizard : public BaseScreen, public UncachedScreen { + private: + static float getIncrement(); + public: + static void runWizard(); + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + static bool onTouchEnd(uint8_t tag); +}; 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 6b36cc9594d5..61476e30cad4 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 @@ -97,7 +97,7 @@ namespace ExtUI { void onLoadSettings(const char *buff) { InterfaceSettingsScreen::loadSettings(buff); } void onPostprocessSettings() {} // Called after loading or resetting stored settings - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE if (success && InterfaceSettingsScreen::backupEEPROM()) { SERIAL_ECHOLNPGM("EEPROM backed up to SPI Flash"); @@ -106,9 +106,9 @@ namespace ExtUI { UNUSED(success); #endif } - void onSettingsLoaded(bool) {} + void onSettingsLoaded(const bool) {} - void onPlayTone(const uint16_t frequency, const uint16_t duration) { sound.play_tone(frequency, duration); } + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) { sound.play_tone(frequency, duration); } void onUserConfirmRequired(const char * const msg) { if (msg) @@ -117,15 +117,26 @@ namespace ExtUI { ConfirmUserRequestAlertBox::hide(); } - #if HAS_LEVELING && HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + + #if HAS_MESH void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) { BedMeshViewScreen::onMeshUpdate(x, y, val); } void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { BedMeshViewScreen::onMeshUpdate(x, y, state); } #endif #if ENABLED(POWER_LOSS_RECOVERY) - void onPowerLossResume() {} // Called on resume from power-loss + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } + void onPowerLossResume() { + // Called on resume from power-loss + } #endif #if HAS_PID_HEATING diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index a796c8edcf5f..24d99d7b45b5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -177,6 +177,14 @@ void CLCD::mem_write_pgm(uint32_t reg_address, const void *data, uint16_t len, u spi_ftdi_deselect(); } +// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM, reversing bytes (suitable for loading XBM images) +void CLCD::mem_write_xbm(uint32_t reg_address, const void *data, uint16_t len, uint8_t padding) { + spi_ftdi_select(); + spi_write_addr(reg_address); + spi_write_bulk(data, len, padding); + spi_ftdi_deselect(); +} + // Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM, reversing bytes (suitable for loading XBM images) void CLCD::mem_write_xbm(uint32_t reg_address, FSTR_P data, uint16_t len, uint8_t padding) { spi_ftdi_select(); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h index 2e2657a83eec..80a2cece1792 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h @@ -118,6 +118,7 @@ class CLCD { static void mem_write_fill (uint32_t reg_address, uint8_t w_data, uint16_t len); static void mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); static void mem_write_pgm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); + static void mem_write_xbm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); static void mem_write_bulk (uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding = 0); static void mem_write_xbm (uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding = 0); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h index 6b2dc9eb4498..a9f77a518ba0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h @@ -305,14 +305,11 @@ #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1' #define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B. - #define IF_ENABLED TERN_ #define IF_DISABLED(O,A) _TERN(_ENA_1(O),,A) #define ANY(V...) !DISABLED(V) - #define NONE(V...) DISABLED(V) - #define ALL(V...) ENABLED(V) - #define BOTH(V1,V2) ALL(V1,V2) - #define EITHER(V1,V2) ANY(V1,V2) + #define NONE DISABLED + #define ALL ENABLED // Remove compiler warning on an unused variable #ifndef UNUSED diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp index 32cc37d2e2f7..7849b1e4616f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp @@ -27,11 +27,11 @@ namespace FTDI { void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor) { const float rim = 0.3; - const float a = percent/100.0*2.0*PI; - const float a1 = min(PI/2, a); - const float a2 = min(PI/2, a-a1); - const float a3 = min(PI/2, a-a1-a2); - const float a4 = min(PI/2, a-a1-a2-a3); + const float a = percent/100.0*2.0*M_PI; + const float a1 = min(M_PI/2, a); + const float a2 = min(M_PI/2, a-a1); + const float a3 = min(M_PI/2, a-a1-a2); + const float a4 = min(M_PI/2, a-a1-a2-a3); const int ro = min(w,h) * 8; const int rr = ro * rim; @@ -69,21 +69,21 @@ namespace FTDI { cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8)); // Paint lower-right quadrant - if (a > PI/2) { + if (a > M_PI/2) { cmd.cmd(BEGIN(EDGE_STRIP_R)); cmd.cmd(VERTEX2F(cx, cy)); cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16)); } // Paint lower-left quadrant - if (a > PI) { + if (a > M_PI) { cmd.cmd(BEGIN(EDGE_STRIP_B)); cmd.cmd(VERTEX2F(cx, cy)); cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3))); } // Paint upper-left quadrant - if (a > 1.5*PI) { + if (a > 1.5*M_PI) { cmd.cmd(BEGIN(EDGE_STRIP_L)); cmd.cmd(VERTEX2F(cx, cy)); cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4))); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp index d7f4d31bdc12..c05d6577d04b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp @@ -66,14 +66,6 @@ * character (this is not the unicode codepoint) */ - utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) { - utf8_char_t val = *(uint8_t*)c++; - if ((val & 0xC0) == 0xC0) - while ((*c & 0xC0) == 0x80) - val = (val << 8) | *(uint8_t*)c++; - return val; - } - utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) { utf8_char_t val = *(uint8_t*)c++; if ((val & 0xC0) == 0xC0) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h index 7818957fcc2d..83ab56df579e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h @@ -47,7 +47,6 @@ namespace FTDI { * pointer to the next character */ utf8_char_t get_utf8_char_and_inc(const char *&c); - utf8_char_t get_utf8_char_and_inc(char *&c); /* Returns the next character in a UTF8 string, without incrementing */ diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py index 6aa8947b9858..1b84f171d954 100755 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py @@ -30,7 +30,7 @@ def deflate(data): parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm") args = parser.parse_args() - varname = os.path.splitext(os.path.basename(args.input))[0]; + varname = os.path.splitext(os.path.basename(args.input))[0] with open(args.input, "rb") as in_file: data = in_file.read() diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py index 0c4499e9aadf..1d11b9307a5b 100755 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py @@ -77,7 +77,7 @@ def write(self): if len(self.values): self.blocks.append(self.values) - block_strs = []; + block_strs = [] for b in self.blocks: data = self.convert_to_4bpp(b) data = ', '.join(data) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py index 74be57430049..131141079a21 100755 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py @@ -44,12 +44,12 @@ def add_bits_to_byte(self, value, size = 1): def append_rgb565(self, color): value = ((color[0] & 0xF8) << 8) + ((color[1] & 0xFC) << 3) + ((color[2] & 0xF8) >> 3) - self.values.append((value & 0x00FF) >> 0); - self.values.append((value & 0xFF00) >> 8); + self.values.append((value & 0x00FF) >> 0) + self.values.append((value & 0xFF00) >> 8) def append_rgb332(self, color): value = (color[0] & 0xE0) + ((color[1] & 0xE0) >> 3) + ((color[2] & 0xC0) >> 6) - self.values.append(value); + self.values.append(value) def append_grayscale(self, color, bits): luminance = int(0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2]) @@ -99,7 +99,7 @@ def write(self, varname, deflate): parser.add_argument("-m", "--mode", default="l1", help="Mode, can be l1, l2, l4, l8, rgb332 or rgb565") args = parser.parse_args() - varname = os.path.splitext(os.path.basename(args.input))[0]; + varname = os.path.splitext(os.path.basename(args.input))[0] writer = WriteSource(args.mode) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py old mode 100644 new mode 100755 index f6e4a3e39abe..0f39932c6a92 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Written By Marcio Teixeira 2018 - Aleph Objects, Inc. # @@ -18,6 +18,8 @@ from __future__ import print_function import argparse,re,sys +from html.parser import HTMLParser + usage = ''' This program extracts line segments from a SVG file and writes them as coordinates in a C array. The x and y values will be @@ -107,19 +109,16 @@ def write(self): print("constexpr float y_max = %f;" % self.y_max) print() - def from_svg_view_box(self, svg): - s = re.search(']+>', svg); - if s: - m = re.search('viewBox="([0-9-.]+) ([0-9-.]+) ([0-9-.]+) ([0-9-.]+)"', svg) - if m: - self.x_min = float(m[1]) - self.y_min = float(m[2]) - self.x_max = float(m[3]) - self.y_max = float(m[4]) - return True + def from_svg_view_box(self, viewbox): + m = re.search('([0-9-.]+) ([0-9-.]+) ([0-9-.]+) ([0-9-.]+)', viewbox) + if m: + self.x_min = float(m[1]) + self.y_min = float(m[2]) + self.x_max = float(m[3]) + self.y_max = float(m[4]) + return True return False -# op class WriteDataStructure: def __init__(self, bounding_box): self.bounds = bounding_box @@ -143,19 +142,29 @@ def path_finished(self, id): print("const PROGMEM uint16_t", id + "[] = {" + ", ".join (self.hex_words) + "};") self.hex_words = [] -class Parser: - def __init__(self, op): +class SVGParser(HTMLParser): + def __init__(self, args): + super().__init__() + self.args = args + self.tags = [] + self.groups = [] + self.op = None + self.restart() + + def set_consumer(self, op): self.op = op - self.reset() + if self.op: + self.op.reset() - def reset(self): + def restart(self): self.last_x = 0 self.last_y = 0 self.initial_x = 0 self.initial_y = 0 def process_svg_path_L_or_M(self, cmd, x, y): - self.op.command(cmd, x, y) + if self.op: + self.op.command(cmd, x, y) self.last_x = x self.last_y = y if cmd == "M": @@ -239,42 +248,71 @@ def process_svg_path_data(self, id, d): print("Syntax error:", d, "in path", id, "\n", file=sys.stderr) quit() - def process_svg_paths(self, svg): - self.op.reset() - for path in re.findall(']+>', svg): - id = "" - m = re.search(' id="(.*)"', path) - if m: - id = m[1] + def find_attr(attrs, what): + for attr, value in attrs: + if attr == what: + return value - m = re.search(' transform="(.*)"', path) - if m: + def layer_matches(self): + """ Are we in the correct layer?""" + if not self.args.layer: + return True + for l in self.groups: + if l and l.find(self.args.layer) != -1: + return True + return False + + def handle_starttag(self, tag, attrs): + self.tags.append(tag) + if tag == 'svg': + self.viewbox = SVGParser.find_attr(attrs, 'viewbox') + if tag == 'g': + label = SVGParser.find_attr(attrs, 'inkscape:label') + self.groups.append(label) + if label and self.layer_matches(): + print("Reading layer:", label, file=sys.stderr) + if tag == 'path' and self.layer_matches(): + id = SVGParser.find_attr(attrs, 'id') + transform = SVGParser.find_attr(attrs, 'transform') + if transform: print("Found transform in path", id, "! Cannot process file!", file=sys.stderr) quit() - - m = re.search(' d="(.*)"', path) - if m: - self.process_svg_path_data(id, m[1]) - self.op.path_finished(id) - self.reset() + d = SVGParser.find_attr(attrs, 'd') + if d: + self.process_svg_path_data(id, d) + if self.op: + self.op.path_finished(id) + self.restart() + + def handle_endtag(self, tag): + if tag == 'g': + self.groups.pop() + if tag != self.tags.pop(): + print("Error popping tag off list") if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("filename") + parser.add_argument('--layer', help='only include layers which have this string in their names') args = parser.parse_args() f = open(args.filename, "r") data = f.read() - print(header) + # First pass to grab viewbox + p = SVGParser(args) + p.feed(data) b = ComputeBoundingBox() - if not b.from_svg_view_box(data): + if not b.from_svg_view_box(p.viewbox): # Can't find the view box, so use the bounding box of the elements themselves. - p = Parser(b) - p.process_svg_paths(data) - b.write() + p = SVGParser(args) + p.set_consumer(b) + p.feed(data) + b.write() + # Last pass to process paths w = WriteDataStructure(b) - p = Parser(w) - p.process_svg_paths(data) + p = SVGParser(args) + p.set_consumer(w) + p.feed(data) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp index 37eb29a99d11..c894d017ebcd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -95,7 +95,7 @@ void BedMeshEditScreen::setHighlightedValue(float value) { } void BedMeshEditScreen::moveToHighlightedValue() { - if (ExtUI::getMeshValid()) { + if (ExtUI::getLevelingIsValid()) { ExtUI::setLevelingActive(true); ExtUI::setSoftEndstopState(false); ExtUI::moveToMeshPoint(mydata.highlight, gaugeThickness + mydata.zAdjustment); @@ -174,11 +174,11 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { case 1: // On Cancel, reload saved mesh, discarding changes GOTO_PREVIOUS(); - injectCommands(F("G29 L1")); + injectCommands(F(TERN(AUTO_BED_LEVELING_UBL, "G29 L1", "M501"))); return true; case 2: saveAdjustedHighlightedValue(); - injectCommands(F("G29 S1")); + injectCommands(F(TERN(AUTO_BED_LEVELING_UBL, "G29 S1", "M500"))); mydata.needSave = false; return true; case 3: @@ -191,7 +191,7 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { void BedMeshEditScreen::show() { // On entry, always home (to account for possible Z offset changes) and save current mesh - SpinnerDialogBox::enqueueAndWait(F("G28\nG29 S1")); + SpinnerDialogBox::enqueueAndWait(F("G28\n" TERN(AUTO_BED_LEVELING_UBL, "G29 S1", "M500"))); // After the spinner, go to this screen. current_screen.forget(); PUSH_SCREEN(BedMeshEditScreen); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp index 7b4195ff5ce3..6030fd02a0e7 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp @@ -53,10 +53,7 @@ constexpr static float gaugeThickness = 0.25; #endif static float meshGetter(uint8_t x, uint8_t y, void*) { - xy_uint8_t pos; - pos.x = x; - pos.y = y; - return ExtUI::getMeshPoint(pos); + return ExtUI::getMeshPoint(xy_uint8_t({ x, y })); } void BedMeshViewScreen::onEntry() { @@ -125,7 +122,7 @@ void BedMeshViewScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI mydata.count = 0; break; case ExtUI::G29_FINISH: - if (mydata.count == GRID_MAX_POINTS && ExtUI::getMeshValid()) + if (mydata.count == GRID_MAX_POINTS && ExtUI::getLevelingIsValid()) mydata.message = GET_TEXT_F(MSG_BED_MAPPING_DONE); else mydata.message = GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE); @@ -158,7 +155,7 @@ void BedMeshViewScreen::doProbe() { } void BedMeshViewScreen::show() { - injectCommands(F("G29 L1")); + TERN_(AUTO_BED_LEVELING_UBL, injectCommands(F("G29 L1"))); GOTO_SCREEN(BedMeshViewScreen); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h index b9791fff7a15..3ec8e06adfaa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h @@ -26,7 +26,7 @@ struct BedMeshViewScreenData { FSTR_P message; - uint8_t count; + grid_count_t count; xy_uint8_t highlight; }; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp index c0940bed5ce4..b01e45948c7a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp @@ -30,7 +30,7 @@ #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) #if ENABLED(TOUCH_UI_PORTRAIT) - #include "../theme/bootscreen_logo_portrait.h" + #include "../theme/_bootscreen_portrait.h" #else #include "../theme/_bootscreen_landscape.h" #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index 08301d41cf49..37f1ec5d4b71 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -41,7 +41,7 @@ void EndstopStatesScreen::onExit() { #define GRID_ROWS 7 #define PIN_BTN(X,Y,PIN,LABEL) button(BTN_POS(X,Y), BTN_SIZE(2,1), LABEL) -#define PIN_ENABLED(X,Y,LABEL,PIN,INV) cmd.enabled(1).colors(READ(PIN##_PIN) != INV ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL); +#define PIN_ENABLED(X,Y,LABEL,PIN,ST) cmd.enabled(1).colors(READ(PIN##_PIN) == ST ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL); #define PIN_DISABLED(X,Y,LABEL,PIN) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL); void EndstopStatesScreen::onRedraw(draw_mode_t) { @@ -54,32 +54,32 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { cmd.font(TERN(TOUCH_UI_PORTRAIT, font_large, font_medium)) .text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .font(font_tiny); - #if HAS_X_MAX + #if USE_X_MAX PIN_ENABLED (1, 2, PSTR(STR_X_MAX), X_MAX, X_MAX_ENDSTOP_INVERTING) #else PIN_DISABLED(1, 2, PSTR(STR_X_MAX), X_MAX) #endif - #if HAS_Y_MAX + #if USE_Y_MAX PIN_ENABLED (3, 2, PSTR(STR_Y_MAX), Y_MAX, Y_MAX_ENDSTOP_INVERTING) #else PIN_DISABLED(3, 2, PSTR(STR_Y_MAX), Y_MAX) #endif - #if HAS_Z_MAX + #if USE_Z_MAX PIN_ENABLED (5, 2, PSTR(STR_Z_MAX), Z_MAX, Z_MAX_ENDSTOP_INVERTING) #else PIN_DISABLED(5, 2, PSTR(STR_Z_MAX), Z_MAX) #endif - #if HAS_X_MIN + #if USE_X_MIN PIN_ENABLED (1, 3, PSTR(STR_X_MIN), X_MIN, X_MIN_ENDSTOP_INVERTING) #else PIN_DISABLED(1, 3, PSTR(STR_X_MIN), X_MIN) #endif - #if HAS_Y_MIN + #if USE_Y_MIN PIN_ENABLED (3, 3, PSTR(STR_Y_MIN), Y_MIN, Y_MIN_ENDSTOP_INVERTING) #else PIN_DISABLED(3, 3, PSTR(STR_Y_MIN), Y_MIN) #endif - #if HAS_Z_MIN + #if USE_Z_MIN PIN_ENABLED (5, 3, PSTR(STR_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_INVERTING) #else PIN_DISABLED(5, 3, PSTR(STR_Z_MIN), Z_MIN) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp index 68948b0c5e5d..0569b90032d1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp @@ -46,7 +46,9 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) { bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) { using namespace ExtUI; - const float increment = getIncrement(); + #if HAS_FILAMENT_RUNOUT_DISTANCE + const float increment = getIncrement(); + #endif switch (tag) { case 2: setFilamentRunoutEnabled(!getFilamentRunoutEnabled()); break; #if HAS_FILAMENT_RUNOUT_DISTANCE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp index 5d797f44df31..15252941d7de 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp @@ -53,6 +53,8 @@ void LanguageMenu::onRedraw(draw_mode_t) { #endif } +extern uint8_t ftdi_language; + bool LanguageMenu::onTouchEnd(uint8_t tag) { if (tag > 0 && tag <= NUM_LANGUAGES) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 47540b0f5519..64efb64cfc0a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -25,7 +25,7 @@ #ifdef FTDI_LEVELING_MENU -#if ALL(HAS_BED_PROBE,BLTOUCH) +#if ALL(HAS_BED_PROBE, BLTOUCH) #include "../../../../feature/bltouch.h" #endif @@ -81,7 +81,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) #endif .font(font_medium).colors(normal_btn) - .enabled(ANY(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)) + .enabled(ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION)) .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS)) .enabled(ENABLED(HAS_BED_PROBE)) .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) @@ -103,7 +103,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - #if ANY(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) + #if ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) case 2: SpinnerDialogBox::enqueueAndWait(F("G34")); break; #endif #if HAS_BED_PROBE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index 001f97490b1d..137ddc59cff5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -43,7 +43,7 @@ void MainMenu::onRedraw(draw_mode_t what) { #define ADVANCED_SETTINGS_POS BTN_POS(1,2), BTN_SIZE(2,1) #if ENABLED(CUSTOM_MENU_MAIN) #define FILAMENTCHANGE_POS BTN_POS(1,3), BTN_SIZE(1,1) - #define CUSTOM_MENU_POS BTN_POS(2,3), BTN_SIZE(1,1) + #define CUSTOM_MENU_POS BTN_POS(2,3), BTN_SIZE(1,1) #else #define FILAMENTCHANGE_POS BTN_POS(1,3), BTN_SIZE(2,1) #endif @@ -66,7 +66,7 @@ void MainMenu::onRedraw(draw_mode_t what) { #if ENABLED(CUSTOM_MENU_MAIN) #define TEMPERATURE_POS BTN_POS(1,4), BTN_SIZE(2,1) #define FILAMENTCHANGE_POS BTN_POS(3,4), BTN_SIZE(2,1) - #define CUSTOM_MENU_POS BTN_POS(5,4), BTN_SIZE(2,1) + #define CUSTOM_MENU_POS BTN_POS(5,4), BTN_SIZE(2,1) #else #define TEMPERATURE_POS BTN_POS(1,4), BTN_SIZE(3,1) #define FILAMENTCHANGE_POS BTN_POS(4,4), BTN_SIZE(3,1) @@ -92,7 +92,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag( 9).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) .tag(10).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) #if ENABLED(CUSTOM_MENU_MAIN) - .tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS)) + .tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS)) #endif .colors(action_btn) .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); @@ -103,22 +103,30 @@ bool MainMenu::onTouchEnd(uint8_t tag) { using namespace ExtUI; switch (tag) { - case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: SpinnerDialogBox::enqueueAndWait(F("G28")); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + case 2: SpinnerDialogBox::enqueueAndWait(F("G28")); break; #if ENABLED(NOZZLE_CLEAN_FEATURE) - case 3: injectCommands(F("G12")); GOTO_SCREEN(StatusScreen); break; + case 3: + injectCommands(F("G12")); + GOTO_SCREEN(StatusScreen); break; #endif - case 4: GOTO_SCREEN(MoveAxisScreen); break; - case 5: injectCommands(F("M84")); break; - case 6: GOTO_SCREEN(TemperatureScreen); break; - case 7: GOTO_SCREEN(ChangeFilamentScreen); break; - case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; + case 4: GOTO_SCREEN(MoveAxisScreen); break; + case 5: + injectCommands(F("M84 E" + TERN_(DISABLE_IDLE_X, " X") + TERN_(DISABLE_IDLE_Y, " Y") + TERN_(DISABLE_IDLE_Z, " Z") + )); + break; + case 6: GOTO_SCREEN(TemperatureScreen); break; + case 7: GOTO_SCREEN(ChangeFilamentScreen); break; + case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; #if HAS_LEVELING - case 9: GOTO_SCREEN(LevelingMenu); break; + case 9: GOTO_SCREEN(LevelingMenu); break; #endif - case 10: GOTO_SCREEN(AboutScreen); break; + case 10: GOTO_SCREEN(AboutScreen); break; #if ENABLED(CUSTOM_MENU_MAIN) - case 11: GOTO_SCREEN(CustomUserMenus); break; + case 11: GOTO_SCREEN(CustomUserMenus); break; #endif default: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp index bc28a65cf9e2..95fe023cdaf6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp @@ -72,13 +72,15 @@ void MoveAxisScreen::onRedraw(draw_mode_t what) { w.increments(); } -bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { +bool BaseMoveAxisScreen::onTouchHeld(const uint8_t tag) { #define UI_INCREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis); #define UI_DECREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis); const float increment = getIncrement(); switch (tag) { - case 2: UI_DECREMENT_AXIS(X); break; - case 3: UI_INCREMENT_AXIS(X); break; + #if HAS_X_AXIS + case 2: UI_DECREMENT_AXIS(X); break; + case 3: UI_INCREMENT_AXIS(X); break; + #endif #if HAS_EXTRUDERS // For extruders, also update relative distances. case 8: UI_DECREMENT_AXIS(E0); mydata.e_rel[0] -= increment; break; @@ -120,20 +122,20 @@ void BaseMoveAxisScreen::raiseZtoTop() { setAxisPosition_mm(Z_MAX_POS - 5, Z, homing_feedrate.z); } -float BaseMoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) { +float BaseMoveAxisScreen::getManualFeedrate(const uint8_t axis, const_float_t increment_mm) { // Compute feedrate so that the tool lags the adjuster when it is // being held down, this allows enough margin for the planner to // connect segments and even out the motion. constexpr xyze_feedrate_t max_manual_feedrate = MANUAL_FEEDRATE; - return min(max_manual_feedrate[axis] / 60.0f, ABS(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); + return min(MMM_TO_MMS(max_manual_feedrate[axis]), ABS(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); } -void BaseMoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) { +void BaseMoveAxisScreen::setManualFeedrate(const ExtUI::axis_t axis, const_float_t increment_mm) { ExtUI::setFeedrate_mm_s(getManualFeedrate(X_AXIS + (axis - ExtUI::X), increment_mm)); } #if HAS_EXTRUDERS - void BaseMoveAxisScreen::setManualFeedrate(ExtUI::extruder_t, float increment_mm) { + void BaseMoveAxisScreen::setManualFeedrate(const ExtUI::extruder_t, const_float_t increment_mm) { ExtUI::setFeedrate_mm_s(getManualFeedrate(E_AXIS, increment_mm)); } #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h index 16723cfc13bc..b26254c4df62 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h @@ -32,14 +32,14 @@ struct MoveAxisScreenData { class BaseMoveAxisScreen : public BaseNumericAdjustmentScreen { private: - static float getManualFeedrate(uint8_t axis, float increment_mm); + static float getManualFeedrate(const uint8_t axis, const_float_t increment_mm); public: static void raiseZtoTop(); - static void setManualFeedrate(ExtUI::axis_t, float increment_mm); - static void setManualFeedrate(ExtUI::extruder_t, float increment_mm); + static void setManualFeedrate(const ExtUI::axis_t, const_float_t increment_mm); + static void setManualFeedrate(const ExtUI::extruder_t, const_float_t increment_mm); static void onEntry(); - static bool onTouchHeld(uint8_t tag); + static bool onTouchHeld(const uint8_t tag); }; class MoveAxisScreen : public BaseMoveAxisScreen, public CachedScreen { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp index 738d8ee64f2e..ea484344bd40 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp @@ -376,10 +376,10 @@ void StatusScreen::loadBitmaps() { // Load the bitmaps for the status screen using namespace Theme; constexpr uint32_t base = ftdi_memory_map::RAM_G; - CLCD::mem_write_pgm(base + TD_Icon_Info.RAMG_offset, TD_Icon, sizeof(TD_Icon)); - CLCD::mem_write_pgm(base + Extruder_Icon_Info.RAMG_offset, Extruder_Icon, sizeof(Extruder_Icon)); - CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon)); - CLCD::mem_write_pgm(base + Fan_Icon_Info.RAMG_offset, Fan_Icon, sizeof(Fan_Icon)); + CLCD::mem_write_xbm(base + TD_Icon_Info.RAMG_offset, TD_Icon, sizeof(TD_Icon)); + CLCD::mem_write_xbm(base + Extruder_Icon_Info.RAMG_offset, Extruder_Icon, sizeof(Extruder_Icon)); + CLCD::mem_write_xbm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon)); + CLCD::mem_write_xbm(base + Fan_Icon_Info.RAMG_offset, Fan_Icon, sizeof(Fan_Icon)); // Load fonts for internationalization #if ENABLED(TOUCH_UI_USE_UTF8) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp index 2dbf2d9f06a7..04eb2acec6bc 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp @@ -66,7 +66,7 @@ void TemperatureScreen::onRedraw(draw_mode_t what) { #if HAS_HEATED_CHAMBER w.adjuster( 22, GET_TEXT_F(MSG_CHAMBER), getTargetTemp_celsius(CHAMBER)); #endif - #if HAS_FAN + #if HAS_FAN0 w.color(fan_speed).units(GET_TEXT_F(MSG_UNITS_PERCENT)); w.adjuster( 10, GET_TEXT_F(MSG_FAN_SPEED), getTargetFan_percent(FAN0)); #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h index 05e625842ad9..6deb5b47587e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h @@ -91,7 +91,6 @@ namespace Language_en { LSTR MSG_IDLE = u8"idle"; LSTR MSG_SET_MAXIMUM = u8"Set Maximum"; LSTR MSG_PRINT_SPEED = u8"Print Speed"; - LSTR MSG_LINEAR_ADVANCE = u8"Linear Advance"; LSTR MSG_LINEAR_ADVANCE_K = u8"K"; LSTR MSG_LINEAR_ADVANCE_K1 = u8"K E1"; LSTR MSG_LINEAR_ADVANCE_K2 = u8"K E2"; @@ -148,6 +147,8 @@ namespace Language_en { LSTR MSG_MOVE_Z_TO_TOP = u8"Raise Z to Top"; LSTR MSG_MAX_SPEED_NO_UNITS = u8"Max Speed"; + //LSTR MSG_FTDI_HEATER_TIMEOUT = u8"Idle timeout, temperature decreased. Press Okay to reheat and again to resume."; + #if ENABLED(TOUCH_UI_LULZBOT_BIO) LSTR MSG_MOVE_TO_HOME = u8"Move to Home"; LSTR MSG_RAISE_PLUNGER = u8"Raise Plunger"; @@ -170,8 +171,6 @@ namespace Language_en { LSTR MSG_PREHEAT_CHOCOLATE = u8"Preheat Chocolate"; LSTR MSG_PREHEAT_FINISHED = u8"Preheat finished"; LSTR MSG_PREHEAT = u8"Preheat"; - LSTR MSG_BUTTON_PAUSE = u8"Pause"; - LSTR MSG_BUTTON_RESUME = u8"Resume"; LSTR MSG_ELAPSED_PRINT = u8"Elapsed Print"; LSTR MSG_XYZ_MOVE = u8"XYZ Move"; LSTR MSG_E_MOVE = u8"Extrusion Move"; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h index 31b16a357179..396349384159 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h @@ -42,13 +42,13 @@ #elif ENABLED(CR10_TFT_PINMAP) // FYSETC S6 - STM32F4 - with TOUCH_UI_ULTIPANEL #define CLCD_USE_SOFT_SPI - #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6 - #define CLCD_SOFT_SPI_MOSI LCD_PINS_EN // PORTC1 Pin 8 - #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7 - #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2 - #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3 - #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5 - #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1 + #define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6 + #define CLCD_SOFT_SPI_MOSI LCD_PINS_EN // PORTC1 Pin 8 + #define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7 + #define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2 + #define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3 + #define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5 + #define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1 #elif ENABLED(AO_EXP1_DEPRECATED_PINMAP) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h index 48a0c1a96440..7b0a0d25e9aa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h @@ -62,9 +62,11 @@ union screen_data_t { DECL_DATA_IF_INCLUDED(FTDI_Z_OFFSET_SCREEN) DECL_DATA_IF_INCLUDED(FTDI_BASE_NUMERIC_ADJ_SCREEN) DECL_DATA_IF_INCLUDED(FTDI_ALERT_DIALOG_BOX) + DECL_DATA_IF_INCLUDED(COCOA_STATUS_SCREEN) DECL_DATA_IF_INCLUDED(COCOA_PREHEAT_SCREEN) DECL_DATA_IF_INCLUDED(COCOA_LOAD_CHOCOLATE_SCREEN) DECL_DATA_IF_INCLUDED(COCOA_FILES_SCREEN) + DECL_DATA_IF_INCLUDED(COCOA_Z_OFFSET_WIZARD) }; extern screen_data_t screen_data; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp index 3a0f891a8237..b17ac9c7cbaa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp @@ -117,6 +117,10 @@ SCREEN_TABLE { DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_E_SCREEN) DECL_SCREEN_IF_INCLUDED(COCOA_CONFIRM_START_PRINT) DECL_SCREEN_IF_INCLUDED(COCOA_FILES_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_Z_OFFSET_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_Z_OFFSET_WIZARD) + DECL_SCREEN_IF_INCLUDED(COCOA_ABOUT_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_STATISTICS_SCREEN) }; SCREEN_TABLE_POST diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h index c194225d99ae..a2729979c6bf 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h @@ -37,25 +37,25 @@ namespace Theme { }; constexpr PROGMEM unsigned char Extruder_Icon[69] = { - 0x3F, 0xFF, 0xFC, - 0x7F, 0xFF, 0xFE, - 0xC0, 0x00, 0x03, - 0xC0, 0x00, 0x03, - 0xC0, 0x00, 0x03, - 0xC0, 0x00, 0x03, - 0x7F, 0xFF, 0xFE, - 0x3F, 0xFF, 0xFC, - 0x3F, 0xFF, 0xFC, - 0x7F, 0xFF, 0xFE, - 0xC0, 0x00, 0x03, - 0xC0, 0x00, 0x03, - 0xC0, 0x00, 0x03, - 0xC0, 0x00, 0x03, - 0x7F, 0xFF, 0xFE, - 0x7F, 0xFF, 0xFE, - 0x07, 0xFF, 0xE0, - 0x03, 0xFF, 0xC0, - 0x01, 0x81, 0x80, + 0xFC, 0xFF, 0x3F, + 0xFE, 0xFF, 0x7F, + 0x03, 0x00, 0xC0, + 0x03, 0x00, 0xC0, + 0x03, 0x00, 0xC0, + 0x03, 0x00, 0xC0, + 0xFE, 0xFF, 0x7F, + 0xFC, 0xFF, 0x3F, + 0xFC, 0xFF, 0x3F, + 0xFE, 0xFF, 0x7F, + 0x03, 0x00, 0xC0, + 0x03, 0x00, 0xC0, + 0x03, 0x00, 0xC0, + 0x03, 0x00, 0xC0, + 0xFE, 0xFF, 0x7F, + 0xFE, 0xFF, 0x7F, + 0xE0, 0xFF, 0x07, + 0xC0, 0xFF, 0x03, + 0x80, 0x81, 0x01, 0x00, 0xC3, 0x00, 0x00, 0x66, 0x00, 0x00, 0x3C, 0x00, @@ -74,28 +74,28 @@ namespace Theme { }; constexpr PROGMEM unsigned char Bed_Heat_Icon[92] = { - 0x01, 0x81, 0x81, 0x80, - 0x01, 0x81, 0x81, 0x80, - 0x00, 0xC0, 0xC0, 0xC0, - 0x00, 0xC0, 0xC0, 0xC0, - 0x00, 0x60, 0x60, 0x60, - 0x00, 0x60, 0x60, 0x60, - 0x00, 0xC0, 0xC0, 0xC0, - 0x00, 0xC0, 0xC0, 0xC0, - 0x01, 0x81, 0x81, 0x80, - 0x01, 0x81, 0x81, 0x80, - 0x03, 0x03, 0x03, 0x00, - 0x03, 0x03, 0x03, 0x00, - 0x06, 0x06, 0x06, 0x00, - 0x06, 0x06, 0x06, 0x00, - 0x03, 0x03, 0x03, 0x00, - 0x03, 0x03, 0x03, 0x00, - 0x01, 0x81, 0x81, 0x80, - 0x01, 0x81, 0x81, 0x80, + 0x80, 0x81, 0x81, 0x01, + 0x80, 0x81, 0x81, 0x01, + 0x00, 0x03, 0x03, 0x03, + 0x00, 0x03, 0x03, 0x03, + 0x00, 0x06, 0x06, 0x06, + 0x00, 0x06, 0x06, 0x06, + 0x00, 0x03, 0x03, 0x03, + 0x00, 0x03, 0x03, 0x03, + 0x80, 0x81, 0x81, 0x01, + 0x80, 0x81, 0x81, 0x01, + 0xC0, 0xC0, 0xC0, 0x00, + 0xC0, 0xC0, 0xC0, 0x00, + 0x60, 0x60, 0x60, 0x00, + 0x60, 0x60, 0x60, 0x00, + 0xC0, 0xC0, 0xC0, 0x00, + 0xC0, 0xC0, 0xC0, 0x00, + 0x80, 0x81, 0x81, 0x01, + 0x80, 0x81, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xC0, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF }; @@ -113,34 +113,34 @@ namespace Theme { constexpr PROGMEM unsigned char Fan_Icon[128] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xF8, 0x00, 0x00, 0x1F, - 0xF0, 0x03, 0xF8, 0x0F, - 0xE0, 0x07, 0xF0, 0x07, - 0xC0, 0x0F, 0xE0, 0x03, - 0xC0, 0x1F, 0xE0, 0x03, - 0xC0, 0x1F, 0xE0, 0x03, - 0xC0, 0x0F, 0xE0, 0x03, - 0xC0, 0x07, 0xE0, 0x03, - 0xC0, 0x03, 0xC0, 0x03, - 0xD0, 0x00, 0x00, 0xC3, - 0xD8, 0x03, 0xC1, 0xE3, - 0xDF, 0xC7, 0xE3, 0xF3, - 0xDF, 0xEF, 0xF7, 0xFB, - 0xDF, 0xEF, 0xF7, 0xFB, - 0xDF, 0xEF, 0xF7, 0xFB, - 0xDF, 0xEF, 0xF7, 0xFB, - 0xCF, 0xC7, 0xE3, 0xFB, - 0xC7, 0x83, 0xC0, 0x1B, - 0xC3, 0x00, 0x00, 0x0B, - 0xC0, 0x03, 0xC0, 0x03, - 0xC0, 0x07, 0xE0, 0x03, - 0xC0, 0x07, 0xF0, 0x03, - 0xC0, 0x07, 0xF8, 0x03, - 0xC0, 0x07, 0xF8, 0x03, - 0xC0, 0x07, 0xF0, 0x03, - 0xE0, 0x0F, 0xE0, 0x07, - 0xF0, 0x1F, 0xC0, 0x0F, - 0xF8, 0x00, 0x00, 0x1F, + 0x1F, 0x00, 0x00, 0xF8, + 0x0F, 0xC0, 0x1F, 0xF0, + 0x07, 0xE0, 0x0F, 0xE0, + 0x03, 0xF0, 0x07, 0xC0, + 0x03, 0xF8, 0x07, 0xC0, + 0x03, 0xF8, 0x07, 0xC0, + 0x03, 0xF0, 0x07, 0xC0, + 0x03, 0xE0, 0x07, 0xC0, + 0x03, 0xC0, 0x03, 0xC0, + 0x0B, 0x00, 0x00, 0xC3, + 0x1B, 0xC0, 0x83, 0xC7, + 0xFB, 0xE3, 0xC7, 0xCF, + 0xFB, 0xF7, 0xEF, 0xDF, + 0xFB, 0xF7, 0xEF, 0xDF, + 0xFB, 0xF7, 0xEF, 0xDF, + 0xFB, 0xF7, 0xEF, 0xDF, + 0xF3, 0xE3, 0xC7, 0xDF, + 0xE3, 0xC1, 0x03, 0xD8, + 0xC3, 0x00, 0x00, 0xD0, + 0x03, 0xC0, 0x03, 0xC0, + 0x03, 0xE0, 0x07, 0xC0, + 0x03, 0xE0, 0x0F, 0xC0, + 0x03, 0xE0, 0x1F, 0xC0, + 0x03, 0xE0, 0x1F, 0xC0, + 0x03, 0xE0, 0x0F, 0xC0, + 0x07, 0xF0, 0x07, 0xE0, + 0x0F, 0xF8, 0x03, 0xF0, + 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; @@ -157,26 +157,26 @@ namespace Theme { }; constexpr PROGMEM unsigned char TD_Icon[140] = { - 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, // Thumb Drive Widget - 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80, - 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, - 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00 + 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, // Thumb Drive Widget + 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x01, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, + 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x01, + 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F, 0x00 }; constexpr PROGMEM bitmap_info_t File_Icon_Info = { @@ -191,17 +191,17 @@ namespace Theme { }; const unsigned char File_Icon[128] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, - 0x40, 0x02, 0x80, 0x00, 0x40, 0x02, 0x40, 0x00, 0x40, 0x02, 0x20, 0x00, - 0x40, 0x02, 0x10, 0x00, 0x40, 0x02, 0x08, 0x00, 0x40, 0x02, 0x04, 0x00, - 0x40, 0x02, 0x02, 0x00, 0x40, 0x03, 0xFF, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, - 0x7F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x00, 0x02, 0xC0, 0x00, 0x00, + 0x02, 0x40, 0x01, 0x00, 0x02, 0x40, 0x02, 0x00, 0x02, 0x40, 0x04, 0x00, + 0x02, 0x40, 0x08, 0x00, 0x02, 0x40, 0x10, 0x00, 0x02, 0x40, 0x20, 0x00, + 0x02, 0x40, 0x40, 0x00, 0x02, 0xC0, 0xFF, 0x00, 0x02, 0x00, 0x80, 0x00, + 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, + 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, + 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, + 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, + 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, + 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, + 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 }; constexpr PROGMEM bitmap_info_t Clock_Icon_Info = { @@ -216,17 +216,17 @@ namespace Theme { }; const unsigned char Clock_Icon[128] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7E, 0x7E, 0x00, - 0x00, 0xE0, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x07, 0x01, 0x00, 0xE0, - 0x0C, 0x01, 0x80, 0x70, 0x0C, 0x01, 0x80, 0x30, 0x18, 0x01, 0x80, 0x18, - 0x30, 0x01, 0x80, 0x08, 0x30, 0x01, 0x80, 0x0C, 0x20, 0x01, 0x80, 0x0C, - 0x60, 0x01, 0x80, 0x04, 0x60, 0x01, 0x80, 0x06, 0x60, 0x01, 0x80, 0x06, - 0x60, 0x01, 0xFF, 0x06, 0x60, 0x01, 0xFF, 0x06, 0x60, 0x00, 0x00, 0x06, - 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x0C, - 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x18, - 0x0C, 0x00, 0x00, 0x30, 0x0E, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0xE0, - 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x7F, 0xFE, 0x00, - 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x7E, 0x7E, 0x00, + 0x00, 0x07, 0xE0, 0x00, 0xC0, 0x01, 0x80, 0x03, 0xE0, 0x80, 0x00, 0x07, + 0x30, 0x80, 0x01, 0x0E, 0x30, 0x80, 0x01, 0x0C, 0x18, 0x80, 0x01, 0x18, + 0x0C, 0x80, 0x01, 0x10, 0x0C, 0x80, 0x01, 0x30, 0x04, 0x80, 0x01, 0x30, + 0x06, 0x80, 0x01, 0x20, 0x06, 0x80, 0x01, 0x60, 0x06, 0x80, 0x01, 0x60, + 0x06, 0x80, 0xFF, 0x60, 0x06, 0x80, 0xFF, 0x60, 0x06, 0x00, 0x00, 0x60, + 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x30, + 0x0C, 0x00, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x10, 0x18, 0x00, 0x00, 0x18, + 0x30, 0x00, 0x00, 0x0C, 0x70, 0x00, 0x00, 0x0E, 0xE0, 0x00, 0x00, 0x07, + 0xC0, 0x01, 0x80, 0x03, 0x00, 0x07, 0xE0, 0x00, 0x00, 0xFE, 0x7F, 0x00, + 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00 }; constexpr PROGMEM bitmap_info_t Light_Bulb_Info = { @@ -241,17 +241,42 @@ namespace Theme { }; const unsigned char Light_Bulb[128] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, - 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x02, 0x00, - 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x36, 0x18, 0x00, - 0x00, 0x2C, 0x08, 0x00, 0x00, 0x58, 0x04, 0x00, 0x00, 0x50, 0x04, 0x00, - 0x7C, 0x50, 0x04, 0x7C, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, - 0x00, 0x60, 0x0C, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, - 0x00, 0x10, 0x10, 0x00, 0x00, 0x88, 0x22, 0x00, 0x01, 0x08, 0x21, 0x00, - 0x02, 0x08, 0x20, 0x80, 0x04, 0x0F, 0xE0, 0x40, 0x00, 0x07, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, + 0x40, 0x00, 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0x00, 0x01, 0x40, 0x00, + 0x00, 0xF0, 0x07, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x6C, 0x18, 0x00, + 0x00, 0x34, 0x10, 0x00, 0x00, 0x1A, 0x20, 0x00, 0x00, 0x0A, 0x20, 0x00, + 0x3E, 0x0A, 0x20, 0x3E, 0x00, 0x02, 0x20, 0x00, 0x00, 0x02, 0x20, 0x00, + 0x00, 0x06, 0x30, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08, 0x08, 0x00, + 0x00, 0x08, 0x08, 0x00, 0x00, 0x11, 0x44, 0x00, 0x80, 0x10, 0x84, 0x00, + 0x40, 0x10, 0x04, 0x01, 0x20, 0xF0, 0x07, 0x02, 0x00, 0xE0, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + constexpr PROGMEM bitmap_info_t Chamber_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8813, + .width = 32, + .height = 32, + }; + + const unsigned char Chamber_Icon[128] PROGMEM = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xF8, + 0x0F, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xC0, + 0x03, 0x00, 0x00, 0xC0, 0x83, 0x81, 0x81, 0xC1, 0x83, 0x81, 0x81, 0xC1, + 0x03, 0x03, 0x03, 0xC3, 0x03, 0x03, 0x03, 0xC3, 0x03, 0x06, 0x06, 0xC6, + 0x03, 0x06, 0x06, 0xC6, 0x03, 0x03, 0x03, 0xC3, 0x03, 0x03, 0x03, 0xC3, + 0x83, 0x81, 0x81, 0xC1, 0x83, 0x81, 0x81, 0xC1, 0xC3, 0xC0, 0xC0, 0xC0, + 0xC3, 0xC0, 0xC0, 0xC0, 0x63, 0x60, 0x60, 0xC0, 0x63, 0x60, 0x60, 0xC0, + 0xC3, 0xC0, 0xC0, 0xC0, 0xC3, 0xC0, 0xC0, 0xC0, 0x83, 0x81, 0x81, 0xC1, + 0x83, 0x81, 0x81, 0xC1, 0x03, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xC0, + 0x07, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0xF8, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h deleted file mode 100644 index 169a306afcaa..000000000000 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -/** - * This file was auto-generated using "svg2cpp.pl" - * - * The encoding consists of x,y pairs with the min and max scaled to - * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the - * start of a new closed path. - */ -#pragma once - -constexpr float x_min = 0.000000, x_max = 272.000000, - y_min = 0.000000, y_max = 480.000000; - -const PROGMEM uint16_t logo_green[] = {0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA}; -const PROGMEM uint16_t logo_mark[] = {0xDB9F, 0xAC0C, 0xDA6F, 0xAC2D, 0xD970, 0xAC91, 0xD8C0, 0xAD23, 0xD885, 0xADCF, 0xD8C0, 0xAE7A, 0xD970, 0xAF0C, 0xDA6F, 0xAF6F, 0xDB9F, 0xAF8F, 0xDCCE, 0xAF6F, 0xDDD0, 0xAF0C, 0xDE7D, 0xAE7B, 0xDEB9, 0xADCF, 0xDE7D, 0xAD22, 0xDDD0, 0xAC91, 0xDCCE, 0xAC2D, 0xFFFF, 0xDB9F, 0xABC3, 0xDCFE, 0xABEA, 0xDE28, 0xAC5E, 0xDEF1, 0xAD06, 0xDF36, 0xADCF, 0xDEF1, 0xAE95, 0xDE28, 0xAF3E, 0xDCFE, 0xAFB1, 0xDB9F, 0xAFD8, 0xDA3F, 0xAFB1, 0xD916, 0xAF3E, 0xD849, 0xAE95, 0xD808, 0xADCF, 0xD849, 0xAD06, 0xD916, 0xAC5E, 0xDA3F, 0xABEA, 0xFFFF, 0xDB7D, 0xACE6, 0xDAE4, 0xACE6, 0xDAE4, 0xADA9, 0xDB7D, 0xADA9, 0xDC3B, 0xAD94, 0xDC71, 0xAD48, 0xDC3B, 0xACFD, 0xFFFF, 0xDB85, 0xAC9E, 0xDCCB, 0xACC8, 0xDD37, 0xAD47, 0xDCF6, 0xADAC, 0xDC3E, 0xADDE, 0xDC85, 0xADFF, 0xDCE8, 0xAE4E, 0xDD92, 0xAEEA, 0xDCBD, 0xAEEA, 0xDC1E, 0xAE58, 0xDBA7, 0xAE03, 0xDB36, 0xADEF, 0xDAE4, 0xADEF, 0xDAE4, 0xAEEA, 0xDA26, 0xAEEA, 0xDA26, 0xAC9E}; -const PROGMEM uint16_t logo_type[] = {0xD8D5, 0xA520, 0xD8A5, 0xA563, 0xD82E, 0xA57F, 0xD348, 0xA57F, 0xD2D1, 0xA598, 0xD2A0, 0xA5D9, 0xD2A0, 0xAF7A, 0xD274, 0xAFBE, 0xD202, 0xAFDA, 0xCD37, 0xAFDA, 0xCCBF, 0xAFBE, 0xCC8F, 0xAF7A, 0xCC8F, 0xA5D9, 0xCC63, 0xA598, 0xCBF1, 0xA57F, 0xC70B, 0xA57F, 0xC694, 0xA563, 0xC664, 0xA520, 0xC664, 0xA28C, 0xC70B, 0xA22C, 0xD82E, 0xA22C, 0xD8A5, 0xA248, 0xD8D5, 0xA28C, 0xFFFF, 0xB138, 0xAC8C, 0xB952, 0xAC8C, 0xB952, 0xA57F, 0xB138, 0xA57F, 0xFFFF, 0xBF27, 0xA421, 0xBF57, 0xA476, 0xBF6D, 0xA4D0, 0xBF6D, 0xAD36, 0xBF57, 0xAD90, 0xBF27, 0xADE6, 0xBBFA, 0xAFB2, 0xBB60, 0xAFCF, 0xBABD, 0xAFDA, 0xAFCE, 0xAFDA, 0xAF30, 0xAFCF, 0xAE9A, 0xAFB2, 0xAB6E, 0xADE6, 0xAB39, 0xAD90, 0xAB28, 0xAD36, 0xAB28, 0xA4D0, 0xAB39, 0xA476, 0xAB6E, 0xA421, 0xAE9A, 0xA255, 0xAF30, 0xA239, 0xAFCE, 0xA22C, 0xBABD, 0xA22C, 0xBB60, 0xA239, 0xBBFA, 0xA255, 0xFFFF, 0x93A4, 0xACDC, 0x9CEA, 0xACDC, 0x9CEA, 0xAA34, 0x93A4, 0xAA34, 0x93A4, 0xACDC, 0xFFFF, 0x93A4, 0xA796, 0x9CEA, 0xA796, 0x9CEA, 0xA525, 0x93A4, 0xA525, 0xFFFF, 0xA227, 0xA421, 0xA258, 0xA478, 0xA26E, 0xA4D5, 0xA26E, 0xA700, 0xA24F, 0xA757, 0xA204, 0xA7A5, 0xA089, 0xA8B8, 0xA061, 0xA903, 0xA092, 0xA949, 0xA1FC, 0xAA43, 0xA24B, 0xAA91, 0xA26E, 0xAAE8, 0xA26E, 0xAD36, 0xA258, 0xAD90, 0xA227, 0xADE6, 0x9EFC, 0xAFB2, 0x9E61, 0xAFCF, 0x9DBE, 0xAFDA, 0x8ED0, 0xAFDA, 0x8E28, 0xAF7A, 0x8E28, 0xA28C, 0x8E59, 0xA248, 0x8ED0, 0xA22C, 0x9DBE, 0xA22C, 0x9E61, 0xA239, 0x9EFC, 0xA255, 0xFFFF, 0x853C, 0xA502, 0x8517, 0xA557, 0x84C9, 0xA5A2, 0x7994, 0xACC8, 0x8494, 0xACC8, 0x850A, 0xACE4, 0x853C, 0xAD27, 0x853C, 0xAF7A, 0x850A, 0xAFBE, 0x8494, 0xAFDA, 0x7371, 0xAFDA, 0x72C9, 0xAF7A, 0x72C9, 0xAD09, 0x72E8, 0xACB2, 0x7333, 0xAC64, 0x7EA5, 0xA53E, 0x73A6, 0xA53E, 0x732F, 0xA522, 0x72FE, 0xA4DF, 0x72FE, 0xA28C, 0x732F, 0xA248, 0x73A6, 0xA22C, 0x8494, 0xA22C, 0x850A, 0xA248, 0x853C, 0xA28C, 0xFFFF, 0x6B68, 0xAC87, 0x6BDB, 0xACA3, 0x6C07, 0xACE6, 0x6C07, 0xAF7A, 0x6BDB, 0xAFBE, 0x6B68, 0xAFDA, 0x5C84, 0xAFDA, 0x5BDC, 0xAF7A, 0x5BDC, 0xA28C, 0x5C84, 0xA22C, 0x6146, 0xA22C, 0x61EE, 0xA28C, 0x61EE, 0xAC2D, 0x621E, 0xAC6E, 0x6295, 0xAC87, 0xFFFF, 0x52C6, 0xA248, 0x52F7, 0xA28C, 0x52F7, 0xAD45, 0x52EE, 0xAD45, 0x52DC, 0xAD9B, 0x52B1, 0xADE6, 0x4F85, 0xAFB2, 0x4EEA, 0xAFCF, 0x4E47, 0xAFDA, 0x4359, 0xAFDA, 0x42BA, 0xAFCF, 0x4224, 0xAFB2, 0x3EF8, 0xADE6, 0x3EC3, 0xAD90, 0x3EB2, 0xAD36, 0x3EB2, 0xA28C, 0x3EE2, 0xA248, 0x3F5A, 0xA22C, 0x441B, 0xA22C, 0x4493, 0xA248, 0x44C3, 0xA28C, 0x44C3, 0xAC2D, 0x44F4, 0xAC71, 0x456B, 0xAC8C, 0x4C3E, 0xAC8C, 0x4CB1, 0xAC71, 0x4CDD, 0xAC2D, 0x4CDD, 0xA28C, 0x4D0D, 0xA248, 0x4D85, 0xA22C, 0x524F, 0xA22C, 0xFFFF, 0x3748, 0xAC87, 0x37BB, 0xACA3, 0x37E7, 0xACE6, 0x37E7, 0xAF7A, 0x37BB, 0xAFBE, 0x3748, 0xAFDA, 0x2864, 0xAFDA, 0x27BC, 0xAF7A, 0x27BC, 0xA28C, 0x2864, 0xA22C, 0x2D26, 0xA22C, 0x2DCD, 0xA28C, 0x2DCD, 0xAC2D, 0x2DFE, 0xAC6E, 0x2E75, 0xAC87}; -const PROGMEM uint16_t logo_black[] = {0x8048, 0x527A, 0x8ADE, 0x5CDE, 0x75B2, 0x5CDE, 0xFFFF, 0x8048, 0x4FF6, 0x71D9, 0x5E20, 0x8EB8, 0x5E20, 0x8048, 0x4FF6, 0xFFFF, 0x4436, 0x8D8E, 0x4ECC, 0x97F2, 0x39A0, 0x97F2, 0xFFFF, 0x4436, 0x8B0A, 0x35C8, 0x9934, 0x52A5, 0x9934, 0xFFFF, 0xBC3D, 0x8D8E, 0xC6D4, 0x97F2, 0xB1A7, 0x97F2, 0xFFFF, 0xBC3D, 0x8B0A, 0xADCE, 0x9934, 0xCAAC, 0x9934, 0xFFFF, 0x8045, 0x6778, 0x7F6D, 0x67A7, 0x7E9D, 0x689F, 0x7D49, 0x69EA, 0x7B41, 0x6A81, 0x7908, 0x6A3A, 0x7726, 0x692C, 0x75EA, 0x685A, 0x7505, 0x684C, 0x744A, 0x6899, 0x73F5, 0x69A8, 0x7345, 0x6B1A, 0x7193, 0x6BF8, 0x6F4D, 0x6C08, 0x6CFA, 0x6B45, 0x6B61, 0x6AA3, 0x6A7D, 0x6AB7, 0x69EB, 0x6B1D, 0x6A1D, 0x6C34, 0x6A22, 0x6DB8, 0x68E5, 0x6ECD, 0x66B9, 0x6F33, 0x6417, 0x6EC5, 0x6239, 0x6E5C, 0x6165, 0x6E91, 0x6108, 0x6F09, 0x61C1, 0x7018, 0x6282, 0x7196, 0x61CF, 0x72D1, 0x5FE5, 0x7384, 0x5D38, 0x7380, 0x5B4B, 0x7365, 0x5A97, 0x73B7, 0x5A74, 0x7438, 0x5B90, 0x7520, 0x5CE8, 0x7671, 0x5CCB, 0x77BB, 0x5B43, 0x78B0, 0x58B6, 0x7914, 0x56D7, 0x7944, 0x564F, 0x79AD, 0x5667, 0x7A2F, 0x57DA, 0x7AE3, 0x59B7, 0x7BF3, 0x5A31, 0x7D37, 0x5927, 0x7E5D, 0x56E0, 0x7F1E, 0x5529, 0x7F93, 0x54D7, 0x800D, 0x5529, 0x8087, 0x56E0, 0x80FD, 0x5926, 0x81BE, 0x5A30, 0x82E5, 0x59B5, 0x8428, 0x57D8, 0x8538, 0x5664, 0x85EB, 0x564C, 0x866D, 0x56D4, 0x86D7, 0x58B2, 0x8708, 0x5B3F, 0x876B, 0x5CC6, 0x8860, 0x5CE3, 0x89AA, 0x5B8B, 0x8AFC, 0x5A6D, 0x8BE3, 0x5A91, 0x8C65, 0x5B44, 0x8CB7, 0x5D32, 0x8C9C, 0x5FDE, 0x8C98, 0x61C7, 0x8D4B, 0x627A, 0x8E87, 0x61B9, 0x9005, 0x60FF, 0x9114, 0x615C, 0x918B, 0x622F, 0x91C0, 0x640E, 0x9158, 0x66B0, 0x90EA, 0x68DC, 0x9150, 0x6A18, 0x9266, 0x6A12, 0x93E9, 0x69E0, 0x9501, 0x6A72, 0x9567, 0x6B56, 0x957B, 0x6CEE, 0x94D9, 0x6F43, 0x9417, 0x7188, 0x9428, 0x7339, 0x9506, 0x73E9, 0x9678, 0x743E, 0x9787, 0x74F8, 0x97D4, 0x75DD, 0x97C6, 0x771A, 0x96F4, 0x78FB, 0x95E6, 0x7B35, 0x95A1, 0x7D3D, 0x9637, 0x7E91, 0x9782, 0x7F60, 0x987A, 0x8038, 0x98AA, 0x810F, 0x987B, 0x81DF, 0x9782, 0x8333, 0x9638, 0x853B, 0x95A1, 0x8775, 0x95E7, 0x8956, 0x96F5, 0x8A92, 0x97C8, 0x8B78, 0x97D6, 0x8C32, 0x9789, 0x8C88, 0x967A, 0x8D37, 0x9508, 0x8EE9, 0x942A, 0x912F, 0x941A, 0x9383, 0x94DD, 0x951B, 0x957F, 0x95FF, 0x956B, 0x9690, 0x9505, 0x9660, 0x93ED, 0x9659, 0x926A, 0x9797, 0x9154, 0x99C3, 0x90EF, 0x9C65, 0x915D, 0x9E43, 0x91C6, 0x9F17, 0x9191, 0x9F74, 0x9119, 0x9EBB, 0x900A, 0x9DFA, 0x8E8C, 0x9EAE, 0x8D51, 0xA098, 0x8C9E, 0xA345, 0x8CA2, 0xA531, 0x8CBE, 0xA5E5, 0x8C6B, 0xA609, 0x8BEA, 0xA4EC, 0x8B02, 0xA394, 0x89B1, 0xA3B2, 0x8867, 0xA53A, 0x8772, 0xA7C6, 0x870E, 0xA9A5, 0x86DE, 0xAA2D, 0x8675, 0xAA14, 0x85F2, 0xA8A2, 0x853F, 0xA6C5, 0x842E, 0xA64B, 0x82EB, 0xA755, 0x81C5, 0xA99C, 0x8104, 0xAB52, 0x808F, 0xABA6, 0x8015, 0xAB52, 0x7F9B, 0xA99C, 0x7F25, 0xA755, 0x7E64, 0xA64C, 0x7D3E, 0xA6C7, 0x7BFA, 0xA8A5, 0x7AEA, 0xAA18, 0x7A37, 0xAA31, 0x79B5, 0xA9A9, 0x794B, 0xA7CA, 0x791B, 0xA53C, 0x78B7, 0xA3B6, 0x77C1, 0xA39A, 0x7677, 0xA4F1, 0x7526, 0xA60E, 0x743F, 0xA5EB, 0x73BD, 0xA538, 0x736B, 0xA34B, 0x7387, 0xA09E, 0x738A, 0x9EB4, 0x72D6, 0x9E02, 0x719B, 0x9EC4, 0x701D, 0x9F7E, 0x6F0E, 0x9F20, 0x6E96, 0x9E4E, 0x6E61, 0x9C6E, 0x6ECA, 0x99CB, 0x6F37, 0x97A0, 0x6ED2, 0x9664, 0x6DBC, 0x966B, 0x6C38, 0x969B, 0x6B21, 0x960B, 0x6ABB, 0x9526, 0x6AA6, 0x938E, 0x6B48, 0x913B, 0x6C0B, 0x8EF4, 0x6BFA, 0x8D43, 0x6B1D, 0x8C94, 0x69AA, 0x8C3F, 0x689B, 0x8B85, 0x684D, 0x8A9E, 0x685C, 0x8962, 0x692E, 0x8781, 0x6A3C, 0x8546, 0x6A82, 0x833F, 0x69EA, 0x81EC, 0x68A0, 0x811C, 0x67A8, 0x8045, 0x6778, 0x8045, 0x6778, 0xFFFF, 0x8047, 0x6AA0, 0x81C8, 0x6AFA, 0x8268, 0x6BD5, 0x81C8, 0x6CAF, 0x8047, 0x6D09, 0x7EC6, 0x6CAF, 0x7E27, 0x6BD5, 0x7EC6, 0x6AFA, 0x8047, 0x6AA0, 0x8047, 0x6AA0, 0xFFFF, 0x803E, 0x6E19, 0x867C, 0x6E71, 0x8C65, 0x6F75, 0x91D7, 0x711B, 0x96AD, 0x735B, 0x9ABC, 0x762C, 0x9DA2, 0x794C, 0x9F5F, 0x7CA2, 0x9FF3, 0x8011, 0x9F5E, 0x8380, 0x9DA1, 0x86D5, 0x9ABA, 0x89F6, 0x96AB, 0x8CC7, 0x91D6, 0x8F08, 0x8C65, 0x90AD, 0x867C, 0x91B1, 0x803D, 0x9209, 0x7A00, 0x91B1, 0x7416, 0x90AD, 0x6EA6, 0x8F08, 0x69D0, 0x8CC7, 0x65D6, 0x8A0A, 0x62EE, 0x86F4, 0x6125, 0x839B, 0x6089, 0x8011, 0x6124, 0x7C88, 0x62ED, 0x792E, 0x65D6, 0x7619, 0x69CF, 0x735B, 0x6EA5, 0x711B, 0x7416, 0x6F75, 0x7A00, 0x6E71, 0x803E, 0x6E19, 0x803E, 0x6E19, 0xFFFF, 0x803E, 0x6EB2, 0x7A5A, 0x6F04, 0x74B2, 0x6FF8, 0x6F4B, 0x7194, 0x6A8F, 0x73C7, 0x66A2, 0x7681, 0x63D5, 0x7986, 0x6226, 0x7CBF, 0x6197, 0x8011, 0x6226, 0x8363, 0x63D5, 0x869C, 0x66A2, 0x89A2, 0x6A8F, 0x8C5B, 0x6F4B, 0x8E8E, 0x74B2, 0x902B, 0x7A5A, 0x911E, 0x803D, 0x9170, 0x803E, 0x9170, 0x8621, 0x911E, 0x8BCA, 0x902B, 0x9130, 0x8E8E, 0x95ED, 0x8C5B, 0x99CF, 0x89AB, 0x9CA7, 0x869C, 0x9E55, 0x8367, 0x9EE5, 0x8011, 0x9E55, 0x7CBB, 0x9CA7, 0x7986, 0x99CF, 0x7677, 0x95ED, 0x73C7, 0x9130, 0x7194, 0x8BCA, 0x6FF8, 0x8621, 0x6F04, 0x803E, 0x6EB2, 0x803E, 0x6EB2, 0xFFFF, 0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x6700, 0x708A, 0x6880, 0x70E5, 0x6920, 0x71BF, 0x6880, 0x7299, 0x66FF, 0x72F4, 0x657F, 0x7299, 0x64E0, 0x71BF, 0x657F, 0x70E4, 0x6700, 0x708A, 0x6700, 0x708A, 0xFFFF, 0x998D, 0x708C, 0x9B0E, 0x70E6, 0x9BAE, 0x71C0, 0x9B0E, 0x729B, 0x998D, 0x72F6, 0x980D, 0x729B, 0x976E, 0x71C1, 0x980D, 0x70E7, 0x998D, 0x708C, 0x998D, 0x708C, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0x8BA7, 0x712C, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0x8F47, 0x723F, 0xFFFF, 0x712D, 0x7242, 0x7308, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x803E, 0x72F6, 0x891B, 0x73F4, 0x909A, 0x76CC, 0x959F, 0x7B0B, 0x975E, 0x8011, 0x959F, 0x8517, 0x909A, 0x8957, 0x891B, 0x8C2E, 0x803E, 0x8D2B, 0x7761, 0x8C2E, 0x6FE2, 0x8957, 0x6ADD, 0x8517, 0x691E, 0x8011, 0x6ADD, 0x7B0B, 0x6FE2, 0x76CC, 0x7761, 0x73F4, 0x803E, 0x72F6, 0x803E, 0x72F6, 0xFFFF, 0x803E, 0x738F, 0x77C8, 0x7481, 0x70A0, 0x7738, 0x6BD7, 0x7B46, 0x6A2C, 0x8011, 0x6BD7, 0x84DC, 0x70A1, 0x88EA, 0x77C9, 0x8BA1, 0x803E, 0x8C93, 0x88B4, 0x8BA1, 0x8FDB, 0x88EA, 0x94A5, 0x84DD, 0x9650, 0x8011, 0x94A5, 0x7B46, 0x8FDB, 0x7738, 0x88B4, 0x7481, 0x803E, 0x738F, 0x803E, 0x738F, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0x9175, 0x745E, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6CEC, 0x76FA, 0x6BED, 0x7674, 0x6A40, 0x75A9, 0x6A45, 0x75A7, 0x6AEB, 0x7539, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0x9A12, 0x790A, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCB, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x5C87, 0x7EDB, 0x5E08, 0x7F35, 0x5EA8, 0x800F, 0x5E08, 0x80E9, 0x5C87, 0x8144, 0x5C85, 0x8144, 0x5B06, 0x80E9, 0x5A67, 0x800F, 0x5B06, 0x7F35, 0x5C87, 0x7EDB, 0x5C87, 0x7EDB, 0xFFFF, 0xA402, 0x7EDE, 0xA583, 0x7F38, 0xA623, 0x8011, 0xA623, 0x8013, 0xA583, 0x80EC, 0xA402, 0x8147, 0xA281, 0x80ED, 0xA1E2, 0x8013, 0xA281, 0x7F38, 0xA402, 0x7EDE, 0xA402, 0x7EDE, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8255, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8914, 0x67DC, 0x8897, 0x6ADF, 0x878A, 0xFFFF, 0x6CF7, 0x892F, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x963E, 0x8A77, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x7035, 0x8B04, 0x6DED, 0x8C8B, 0x6DE1, 0x8C87, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x66F3, 0x8D2F, 0x6874, 0x8D8A, 0x687D, 0x8D8F, 0x6886, 0x8D94, 0x6926, 0x8E6E, 0x6887, 0x8F48, 0x6705, 0x8FA2, 0x6584, 0x8F49, 0x657F, 0x8F45, 0x6570, 0x8F3E, 0x6573, 0x8F3E, 0x64D3, 0x8E63, 0x6573, 0x8D89, 0x66F3, 0x8D2F, 0x66F3, 0x8D2F, 0xFFFF, 0x9993, 0x8D31, 0x9B13, 0x8D8C, 0x9BB4, 0x8E66, 0x9B16, 0x8F40, 0x9993, 0x8F9A, 0x9814, 0x8F40, 0x9774, 0x8E66, 0x9812, 0x8D8C, 0x9993, 0x8D31, 0x9993, 0x8D31, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CD, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C1, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0x7C48, 0x8E1C, 0xFFFF, 0x80BF, 0x8E49, 0x80D2, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BF, 0x8E49, 0x80BF, 0x8E49, 0xFFFF, 0x804F, 0x9321, 0x81D0, 0x937A, 0x8271, 0x9455, 0x81D1, 0x952F, 0x8051, 0x958A, 0x7ECF, 0x9530, 0x7E2F, 0x9456, 0x7ECE, 0x937B, 0x804F, 0x9321, 0x804F, 0x9321, 0xFFFF, 0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA, 0xFFFF, 0x8048, 0x4BC9, 0x952E, 0x604A, 0x6B62, 0x604A, 0xFFFF, 0x68D2, 0x62CE, 0x97BF, 0x62CE, 0xB9BA, 0x8427, 0xA239, 0x9B36, 0x5E16, 0x9B36, 0x46B6, 0x8446, 0x68D2, 0x62CE, 0xFFFF, 0xBC3E, 0x869F, 0xD13B, 0x9B36, 0xA742, 0x9B36, 0xFFFF, 0x4431, 0x86BE, 0x590E, 0x9B36, 0x2F54, 0x9B36, 0x4431, 0x86BE}; -const PROGMEM uint16_t logo_white[] = {0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0xFFFF, 0x712D, 0x7242, 0x7309, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6A40, 0x75A9, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCC, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8256, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8915, 0x67DC, 0x8897, 0xFFFF, 0x6CF7, 0x8930, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x6DED, 0x8C8C, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CC, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C0, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0xFFFF, 0x80BE, 0x8E49, 0x80D1, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BE, 0x8E49, 0xFFFF, 0x8276, 0x75D6, 0x83AF, 0x75FE, 0x8436, 0x7628, 0x84AE, 0x7661, 0x8542, 0x7706, 0x8512, 0x77BA, 0x8457, 0x7845, 0x8335, 0x788B, 0x8318, 0x7882, 0x82D8, 0x7860, 0x831E, 0x7830, 0x8353, 0x7823, 0x83E6, 0x77F9, 0x8464, 0x7790, 0x847A, 0x771A, 0x8415, 0x76B7, 0x83B6, 0x7691, 0x8351, 0x7676, 0x827F, 0x7662, 0x81BB, 0x7687, 0x8161, 0x76AF, 0x8123, 0x76DA, 0x80E5, 0x771A, 0x80C5, 0x774D, 0x80B8, 0x77C1, 0x80D1, 0x77EE, 0x8107, 0x7814, 0x81CC, 0x786B, 0x837F, 0x7918, 0x8464, 0x7983, 0x84C0, 0x79B2, 0x852D, 0x79FD, 0x859D, 0x7ABC, 0x858E, 0x7B79, 0x8545, 0x7C25, 0x84D9, 0x7CC5, 0x8469, 0x7D4D, 0x843B, 0x7DCD, 0x8555, 0x7DA8, 0x85D3, 0x7D67, 0x870D, 0x7CA0, 0x87E0, 0x7BC0, 0x880D, 0x7B5B, 0x886D, 0x7A46, 0x88B3, 0x799B, 0x88CC, 0x7970, 0x893A, 0x78EA, 0x8995, 0x78A8, 0x8A01, 0x786F, 0x8AF8, 0x781F, 0x8BA6, 0x77FD, 0x8C0C, 0x77EF, 0x8C96, 0x77FB, 0x8D1D, 0x7815, 0x8D59, 0x7826, 0x8E40, 0x7889, 0x8EDB, 0x7925, 0x8EFC, 0x797B, 0x8EFF, 0x79D4, 0x8E71, 0x7A7B, 0x8D58, 0x7AD2, 0x8C23, 0x7ADE, 0x8AFF, 0x7A97, 0x8AF5, 0x7A81, 0x8AEF, 0x7A4E, 0x8B68, 0x7A52, 0x8B96, 0x7A5F, 0x8C39, 0x7A87, 0x8D33, 0x7A7F, 0x8E07, 0x7A3F, 0x8E66, 0x79CB, 0x8E63, 0x7985, 0x8E43, 0x793F, 0x8DC6, 0x78C6, 0x8CFA, 0x7876, 0x8C7E, 0x785F, 0x8C18, 0x7857, 0x8B84, 0x7874, 0x8B22, 0x788F, 0x8A7D, 0x78CA, 0x8A2E, 0x78F9, 0x89F0, 0x7930, 0x89A3, 0x79A5, 0x8979, 0x7AC0, 0x897C, 0x7B9C, 0x8972, 0x7BF2, 0x88CC, 0x7D32, 0x87B7, 0x7E4C, 0x8665, 0x7F52, 0x8660, 0x7F5A, 0x878F, 0x7F01, 0x88AE, 0x7EC2, 0x89FD, 0x7E9E, 0x8B8D, 0x7EC6, 0x8C40, 0x7F0E, 0x8CB6, 0x7F68, 0x8D1D, 0x7FD7, 0x8DFA, 0x80BD, 0x8EA8, 0x816E, 0x8F34, 0x81D4, 0x8F8A, 0x81F9, 0x8FDA, 0x820A, 0x90AB, 0x820F, 0x9120, 0x81FF, 0x91A5, 0x81DC, 0x91F4, 0x81B8, 0x922C, 0x8198, 0x9288, 0x812B, 0x927D, 0x80AB, 0x9252, 0x8068, 0x921C, 0x8033, 0x9174, 0x7FEB, 0x9099, 0x7FEB, 0x8FCF, 0x8029, 0x8F5D, 0x808D, 0x8F47, 0x80A4, 0x8ED4, 0x80A4, 0x8EC5, 0x8070, 0x8F65, 0x7FE6, 0x906D, 0x7F92, 0x91A4, 0x7F90, 0x92A8, 0x7FF7, 0x92FC, 0x8043, 0x9331, 0x8090, 0x9349, 0x813D, 0x92D1, 0x81E3, 0x9264, 0x8227, 0x91E5, 0x825B, 0x915D, 0x8280, 0x90D3, 0x8296, 0x8FA0, 0x829A, 0x8F2C, 0x8286, 0x8EE7, 0x8273, 0x8E78, 0x824A, 0x8DA9, 0x81D4, 0x8CB9, 0x8127, 0x8B68, 0x802C, 0x8B22, 0x8001, 0x8AC3, 0x7FE7, 0x8A50, 0x7FF4, 0x88FD, 0x8068, 0x87A4, 0x811D, 0x879E, 0x812D, 0x8904, 0x81F1, 0x89D4, 0x8285, 0x8A7C, 0x8343, 0x8A94, 0x8431, 0x8A4E, 0x84A1, 0x89E8, 0x850E, 0x892F, 0x85E5, 0x88B0, 0x86E5, 0x88C0, 0x8757, 0x88F2, 0x878D, 0x8927, 0x87AD, 0x8ABF, 0x8821, 0x8B0E, 0x881E, 0x8B70, 0x8811, 0x8C1B, 0x87D6, 0x8C9B, 0x8776, 0x8CC4, 0x873D, 0x8CD3, 0x8705, 0x8CA2, 0x86A3, 0x8C06, 0x8662, 0x8B39, 0x864F, 0x8A77, 0x8662, 0x89F9, 0x864D, 0x8A10, 0x8606, 0x8A66, 0x85F7, 0x8B35, 0x85DC, 0x8C50, 0x85FD, 0x8D3C, 0x8663, 0x8D94, 0x870A, 0x8D7D, 0x875F, 0x8D3A, 0x87B8, 0x8CB1, 0x882D, 0x8BC1, 0x888C, 0x8B30, 0x88A7, 0x8A8D, 0x88AE, 0x89EE, 0x8898, 0x896E, 0x887E, 0x8869, 0x882D, 0x87EE, 0x87EA, 0x87A4, 0x87A8, 0x878E, 0x8785, 0x874D, 0x86E3, 0x875D, 0x8637, 0x87FD, 0x8466, 0x8705, 0x835A, 0x86B8, 0x8359, 0x84A4, 0x8358, 0x7F20, 0x851B, 0x7F13, 0x864D, 0x8016, 0x86F9, 0x818E, 0x87D8, 0x823B, 0x8869, 0x8272, 0x88C9, 0x8276, 0x8915, 0x8266, 0x893D, 0x81FB, 0x89D8, 0x8197, 0x8A21, 0x8119, 0x8A62, 0x80A7, 0x8A8A, 0x8016, 0x8AAA, 0x7EDC, 0x8AAE, 0x7DC5, 0x8A63, 0x7D55, 0x8A29, 0x7CFA, 0x89E5, 0x7CAD, 0x8939, 0x7D1B, 0x8895, 0x7E00, 0x8825, 0x7F27, 0x8800, 0x7F66, 0x880F, 0x7F69, 0x8850, 0x7E49, 0x8873, 0x7D9A, 0x88C9, 0x7D4F, 0x893E, 0x7D8B, 0x89B2, 0x7DD8, 0x89E6, 0x7E36, 0x8A10, 0x7F02, 0x8A40, 0x7FDB, 0x8A34, 0x8046, 0x8A16, 0x8091, 0x89F5, 0x80A5, 0x89EB, 0x80FE, 0x89AB, 0x8126, 0x8981, 0x8159, 0x8918, 0x814F, 0x88E6, 0x8128, 0x88B8, 0x8094, 0x8856, 0x7EFC, 0x8796, 0x7D74, 0x86E7, 0x7D3D, 0x86C5, 0x7CD8, 0x8674, 0x7C98, 0x8605, 0x7CA0, 0x8536, 0x7D7C, 0x83E6, 0x7E07, 0x8357, 0x7DED, 0x835B, 0x79CC, 0x843E, 0x7962, 0x8448, 0x77CB, 0x8450, 0x76F3, 0x8438, 0x763E, 0x841E, 0x7502, 0x83FE, 0x746C, 0x83FD, 0x73E4, 0x840A, 0x72CE, 0x8444, 0x729B, 0x8457, 0x71E6, 0x84B7, 0x71B5, 0x84EB, 0x719B, 0x853B, 0x719B, 0x8558, 0x71D4, 0x85E0, 0x72B0, 0x8642, 0x73D4, 0x8661, 0x74B3, 0x8616, 0x74AD, 0x84D7, 0x74B2, 0x84B3, 0x74B5, 0x849B, 0x751E, 0x8496, 0x753B, 0x84B8, 0x75C5, 0x856E, 0x756D, 0x865A, 0x74D0, 0x86B8, 0x73FA, 0x86EA, 0x7250, 0x86CF, 0x70E7, 0x863F, 0x707E, 0x85C8, 0x705F, 0x8549, 0x7075, 0x84CC, 0x70AC, 0x8475, 0x70CD, 0x8452, 0x71FF, 0x839C, 0x7287, 0x8376, 0x736A, 0x833A, 0x7443, 0x8319, 0x751E, 0x8311, 0x76AC, 0x8327, 0x77C4, 0x8341, 0x7810, 0x8340, 0x799F, 0x8313, 0x7A2A, 0x82EA, 0x7B24, 0x8281, 0x7BE4, 0x820C, 0x7BEC, 0x81B1, 0x7A5E, 0x81C8, 0x7809, 0x81ED, 0x7751, 0x81F8, 0x7664, 0x81EF, 0x7571, 0x81B4, 0x74BB, 0x8141, 0x7483, 0x80F9, 0x7408, 0x802F, 0x73D9, 0x7FEB, 0x7359, 0x7F50, 0x72A0, 0x7EC4, 0x719E, 0x7E89, 0x7074, 0x7EA8, 0x7015, 0x7ECC, 0x6FD0, 0x7EF8, 0x6FA3, 0x7F19, 0x6F6B, 0x7FBB, 0x6F93, 0x8017, 0x6FA7, 0x8032, 0x6FD7, 0x805A, 0x70DF, 0x8092, 0x7205, 0x805A, 0x729E, 0x7FCB, 0x72B3, 0x7FBC, 0x7309, 0x7FA6, 0x733B, 0x7FDE, 0x72F9, 0x804B, 0x726D, 0x80A7, 0x70E6, 0x80FB, 0x700D, 0x80EC, 0x6F48, 0x80A8, 0x6EFC, 0x8073, 0x6EC1, 0x8026, 0x6E93, 0x7FCC, 0x6ED4, 0x7ED8, 0x6F54, 0x7E72, 0x6FCB, 0x7E3A, 0x700B, 0x7E25, 0x71AB, 0x7DED, 0x7356, 0x7E3E, 0x7472, 0x7EF4, 0x7536, 0x7FBD, 0x75DA, 0x8075, 0x7628, 0x80B6, 0x767B, 0x80D8, 0x76D9, 0x80EF, 0x7755, 0x80FC, 0x7881, 0x80D5, 0x7931, 0x8093, 0x7A00, 0x801E, 0x799B, 0x7D9B, 0x789A, 0x7CD8, 0x77C0, 0x7BE5, 0x7783, 0x7B55, 0x7787, 0x7AB9, 0x77AE, 0x7A67, 0x77E6, 0x7A1D, 0x781E, 0x79CD, 0x785E, 0x7909, 0x7853, 0x78C0, 0x7823, 0x788B, 0x7808, 0x7875, 0x7649, 0x77E8, 0x74B6, 0x7869, 0x7488, 0x78B3, 0x7472, 0x7901, 0x74D2, 0x796F, 0x75D8, 0x799A, 0x76EE, 0x7971, 0x774A, 0x797A, 0x7751, 0x79B4, 0x76A0, 0x79F0, 0x75E4, 0x7A0A, 0x7454, 0x79E1, 0x73AF, 0x7986, 0x7369, 0x7909, 0x7374, 0x7891, 0x739D, 0x783C, 0x73B6, 0x781E, 0x74B7, 0x7768, 0x765D, 0x772C, 0x77ED, 0x7769, 0x7932, 0x77FC, 0x7979, 0x7836, 0x79B8, 0x787B, 0x79DF, 0x7912, 0x7998, 0x7A14, 0x7967, 0x7AB4, 0x796A, 0x7AD8, 0x79C5, 0x7B60, 0x7A9D, 0x7BE9, 0x7B72, 0x7C47, 0x7EBA, 0x7BD6, 0x8206, 0x7CA8, 0x82FA, 0x7C2E, 0x8391, 0x7BB4, 0x83F6, 0x7B40, 0x8413, 0x7AD0, 0x83DD, 0x7A71, 0x838A, 0x7A39, 0x8296, 0x79B7, 0x80F3, 0x78FA, 0x8016, 0x788A, 0x7FB4, 0x7833, 0x7F8D, 0x77DF, 0x7F92, 0x77A9, 0x7FB3, 0x7718, 0x7FF6, 0x76C2, 0x8036, 0x768A, 0x8097, 0x764A, 0x80DF, 0x762A, 0x813C, 0x7605, 0x8275, 0x75D5}; - -#define LOGO_BACKGROUND 0xDEEA5C - -#define LOGO_PAINT_PATHS \ - LOGO_PAINT_PATH(0xC1D82F, logo_green) \ - LOGO_PAINT_PATH(0x000000, logo_black) \ - LOGO_PAINT_PATH(0x000000, logo_type) \ - LOGO_PAINT_PATH(0x000000, logo_mark) \ - LOGO_PAINT_PATH(0xFFFFFF, logo_white) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp index 55a310dea9bd..49967be086e9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp @@ -299,6 +299,44 @@ namespace Theme { {SILENCE, END_SONG, 0} }; + const PROGMEM SoundPlayer::sound_t flagpole[] = { + {TRIANGLE_WAVE, NOTE_G3, 2}, + {TRIANGLE_WAVE, NOTE_C4, 2}, + {TRIANGLE_WAVE, NOTE_E4, 2}, + {TRIANGLE_WAVE, NOTE_G4, 2}, + {TRIANGLE_WAVE, NOTE_C5, 2}, + {TRIANGLE_WAVE, NOTE_E5, 2}, + {TRIANGLE_WAVE, NOTE_G5, 5}, + {TRIANGLE_WAVE, NOTE_E5, 2}, + + {TRIANGLE_WAVE, NOTE_G3S, 2}, + {TRIANGLE_WAVE, NOTE_C4, 2}, + {TRIANGLE_WAVE, NOTE_D4S, 2}, + {TRIANGLE_WAVE, NOTE_G4S, 2}, + {TRIANGLE_WAVE, NOTE_C5, 2}, + {TRIANGLE_WAVE, NOTE_D5S, 2}, + {TRIANGLE_WAVE, NOTE_G5S, 5}, + {TRIANGLE_WAVE, NOTE_D5S, 5}, + + {TRIANGLE_WAVE, NOTE_A3S, 2}, + {TRIANGLE_WAVE, NOTE_D4, 2}, + {TRIANGLE_WAVE, NOTE_F4, 2}, + {TRIANGLE_WAVE, NOTE_A4S, 2}, + {TRIANGLE_WAVE, NOTE_D5, 2}, + {TRIANGLE_WAVE, NOTE_F5, 2}, + {TRIANGLE_WAVE, NOTE_A5S, 5}, + + {SILENCE, REST, 1}, + {TRIANGLE_WAVE, NOTE_A5S, 1}, + {SILENCE, REST, 1}, + {TRIANGLE_WAVE, NOTE_A5S, 1}, + {SILENCE, REST, 1}, + {TRIANGLE_WAVE, NOTE_A5S, 1}, + {SILENCE, REST, 1}, + {TRIANGLE_WAVE, NOTE_A5S, 8}, + {SILENCE, END_SONG, 0} + }; + const PROGMEM SoundPlayer::sound_t big_band[] = { {XYLOPHONE, NOTE_F4, 3}, {XYLOPHONE, NOTE_G4, 3}, @@ -401,7 +439,8 @@ const SoundList::list_t SoundList::list[] = { {"Carousel", Theme::carousel}, {"Beats", Theme::beats}, {"Bach Joy", Theme::js_bach_joy}, - {"Bach Toccata", Theme::js_bach_toccata} + {"Bach Toccata", Theme::js_bach_toccata}, + {"Flagpole", Theme::flagpole} }; const uint8_t SoundList::n = N_ELEMENTS(SoundList::list); diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index 0c3658091c23..6ba5e2bc3c1d 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -137,7 +137,7 @@ namespace ExtUI { void onMediaInserted() {} void onMediaError() {} void onMediaRemoved() {} - void onPlayTone(const uint16_t, const uint16_t) {} + void onPlayTone(const uint16_t, const uint16_t/*=0*/) {} void onFilamentRunout(const extruder_t extruder) {} void onUserConfirmRequired(const char * const) {} void onHomingStart() {} @@ -147,18 +147,29 @@ namespace ExtUI { void onStoreSettings(char*) {} void onLoadSettings(const char*) {} void onPostprocessSettings() {} - void onSettingsStored(bool) {} - void onSettingsLoaded(bool) {} + void onSettingsStored(const bool) {} + void onSettingsLoaded(const bool) {} - #if HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {} + #endif + + #if HAS_MESH + void onMeshUpdate(const int8_t, const int8_t, const_float_t) {} + void onMeshUpdate(const int8_t, const int8_t, const ExtUI::probe_state_t) {} #endif #if ENABLED(POWER_LOSS_RECOVERY) - void onPowerLossResume() {} + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } + void onPowerLossResume() { + // Called on resume from power-loss + } #endif void onSteppersDisabled() {} diff --git a/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp index 42abd4bf6453..5f10d76e2f79 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp @@ -37,11 +37,11 @@ TFT SPI_TFT; // use SPI1 for the spi tft. -void TFT::spi_init(uint8_t spiRate) { +void TFT::spiInit(uint8_t spiRate) { tftio.Init(); } -void TFT::SetPoint(uint16_t x, uint16_t y, uint16_t point) { +void TFT::setPoint(uint16_t x, uint16_t y, uint16_t point) { if ((x > 480) || (y > 320)) return; setWindow(x, y, 1, 1); @@ -52,32 +52,30 @@ void TFT::setWindow(uint16_t x, uint16_t y, uint16_t with, uint16_t height) { tftio.set_window(x, y, (x + with - 1), (y + height - 1)); } -void TFT::LCD_init() { +void TFT::lcdInit() { tftio.InitTFT(); #if PIN_EXISTS(TFT_BACKLIGHT) OUT_WRITE(TFT_BACKLIGHT_PIN, LOW); #endif delay(100); - LCD_clear(0x0000); - LCD_Draw_Logo(); + lcdClear(0x0000); + lcdDrawLogo(); #if PIN_EXISTS(TFT_BACKLIGHT) OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif - #if HAS_LOGO_IN_FLASH - delay(2000); - #endif + TERN_(HAS_LOGO_IN_FLASH, delay(2000)); } -void TFT::LCD_clear(uint16_t color) { +void TFT::lcdClear(uint16_t color) { setWindow(0, 0, TFT_WIDTH, TFT_HEIGHT); tftio.WriteMultiple(color, uint32_t(TFT_WIDTH) * uint32_t(TFT_HEIGHT)); } -void TFT::LCD_Draw_Logo() { +void TFT::lcdDrawLogo() { #if HAS_LOGO_IN_FLASH setWindow(0, 0, TFT_WIDTH, TFT_HEIGHT); for (uint16_t i = 0; i < (TFT_HEIGHT); i++) { - Pic_Logo_Read((uint8_t *)"", (uint8_t *)bmp_public_buf, (TFT_WIDTH) * 2); + picLogoRead((uint8_t *)"", (uint8_t *)bmp_public_buf, (TFT_WIDTH) * 2); tftio.WriteSequence((uint16_t *)bmp_public_buf, TFT_WIDTH); } #endif diff --git a/Marlin/src/lcd/extui/mks_ui/SPI_TFT.h b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.h index 62a084fb1196..56576c8c16a5 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPI_TFT.h +++ b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.h @@ -27,12 +27,12 @@ class TFT { public: TFT_IO tftio; - void spi_init(uint8_t spiRate); - void SetPoint(uint16_t x, uint16_t y, uint16_t point); + void spiInit(uint8_t spiRate); + void setPoint(uint16_t x, uint16_t y, uint16_t point); void setWindow(uint16_t x, uint16_t y, uint16_t with, uint16_t height); - void LCD_init(); - void LCD_clear(uint16_t color); - void LCD_Draw_Logo(); + void lcdInit(); + void lcdClear(uint16_t color); + void lcdDrawLogo(); }; extern TFT SPI_TFT; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp index ac7d6d3dfb37..48455e7e36c5 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp @@ -124,8 +124,10 @@ void lv_draw_acceleration_settings() { lv_screen_menu_item_1_edit(scr, machine_menu.TravelAcceleration, PARA_UI_POS_X, y, event_handler, ID_ACCE_TRAVEL, 2, public_buf_l); y += PARA_UI_POS_Y; - itoa(planner.settings.max_acceleration_mm_per_s2[X_AXIS], public_buf_l, 10); - lv_screen_menu_item_1_edit(scr, machine_menu.X_Acceleration, PARA_UI_POS_X, y, event_handler, ID_ACCE_X, 3, public_buf_l); + #if HAS_X_AXIS + itoa(planner.settings.max_acceleration_mm_per_s2[X_AXIS], public_buf_l, 10); + lv_screen_menu_item_1_edit(scr, machine_menu.X_Acceleration, PARA_UI_POS_X, y, event_handler, ID_ACCE_X, 3, public_buf_l); + #endif lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_ACCE_DOWN, true); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index f0609f4ebbf7..061949289690 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -380,6 +380,7 @@ void lv_draw_dialog(uint8_t type) { lv_label_set_text(labelDialog, DIALOG_UPDATE_NO_DEVICE_EN); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } + #if ENABLED(MKS_WIFI_MODULE) else if (DIALOG_IS(TYPE_UPLOAD_FILE)) { if (upload_result == 1) { @@ -422,6 +423,7 @@ void lv_draw_dialog(uint8_t type) { lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } #endif // MKS_WIFI_MODULE + else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT)) { lv_label_set_text(labelDialog, filament_menu.filament_dialog_load_heat); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp index bc151001531f..2c9928f3879f 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp @@ -35,7 +35,7 @@ static lv_obj_t *scr; void lv_draw_error_message(FSTR_P const fmsg) { FSTR_P fhalted = F("PRINTER HALTED"), fplease = F("Please Reset"); - SPI_TFT.LCD_clear(0x0000); + SPI_TFT.lcdClear(0x0000); if (fmsg) disp_string((TFT_WIDTH - strlen_P(FTOP(fmsg)) * 16) / 2, 100, fmsg, 0xFFFF, 0x0000); disp_string((TFT_WIDTH - strlen_P(FTOP(fhalted)) * 16) / 2, 140, fhalted, 0xFFFF, 0x0000); disp_string((TFT_WIDTH - strlen_P(FTOP(fplease)) * 16) / 2, 180, fplease, 0xFFFF, 0x0000); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp b/Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp index 90b181d6b548..af61d716b859 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp @@ -155,7 +155,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { #endif // MKS_WIFI_MODULE case autoLevelGcodeCommand: uint8_t buf[100]; - strncpy((char *)buf, ret_ta_txt, sizeof(buf)); + strncpy((char *)buf, ret_ta_txt, sizeof(buf) - 1); update_gcode_command(AUTO_LEVELING_COMMAND_ADDR, buf); goto_previous_ui(); break; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp index 850a409a1857..7e0624c15988 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp @@ -56,15 +56,9 @@ static bool point_flag = true; enum { ID_NUM_KEY1 = 1, - ID_NUM_KEY2, - ID_NUM_KEY3, - ID_NUM_KEY4, - ID_NUM_KEY5, - ID_NUM_KEY6, - ID_NUM_KEY7, - ID_NUM_KEY8, - ID_NUM_KEY9, - ID_NUM_KEY0, + ID_NUM_KEY2, ID_NUM_KEY3, ID_NUM_KEY4, + ID_NUM_KEY5, ID_NUM_KEY6, ID_NUM_KEY7, + ID_NUM_KEY8, ID_NUM_KEY9, ID_NUM_KEY0, ID_NUM_BACK, ID_NUM_RESET, ID_NUM_CONFIRM, diff --git a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp index da79cb617495..6521bd6af41a 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp @@ -485,17 +485,17 @@ void cutFileName(char *path, int len, int bytePerLine, char *outStr) { wcsncpy(outStr, (const WCHAR *)beginIndex, len - 3); wcscat(outStr, (const WCHAR *)gFileTail); #else - //strncpy(outStr, beginIndex, len - 3); strncpy(outStr, beginIndex, len - 4); strcat_P(outStr, PSTR("~.g")); #endif } else { + const size_t strsize = strIndex2 - beginIndex + 1; #if _LFN_UNICODE - wcsncpy(outStr, (const WCHAR *)beginIndex, strIndex2 - beginIndex + 1); + wcsncpy(outStr, (const WCHAR *)beginIndex, strsize); wcscat(outStr, (const WCHAR *)&gFileTail[3]); #else - strncpy(outStr, beginIndex, strIndex2 - beginIndex + 1); + strncpy(outStr, beginIndex, strsize); strcat_P(outStr, PSTR("g")); #endif } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.h b/Marlin/src/lcd/extui/mks_ui/draw_ui.h index da43f2a49098..10b8dcee2875 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.h @@ -294,9 +294,7 @@ typedef enum { LEVELING_UI, MESHLEVELING_UI, BIND_UI, - #if HAS_BED_PROBE - NOZZLE_PROBE_OFFSET_UI, - #endif + OPTITEM(HAS_BED_PROBE, NOZZLE_PROBE_OFFSET_UI) TOOL_UI, HARDWARE_TEST_UI, WIFI_LIST_UI, @@ -402,11 +400,11 @@ typedef enum { level_pos_y4, level_pos_x5, level_pos_y5, + #if HAS_BED_PROBE - x_offset, - y_offset, - z_offset, + x_offset, y_offset, z_offset, #endif + load_length, load_speed, unload_length, diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index b92a7bdebfea..63b6d487b723 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -50,7 +50,7 @@ #else constexpr static bool endstopx1_sta = true; #endif - #if HAS_X2_MIN || HAS_X2_MAX + #if USE_X2_MIN || USE_X2_MAX bool endstopx2_sta; #else constexpr static bool endstopx2_sta = true; @@ -60,7 +60,7 @@ #else constexpr static bool endstopy1_sta = true; #endif - #if HAS_Y2_MIN || HAS_Y2_MAX + #if USE_Y2_MIN || USE_Y2_MAX bool endstopy2_sta; #else constexpr static bool endstopy2_sta = true; @@ -70,7 +70,7 @@ #else constexpr static bool endstopz1_sta = true; #endif - #if HAS_Z2_MIN || HAS_Z2_MAX + #if USE_Z2_MIN || USE_Z2_MAX bool endstopz2_sta; #else constexpr static bool endstopz2_sta = true; @@ -87,34 +87,34 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == LOW); #endif - #if HAS_X_MIN + #if USE_X_MIN endstopx1_sta = ESTATE(X_MIN); - #elif HAS_X_MAX + #elif USE_X_MAX endstopx1_sta = ESTATE(X_MAX); #endif - #if HAS_X2_MIN + #if USE_X2_MIN endstopx2_sta = ESTATE(X2_MIN); - #elif HAS_X2_MAX + #elif USE_X2_MAX endstopx2_sta = ESTATE(X2_MAX); #endif - #if HAS_Y_MIN + #if USE_Y_MIN endstopy1_sta = ESTATE(Y_MIN); - #elif HAS_Y_MAX + #elif USE_Y_MAX endstopy1_sta = ESTATE(Y_MAX); #endif - #if HAS_Y2_MIN + #if USE_Y2_MIN endstopy2_sta = ESTATE(Y2_MIN); - #elif HAS_Y2_MAX + #elif USE_Y2_MAX endstopy2_sta = ESTATE(Y2_MAX); #endif - #if HAS_Z_MIN + #if USE_Z_MIN endstopz1_sta = ESTATE(Z_MIN); - #elif HAS_Z_MAX + #elif USE_Z_MAX endstopz1_sta = ESTATE(Z_MAX); #endif - #if HAS_Z2_MIN + #if USE_Z2_MIN endstopz2_sta = ESTATE(Z2_MIN); - #elif HAS_Z2_MAX + #elif USE_Z2_MAX endstopz2_sta = ESTATE(Z2_MAX); #endif } @@ -128,34 +128,34 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH); #endif - #if HAS_X_MIN + #if USE_X_MIN endstopx1_sta = !ESTATE(X_MIN); - #elif HAS_X_MAX + #elif USE_X_MAX endstopx1_sta = !ESTATE(X_MAX); #endif - #if HAS_X2_MIN + #if USE_X2_MIN endstopx2_sta = !ESTATE(X2_MIN); - #elif HAS_X2_MAX + #elif USE_X2_MAX endstopx2_sta = !ESTATE(X2_MAX); #endif - #if HAS_Y_MIN + #if USE_Y_MIN endstopy1_sta = !ESTATE(Y_MIN); - #elif HAS_Y_MAX + #elif USE_Y_MAX endstopy1_sta = !ESTATE(Y_MAX); #endif - #if HAS_Y2_MIN + #if USE_Y2_MIN endstopy2_sta = !ESTATE(Y2_MIN); - #elif HAS_Y2_MAX + #elif USE_Y2_MAX endstopy2_sta = !ESTATE(Y2_MAX); #endif - #if HAS_Z_MIN + #if USE_Z_MIN endstopz1_sta = !ESTATE(Z_MIN); - #elif HAS_Z_MAX + #elif USE_Z_MAX endstopz1_sta = !ESTATE(Z_MAX); #endif - #if HAS_Z2_MIN + #if USE_Z2_MIN endstopz2_sta = !ESTATE(Z2_MIN); - #elif HAS_Z2_MAX + #elif USE_Z2_MAX endstopz2_sta = !ESTATE(Z2_MAX); #endif } @@ -178,7 +178,9 @@ SET_INPUT_PULLUP(MKS_TEST_PS_ON_PIN); SET_INPUT_PULLUP(SERVO0_PIN); - OUT_WRITE(X_ENABLE_PIN, LOW); + #if HAS_X_AXIS + OUT_WRITE(X_ENABLE_PIN, LOW); + #endif #if HAS_Y_AXIS OUT_WRITE(Y_ENABLE_PIN, LOW); #endif @@ -240,7 +242,9 @@ void mks_hardware_test() { if (millis() % 2000 < 1000) { thermalManager.fan_speed[0] = 255; - WRITE(X_DIR_PIN, LOW); + #if HAS_X_AXIS + WRITE(X_DIR_PIN, LOW); + #endif #if HAS_Y_AXIS WRITE(Y_DIR_PIN, LOW); #endif @@ -265,11 +269,13 @@ } else { thermalManager.fan_speed[0] = 0; - WRITE(X_DIR_PIN, HIGH); + #if HAS_X_AXIS + WRITE(X_DIR_PIN, HIGH); + #endif #if HAS_Y_AXIS WRITE(Y_DIR_PIN, HIGH); #endif - #if HAS_Y_AXIS + #if HAS_Z_AXIS WRITE(Z_DIR_PIN, HIGH); #endif #if HAS_EXTRUDERS @@ -690,7 +696,7 @@ void disp_char_1624(uint16_t x, uint16_t y, uint8_t c, uint16_t charColor, uint1 for (uint16_t i = 0; i < 24; i++) { const uint16_t tmp_char = pgm_read_word(&ASCII_Table_16x24[((c - 0x20) * 24) + i]); for (uint16_t j = 0; j < 16; j++) - SPI_TFT.SetPoint(x + j, y + i, ((tmp_char >> j) & 0x01) ? charColor : bkColor); + SPI_TFT.setPoint(x + j, y + i, ((tmp_char >> j) & 0x01) ? charColor : bkColor); } } @@ -706,7 +712,7 @@ void disp_string(uint16_t x, uint16_t y, FSTR_P const fstr, uint16_t charColor, } void disp_assets_update() { - SPI_TFT.LCD_clear(0x0000); + SPI_TFT.lcdClear(0x0000); disp_string(100, 140, F("Assets Updating..."), 0xFFFF, 0x0000); } @@ -716,7 +722,6 @@ void disp_assets_update_progress(FSTR_P const fmsg) { char buf[buflen]; memset(buf, ' ', buflen); strncpy_P(buf, FTOP(fmsg), buflen - 1); - buf[buflen - 1] = '\0'; disp_string(100, 165, buf, 0xFFFF, 0x0000); #else disp_string(100, 165, FTOP(fmsg), 0xFFFF, 0x0000); diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index 7c0ec802c306..aaa7a919f672 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -291,7 +291,7 @@ void spiFlashErase_PIC() { uint32_t LogoWrite_Addroffset = 0; -uint8_t Pic_Logo_Write(uint8_t *LogoName, uint8_t *Logo_Wbuff, uint32_t LogoWriteSize) { +uint8_t picLogoWrite(uint8_t *LogoName, uint8_t *Logo_Wbuff, uint32_t LogoWriteSize) { if (LogoWriteSize <= 0) return 0; W25QXX.SPI_FLASH_BufferWrite(Logo_Wbuff, PIC_LOGO_ADDR + LogoWrite_Addroffset, LogoWriteSize); @@ -308,7 +308,7 @@ uint8_t Pic_Logo_Write(uint8_t *LogoName, uint8_t *Logo_Wbuff, uint32_t LogoWrit } uint32_t TitleLogoWrite_Addroffset = 0; -uint8_t Pic_TitleLogo_Write(uint8_t *TitleLogoName, uint8_t *TitleLogo_Wbuff, uint32_t TitleLogoWriteSize) { +uint8_t picTitleLogoWrite(uint8_t *TitleLogoName, uint8_t *TitleLogo_Wbuff, uint32_t TitleLogoWriteSize) { if (TitleLogoWriteSize <= 0) return 0; if ((DeviceCode == 0x9488) || (DeviceCode == 0x5761)) @@ -329,15 +329,15 @@ void default_view_Write(uint8_t *default_view__Rbuff, uint32_t default_view_Writ default_view_addroffset_r = 0; } -uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { +uint32_t picInfoWrite(uint8_t *P_name, uint32_t P_size) { uint8_t pic_counter = 0; - uint32_t Pic_SaveAddr; + uint32_t picSaveAddr; uint32_t Pic_SizeSaveAddr; - uint32_t Pic_NameSaveAddr; - uint8_t Pname_temp; + uint32_t picNameSaveAddr; + uint8_t pNameTemp; uint32_t i, j; uint32_t name_len = 0; - uint32_t SaveName_len = 0; + uint32_t saveNameLen = 0; union union32 size_tmp; W25QXX.SPI_FLASH_BufferRead(&pic_counter, PIC_COUNTER_ADDR, 1); @@ -346,15 +346,15 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { pic_counter = 0; if ((DeviceCode == 0x9488) || (DeviceCode == 0x5761)) - Pic_SaveAddr = PIC_DATA_ADDR_TFT35 + pic_counter * PER_PIC_MAX_SPACE_TFT35; + picSaveAddr = PIC_DATA_ADDR_TFT35 + pic_counter * PER_PIC_MAX_SPACE_TFT35; else - Pic_SaveAddr = PIC_DATA_ADDR_TFT32 + pic_counter * PER_PIC_MAX_SPACE_TFT32; + picSaveAddr = PIC_DATA_ADDR_TFT32 + pic_counter * PER_PIC_MAX_SPACE_TFT32; for (j = 0; j < pic_counter; j++) { do { - W25QXX.SPI_FLASH_BufferRead(&Pname_temp, PIC_NAME_ADDR + SaveName_len, 1); - SaveName_len++; - } while (Pname_temp != '\0'); + W25QXX.SPI_FLASH_BufferRead(&pNameTemp, PIC_NAME_ADDR + saveNameLen, 1); + saveNameLen++; + } while (pNameTemp != '\0'); } i = 0; while ((*(P_name + i) != '\0')) { @@ -362,8 +362,8 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { name_len++; } - Pic_NameSaveAddr = PIC_NAME_ADDR + SaveName_len; - W25QXX.SPI_FLASH_BufferWrite(P_name, Pic_NameSaveAddr, name_len + 1); + picNameSaveAddr = PIC_NAME_ADDR + saveNameLen; + W25QXX.SPI_FLASH_BufferWrite(P_name, picNameSaveAddr, name_len + 1); Pic_SizeSaveAddr = PIC_SIZE_ADDR + 4 * pic_counter; size_tmp.dwords = P_size; W25QXX.SPI_FLASH_BufferWrite(size_tmp.bytes, Pic_SizeSaveAddr, 4); @@ -372,7 +372,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { W25QXX.SPI_FLASH_SectorErase(PIC_COUNTER_ADDR); W25QXX.SPI_FLASH_BufferWrite(&pic_counter, PIC_COUNTER_ADDR, 1); - return Pic_SaveAddr; + return picSaveAddr; } #if HAS_MEDIA @@ -388,7 +388,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { } static int8_t arrayFindStr(FSTR_P const arr[], uint8_t arraySize, const char *str) { - for (uint8_t a = 0; a < arraySize; a++) { + for (uint8_t a = 0; a < arraySize; ++a) { if (strcasecmp(FTOP(arr[a]), str) == 0) return a; } @@ -430,14 +430,14 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { do { hal.watchdog_refresh(); pbr = file.read(public_buf, BMP_WRITE_BUF_LEN); - Pic_Logo_Write((uint8_t*)fn, public_buf, pbr); + picLogoWrite((uint8_t*)fn, public_buf, pbr); } while (pbr >= BMP_WRITE_BUF_LEN); } else if (assetType == ASSET_TYPE_TITLE_LOGO) { do { hal.watchdog_refresh(); pbr = file.read(public_buf, BMP_WRITE_BUF_LEN); - Pic_TitleLogo_Write((uint8_t*)fn, public_buf, pbr); + picTitleLogoWrite((uint8_t*)fn, public_buf, pbr); } while (pbr >= BMP_WRITE_BUF_LEN); } else if (assetType == ASSET_TYPE_G_PREVIEW) { @@ -448,7 +448,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { } while (pbr >= BMP_WRITE_BUF_LEN); } else if (assetType == ASSET_TYPE_ICON) { - Pic_Write_Addr = Pic_Info_Write((uint8_t*)fn, pfileSize); + Pic_Write_Addr = picInfoWrite((uint8_t*)fn, pfileSize); SPIFlash.beginWrite(Pic_Write_Addr); #if HAS_SPI_FLASH_COMPRESSION do { @@ -550,7 +550,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { #endif // HAS_MEDIA -void Pic_Read(uint8_t *Pname, uint8_t *P_Rbuff) { +void picRead(uint8_t *Pname, uint8_t *P_Rbuff) { uint8_t i, j; uint8_t Pic_cnt; uint32_t tmp_cnt = 0; @@ -596,7 +596,7 @@ void lv_pic_test(uint8_t *P_Rbuff, uint32_t addr, uint32_t size) { #endif uint32_t logo_addroffset = 0; -void Pic_Logo_Read(uint8_t *LogoName, uint8_t *Logo_Rbuff, uint32_t LogoReadsize) { +void picLogoRead(uint8_t *LogoName, uint8_t *Logo_Rbuff, uint32_t LogoReadsize) { W25QXX.init(SPI_QUARTER_SPEED); W25QXX.SPI_FLASH_BufferRead(Logo_Rbuff, PIC_LOGO_ADDR + logo_addroffset, LogoReadsize); logo_addroffset += LogoReadsize; diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.h b/Marlin/src/lcd/extui/mks_ui/pic_manager.h index cdcc5b76b8a9..1483b96461e4 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.h +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.h @@ -154,8 +154,8 @@ typedef struct pic_msg PIC_MSG; #define PIC_SIZE_xM 6 #define FONT_SIZE_xM 2 -void Pic_Read(uint8_t *Pname, uint8_t *P_Rbuff); -void Pic_Logo_Read(uint8_t *LogoName, uint8_t *Logo_Rbuff, uint32_t LogoReadsize); +void picRead(uint8_t *Pname, uint8_t *P_Rbuff); +void picLogoRead(uint8_t *LogoName, uint8_t *Logo_Rbuff, uint32_t LogoReadsize); void lv_pic_test(uint8_t *P_Rbuff, uint32_t addr, uint32_t size); uint32_t lv_get_pic_addr(uint8_t *Pname); void get_spi_flash_data(const char *rec_buf, int offset, int size); diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 7d00f1a50314..081b8c03ed57 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -129,15 +129,14 @@ void tft_lvgl_init() { hal.watchdog_refresh(); // LVGL init takes time // Init TFT first! - SPI_TFT.spi_init(SPI_FULL_SPEED); - SPI_TFT.LCD_init(); + SPI_TFT.spiInit(SPI_FULL_SPEED); + SPI_TFT.lcdInit(); hal.watchdog_refresh(); // LVGL init takes time #if ENABLED(USB_FLASH_DRIVE_SUPPORT) uint16_t usb_flash_loop = 1000; #if ENABLED(MULTI_VOLUME) && !HAS_SD_HOST_DRIVE - SET_INPUT_PULLUP(SD_DETECT_PIN); if (IS_SD_INSERTED()) card.changeMedia(&card.media_driver_sdcard); else @@ -238,11 +237,11 @@ void tft_lvgl_init() { uiCfg.print_state = REPRINTING; #if ENABLED(LONG_FILENAME_HOST_SUPPORT) - strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); + strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m) - 1); card.printLongPath(public_buf_m); - strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[0])); + strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[0]) - 1); #else - strncpy(list_file.long_name[sel_id], recovery.info.sd_filename, sizeof(list_file.long_name[0])); + strncpy(list_file.long_name[sel_id], recovery.info.sd_filename, sizeof(list_file.long_name[0]) - 1); #endif lv_draw_printing(); } @@ -302,18 +301,16 @@ void lv_fill_rect(lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2, lv W25QXX.init(SPI_QUARTER_SPEED); } -#define TICK_CYCLE 1 - -unsigned int getTickDiff(unsigned int curTick, unsigned int lastTick) { - return TICK_CYCLE * (lastTick <= curTick ? (curTick - lastTick) : (0xFFFFFFFF - lastTick + curTick)); +uint16_t getTickDiff(const uint16_t curTick, const uint16_t lastTick) { + return (TICK_CYCLE) * (lastTick <= curTick ? (curTick - lastTick) : (0xFFFFFFFF - lastTick + curTick)); } -static bool get_point(int16_t *x, int16_t *y) { +static bool get_point(int16_t * const x, int16_t * const y) { if (!touch.getRawPoint(x, y)) return false; #if ENABLED(TOUCH_SCREEN_CALIBRATION) const calibrationState state = touch_calibration.get_calibration_state(); - if (state >= CALIBRATION_TOP_LEFT && state <= CALIBRATION_BOTTOM_RIGHT) { + if (WITHIN(state, CALIBRATION_TOP_LEFT, CALIBRATION_BOTTOM_RIGHT)) { if (touch_calibration.handleTouch(*x, *y)) lv_update_touch_calibration_screen(); return false; } @@ -328,27 +325,10 @@ static bool get_point(int16_t *x, int16_t *y) { } bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data) { - static int16_t last_x = 0, last_y = 0; - if (get_point(&last_x, &last_y)) { - #if TFT_ROTATION == TFT_ROTATE_180 - data->point.x = TFT_WIDTH - last_x; - data->point.y = TFT_HEIGHT - last_y; - #else - data->point.x = last_x; - data->point.y = last_y; - #endif - data->state = LV_INDEV_STATE_PR; - } - else { - #if TFT_ROTATION == TFT_ROTATE_180 - data->point.x = TFT_WIDTH - last_x; - data->point.y = TFT_HEIGHT - last_y; - #else - data->point.x = last_x; - data->point.y = last_y; - #endif - data->state = LV_INDEV_STATE_REL; - } + static xy_int_t last { 0, 0 }; + data->state = get_point(&last.x, &last.y) ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL; + data->point.x = (TFT_ROTATION == TFT_ROTATE_180) ? TFT_WIDTH - last.x : last.x; + data->point.y = (TFT_ROTATION == TFT_ROTATE_180) ? TFT_HEIGHT - last.y : last.y; return false; // Return `false` since no data is buffering or left to read } @@ -564,7 +544,7 @@ void lv_encoder_pin_init() { #endif // HAS_ENCODER_ACTION -#if __PLAT_NATIVE_SIM__ +#ifdef __PLAT_NATIVE_SIM__ #include typedef void (*lv_log_print_g_cb_t)(lv_log_level_t level, const char *, uint32_t, const char *); extern "C" void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb) {} diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h index a71bdc9db766..d847cfb1933b 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h @@ -40,11 +40,7 @@ void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * co bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data); bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); -void LCD_Clear(uint16_t Color); -void tft_set_point(uint16_t x, uint16_t y, uint16_t point); -void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t height); -void LCD_WriteRAM_Prepare(); -void lcd_draw_logo(); +void lcdClear(uint16_t color); void lv_encoder_pin_init(); void lv_update_encoder(); diff --git a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp index 6e9c37b0169e..aaddbcb892d2 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp @@ -167,7 +167,7 @@ void machine_setting_disp() { machine_menu.Extrude_Min_Temper = EXTRUD_MIN_TEMPER_CN; machine_menu.HotbedConfTitle = HOTBED_CONF_TITLE_CN; - machine_menu.HotbedAjustType = HOTBED_ADJUST_CN; + machine_menu.HotbedAdjustType = HOTBED_ADJUST_CN; machine_menu.HotbedMinTemperature = HOTBED_MIN_TEMPERATURE_CN; machine_menu.HotbedMaxTemperature = HOTBED_MAX_TEMPERATURE_CN; @@ -395,7 +395,7 @@ void machine_setting_disp() { machine_menu.Extrude_Min_Temper = EXTRUD_MIN_TEMPER_T_CN; machine_menu.HotbedConfTitle = HOTBED_CONF_TITLE_T_CN; - machine_menu.HotbedAjustType = HOTBED_ADJUST_T_CN; + machine_menu.HotbedAdjustType = HOTBED_ADJUST_T_CN; machine_menu.HotbedMinTemperature = HOTBED_MIN_TEMPERATURE_T_CN; machine_menu.HotbedMaxTemperature = HOTBED_MAX_TEMPERATURE_T_CN; @@ -627,7 +627,7 @@ void machine_setting_disp() { machine_menu.HotbedEnable = HOTBED_ENABLE_EN; machine_menu.HotbedConfTitle = HOTBED_CONF_TITLE_EN; - machine_menu.HotbedAjustType = HOTBED_ADJUST_EN; + machine_menu.HotbedAdjustType = HOTBED_ADJUST_EN; machine_menu.HotbedMinTemperature = HOTBED_MIN_TEMPERATURE_EN; machine_menu.HotbedMaxTemperature = HOTBED_MAX_TEMPERATURE_EN; diff --git a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.h b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.h index 2a5135dded4f..9a6109cbe7c3 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.h @@ -150,7 +150,7 @@ typedef struct machine_common_disp { const char *HotbedEnable; const char *HotbedConfTitle; - const char *HotbedAjustType; + const char *HotbedAdjustType; const char *HotbedMinTemperature; const char *HotbedMaxTemperature; diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp index 338811bc0534..cb5b7f0b68c8 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp @@ -230,7 +230,7 @@ void WifiSerial::_rx_complete_irq(serial_t *obj) { WRITE(WIFI_IO1_PIN, HIGH); - rx_buffer_index_t i = (unsigned int)(obj->rx_head + 1) % WIFI_RX_BUF_SIZE; + rx_buffer_index_t i = uint16_t(obj->rx_head + 1) % WIFI_RX_BUF_SIZE; // if we should be storing the received character into the location // just before the tail (meaning that the head would advance to the @@ -292,7 +292,7 @@ void WifiSerial::begin(unsigned long baud, byte config) { case 0: Error_Handler(); break; } - uart_init(&_serial, (uint32_t)baud, databits, parity, stopbits); + uart_init(&_serial, uint32_t(baud), databits, parity, stopbits); enableHalfDuplexRx(); if (baud == WIFI_BAUDRATE) uart_attach_rx_callback(&_serial, _rx_complete_irq); @@ -311,7 +311,7 @@ void WifiSerial::end() { } int WifiSerial::available() { - return ((unsigned int)(WIFI_RX_BUF_SIZE + _serial.rx_head - _serial.rx_tail)) % WIFI_RX_BUF_SIZE; + return uint16_t(WIFI_RX_BUF_SIZE + _serial.rx_head - _serial.rx_tail) % WIFI_RX_BUF_SIZE; } // @@ -322,7 +322,7 @@ int WifiSerial::read() { // if the head isn't ahead of the tail, we don't have any characters if (_serial.rx_head == _serial.rx_tail) return -1; - unsigned char c = _serial.rx_buff[_serial.rx_tail]; + uint8_t c = _serial.rx_buff[_serial.rx_tail]; _serial.rx_tail = (rx_buffer_index_t)(_serial.rx_tail + 1) % WIFI_RX_BUF_SIZE; return c; } diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index a97db476494d..122712e9e114 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -55,11 +55,11 @@ #define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); #define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); -extern uint8_t Explore_Disk(char *path, uint8_t recu_level); +uint8_t exploreDisk(const char * const path, const uint8_t recu_level, const bool with_longnames); extern uint8_t commands_in_queue; extern uint8_t sel_id; -extern unsigned int getTickDiff(unsigned int curTick, unsigned int lastTick); +uint16_t getTickDiff(const uint16_t curTick, const uint16_t lastTick); volatile SZ_USART_FIFO WifiRxFifo; @@ -114,33 +114,34 @@ extern CLOUD_PARA cloud_para; extern bool once_flag, flash_preview_begin, default_preview_flg, gcode_preview_over; extern bool flash_dma_mode; -uint32_t getWifiTick() { return millis(); } +millis_t getWifiTick() { return millis(); } -uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick) { - return (lastTick <= curTick ? curTick - lastTick : 0xFFFFFFFF - lastTick + curTick) * TICK_CYCLE; +millis_t getWifiTickDiff(const millis_t lastTick, const millis_t curTick) { + return (TICK_CYCLE) * (lastTick <= curTick ? curTick - lastTick : 0xFFFFFFFFUL - lastTick + curTick); } -void wifi_delay(int n) { - const uint32_t start = getWifiTick(); - while (getWifiTickDiff(start, getWifiTick()) < (uint32_t)n) +void wifi_delay(const uint16_t n) { + const millis_t start = getWifiTick(); + while (getWifiTickDiff(start, getWifiTick()) < millis_t(n)) hal.watchdog_refresh(); } void wifi_reset() { - uint32_t start = getWifiTick(); + const millis_t start = getWifiTick(); WIFI_RESET(); while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } WIFI_SET(); } -void mount_file_sys(uint8_t disk_type) { - if (disk_type == FILE_SYS_SD) { - TERN_(HAS_MEDIA, card.mount()); - } - else if (disk_type == FILE_SYS_USB) { +void mount_file_sys(const uint8_t disk_type) { + switch (disk_type) { + case FILE_SYS_SD: TERN_(HAS_MEDIA, card.mount()); break; + case FILE_SYS_USB: break; } } +#define ILLEGAL_CHAR_REPLACE 0x5F // '_' + static bool longName2DosName(const char *longName, char *dosName) { uint8_t i = FILENAME_LENGTH; while (i) dosName[--i] = '\0'; @@ -152,18 +153,24 @@ static bool longName2DosName(const char *longName, char *dosName) { strcat_P(dosName, PSTR(".GCO")); return dosName[0] != '\0'; } + + // Fail for illegal characters + if (c < 0x21 || c == 0x7F) // Check size, non-printable characters + c = ILLEGAL_CHAR_REPLACE; // replace non-printable chars with underscore '_' else { - // Fail for illegal characters PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); - while (uint8_t b = pgm_read_byte(p++)) if (b == c) return false; - if (c < 0x21 || c == 0x7F) return false; // Check size, non-printable characters - dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name + while (const uint8_t b = pgm_read_byte(p++)) + if (b == c) c = ILLEGAL_CHAR_REPLACE; // replace illegal chars with underscore '_' } + + dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name + if (i >= 5) { strcat_P(dosName, PSTR("~1.GCO")); return dosName[0] != '\0'; } } + return dosName[0] != '\0'; // Return true if any name was set } @@ -562,8 +569,8 @@ static bool longName2DosName(const char *longName, char *dosName) { #if ENABLED(MKS_WIFI_MODULE) - int raw_send_to_wifi(uint8_t *buf, int len) { - if (buf == 0 || len <= 0) return 0; + int raw_send_to_wifi(uint8_t * const buf, const int len) { + if (buf == nullptr || len <= 0) return 0; for (int i = 0; i < len; i++) WIFISERIAL.write(*(buf + i)); return len; } @@ -701,13 +708,13 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { return 1; } +int send_to_wifi(uint8_t * const buf, const int len) { return package_to_wifi(WIFI_TRANS_INF, buf, len); } -#define SEND_OK_TO_WIFI send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")) -int send_to_wifi(uint8_t *buf, int len) { return package_to_wifi(WIFI_TRANS_INF, buf, len); } +inline void send_ok_to_wifi() { send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")); } void set_cur_file_sys(int fileType) { gCfgItems.fileSysType = fileType; } -void get_file_list(char *path) { +void get_file_list(const char * const path, const bool with_longnames) { if (!path) return; if (gCfgItems.fileSysType == FILE_SYS_SD) { @@ -716,7 +723,7 @@ void get_file_list(char *path) { else if (gCfgItems.fileSysType == FILE_SYS_USB) { // udisk } - Explore_Disk(path, 0); + exploreDisk(path, 0, with_longnames); } char wait_ip_back_flag = 0; @@ -795,7 +802,7 @@ typedef struct { uint8_t tail; } ESP_PROTOC_FRAME; -static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) { +static int cut_msg_head(uint8_t * const msg, const uint16_t msgLen, uint16_t cutLen) { if (msgLen < cutLen) return 0; else if (msgLen == cutLen) { @@ -811,8 +818,7 @@ static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) { return msgLen - cutLen; } -uint8_t Explore_Disk(char *path , uint8_t recu_level) { - char tmp[200]; +uint8_t exploreDisk(const char * const path, const uint8_t recu_level, const bool with_longnames) { char Fstream[200]; if (!path) return 0; @@ -844,434 +850,449 @@ uint8_t Explore_Disk(char *path , uint8_t recu_level) { return fileCnt; } -static void wifi_gcode_exec(uint8_t *cmd_line) { +static void wifi_gcode_exec(uint8_t * const cmd_line) { int8_t tempBuf[100] = { 0 }; - uint8_t *tmpStr = 0; int cmd_value; volatile int print_rate; - if (strchr((char *)cmd_line, '\n') && (strchr((char *)cmd_line, 'G') || strchr((char *)cmd_line, 'M') || strchr((char *)cmd_line, 'T'))) { - tmpStr = (uint8_t *)strchr((char *)cmd_line, '\n'); - if (tmpStr) *tmpStr = '\0'; - - tmpStr = (uint8_t *)strchr((char *)cmd_line, '\r'); - if (tmpStr) *tmpStr = '\0'; - tmpStr = (uint8_t *)strchr((char *)cmd_line, '*'); - if (tmpStr) *tmpStr = '\0'; + // Only accept commands with a linefeed + char * const lfStr = strchr((char *)cmd_line, '\n'); + if (!lfStr) return; + + // Only accept commands with G, M, or T somewhere + const char * const gStr = strchr((char *)cmd_line, 'G'); + const char * const mStr = strchr((char *)cmd_line, 'M'); + const char * const tStr = strchr((char *)cmd_line, 'T'); + if (!(gStr || mStr || tStr)) return; + + // Replace the linefeed with nul terminator + *lfStr = '\0'; + + // Terminate on the first cr, if any + char * const crStr = strchr((char *)cmd_line, '\r'); + if (crStr) *crStr = '\0'; + + // Terminate on the checksum marker, if any + char * const aStr = strchr((char *)cmd_line, '*'); + if (aStr) *aStr = '\0'; + + // Handle some M commands here + if (mStr) { + cmd_value = atoi(mStr + 1); + char * const spStr = strchr(mStr, ' '); + + switch (cmd_value) { + + case 20: // M20: Print SD / µdisk file + file_writer.fileTransfer = 0; + if (uiCfg.print_state == IDLE) { + int index = 0; + if (spStr == nullptr) { + gCfgItems.fileSysType = FILE_SYS_SD; + send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); + get_file_list("0:/", false); + send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); + send_ok_to_wifi(); + break; + } - tmpStr = (uint8_t *)strchr((char *)cmd_line, 'M'); - if (tmpStr) { - cmd_value = atoi((char *)(tmpStr + 1)); - tmpStr = (uint8_t *)strchr((char *)tmpStr, ' '); + while (mStr[index] == ' ') index++; - switch (cmd_value) { + if (gCfgItems.wifi_type == ESP_WIFI) { + char * const path = (char *)tempBuf; + if (strlen(&mStr[index]) < 80) { + send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); - case 20: // M20: Print SD / µdisk file - file_writer.fileTransfer = 0; - if (uiCfg.print_state == IDLE) { - int index = 0; + if (strncmp(&mStr[index], "1:", 2) == 0) + gCfgItems.fileSysType = FILE_SYS_SD; + else if (strncmp(&mStr[index], "0:", 2) == 0) + gCfgItems.fileSysType = FILE_SYS_USB; - if (tmpStr == 0) { - gCfgItems.fileSysType = FILE_SYS_SD; - send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); - get_file_list((char *)"0:/"); + strcpy(path, &mStr[index]); + const bool with_longnames = strchr(mStr, 'L') != nullptr; + get_file_list(path, with_longnames); send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); - SEND_OK_TO_WIFI; - break; } + send_ok_to_wifi(); + } + } + break; - while (tmpStr[index] == ' ') index++; + case 21: send_ok_to_wifi(); break; // Init SD card - if (gCfgItems.wifi_type == ESP_WIFI) { - char *path = (char *)tempBuf; + case 23: + // Select the file + if (uiCfg.print_state == IDLE) { + int index = 0; + while (mStr[index] == ' ') index++; - if (strlen((char *)&tmpStr[index]) < 80) { - send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); + if (strstr_P(&mStr[index], PSTR(".g")) || strstr_P(&mStr[index], PSTR(".G"))) { + if (strlen(&mStr[index]) < 80) { + ZERO(list_file.file_name[sel_id]); + ZERO(list_file.long_name[sel_id]); + uint8_t has_path_selected = 0; - if (strncmp((char *)&tmpStr[index], "1:", 2) == 0) + if (gCfgItems.wifi_type == ESP_WIFI) { + if (strncmp_P(&mStr[index], PSTR("1:"), 2) == 0) { gCfgItems.fileSysType = FILE_SYS_SD; - else if (strncmp((char *)&tmpStr[index], "0:", 2) == 0) + has_path_selected = 1; + } + else if (strncmp_P(&mStr[index], PSTR("0:"), 2) == 0) { gCfgItems.fileSysType = FILE_SYS_USB; + has_path_selected = 1; + } + else if (mStr[index] != '/') + strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); + + if (file_writer.fileTransfer == 1) { + char dosName[FILENAME_LENGTH]; + uint8_t fileName[sizeof(list_file.file_name[sel_id])]; + fileName[0] = '\0'; + if (has_path_selected == 1) { + strcat((char *)fileName, &mStr[index + 3]); + strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); + } + else strcat((char *)fileName, &mStr[index]); + if (!longName2DosName((const char *)fileName, dosName)) + strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); + strcat((char *)list_file.file_name[sel_id], dosName); + strcat((char *)list_file.long_name[sel_id], (const char *)fileName); + } + else { + strcat((char *)list_file.file_name[sel_id], &mStr[index]); + strcat((char *)list_file.long_name[sel_id], &mStr[index]); + } + + } + else + strcpy(list_file.file_name[sel_id], &mStr[index]); + + char *cur_name = strrchr(list_file.file_name[sel_id],'/'); + + card.openFileRead(cur_name); - strcpy((char *)path, (char *)&tmpStr[index]); - get_file_list(path); - send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); + if (card.isFileOpen()) + send_to_wifi((uint8_t *)"File selected\r\n", strlen("File selected\r\n")); + else { + send_to_wifi((uint8_t *)"file.open failed\r\n", strlen("file.open failed\r\n")); + strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); } - SEND_OK_TO_WIFI; + send_ok_to_wifi(); } } - break; - - case 21: SEND_OK_TO_WIFI; break; // Init SD card + } + break; - case 23: - // Select the file + case 24: + if (strcmp_P(list_file.file_name[sel_id], PSTR("notValid")) != 0) { if (uiCfg.print_state == IDLE) { - int index = 0; - while (tmpStr[index] == ' ') index++; - - if (strstr_P((char *)&tmpStr[index], PSTR(".g")) || strstr_P((char *)&tmpStr[index], PSTR(".G"))) { - if (strlen((char *)&tmpStr[index]) < 80) { - ZERO(list_file.file_name[sel_id]); - ZERO(list_file.long_name[sel_id]); - uint8_t has_path_selected = 0; - - if (gCfgItems.wifi_type == ESP_WIFI) { - if (strncmp_P((char *)&tmpStr[index], PSTR("1:"), 2) == 0) { - gCfgItems.fileSysType = FILE_SYS_SD; - has_path_selected = 1; - } - else if (strncmp_P((char *)&tmpStr[index], PSTR("0:"), 2) == 0) { - gCfgItems.fileSysType = FILE_SYS_USB; - has_path_selected = 1; - } - else if (tmpStr[index] != '/') - strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); + clear_cur_ui(); + reset_print_time(); + start_print_time(); + preview_gcode_prehandle(list_file.file_name[sel_id]); + uiCfg.print_state = WORKING; + lv_draw_printing(); - if (file_writer.fileTransfer == 1) { - char dosName[FILENAME_LENGTH]; - uint8_t fileName[sizeof(list_file.file_name[sel_id])]; - fileName[0] = '\0'; - if (has_path_selected == 1) { - strcat((char *)fileName, (char *)&tmpStr[index + 3]); - strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); - } - else strcat((char *)fileName, (char *)&tmpStr[index]); - if (!longName2DosName((const char *)fileName, dosName)) - strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); - strcat((char *)list_file.file_name[sel_id], dosName); - strcat((char *)list_file.long_name[sel_id], dosName); - } - else { - strcat((char *)list_file.file_name[sel_id], (char *)&tmpStr[index]); - strcat((char *)list_file.long_name[sel_id], (char *)&tmpStr[index]); - } + #if HAS_MEDIA + if (!gcode_preview_over) { + char *cur_name = strrchr(list_file.file_name[sel_id], '/'); + MediaFile file; + MediaFile *curDir; + card.abortFilePrintNow(); + const char * const fname = card.diveToFile(false, curDir, cur_name); + if (!fname) return; + if (file.open(curDir, fname, O_READ)) { + gCfgItems.curFilesize = file.fileSize(); + file.close(); + update_spi_flash(); } - else - strcpy(list_file.file_name[sel_id], (char *)&tmpStr[index]); - - char *cur_name=strrchr(list_file.file_name[sel_id],'/'); - card.openFileRead(cur_name); - - if (card.isFileOpen()) - send_to_wifi((uint8_t *)"File selected\r\n", strlen("File selected\r\n")); - else { - send_to_wifi((uint8_t *)"file.open failed\r\n", strlen("file.open failed\r\n")); - strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); + if (card.isFileOpen()) { + //saved_feedrate_percentage = feedrate_percentage; + feedrate_percentage = 100; + #if HAS_EXTRUDERS + planner.flow_percentage[0] = 100; + planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; + #endif + #if HAS_MULTI_EXTRUDER + planner.flow_percentage[1] = 100; + planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; + #endif + card.startOrResumeFilePrinting(); + TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); + once_flag = false; } - SEND_OK_TO_WIFI; } - } - } - break; - - case 24: - if (strcmp_P(list_file.file_name[sel_id], PSTR("notValid")) != 0) { - if (uiCfg.print_state == IDLE) { - clear_cur_ui(); - reset_print_time(); - start_print_time(); - preview_gcode_prehandle(list_file.file_name[sel_id]); - uiCfg.print_state = WORKING; - lv_draw_printing(); - - #if HAS_MEDIA - if (!gcode_preview_over) { - char *cur_name = strrchr(list_file.file_name[sel_id], '/'); - - MediaFile file; - MediaFile *curDir; - card.abortFilePrintNow(); - const char * const fname = card.diveToFile(false, curDir, cur_name); - if (!fname) return; - if (file.open(curDir, fname, O_READ)) { - gCfgItems.curFilesize = file.fileSize(); - file.close(); - update_spi_flash(); - } - card.openFileRead(cur_name); - if (card.isFileOpen()) { - //saved_feedrate_percentage = feedrate_percentage; - feedrate_percentage = 100; - #if HAS_EXTRUDERS - planner.flow_percentage[0] = 100; - planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; - #endif - #if HAS_MULTI_EXTRUDER - planner.flow_percentage[1] = 100; - planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; - #endif - card.startOrResumeFilePrinting(); - TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); - once_flag = false; - } - } - #endif - } - else if (uiCfg.print_state == PAUSED) { - uiCfg.print_state = RESUMING; - clear_cur_ui(); - start_print_time(); - - if (gCfgItems.from_flash_pic) - flash_preview_begin = true; - else - default_preview_flg = true; - lv_draw_printing(); - } - else if (uiCfg.print_state == REPRINTING) { - uiCfg.print_state = REPRINTED; - clear_cur_ui(); - start_print_time(); - if (gCfgItems.from_flash_pic) - flash_preview_begin = true; - else - default_preview_flg = true; - lv_draw_printing(); - } + #endif } - SEND_OK_TO_WIFI; - break; - - case 25: - // Pause print file - if (uiCfg.print_state == WORKING) { - stop_print_time(); - + else if (uiCfg.print_state == PAUSED) { + uiCfg.print_state = RESUMING; clear_cur_ui(); + start_print_time(); - #if HAS_MEDIA - card.pauseSDPrint(); - uiCfg.print_state = PAUSING; - #endif if (gCfgItems.from_flash_pic) flash_preview_begin = true; else default_preview_flg = true; lv_draw_printing(); - SEND_OK_TO_WIFI; } - break; - - case 26: - // Stop print file - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED) || (uiCfg.print_state == REPRINTING)) { - stop_print_time(); - + else if (uiCfg.print_state == REPRINTING) { + uiCfg.print_state = REPRINTED; clear_cur_ui(); - #if HAS_MEDIA - uiCfg.print_state = IDLE; - card.abortFilePrintSoon(); - #endif + start_print_time(); + if (gCfgItems.from_flash_pic) + flash_preview_begin = true; + else + default_preview_flg = true; + lv_draw_printing(); + } + } + send_ok_to_wifi(); + break; - lv_draw_ready_print(); + case 25: + // Pause print file + if (uiCfg.print_state == WORKING) { + stop_print_time(); - SEND_OK_TO_WIFI; - } - break; - - case 27: - // Report print rate - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)|| (uiCfg.print_state == REPRINTING)) { - print_rate = uiCfg.totalSend; - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("M27 %d\r\n"), print_rate); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - } - break; + clear_cur_ui(); - case 28: - // Begin to transfer file to filesys - if (uiCfg.print_state == IDLE) { + #if HAS_MEDIA + card.pauseSDPrint(); + uiCfg.print_state = PAUSING; + #endif + if (gCfgItems.from_flash_pic) + flash_preview_begin = true; + else + default_preview_flg = true; + lv_draw_printing(); + send_ok_to_wifi(); + } + break; - int index = 0; - while (tmpStr[index] == ' ') index++; + case 26: + // Stop print file + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED || uiCfg.print_state == REPRINTING) { + stop_print_time(); - if (strstr_P((char *)&tmpStr[index], PSTR(".g")) || strstr_P((char *)&tmpStr[index], PSTR(".G"))) { - strcpy((char *)file_writer.saveFileName, (char *)&tmpStr[index]); + clear_cur_ui(); + #if HAS_MEDIA + uiCfg.print_state = IDLE; + card.abortFilePrintSoon(); + #endif - if (gCfgItems.fileSysType == FILE_SYS_SD) { - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("%s"), file_writer.saveFileName); - } - else if (gCfgItems.fileSysType == FILE_SYS_USB) { - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("%s"), (char *)file_writer.saveFileName); - } - mount_file_sys(gCfgItems.fileSysType); + lv_draw_ready_print(); - #if HAS_MEDIA - char *cur_name = strrchr(list_file.file_name[sel_id], '/'); - card.openFileWrite(cur_name); - if (card.isFileOpen()) { - ZERO(file_writer.saveFileName); - strcpy((char *)file_writer.saveFileName, (char *)&tmpStr[index]); - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("Writing to file: %s\r\n"), (char *)file_writer.saveFileName); - wifi_ret_ack(); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - wifi_link_state = WIFI_WAIT_TRANS_START; - } - else { - wifi_link_state = WIFI_CONNECTED; - clear_cur_ui(); - lv_draw_dialog(DIALOG_TRANSFER_NO_DEVICE); - } - #endif - } - } - break; + send_ok_to_wifi(); + } + break; - case 105: - case 991: + case 27: + // Report print rate + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED|| uiCfg.print_state == REPRINTING) { + print_rate = uiCfg.totalSend; ZERO(tempBuf); - if (cmd_value == 105) { + sprintf_P((char *)tempBuf, PSTR("M27 %d\r\n"), print_rate); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + } + break; - SEND_OK_TO_WIFI; + case 28: + // Begin to transfer file to filesys + if (uiCfg.print_state == IDLE) { - char *outBuf = (char *)tempBuf; - char tbuf[34]; + int index = 0; + while (mStr[index] == ' ') index++; - sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); + if (strstr_P(&mStr[index], PSTR(".g")) || strstr_P(&mStr[index], PSTR(".G"))) { + strcpy((char *)file_writer.saveFileName, &mStr[index]); - const int tlen = strlen(tbuf); - sprintf_P(outBuf, PSTR("T:%s"), tbuf); - outBuf += 2 + tlen; + if (gCfgItems.fileSysType == FILE_SYS_SD) { + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("%s"), file_writer.saveFileName); + } + else if (gCfgItems.fileSysType == FILE_SYS_USB) { + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("%s"), (char *)file_writer.saveFileName); + } + mount_file_sys(gCfgItems.fileSysType); - strcpy_P(outBuf, PSTR(" B:")); - outBuf += 3; - #if HAS_HEATED_BED - sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegBed(), thermalManager.degTargetBed()); - #else - strcpy_P(outBuf, PSTR("0 /0")); - #endif - outBuf += 4; - - strcat_P(outBuf, PSTR(" T0:")); - strcat(outBuf, tbuf); - outBuf += 4 + tlen; - - strcat_P(outBuf, PSTR(" T1:")); - outBuf += 4; - #if HAS_MULTI_HOTEND - sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); - #else - strcpy_P(outBuf, PSTR("0 /0")); + #if HAS_MEDIA + char *cur_name = strrchr(list_file.file_name[sel_id], '/'); + card.openFileWrite(cur_name); + if (card.isFileOpen()) { + ZERO(file_writer.saveFileName); + strcpy((char *)file_writer.saveFileName, &mStr[index]); + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("Writing to file: %s\r\n"), (char *)file_writer.saveFileName); + wifi_ret_ack(); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + wifi_link_state = WIFI_WAIT_TRANS_START; + } + else { + wifi_link_state = WIFI_CONNECTED; + clear_cur_ui(); + lv_draw_dialog(DIALOG_TRANSFER_NO_DEVICE); + } #endif - outBuf += 4; - - strcat_P(outBuf, PSTR(" @:0 B@:0\r\n")); - } - else { - sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), - thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), - TERN0(HAS_HEATED_BED, thermalManager.wholeDegBed()), - TERN0(HAS_HEATED_BED, thermalManager.degTargetBed()), - thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), - TERN0(HAS_MULTI_HOTEND, thermalManager.wholeDegHotend(1)), - TERN0(HAS_MULTI_HOTEND, thermalManager.degTargetHotend(1)) - ); } + } + break; - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - queue.enqueue_one(F("M105")); - break; + case 105: + case 991: + ZERO(tempBuf); + if (cmd_value == 105) { + + send_ok_to_wifi(); + + char *outBuf = (char *)tempBuf; + char tbuf[34]; + + sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); + + const int tlen = strlen(tbuf); + sprintf_P(outBuf, PSTR("T:%s"), tbuf); + outBuf += 2 + tlen; + + strcpy_P(outBuf, PSTR(" B:")); + outBuf += 3; + #if HAS_HEATED_BED + sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegBed(), thermalManager.degTargetBed()); + #else + strcpy_P(outBuf, PSTR("0 /0")); + #endif + outBuf += 4; + + strcat_P(outBuf, PSTR(" T0:")); + strcat(outBuf, tbuf); + outBuf += 4 + tlen; + + strcat_P(outBuf, PSTR(" T1:")); + outBuf += 4; + #if HAS_MULTI_HOTEND + sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); + #else + strcpy_P(outBuf, PSTR("0 /0")); + #endif + outBuf += 4; + + strcat_P(outBuf, PSTR(" @:0 B@:0\r\n")); + } + else { + sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), + TERN0(HAS_HEATED_BED, thermalManager.wholeDegBed()), + TERN0(HAS_HEATED_BED, thermalManager.degTargetBed()), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), + TERN0(HAS_MULTI_HOTEND, thermalManager.wholeDegHotend(1)), + TERN0(HAS_MULTI_HOTEND, thermalManager.degTargetHotend(1)) + ); + } - case 992: - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)) { - ZERO(tempBuf); - sprintf_P((char *)tempBuf, PSTR("M992 %d%d:%d%d:%d%d\r\n"), print_time.hours/10, print_time.hours%10, print_time.minutes/10, print_time.minutes%10, print_time.seconds/10, print_time.seconds%10); - wifi_ret_ack(); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - } - break; + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + queue.enqueue_one(F("M105")); + break; - case 994: - if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)) { - ZERO(tempBuf); - if (strlen((char *)list_file.file_name[sel_id]) > (100 - 1)) return; - sprintf_P((char *)tempBuf, PSTR("M994 %s;%d\n"), list_file.file_name[sel_id], (int)gCfgItems.curFilesize); - wifi_ret_ack(); - send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); - } - break; + case 992: + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED) { + ZERO(tempBuf); + sprintf_P((char *)tempBuf, PSTR("M992 %d%d:%d%d:%d%d\r\n"), print_time.hours/10, print_time.hours%10, print_time.minutes/10, print_time.minutes%10, print_time.seconds/10, print_time.seconds%10); + wifi_ret_ack(); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + } + break; - case 997: - if (uiCfg.print_state == IDLE) { + case 994: + if (uiCfg.print_state == WORKING || uiCfg.print_state == PAUSED) { + ZERO(tempBuf); + if (strlen((char *)list_file.file_name[sel_id]) > (100 - 1)) return; + sprintf_P((char *)tempBuf, PSTR("M994 %s;%d\n"), list_file.file_name[sel_id], (int)gCfgItems.curFilesize); + wifi_ret_ack(); + send_to_wifi((uint8_t *)tempBuf, strlen((char *)tempBuf)); + } + break; + + case 997: + #define SENDIDLE "M997 IDLE\r\n" + #define SENDPRINTING "M997 PRINTING\r\n" + #define SENDPAUSE "M997 PAUSE\r\n" + switch (uiCfg.print_state) { + default: break; + case IDLE: wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 IDLE\r\n", strlen("M997 IDLE\r\n")); - } - else if (uiCfg.print_state == WORKING) { + send_to_wifi((uint8_t *)SENDIDLE, strlen(SENDIDLE)); + break; + case WORKING: wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 PRINTING\r\n", strlen("M997 PRINTING\r\n")); - } - else if (uiCfg.print_state == PAUSED) { + send_to_wifi((uint8_t *)SENDPRINTING, strlen(SENDPRINTING)); + break; + case PAUSED: wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 PAUSE\r\n", strlen("M997 PAUSE\r\n")); - } - else if (uiCfg.print_state == REPRINTING) { + send_to_wifi((uint8_t *)SENDPAUSE, strlen(SENDPAUSE)); + break; + case REPRINTING: wifi_ret_ack(); - send_to_wifi((uint8_t *)"M997 PAUSE\r\n", strlen("M997 PAUSE\r\n")); - } - if (!uiCfg.command_send) get_wifi_list_command_send(); - break; + send_to_wifi((uint8_t *)SENDPAUSE, strlen(SENDPAUSE)); + break; + } + if (!uiCfg.command_send) get_wifi_list_command_send(); + break; - case 998: - if (uiCfg.print_state == IDLE) { - const int v = atoi((char *)tmpStr); - if (v == 0 || v == 1) set_cur_file_sys(v); - wifi_ret_ack(); - } - break; + case 998: + if (uiCfg.print_state == IDLE) { + const int v = atoi(mStr); + if (v == 0 || v == 1) set_cur_file_sys(v); + wifi_ret_ack(); + } + break; - case 115: - ZERO(tempBuf); - SEND_OK_TO_WIFI; - send_to_wifi((uint8_t *)"FIRMWARE_NAME:Robin_nano\r\n", strlen("FIRMWARE_NAME:Robin_nano\r\n")); - break; - - default: - strcat_P((char *)cmd_line, PSTR("\n")); - - if (espGcodeFifo.wait_tick > 5) { - const uint32_t left = espGcodeFifo.r > espGcodeFifo.w - ? espGcodeFifo.r - espGcodeFifo.w - 1 - : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; - - if (left >= strlen((const char *)cmd_line)) { - for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { - espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; - espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - } - if (left - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) - SEND_OK_TO_WIFI; - else - need_ok_later = true; + case 115: + ZERO(tempBuf); + send_ok_to_wifi(); + #define SENDFW "FIRMWARE_NAME:Robin_nano\r\n" + send_to_wifi((uint8_t *)SENDFW, strlen(SENDFW)); + break; + + default: + strcat_P((char *)cmd_line, PSTR("\n")); + + if (espGcodeFifo.wait_tick > 5) { + uint32_t left = espGcodeFifo.r - espGcodeFifo.w - 1; + if (espGcodeFifo.r > espGcodeFifo.w) left += WIFI_GCODE_BUFFER_SIZE; + + if (left >= strlen((const char *)cmd_line)) { + for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { + espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index]; + espGcodeFifo.w = (espGcodeFifo.w + 1) % (WIFI_GCODE_BUFFER_SIZE); } + if (left - (WIFI_GCODE_BUFFER_LEAST_SIZE) >= strlen((const char *)cmd_line)) + send_ok_to_wifi(); + else + need_ok_later = true; } - break; - } + } + break; } - else { - strcat_P((char *)cmd_line, PSTR("\n")); + } + else { + // Add another linefeed to the command, terminate with null + strcat_P((char *)cmd_line, PSTR("\n")); - if (espGcodeFifo.wait_tick > 5) { - const uint32_t left_g = espGcodeFifo.r > espGcodeFifo.w - ? espGcodeFifo.r - espGcodeFifo.w - 1 - : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; + if (espGcodeFifo.wait_tick > 5) { + uint32_t left_g = espGcodeFifo.r - espGcodeFifo.w - 1; + if (espGcodeFifo.r > espGcodeFifo.w) left_g += WIFI_GCODE_BUFFER_SIZE; - if (left_g >= strlen((const char *)cmd_line)) { - for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { - espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; - espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - } - if (left_g - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) - SEND_OK_TO_WIFI; - else - need_ok_later = true; + if (left_g >= strlen((char * const)cmd_line)) { + for (uint32_t index = 0; index < strlen((char * const)cmd_line); index++) { + espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index]; + espGcodeFifo.w = (espGcodeFifo.w + 1) % (WIFI_GCODE_BUFFER_SIZE); } + if (left_g - (WIFI_GCODE_BUFFER_LEAST_SIZE) >= strlen((char * const)cmd_line)) + send_ok_to_wifi(); + else + need_ok_later = true; } } } @@ -1288,7 +1309,7 @@ void get_wifi_list_command_send() { raw_send_to_wifi(cmd_wifi_list, COUNT(cmd_wifi_list)); } -static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { +static void net_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { int wifiNameLen, wifiKeyLen, hostLen, id_len, ver_len; if (msgLen <= 0) return; @@ -1323,7 +1344,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { } } - cloud_para.state =msg[10 + wifiNameLen + wifiKeyLen]; + cloud_para.state = msg[10 + wifiNameLen + wifiKeyLen]; hostLen = msg[11 + wifiNameLen + wifiKeyLen]; if (cloud_para.state) { if (hostLen < 96) { @@ -1363,7 +1384,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { } } -static void wifi_list_msg_handle(uint8_t * msg, uint16_t msgLen) { +static void wifi_list_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { int wifiNameLen,wifiMsgIdex = 1; int8_t wifi_name_is_same = 0; int8_t i, j; @@ -1422,16 +1443,15 @@ static void wifi_list_msg_handle(uint8_t * msg, uint16_t msgLen) { } } -static void gcode_msg_handle(uint8_t * msg, uint16_t msgLen) { +static void gcode_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { uint8_t gcodeBuf[100] = { 0 }; - char *index_s, *index_e; if (msgLen <= 0) return; - index_s = (char *)msg; - index_e = (char *)strchr((char *)msg, '\n'); + char *index_s = (char *)msg, + *index_e = strchr((char *)msg, '\n'); if (*msg == 'N') { - index_s = (char *)strchr((char *)msg, ' '); + index_s = strchr((char *)msg, ' '); while (*index_s == ' ') index_s++; } while ((index_e != 0) && ((int)index_s < (int)index_e)) { @@ -1442,7 +1462,7 @@ static void gcode_msg_handle(uint8_t * msg, uint16_t msgLen) { } while ((*index_e == '\r') || (*index_e == '\n')) index_e++; index_s = index_e; - index_e = (char *)strchr(index_s, '\n'); + index_e = strchr(index_s, '\n'); } } @@ -1489,8 +1509,8 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { COPY(source, FileName_unicode); } -static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { - uint8_t fileNameLen = *msg; +static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { + const uint8_t fileNameLen = *msg; if (msgLen != fileNameLen + 5) return; @@ -1572,8 +1592,8 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { #define FRAG_MASK ~_BV32(31) -static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { - uint32_t frag = *((uint32_t *)msg); +static void file_fragment_msg_handle(const uint8_t * const msg, const uint16_t msgLen) { + const uint32_t frag = *((uint32_t *)msg); if ((frag & FRAG_MASK) != (uint32_t)(lastFragment + 1)) { ZERO(public_buf); file_writer.write_index = 0; @@ -1784,7 +1804,8 @@ void stopEspTransfer() { W25QXX.init(SPI_QUARTER_SPEED); - TERN_(HAS_TFT_LVGL_UI_SPI, SPI_TFT.spi_init(SPI_FULL_SPEED)); + // ?? Workaround for SPI / Servo issues ?? + TERN_(HAS_TFT_LVGL_UI_SPI, SPI_TFT.spiInit(SPI_FULL_SPEED)); TERN_(HAS_SERVOS, servo_init()); TERN_(HAS_Z_SERVO_PROBE, probe.servo_probe_init()); @@ -1849,7 +1870,7 @@ void wifi_rcv_handle() { } if (need_ok_later && !queue.ring_buffer.full()) { need_ok_later = false; - send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")); + send_ok_to_wifi(); } } @@ -1879,7 +1900,7 @@ void wifi_rcv_handle() { if (wifiTransError.flag == 0x1) { wifiTransError.now_tick = getWifiTick(); - if (getWifiTickDiff(wifiTransError.start_tick, wifiTransError.now_tick) > WAIT_ESP_TRANS_TIMEOUT_TICK) { + if (getWifiTickDiff(wifiTransError.start_tick, wifiTransError.now_tick) > (WAIT_ESP_TRANS_TIMEOUT_TICK)) { wifiTransError.flag = 0; WIFI_IO1_RESET(); } @@ -1999,7 +2020,7 @@ void get_wifi_commands() { char wifi_char = espGcodeFifo.Buffer[espGcodeFifo.r]; - espGcodeFifo.r = (espGcodeFifo.r + 1) % WIFI_GCODE_BUFFER_SIZE; + espGcodeFifo.r = (espGcodeFifo.r + 1) % (WIFI_GCODE_BUFFER_SIZE); /** * If the character ends the line diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.h b/Marlin/src/lcd/extui/mks_ui/wifi_module.h index 0f594c764342..851e85c512a0 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.h +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.h @@ -179,14 +179,14 @@ extern CLOUD_PARA cloud_para; extern WIFI_GCODE_BUFFER espGcodeFifo; -uint32_t getWifiTick(); -uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick); +millis_t getWifiTick(); +millis_t getWifiTickDiff(const millis_t lastTick, const millis_t curTick); void mks_esp_wifi_init(); extern int cfg_cloud_flag; -int send_to_wifi(uint8_t *buf, int len); +int send_to_wifi(uint8_t * const buf, const int len); void wifi_looping(); -int raw_send_to_wifi(uint8_t *buf, int len); +int raw_send_to_wifi(uint8_t * const buf, const int len); int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len); void get_wifi_list_command_send(); void get_wifi_commands(); diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp index 5517aba7d811..3e1ecf415713 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp @@ -38,10 +38,8 @@ extern SZ_USART_FIFO WifiRxFifo; -extern int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); -extern int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len); void esp_port_begin(uint8_t interrupt); -void wifi_delay(int n); +void wifi_delay(const uint16_t n); #define ARRAY_SIZE(a) sizeof(a) / sizeof((a)[0]) @@ -113,7 +111,7 @@ const char *resultMessages[] = { */ static const uint32_t uploadBaudRates[] = { 460800, 230400, 115200, 74880 }; -signed char IsReady() { +signed char isReady() { return esp_upload.state == upload_idle; } @@ -184,7 +182,7 @@ void putData(uint32_t val, unsigned byteCnt, uint8_t *buf, int ofst) { * -2 - a SLIP escape byte was found but the following byte wasn't available * -3 - a SLIP escape byte was followed by an invalid byte */ -int ReadByte(uint8_t *data, signed char slipDecode) { +int readByte(uint8_t *data, signed char slipDecode) { if (uploadPort_available() == 0) return 0; // At least one byte is available @@ -212,19 +210,19 @@ void _writePacketRaw(const uint8_t *buf, size_t len) { } // Write a byte to the serial port optionally SLIP encoding. Return the number of bytes actually written. -void WriteByteRaw(uint8_t b) { +void writeByteRaw(uint8_t b) { uploadPort_write((const uint8_t *)&b, 1); } // Write a byte to the serial port optionally SLIP encoding. Return the number of bytes actually written. -void WriteByteSlip(const uint8_t b) { +void writeByteSlip(const uint8_t b) { if (b == 0xC0) { - WriteByteRaw(0xDB); - WriteByteRaw(0xDC); + writeByteRaw(0xDB); + writeByteRaw(0xDC); } else if (b == 0xDB) { - WriteByteRaw(0xDB); - WriteByteRaw(0xDD); + writeByteRaw(0xDB); + writeByteRaw(0xDD); } else uploadPort_write((const uint8_t *)&b, 1); @@ -300,7 +298,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, millis_t case body: { // reading the response body int rslt; // retrieve a byte with SLIP decoding - rslt = ReadByte(&c, 1); + rslt = readByte(&c, 1); if (rslt != 1 && rslt != 2) { // some error occurred stat = (rslt == 0 || rslt == -2) ? slipData : slipFrame; @@ -378,19 +376,19 @@ void _writePacket(const uint8_t *data, size_t len) { // 0xC0 and 0xDB replaced by the two-byte sequences {0xDB, 0xDC} and {0xDB, 0xDD} respectively. void writePacket(const uint8_t *hdr, size_t hdrLen, const uint8_t *data, size_t dataLen) { - WriteByteRaw(0xC0); // send the packet start character + writeByteRaw(0xC0); // send the packet start character _writePacket(hdr, hdrLen); // send the header _writePacket(data, dataLen); // send the data block - WriteByteRaw(0xC0); // send the packet end character + writeByteRaw(0xC0); // send the packet end character } // Send a packet to the serial port while performing SLIP framing. The packet data comprises a header and an optional data block. // This is like writePacket except that it does a fast block write for both the header and the main data with no SLIP encoding. Used to send sync commands. void writePacketRaw(const uint8_t *hdr, size_t hdrLen, const uint8_t *data, size_t dataLen) { - WriteByteRaw(0xC0); // send the packet start character + writeByteRaw(0xC0); // send the packet start character _writePacketRaw(hdr, hdrLen); // send the header _writePacketRaw(data, dataLen); // send the data block in raw mode - WriteByteRaw(0xC0); // send the packet end character + writeByteRaw(0xC0); // send the packet end character } // Send a command to the attached device together with the supplied data, if any. @@ -426,7 +424,7 @@ EspUploadResult doCommand(uint8_t op, const uint8_t *data, size_t dataLen, uint3 // Send a synchronising packet to the serial port in an attempt to induce // the ESP8266 to auto-baud lock on the baud rate. -EspUploadResult Sync(uint16_t timeout) { +EspUploadResult sync(uint16_t timeout) { uint8_t buf[36]; EspUploadResult stat; int i; @@ -561,7 +559,7 @@ void upload_spin() { case connecting: if ((getWifiTickDiff(esp_upload.lastAttemptTime, getWifiTick()) >= connectAttemptInterval) && (getWifiTickDiff(esp_upload.lastResetTime, getWifiTick()) >= 500)) { - EspUploadResult res = Sync(5000); + EspUploadResult res = sync(5000); esp_upload.lastAttemptTime = getWifiTick(); if (res == success) esp_upload.state = erasing; @@ -630,7 +628,7 @@ void upload_spin() { } // Try to upload the given file at the given address -void SendUpdateFile(const char *file, uint32_t address) { +void sendUpdateFile(const char *file, uint32_t address) { const char * const fname = card.diveToFile(false, update_curDir, ESP_FIRMWARE_FILE); if (!update_file.open(update_curDir, fname, O_READ)) return; @@ -648,7 +646,7 @@ void SendUpdateFile(const char *file, uint32_t address) { static const uint32_t FirmwareAddress = 0x00000000, WebFilesAddress = 0x00100000; -void ResetWiFiForUpload(int begin_or_end) { +void resetWiFiForUpload(int begin_or_end) { //#if 0 uint32_t start = getWifiTick(); @@ -668,12 +666,12 @@ void ResetWiFiForUpload(int begin_or_end) { int32_t wifi_upload(int type) { esp_upload.retriesPerBaudRate = 9; - ResetWiFiForUpload(0); + resetWiFiForUpload(0); switch (type) { - case 0: SendUpdateFile(ESP_FIRMWARE_FILE, FirmwareAddress); break; - case 1: SendUpdateFile(ESP_WEB_FIRMWARE_FILE, FirmwareAddress); break; - case 2: SendUpdateFile(ESP_WEB_FILE, WebFilesAddress); break; + case 0: sendUpdateFile(ESP_FIRMWARE_FILE, FirmwareAddress); break; + case 1: sendUpdateFile(ESP_WEB_FIRMWARE_FILE, FirmwareAddress); break; + case 2: sendUpdateFile(ESP_WEB_FILE, WebFilesAddress); break; default: return -1; } @@ -682,7 +680,7 @@ int32_t wifi_upload(int type) { hal.watchdog_refresh(); } - ResetWiFiForUpload(1); + resetWiFiForUpload(1); return esp_upload.uploadResult == success ? 0 : -1; } diff --git a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp index 0e84fd33cf4f..75bcf6ad9db6 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp @@ -41,7 +41,7 @@ namespace ExtUI { void onMediaInserted() {} void onMediaError() {} void onMediaRemoved() {} - void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {} void onPrintTimerStarted() {} void onPrintTimerPaused() {} void onPrintTimerStopped() {} @@ -79,20 +79,22 @@ namespace ExtUI { // Called after loading or resetting stored settings } - void onSettingsStored(bool success) { + void onSettingsStored(const bool success) { // Called after the entire EEPROM has been written, // whether successful or not. } - void onSettingsLoaded(bool success) { + void onSettingsLoaded(const bool success) { // Called after the entire EEPROM has been read, // whether successful or not. } - #if HAS_MESH + #if HAS_LEVELING void onLevelingStart() {} void onLevelingDone() {} + #endif + #if HAS_MESH void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { // Called when any mesh points are updated } @@ -103,6 +105,12 @@ namespace ExtUI { #endif #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff) { + // Called when power-loss is enabled/disabled + } + void onPowerLoss() { + // Called when power-loss state is detected + } void onPowerLossResume() { // Called on resume from power-loss } diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index ce45332e28d4..14a7f9996c0b 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -139,10 +139,10 @@ bool NextionTFT::ReadTFTCommand() { #if NEXDEBUG(N_SOME) uint8_t req = atoi(&nextion_command[1]); if (req > 7 && req != 20) - DEBUG_ECHOLNPGM( "> ", AS_CHAR(nextion_command[0]), - "\n> ", AS_CHAR(nextion_command[1]), - "\n> ", AS_CHAR(nextion_command[2]), - "\n> ", AS_CHAR(nextion_command[3]), + DEBUG_ECHOLNPGM( "> ", C(nextion_command[0]), + "\n> ", C(nextion_command[1]), + "\n> ", C(nextion_command[2]), + "\n> ", C(nextion_command[3]), "\nprinter_state:", printer_state); #endif } @@ -445,9 +445,9 @@ void NextionTFT::PanelInfo(uint8_t req) { #elif Z_HOME_TO_MAX SEND_VALasTXT("z2", READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); #endif - #if HAS_Z2_MIN + #if USE_Z2_MIN SEND_VALasTXT("z2", READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); - #elif HAS_Z2_MAX + #elif USE_Z2_MAX SEND_VALasTXT("z2", READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); #endif #if HAS_BED_PROBE diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 678d6dd1e03b..c0ea3461a311 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -393,8 +393,8 @@ namespace ExtUI { // bool canMove(const axis_t axis) { switch (axis) { - #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING) - case X: return !axis_should_home(X_AXIS); + #if ANY(IS_KINEMATIC, NO_MOTION_BEFORE_HOMING) + OPTCODE(HAS_X_AXIS, case X: return !axis_should_home(X_AXIS)) OPTCODE(HAS_Y_AXIS, case Y: return !axis_should_home(Y_AXIS)) OPTCODE(HAS_Z_AXIS, case Z: return !axis_should_home(Z_AXIS)) #else @@ -810,7 +810,9 @@ namespace ExtUI { bool babystepAxis_steps(const int16_t steps, const axis_t axis) { switch (axis) { #if ENABLED(BABYSTEP_XY) - case X: babystep.add_steps(X_AXIS, steps); break; + #if HAS_X_AXIS + case X: babystep.add_steps(X_AXIS, steps); break; + #endif #if HAS_Y_AXIS case Y: babystep.add_steps(Y_AXIS, steps); break; #endif @@ -855,7 +857,7 @@ namespace ExtUI { if (e != active_extruder) hotend_offset[e][axis] += mm; - normalizeNozzleOffset(X); + TERN_(HAS_X_AXIS, normalizeNozzleOffset(X)); TERN_(HAS_Y_AXIS, normalizeNozzleOffset(Y)); TERN_(HAS_Z_AXIS, normalizeNozzleOffset(Z)); } @@ -954,7 +956,7 @@ namespace ExtUI { bool getLevelingActive() { return planner.leveling_active; } void setLevelingActive(const bool state) { set_bed_leveling_enabled(state); } - bool getMeshValid() { return leveling_is_valid(); } + bool getLevelingIsValid() { return leveling_is_valid(); } #if HAS_MESH @@ -963,7 +965,7 @@ namespace ExtUI { void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) { if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) { bedlevel.z_values[pos.x][pos.y] = zoff; - TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate()); + TERN_(ABL_BILINEAR_SUBDIVISION, bedlevel.refresh_bed_level()); } } @@ -974,14 +976,14 @@ namespace ExtUI { y_target = MESH_MIN_Y + pos.y * (MESH_Y_DIST); if (x_target != current_position.x || y_target != current_position.y) { // If moving across bed, raise nozzle to safe height over bed - feedrate_mm_s = Z_PROBE_FEEDRATE_FAST; + feedrate_mm_s = MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST); destination.set(current_position.x, current_position.y, Z_CLEARANCE_BETWEEN_PROBES); prepare_line_to_destination(); - feedrate_mm_s = XY_PROBE_FEEDRATE; + feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S; destination.set(x_target, y_target); prepare_line_to_destination(); } - feedrate_mm_s = Z_PROBE_FEEDRATE_FAST; + feedrate_mm_s = MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST); destination.z = z; prepare_line_to_destination(); #else diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index c584745fa2c3..a250180393c1 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -206,7 +206,7 @@ namespace ExtUI { // Global leveling state, events bool getLevelingActive(); void setLevelingActive(const bool); - bool getMeshValid(); + bool getLevelingIsValid(); void onLevelingStart(); void onLevelingDone(); #if HAS_MESH @@ -459,7 +459,7 @@ namespace ExtUI { void onMediaInserted(); void onMediaError(); void onMediaRemoved(); - void onPlayTone(const uint16_t frequency, const uint16_t duration); + void onPlayTone(const uint16_t frequency, const uint16_t duration=0); void onPrinterKilled(FSTR_P const error, FSTR_P const component); void onPrintTimerStarted(); void onPrintTimerPaused(); @@ -478,9 +478,11 @@ namespace ExtUI { void onStoreSettings(char *); void onLoadSettings(const char *); void onPostprocessSettings(); - void onSettingsStored(bool success); - void onSettingsLoaded(bool success); + void onSettingsStored(const bool success); + void onSettingsLoaded(const bool success); #if ENABLED(POWER_LOSS_RECOVERY) + void onSetPowerLoss(const bool onoff); + void onPowerLoss(); void onPowerLossResume(); #endif #if HAS_PID_HEATING diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index 1d4801278ce2..e9d89c685f1d 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -41,7 +41,7 @@ namespace Language_an { LSTR MSG_MEDIA_INSERTED = _UxGT("Tarcheta mesa"); LSTR MSG_MEDIA_REMOVED = _UxGT("Tarcheta sacada"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Menu prencipal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu prencipal"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Inicio automatico"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Amortar motors"); LSTR MSG_HOMING = _UxGT("Orichen"); diff --git a/Marlin/src/lcd/language/language_bg.h b/Marlin/src/lcd/language/language_bg.h index 312ada7b10cd..74e31ab77d3f 100644 --- a/Marlin/src/lcd/language/language_bg.h +++ b/Marlin/src/lcd/language/language_bg.h @@ -39,7 +39,7 @@ namespace Language_bg { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Готов."); LSTR MSG_MEDIA_INSERTED = _UxGT("Картата е поставена"); LSTR MSG_MEDIA_REMOVED = _UxGT("Картата е извадена"); - LSTR MSG_MAIN = _UxGT("Меню"); + LSTR MSG_MAIN_MENU = _UxGT("Меню"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Изкл. двигатели"); LSTR MSG_AUTO_HOME = _UxGT("Паркиране"); diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index 13b5d70837ad..c9fb734a2aee 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -37,7 +37,7 @@ namespace Language_ca { LSTR MSG_MEDIA_INSERTED = _UxGT("Targeta detectada."); LSTR MSG_MEDIA_REMOVED = _UxGT("Targeta extreta."); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); - LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menú principal"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Inici automatic"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Desactiva motors"); LSTR MSG_DEBUG_MENU = _UxGT("Menu de depuracio"); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index bb930eb7846c..51b302608d5d 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -54,7 +54,7 @@ namespace Language_cz { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Chyba USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znaku LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstopy"); - LSTR MSG_MAIN = _UxGT("Hlavní nabídka"); + LSTR MSG_MAIN_MENU = _UxGT("Hlavní nabídka"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Další nastavení"); LSTR MSG_CONFIGURATION = _UxGT("Konfigurace"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); @@ -334,7 +334,7 @@ namespace Language_cz { LSTR MSG_STOP_PRINT = _UxGT("Zastavit tisk"); LSTR MSG_PRINTING_OBJECT = _UxGT("Tisk objektu"); LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušit objekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušit objekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušit objekt {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Obnova výpadku"); LSTR MSG_MEDIA_MENU = _UxGT("Tisknout z SD"); LSTR MSG_NO_MEDIA = _UxGT("Žádná SD karta"); @@ -512,7 +512,7 @@ namespace Language_cz { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Vytáhněte, klikněte"); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponenta ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponenta {"); LSTR MSG_MIXER = _UxGT("Mixér"); LSTR MSG_GRADIENT = _UxGT("Přechod"); LSTR MSG_FULL_GRADIENT = _UxGT("Celý přechod"); diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index 56c53b84fd51..a668e8f3139e 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -39,7 +39,7 @@ namespace Language_da { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" er klar"); LSTR MSG_MEDIA_INSERTED = _UxGT("Kort isat"); LSTR MSG_MEDIA_REMOVED = _UxGT("Kort fjernet"); - LSTR MSG_MAIN = _UxGT("Menu"); + LSTR MSG_MAIN_MENU = _UxGT("Menu"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Slå alle steppere fra"); LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); // G28 LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klik når du er klar"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 09b979b5f78b..4a1828e5704e 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -52,7 +52,7 @@ namespace Language_de { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall überschritten"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopp"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Software-Endstopp"); - LSTR MSG_MAIN = _UxGT("Hauptmenü"); + LSTR MSG_MAIN_MENU = _UxGT("Hauptmenü"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Erw. Einstellungen"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Toolbar Einstellung"); LSTR MSG_OPTION_DISABLED = _UxGT("Option Deaktiviert"); @@ -277,7 +277,7 @@ namespace Language_de { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violett"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Weiß"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); LSTR MSG_LEDS2 = _UxGT("Lichter #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Licht #2 Voreinst."); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Helligkeit"); @@ -461,7 +461,7 @@ namespace Language_de { LSTR MSG_END_LOOPS = _UxGT("Wiederholung beenden"); LSTR MSG_PRINTING_OBJECT = _UxGT("Objekt drucken"); LSTR MSG_CANCEL_OBJECT = _UxGT("Objekt abbrechen"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objekt abbrechen ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objekt abbrechen {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Wiederh. n. Stroma."); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Druckauftrag fortset."); LSTR MSG_MEDIA_MENU = _UxGT("Druck vom Medium"); @@ -692,7 +692,7 @@ namespace Language_de { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Entfernen, klicken"); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponente {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); // equal Farbverlauf LSTR MSG_FULL_GRADIENT = _UxGT("Volle Gradient"); diff --git a/Marlin/src/lcd/language/language_el.h b/Marlin/src/lcd/language/language_el.h index 57af804147c5..978855588d83 100644 --- a/Marlin/src/lcd/language/language_el.h +++ b/Marlin/src/lcd/language/language_el.h @@ -51,7 +51,7 @@ namespace Language_el { LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB αφαιρέθη"); LSTR MSG_MEDIA_USB_FAILED = _UxGT("Αποτυχία εκκίνησης USB"); LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Αποτυχία αρχικοποίησης SD"); - LSTR MSG_MAIN = _UxGT("Αρχική Οθόνη"); + LSTR MSG_MAIN_MENU = _UxGT("Αρχική Οθόνη"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση μοτέρ"); LSTR MSG_AUTO_HOME = _UxGT("Αυτόμ. επαναφορά XYZ"); diff --git a/Marlin/src/lcd/language/language_el_gr.h b/Marlin/src/lcd/language/language_el_gr.h index 08f647f705bb..207cf707bb91 100644 --- a/Marlin/src/lcd/language/language_el_gr.h +++ b/Marlin/src/lcd/language/language_el_gr.h @@ -40,7 +40,7 @@ namespace Language_el_gr { LSTR MSG_MEDIA_INSERTED = _UxGT("Εισαγωγή κάρτας"); LSTR MSG_MEDIA_REMOVED = _UxGT("Αφαίρεση κάρτας"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Βασική Οθόνη"); + LSTR MSG_MAIN_MENU = _UxGT("Βασική Οθόνη"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση βηματιστή"); LSTR MSG_AUTO_HOME = _UxGT("Αυτομ. επαναφορά στο αρχικό σημείο"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 8dab8fcdaec4..ba90de5a5eba 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -30,7 +30,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -67,7 +67,7 @@ namespace Language_en { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - LSTR MSG_MAIN = _UxGT("Main"); + LSTR MSG_MAIN_MENU = _UxGT("Main"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Advanced Settings"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Toolbar Setup"); LSTR MSG_OPTION_DISABLED = _UxGT("Option Disabled"); @@ -107,6 +107,7 @@ namespace Language_en { LSTR MSG_HOME_OFFSET_Y = _UxGT("Home Offset Y"); LSTR MSG_HOME_OFFSET_Z = _UxGT("Home Offset Z"); 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 "); @@ -270,8 +271,8 @@ namespace Language_en { LSTR MSG_MESH_SAVED = _UxGT("Mesh %i Saved"); LSTR MSG_MESH_ACTIVE = _UxGT("Mesh %i active"); LSTR MSG_UBL_NO_STORAGE = _UxGT("No Storage"); - LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: UBL Save"); - LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: UBL Restore"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("UBL Save Error"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("UBL Restore Error"); LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stopped"); LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Step-By-Step UBL"); @@ -295,7 +296,7 @@ namespace Language_en { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); LSTR MSG_SET_LEDS_WHITE = _UxGT("White"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Default"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Channel ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Channel {"); LSTR MSG_LEDS2 = _UxGT("Lights #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Light #2 Presets"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Brightness"); @@ -360,7 +361,7 @@ namespace Language_en { LSTR MSG_LCD_ON = _UxGT("On"); LSTR MSG_LCD_OFF = _UxGT("Off"); LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); - LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Autotune * PID"); LSTR MSG_PID_CYCLE = _UxGT("PID Cycles"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("PID Autotune failed!"); @@ -435,6 +436,7 @@ namespace Language_en { LSTR MSG_DRAW_MIN_Y = _UxGT("Draw Min Y"); LSTR MSG_DRAW_MAX_Y = _UxGT("Draw Max Y"); LSTR MSG_MAX_BELT_LEN = _UxGT("Max Belt Len"); + LSTR MSG_LINEAR_ADVANCE = _UxGT("Linear Advance"); LSTR MSG_ADVANCE_K = _UxGT("Advance K"); LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); @@ -495,7 +497,7 @@ namespace Language_en { LSTR MSG_HOST_START_PRINT = _UxGT("Start Host Print"); LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Print Job"); LSTR MSG_MEDIA_MENU = _UxGT("Print from ") MEDIA_TYPE_EN; LSTR MSG_TURN_OFF = _UxGT("Turn off the printer"); @@ -504,7 +506,7 @@ namespace Language_en { 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_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"); @@ -745,7 +747,7 @@ namespace Language_en { LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Remove and click..."); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Component {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index eb39a8a08940..00a792f89778 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -49,7 +49,7 @@ namespace Language_es { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbordamiento de subllamada"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menú principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Ajustes avanzados"); LSTR MSG_CONFIGURATION = _UxGT("Configuración"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Inicio automático"); @@ -338,7 +338,7 @@ namespace Language_es { LSTR MSG_STOP_PRINT = _UxGT("Detener impresión"); LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimiendo Objeto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Rec. Fallo electrico"); LSTR MSG_MEDIA_MENU = _UxGT("Imprim. desde SD/FD"); LSTR MSG_NO_MEDIA = _UxGT("SD/FD no presente"); @@ -510,7 +510,7 @@ namespace Language_es { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retirar, y pulsar"); LSTR MSG_MIX = _UxGT("Mezcla"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente {"); LSTR MSG_MIXER = _UxGT("Miezclador"); LSTR MSG_GRADIENT = _UxGT("Degradado"); LSTR MSG_FULL_GRADIENT = _UxGT("Degradado Total"); diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index 0c29cdd2aaba..78274dce4349 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -41,7 +41,7 @@ namespace Language_eu { LSTR MSG_BACK = _UxGT("Atzera"); LSTR MSG_MEDIA_INSERTED = _UxGT("Txartela sartuta"); LSTR MSG_MEDIA_REMOVED = _UxGT("Txartela kenduta"); - LSTR MSG_MAIN = _UxGT("Menu nagusia"); + LSTR MSG_MAIN_MENU = _UxGT("Menu nagusia"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto hasiera"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Itzali motoreak"); LSTR MSG_DEBUG_MENU = _UxGT("Arazketa Menua"); diff --git a/Marlin/src/lcd/language/language_fi.h b/Marlin/src/lcd/language/language_fi.h index 300da9b95652..57fc0a7c21b5 100644 --- a/Marlin/src/lcd/language/language_fi.h +++ b/Marlin/src/lcd/language/language_fi.h @@ -39,7 +39,7 @@ namespace Language_fi { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" valmis."); LSTR MSG_MEDIA_INSERTED = _UxGT("Kortti asetettu"); LSTR MSG_MEDIA_REMOVED = _UxGT("Kortti poistettu"); - LSTR MSG_MAIN = _UxGT("Palaa"); + LSTR MSG_MAIN_MENU = _UxGT("Palaa"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Automaatti"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Vapauta moottorit"); LSTR MSG_AUTO_HOME = _UxGT("Aja referenssiin"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 8c2df5845239..f10023680215 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -49,7 +49,7 @@ namespace Language_fr { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Erreur média USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Butées"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Butées SW"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. avancée"); LSTR MSG_CONFIGURATION = _UxGT("Configuration"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Exéc. auto.gcode"); @@ -353,7 +353,7 @@ namespace Language_fr { LSTR MSG_STOP_PRINT = _UxGT("Arrêter impr."); LSTR MSG_PRINTING_OBJECT = _UxGT("Impression objet"); LSTR MSG_CANCEL_OBJECT = _UxGT("Annuler objet"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Récup. coup."); LSTR MSG_MEDIA_MENU = _UxGT("Impression SD"); LSTR MSG_NO_MEDIA = _UxGT("Pas de média"); @@ -540,7 +540,7 @@ namespace Language_fr { LSTR MSG_MMU2_RESETTING = _UxGT("Réinit. MMU..."); LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retrait, click"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante {"); LSTR MSG_MIXER = _UxGT("Mixeur"); LSTR MSG_GRADIENT = _UxGT("Dégradé"); LSTR MSG_FULL_GRADIENT = _UxGT("Dégradé complet"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index 54ae62bac94d..16b5bf2e4f81 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -50,7 +50,7 @@ namespace Language_gl { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbord. Subch."); LSTR MSG_LCD_ENDSTOPS = _UxGT("FinCarro"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("FinCarro SW"); - LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menú principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Axustes avanzados"); LSTR MSG_CONFIGURATION = _UxGT("Configuración"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autoarranque"); @@ -342,7 +342,7 @@ namespace Language_gl { LSTR MSG_STOP_PRINT = _UxGT("Deter impresión"); LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimindo Obxecto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Obxecto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Obxecto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Obxecto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impresión"); LSTR MSG_MEDIA_MENU = _UxGT("Tarxeta SD"); LSTR MSG_NO_MEDIA = _UxGT("Sen tarxeta SD"); @@ -525,7 +525,7 @@ namespace Language_gl { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Expulsar, premer"); LSTR MSG_MIX = _UxGT("Mestura"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Compoñente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Compoñente {"); LSTR MSG_MIXER = _UxGT("Mesturadora"); LSTR MSG_GRADIENT = _UxGT("Degradado"); LSTR MSG_FULL_GRADIENT = _UxGT("Degradado Total"); diff --git a/Marlin/src/lcd/language/language_hr.h b/Marlin/src/lcd/language/language_hr.h index 36eaf78acb1a..c523898a8f8c 100644 --- a/Marlin/src/lcd/language/language_hr.h +++ b/Marlin/src/lcd/language/language_hr.h @@ -40,7 +40,7 @@ namespace Language_hr { LSTR MSG_MEDIA_INSERTED = _UxGT("SD kartica umetnuta"); LSTR MSG_MEDIA_REMOVED = _UxGT("SD kartica uklonjena"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Main"); + LSTR MSG_MAIN_MENU = _UxGT("Main"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto pokretanje"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Ugasi steppere"); LSTR MSG_AUTO_HOME = _UxGT("Automatski homing"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 148a0fb64e26..2400a5434235 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -54,7 +54,7 @@ namespace Language_hu { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Túlfolyás"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Végállás"); // Maximum 8 karakter LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Szoft. végállás"); - LSTR MSG_MAIN = _UxGT(""); + LSTR MSG_MAIN_MENU = _UxGT(""); LSTR MSG_ADVANCED_SETTINGS = _UxGT("További beállítások"); LSTR MSG_CONFIGURATION = _UxGT("Konfiguráció"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Fájl auto. futtatás"); @@ -240,7 +240,7 @@ namespace Language_hu { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Viola"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Fehér"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna {"); LSTR MSG_LEDS2 = _UxGT("LED-ek #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Fény #2 megadott"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Fényerö"); @@ -284,10 +284,10 @@ namespace Language_hu { LSTR MSG_FLOWMETER_SAFETY = _UxGT("Áramlásbiztonság"); LSTR MSG_LASER = _UxGT("Lézer"); LSTR MSG_FAN_SPEED = _UxGT("Hütés sebesség"); - LSTR MSG_FAN_SPEED_N = _UxGT("Hütés sebesség ="); - LSTR MSG_STORED_FAN_N = _UxGT("Tárolt hütés ="); + LSTR MSG_FAN_SPEED_N = _UxGT("Hütés sebesség {"); + LSTR MSG_STORED_FAN_N = _UxGT("Tárolt hütés {"); LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra hütés sebesség"); - LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség ="); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség {"); LSTR MSG_CONTROLLER_FAN = _UxGT("Hütésvezérlés"); LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Alapjárat"); LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Automatikus mód"); @@ -396,7 +396,7 @@ namespace Language_hu { LSTR MSG_END_LOOPS = _UxGT("Hurok ismétlés vége"); LSTR MSG_PRINTING_OBJECT = _UxGT("Objektum nyomtatása"); LSTR MSG_CANCEL_OBJECT = _UxGT("Objektum törlése"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objektum törlése ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objektum törlése {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Kiesés helyreáll."); LSTR MSG_MEDIA_MENU = _UxGT("Nyomtatás tárolóról"); LSTR MSG_NO_MEDIA = _UxGT("Nincs tároló"); @@ -587,7 +587,7 @@ namespace Language_hu { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kidob, kattint"); LSTR MSG_MIX = _UxGT("Kever"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Összetevö ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Összetevö {"); LSTR MSG_MIXER = _UxGT("Keverö"); LSTR MSG_GRADIENT = _UxGT("Színátm."); LSTR MSG_FULL_GRADIENT = _UxGT("Teljes színátm."); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 41786f4d7bdf..f22564e66491 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -30,7 +30,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -62,7 +62,7 @@ namespace Language_it { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Overflow subchiamate"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Finecor."); // Max 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Finecorsa Soft"); - LSTR MSG_MAIN = _UxGT("Menu principale"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principale"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Impostaz. avanzate"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Cnf barra strumenti"); LSTR MSG_OPTION_DISABLED = _UxGT("Opzione disab."); @@ -293,7 +293,7 @@ namespace Language_it { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Viola"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Bianco"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Canale ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Canale {"); LSTR MSG_LEDS2 = _UxGT("Luci #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Presets luce #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità"); @@ -440,6 +440,7 @@ namespace Language_it { LSTR MSG_DRAW_MIN_Y = _UxGT("Min Y area disegno"); LSTR MSG_DRAW_MAX_Y = _UxGT("Max Y area disegno"); LSTR MSG_MAX_BELT_LEN = _UxGT("Lungh.max cinghia"); + LSTR MSG_LINEAR_ADVANCE = _UxGT("Avanzam.Lineare"); LSTR MSG_ADVANCE_K = _UxGT("K Avanzamento"); LSTR MSG_ADVANCE_K_E = _UxGT("K Avanzamento *"); LSTR MSG_CONTRAST = _UxGT("Contrasto LCD"); @@ -498,7 +499,7 @@ namespace Language_it { LSTR MSG_END_LOOPS = _UxGT("Fine cicli di rip."); LSTR MSG_PRINTING_OBJECT = _UxGT("Stampa Oggetto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancella Oggetto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. Oggetto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. Oggetto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da PowerLoss"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Cont.proc.stampa"); LSTR MSG_MEDIA_MENU = _UxGT("Stampa da media"); @@ -734,7 +735,7 @@ namespace Language_it { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Rimuovi, click"); LSTR MSG_MIX = _UxGT("Miscela"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente {"); LSTR MSG_MIXER = _UxGT("Miscelatore"); LSTR MSG_GRADIENT = _UxGT("Gradiente"); LSTR MSG_FULL_GRADIENT = _UxGT("Gradiente pieno"); diff --git a/Marlin/src/lcd/language/language_jp_kana.h b/Marlin/src/lcd/language/language_jp_kana.h index 335d4533daa6..c271ec929361 100644 --- a/Marlin/src/lcd/language/language_jp_kana.h +++ b/Marlin/src/lcd/language/language_jp_kana.h @@ -46,7 +46,7 @@ namespace Language_jp_kana { LSTR MSG_MEDIA_REMOVED = _UxGT("メディアガアリマセン"); // "Card removed" LSTR MSG_RELEASE_MEDIA = _UxGT("メディアノトリダシ"); LSTR MSG_LCD_ENDSTOPS = _UxGT("エンドストップ"); // "Endstops" // Max length 8 characters - LSTR MSG_MAIN = _UxGT("メイン"); // "Main" + LSTR MSG_MAIN_MENU = _UxGT("メイン"); // "Main" LSTR MSG_RUN_AUTO_FILES = _UxGT("ジドウカイシ"); // "Autostart" LSTR MSG_DISABLE_STEPPERS = _UxGT("モーターデンゲン オフ"); // "Disable steppers" LSTR MSG_DEBUG_MENU = _UxGT("デバッグメニュー"); // "Debug Menu" diff --git a/Marlin/src/lcd/language/language_ko_KR.h b/Marlin/src/lcd/language/language_ko_KR.h index 50c73f69e9ae..e52ced2dad6f 100644 --- a/Marlin/src/lcd/language/language_ko_KR.h +++ b/Marlin/src/lcd/language/language_ko_KR.h @@ -39,7 +39,7 @@ namespace Language_ko_KR { LSTR MSG_MEDIA_REMOVED = _UxGT("카드 제거됨"); LSTR MSG_LCD_ENDSTOPS = _UxGT("엔드스탑"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("소프트 엔드스탑"); - LSTR MSG_MAIN = _UxGT("뒤로"); + LSTR MSG_MAIN_MENU = _UxGT("뒤로"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("고급 설정"); LSTR MSG_CONFIGURATION = _UxGT("설정"); LSTR MSG_RUN_AUTO_FILES = _UxGT("자동 시작"); diff --git a/Marlin/src/lcd/language/language_nl.h b/Marlin/src/lcd/language/language_nl.h index 9ad16bcd8c14..a55a95fc5a02 100644 --- a/Marlin/src/lcd/language/language_nl.h +++ b/Marlin/src/lcd/language/language_nl.h @@ -42,7 +42,7 @@ namespace Language_nl { LSTR MSG_MEDIA_INSERTED = _UxGT("Kaart ingestoken"); LSTR MSG_MEDIA_REMOVED = _UxGT("Kaart verwijderd"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Hoofdmenu"); + LSTR MSG_MAIN_MENU = _UxGT("Hoofdmenu"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Motoren uit"); LSTR MSG_DEBUG_MENU = _UxGT("Debug Menu"); // accepted English terms diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index 9dc0ec7cc338..864471ea24ca 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -30,7 +30,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -58,7 +58,7 @@ namespace Language_pl { LSTR MSG_MEDIA_USB_FAILED = _UxGT("Błąd uruchomienia USB"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Krańców."); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Progr. Krańcówki"); - LSTR MSG_MAIN = _UxGT("Menu główne"); + LSTR MSG_MAIN_MENU = _UxGT("Menu główne"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Ustawienie zaawansowane"); LSTR MSG_CONFIGURATION = _UxGT("Konfiguracja"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); @@ -221,7 +221,7 @@ namespace Language_pl { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fioletowy"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Biały"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Domyślny"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanał ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanał {"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jasność"); LSTR MSG_CUSTOM_LEDS = _UxGT("Własne światła"); LSTR MSG_INTENSITY_R = _UxGT("Czerwony"); @@ -330,7 +330,7 @@ namespace Language_pl { LSTR MSG_STOP_PRINT = _UxGT("Stop"); LSTR MSG_PRINTING_OBJECT = _UxGT("Drukowanie obiektu"); LSTR MSG_CANCEL_OBJECT = _UxGT("Anunuj obiekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Anunuj obiekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Anunuj obiekt {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Odzyskiwanie po awarii"); LSTR MSG_MEDIA_MENU = _UxGT("Karta SD"); LSTR MSG_NO_MEDIA = _UxGT("Brak karty"); @@ -474,7 +474,7 @@ namespace Language_pl { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Usuń, kliknij"); LSTR MSG_MIX = _UxGT("Miks"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent {"); LSTR MSG_MIXER = _UxGT("Mikser"); LSTR MSG_FULL_GRADIENT = _UxGT("Pełny gradient"); LSTR MSG_TOGGLE_MIX = _UxGT("Przełacz miks"); diff --git a/Marlin/src/lcd/language/language_pt.h b/Marlin/src/lcd/language/language_pt.h index 0672f2556084..06fe069ee553 100644 --- a/Marlin/src/lcd/language/language_pt.h +++ b/Marlin/src/lcd/language/language_pt.h @@ -40,7 +40,7 @@ namespace Language_pt { LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" pronta."); LSTR MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); LSTR MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_DISABLE_STEPPERS = _UxGT("Desactivar motores"); LSTR MSG_AUTO_HOME = _UxGT("Ir para origem"); LSTR MSG_AUTO_HOME_X = _UxGT("Ir para origem X"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index d52728d10726..b3e9a8f5bb06 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -48,7 +48,7 @@ namespace Language_pt_br { LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB falhou"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Fins de curso"); LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Fins curso"); - LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_MAIN_MENU = _UxGT("Menu principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. Avançada"); LSTR MSG_CONFIGURATION = _UxGT("Configuração"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Início automático"); @@ -293,7 +293,7 @@ namespace Language_pt_br { LSTR MSG_STOP_PRINT = _UxGT("Parar impressão"); LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimindo objeto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impressão"); LSTR MSG_MEDIA_MENU = _UxGT("Imprimir do SD"); LSTR MSG_NO_MEDIA = _UxGT("Sem cartão SD"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index 4eefc11cb9c4..3d537f006a14 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -49,7 +49,7 @@ namespace Language_ro { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Eroare:Subcall Overflow"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - LSTR MSG_MAIN = _UxGT("Principal"); + LSTR MSG_MAIN_MENU = _UxGT("Principal"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Setari Avansate"); LSTR MSG_CONFIGURATION = _UxGT("Configurare"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); @@ -348,7 +348,7 @@ namespace Language_ro { LSTR MSG_STOP_PRINT = _UxGT("Stop Print"); LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Outage Recovery"); LSTR MSG_MEDIA_MENU = _UxGT("Print from Media"); LSTR MSG_NO_MEDIA = _UxGT("No Media"); @@ -532,7 +532,7 @@ namespace Language_ro { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); LSTR MSG_MIX = _UxGT("Mix"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Component {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 03380af15e84..1272ea582e0b 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -58,7 +58,7 @@ namespace Language_ru { #endif LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр. эндстопы"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Эндстопы"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Основное меню"); + LSTR MSG_MAIN_MENU = _UxGT("Основное меню"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Другие настройки"); LSTR MSG_CONFIGURATION = _UxGT("Конфигурация"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); @@ -312,7 +312,7 @@ namespace Language_ru { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Фиолетовый"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Белый"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {"); LSTR MSG_LEDS2 = _UxGT("Свет #2"); #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустановки"); @@ -487,7 +487,7 @@ namespace Language_ru { LSTR MSG_STOP_PRINT = _UxGT("Остановить печать"); LSTR MSG_PRINTING_OBJECT = _UxGT("Печать объекта"); LSTR MSG_CANCEL_OBJECT = _UxGT("Завершить объект"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершить объект ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершить объект {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Восстановение сбоя"); LSTR MSG_MEDIA_MENU = _UxGT("Печать с SD карты"); LSTR MSG_NO_MEDIA = _UxGT("Нет SD карты"); @@ -736,7 +736,7 @@ namespace Language_ru { #else LSTR MSG_MIX = _UxGT("Смешив."); #endif - LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент {"); LSTR MSG_MIXER = _UxGT("Смеситель"); LSTR MSG_GRADIENT = _UxGT("Градиент"); LSTR MSG_FULL_GRADIENT = _UxGT("Полный градиент"); @@ -766,10 +766,10 @@ namespace Language_ru { LSTR MSG_END_Z = _UxGT(" Конец Z"); LSTR MSG_GAMES = _UxGT("Игры"); - LSTR MSG_BRICKOUT = _UxGT("Кирпичи"); - LSTR MSG_INVADERS = _UxGT("Вторжение"); - LSTR MSG_SNAKE = _UxGT("Змейка"); - LSTR MSG_MAZE = _UxGT("Лабиринт"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_BAD_PAGE = _UxGT("Плохой индекс страницы"); @@ -826,7 +826,7 @@ namespace Language_ru { LSTR MSG_TMC_DRIVERS = _UxGT("Драйвера TMC"); LSTR MSG_TMC_CURRENT = _UxGT("Ток двигателей"); LSTR MSG_TMC_HYBRID_THRS = _UxGT("Гибридный режим"); - LSTR MSG_TMC_HOMING_THRS = _UxGT("Режим без эндстопов"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Чувствительность"); LSTR MSG_TMC_STEPPING_MODE = _UxGT("Режим драйвера"); LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("Тихий режим вкл"); @@ -864,7 +864,7 @@ namespace Language_ru { LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Калибровка успешна"); LSTR MSG_CALIBRATION_FAILED = _UxGT("Ошибка калибровки"); - LSTR MSG_DRIVER_BACKWARD = _UxGT(" драйвер назад"); + LSTR MSG_DRIVER_BACKWARD = _UxGT(" драйвер наоборот"); LSTR MSG_SD_CARD = _UxGT("SD Карта"); LSTR MSG_USB_DISK = _UxGT("USB Диск"); @@ -872,4 +872,5 @@ namespace Language_ru { LSTR MSG_SHORT_DAY = _UxGT("д"); // One character only LSTR MSG_SHORT_HOUR = _UxGT("ч"); // One character only LSTR MSG_SHORT_MINUTE = _UxGT("м"); // One character only + LSTR MSG_LINEAR_ADVANCE = _UxGT("Linear Advance"); } diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 024d02b71345..6899acc39863 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -34,7 +34,7 @@ * Substitutions are applied for the following characters when used in menu items titles: * * $ displays an inserted string - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -65,7 +65,7 @@ namespace Language_sk { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Preteč. podprogramu"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znakov LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft. endstopy"); - LSTR MSG_MAIN = _UxGT("Hlavná ponuka"); + LSTR MSG_MAIN_MENU = _UxGT("Hlavná ponuka"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Pokročilé nastav."); LSTR MSG_TOOLBAR_SETUP = _UxGT("Panel nástrojov"); LSTR MSG_OPTION_DISABLED = _UxGT("Možnosť vypnutá"); @@ -294,7 +294,7 @@ namespace Language_sk { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fialová"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Biela"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Obnoviť nastavenie"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál {"); LSTR MSG_LEDS2 = _UxGT("Svetlo #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Predvolby svetla #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jas"); @@ -500,7 +500,7 @@ namespace Language_sk { LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta"); LSTR MSG_PRINTING_OBJECT = _UxGT("Tlačím objekt"); LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť objekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Pokračovať v úlohe"); LSTR MSG_MEDIA_MENU = _UxGT("Vytlačiť z karty"); LSTR MSG_TURN_OFF = _UxGT("Vypnite tlačiareň"); @@ -509,7 +509,7 @@ namespace Language_sk { LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta"); LSTR MSG_PRINTING_OBJECT = _UxGT("Tlačím obj."); LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť obj."); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť obj. ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť obj. {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Pokrač. v úlohe"); LSTR MSG_MEDIA_MENU = _UxGT("Tlač z karty"); LSTR MSG_TURN_OFF = _UxGT("Vypnit. teraz"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index e66de33c221e..e2d08c5c2409 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -51,7 +51,7 @@ namespace Language_sv { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Underanrop överskriden"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Slutstop"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Mjuk slutstopp"); - LSTR MSG_MAIN = _UxGT("Huvud"); + LSTR MSG_MAIN_MENU = _UxGT("Huvud"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Advancerade inställningar"); LSTR MSG_CONFIGURATION = _UxGT("Konfiguration"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostarta Filer"); @@ -233,7 +233,7 @@ namespace Language_sv { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Vitt"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); LSTR MSG_LEDS2 = _UxGT("Ljus #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Ljus #2 Förinställd"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Ljusstyrka"); @@ -381,7 +381,7 @@ namespace Language_sv { LSTR MSG_END_LOOPS = _UxGT("Slut Upprepningsloop"); LSTR MSG_PRINTING_OBJECT = _UxGT("Skriver Objekt"); LSTR MSG_CANCEL_OBJECT = _UxGT("Avbryt Objekt"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Avbryt Objekt ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Avbryt Objekt {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ström Avbrott"); LSTR MSG_MEDIA_MENU = _UxGT("Skriv fråm Media"); LSTR MSG_NO_MEDIA = _UxGT("Inget Media"); @@ -569,7 +569,7 @@ namespace Language_sv { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Ta bort, Klicka"); LSTR MSG_MIX = _UxGT("Mixa"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent {"); LSTR MSG_MIXER = _UxGT("Mixer"); LSTR MSG_GRADIENT = _UxGT("Gradient"); LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); diff --git a/Marlin/src/lcd/language/language_test.h b/Marlin/src/lcd/language/language_test.h index c2ead6920327..f517a8775992 100644 --- a/Marlin/src/lcd/language/language_test.h +++ b/Marlin/src/lcd/language/language_test.h @@ -129,7 +129,7 @@ namespace Language_test { LSTR MSG_PREPARE = _UxGT("UTF8"); LSTR MSG_CONTROL = _UxGT("ASCII"); - LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_MAIN_MENU = _UxGT(".."); LSTR MSG_DISABLE_STEPPERS = STRG_C2_8; LSTR MSG_AUTO_HOME = STRG_C2_9; LSTR MSG_SET_HOME_OFFSETS = STRG_C2_a; @@ -139,7 +139,7 @@ namespace Language_test { LSTR MSG_SWITCH_PS_OFF = STRG_C3_a; LSTR MSG_MOVE_AXIS = STRG_C3_b; - LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_MAIN_MENU = STRG_OKTAL_2; LSTR MSG_TEMPERATURE = STRG_OKTAL_3; LSTR MSG_MOTION = STRG_OKTAL_4; LSTR MSG_FILAMENT = STRG_OKTAL_5; @@ -166,7 +166,7 @@ namespace Language_test { LSTR MSG_PREPARE = _UxGT("UTF8"); LSTR MSG_CONTROL = _UxGT("ASCII"); - LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_MAIN_MENU = _UxGT(".."); LSTR MSG_DISABLE_STEPPERS = STRG_D0_8; LSTR MSG_AUTO_HOME = STRG_D0_9; LSTR MSG_SET_HOME_OFFSETS = STRG_D0_a; @@ -176,7 +176,7 @@ namespace Language_test { LSTR MSG_SWITCH_PS_OFF = STRG_D1_a; LSTR MSG_MOVE_AXIS = STRG_D1_b; - LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_MAIN_MENU = STRG_OKTAL_2; LSTR MSG_TEMPERATURE = STRG_OKTAL_3; LSTR MSG_MOTION = STRG_OKTAL_4; LSTR MSG_FILAMENT = STRG_OKTAL_5; @@ -202,7 +202,7 @@ namespace Language_test { LSTR MSG_PREPARE = _UxGT("UTF8"); LSTR MSG_CONTROL = _UxGT("ASCII"); - LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_MAIN_MENU = _UxGT(".."); LSTR MSG_DISABLE_STEPPERS = STRG_E382_8; LSTR MSG_AUTO_HOME = STRG_E382_9; LSTR MSG_SET_HOME_OFFSETS = STRG_E382_a; @@ -212,7 +212,7 @@ namespace Language_test { LSTR MSG_SWITCH_PS_OFF = STRG_E383_a; LSTR MSG_MOVE_AXIS = STRG_E383_b; - LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_MAIN_MENU = STRG_OKTAL_2; LSTR MSG_TEMPERATURE = STRG_OKTAL_3; LSTR MSG_MOTION = STRG_OKTAL_4; LSTR MSG_FILAMENT = STRG_OKTAL_5; diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index ca6a38142caa..5fc78758d4f1 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -55,7 +55,7 @@ namespace Language_tr { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Yazılımsal Endstops"); - LSTR MSG_MAIN = _UxGT("Ana"); + LSTR MSG_MAIN_MENU = _UxGT("Ana"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Gelişmiş Ayarlar"); LSTR MSG_TOOLBAR_SETUP = _UxGT("Araç Çubuğu Kurulumu"); LSTR MSG_OPTION_DISABLED = _UxGT("Seçenek Devre Dışı"); @@ -280,7 +280,7 @@ namespace Language_tr { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Menekşe"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Beyaz"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Varsayılan"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); LSTR MSG_LEDS2 = _UxGT("Işıklar #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Işık #2 Ön Ayarları"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Parlaklık"); @@ -479,7 +479,7 @@ namespace Language_tr { LSTR MSG_HOST_START_PRINT = _UxGT("Host Baskıyı başlat"); LSTR MSG_PRINTING_OBJECT = _UxGT("Yazdırma Nesnesi"); LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi İptal Et"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Yazdırmaya Devam Et"); LSTR MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır"); LSTR MSG_TURN_OFF = _UxGT("Yazıcıyı kapat"); @@ -488,7 +488,7 @@ namespace Language_tr { LSTR MSG_HOST_START_PRINT = _UxGT("Host Başlatma"); LSTR MSG_PRINTING_OBJECT = _UxGT("Nesneyi Yazdır"); LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi İptal Et"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et {"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("İşe Devam Et"); LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Yazdır"); LSTR MSG_TURN_OFF = _UxGT("Şimdi kapat"); @@ -720,7 +720,7 @@ namespace Language_tr { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kaldır, tıkla"); LSTR MSG_MIX = _UxGT("Karışım"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("Bileşen ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Bileşen {"); LSTR MSG_MIXER = _UxGT("Karıştırıcı"); LSTR MSG_GRADIENT = _UxGT("Gradyan"); LSTR MSG_FULL_GRADIENT = _UxGT("Tam Gradyan"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 71a5c4ccd6d1..2db94dba86d8 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -60,7 +60,7 @@ namespace Language_uk { LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр.кінцевики"); #endif LSTR MSG_LCD_ENDSTOPS = _UxGT("Кінцевик"); // Max length 8 characters - LSTR MSG_MAIN = _UxGT("Основне меню"); + LSTR MSG_MAIN_MENU = _UxGT("Основне меню"); LSTR MSG_ADVANCED_SETTINGS = _UxGT("Інші налаштування"); LSTR MSG_CONFIGURATION = _UxGT("Конфігурація"); LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); @@ -313,7 +313,7 @@ namespace Language_uk { LSTR MSG_SET_LEDS_VIOLET = _UxGT("Фіолетовий"); LSTR MSG_SET_LEDS_WHITE = _UxGT("Білий"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням"); - LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); + LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {"); LSTR MSG_LEDS2 = _UxGT("Світло #2"); #if LCD_WIDTH > 21 || HAS_DWIN_E3V2 LSTR MSG_NEO2_PRESETS = _UxGT("Передустановка світла #2"); @@ -507,7 +507,7 @@ namespace Language_uk { LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops"); // needs translation LSTR MSG_PRINTING_OBJECT = _UxGT("Друк об'єкта"); LSTR MSG_CANCEL_OBJECT = _UxGT("Завершити об'єкт"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершити об'єкт ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершити об'єкт {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("Віднов. після збою"); LSTR MSG_MEDIA_MENU = _UxGT("Друкувати з SD"); LSTR MSG_NO_MEDIA = _UxGT("SD-картки немає"); @@ -780,7 +780,7 @@ namespace Language_uk { #else LSTR MSG_MIX = _UxGT("Змішув."); #endif - LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент {"); LSTR MSG_MIXER = _UxGT("Змішувач"); LSTR MSG_GRADIENT = _UxGT("Градієнт"); LSTR MSG_FULL_GRADIENT = _UxGT("Повний градієнт"); diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index 3b83349207e6..223186e6f093 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -44,7 +44,7 @@ namespace Language_vi { LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB khởi thất bại"); LSTR MSG_LCD_ENDSTOPS = _UxGT("Công tắc"); // Endstops - công tắc hành trình LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Công tắc mềm"); // soft Endstops - LSTR MSG_MAIN = _UxGT("Chính"); // Main + LSTR MSG_MAIN_MENU = _UxGT("Chính"); // Main LSTR MSG_ADVANCED_SETTINGS = _UxGT("Thiết lập cấp cao"); // Advanced Settings LSTR MSG_CONFIGURATION = _UxGT("Cấu hình"); // Configuration LSTR MSG_RUN_AUTO_FILES = _UxGT("Khởi chạy tự động"); // Autostart diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 9dbb61e70b07..e87ac44d3bce 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -48,7 +48,7 @@ namespace Language_zh_CN { LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("子响应溢出"); LSTR MSG_LCD_ENDSTOPS = _UxGT("挡块"); // "Endstops" // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("软挡块"); - LSTR MSG_MAIN = _UxGT("主菜单"); // "Main" + LSTR MSG_MAIN_MENU = _UxGT("主菜单"); // "Main" LSTR MSG_ADVANCED_SETTINGS = _UxGT("高级设置"); LSTR MSG_CONFIGURATION = _UxGT("配置"); LSTR MSG_RUN_AUTO_FILES = _UxGT("自动开始"); // "Autostart" @@ -348,7 +348,7 @@ namespace Language_zh_CN { LSTR MSG_STOP_PRINT = _UxGT("停止打印"); // "Stop print" LSTR MSG_PRINTING_OBJECT = _UxGT("打印物体"); LSTR MSG_CANCEL_OBJECT = _UxGT("取消物体"); - LSTR MSG_CANCEL_OBJECT_N = _UxGT("取消物体 ="); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("取消物体 {"); LSTR MSG_OUTAGE_RECOVERY = _UxGT("中断恢复"); LSTR MSG_MEDIA_MENU = _UxGT("从存储卡上打印"); // "Print from SD" LSTR MSG_NO_MEDIA = _UxGT("无存储卡"); // "No SD card" @@ -532,7 +532,7 @@ namespace Language_zh_CN { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("移出, 按下"); LSTR MSG_MIX = _UxGT("混合"); - LSTR MSG_MIX_COMPONENT_N = _UxGT("器件 ="); + LSTR MSG_MIX_COMPONENT_N = _UxGT("器件 {"); LSTR MSG_MIXER = _UxGT("混合器"); LSTR MSG_GRADIENT = _UxGT("梯度"); LSTR MSG_FULL_GRADIENT = _UxGT("全梯度"); diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index 49e57d6220fd..222d27f77ea0 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -46,7 +46,7 @@ namespace Language_zh_TW { LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB啟動失敗"); // "USB start failed" LSTR MSG_LCD_ENDSTOPS = _UxGT("擋塊"); // "Endstops" // Max length 8 characters LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("軟體擋塊"); // "Soft Endstops" - LSTR MSG_MAIN = _UxGT("主選單"); // "Main" + LSTR MSG_MAIN_MENU = _UxGT("主選單"); // "Main" LSTR MSG_ADVANCED_SETTINGS = _UxGT("進階設置"); // "Advanced Settings" LSTR MSG_CONFIGURATION = _UxGT("設置"); //Configuration LSTR MSG_RUN_AUTO_FILES = _UxGT("自動開始"); // "Autostart" @@ -235,10 +235,10 @@ namespace Language_zh_TW { LSTR MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" 熱床"); // "Bed" LSTR MSG_CHAMBER = _UxGT("Enclosure"); LSTR MSG_FAN_SPEED = _UxGT("風扇速率"); // "Fan speed" - LSTR MSG_FAN_SPEED_N = _UxGT("風扇速率 ="); - LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan ="); + LSTR MSG_FAN_SPEED_N = _UxGT("風扇速率 {"); + LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan {"); LSTR MSG_EXTRA_FAN_SPEED = _UxGT("額外風扇速率"); // "Extra fan speed" - LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 ="); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 {"); LSTR MSG_FLOW = _UxGT("擠出速率"); LSTR MSG_FLOW_N = _UxGT("擠出速率 ~"); // "Flow" LSTR MSG_CONTROL = _UxGT("控制"); // "Control" @@ -322,7 +322,7 @@ namespace Language_zh_TW { LSTR MSG_STOP_PRINT = _UxGT("停止列印"); // "Stop print" LSTR MSG_PRINTING_OBJECT = _UxGT("列印物件"); // "Printing Object" LSTR MSG_CANCEL_OBJECT = _UxGT("中止物件"); // "Cancel Object" - LSTR MSG_CANCEL_OBJECT_N = _UxGT("中止物件 ="); // "Cancel Object =" + LSTR MSG_CANCEL_OBJECT_N = _UxGT("中止物件 {"); // "Cancel Object =" LSTR MSG_OUTAGE_RECOVERY = _UxGT("中斷恢復"); // "Outage Recovery" LSTR MSG_MEDIA_MENU = _UxGT("從記憶卡上列印"); // "Print from SD" LSTR MSG_NO_MEDIA = _UxGT("無記憶卡"); // "No SD card" diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp index 650824e553bc..162f01a12cbd 100644 --- a/Marlin/src/lcd/lcdprint.cpp +++ b/Marlin/src/lcd/lcdprint.cpp @@ -37,7 +37,7 @@ * Print a string with optional substitutions: * * $ displays the clipped string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -50,11 +50,11 @@ lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/ lchar_t wc; p = get_utf8_value_cb(p, read_byte_rom, wc); if (!wc) break; - if (wc == '=' || wc == '~' || wc == '*') { + if (wc == '{' || wc == '~' || wc == '*') { if (ind >= 0) { if (wc == '*') { lcd_put_u8str(F("E")); n--; } if (n) { - int8_t inum = ind + ((wc == '=') ? 0 : LCD_FIRST_TOOL); + int8_t inum = ind + ((wc == '{') ? 0 : LCD_FIRST_TOOL); if (inum >= 10) { lcd_put_lchar('0' + (inum / 10)); n--; inum %= 10; diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index bcf85cb69396..f4343c22661c 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -30,7 +30,7 @@ */ #pragma once -#include "fontutils.h" +#include "utf8.h" #include "../inc/MarlinConfig.h" @@ -208,11 +208,11 @@ inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, FSTR_P cons /** * @brief Draw a string with optional substitution * @details Print a string with optional substitutions: - * $ displays the clipped string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 - * ~ displays '1'....'11' for indexes 0 - 10 - * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) - * @ displays an axis name such as XYZUVW, or E for an extruder + * $ : the clipped string given by fstr or cstr + * { : '0'....'10' for indexes 0 - 10 + * ~ : '1'....'11' for indexes 0 - 10 + * * : 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) + * @ : an axis name such as XYZUVW, or E for an extruder * * @param ptpl A ROM string (template) * @param ind An index value to use for = ~ * substitution diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index da252c80fdc4..b8ef8e1ed88b 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -42,7 +42,7 @@ MarlinUI ui; #if HAS_DISPLAY #include "../gcode/queue.h" - #include "fontutils.h" + #include "utf8.h" #endif #if ENABLED(DWIN_CREALITY_LCD) @@ -213,6 +213,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; void MarlinUI::init() { + #if HAS_U8GLIB_I2C_OLED && PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM) + Wire.begin(uint8_t(I2C_SDA_PIN), uint8_t(I2C_SCL_PIN)); + #endif + init_lcd(); #if HAS_DIGITAL_BUTTONS @@ -269,10 +273,6 @@ void MarlinUI::init() { slow_buttons = 0; #endif - #if HAS_U8GLIB_I2C_OLED && PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM) - Wire.begin(int(I2C_SDA_PIN), int(I2C_SCL_PIN)); - #endif - update_buttons(); TERN_(HAS_ENCODER_ACTION, encoderDiff = 0); @@ -403,7 +403,7 @@ void MarlinUI::init() { #if HAS_TOUCH_BUTTONS uint8_t MarlinUI::touch_buttons; - uint8_t MarlinUI::repeat_delay; + uint16_t MarlinUI::repeat_delay; #endif #if ANY(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) @@ -439,8 +439,9 @@ void MarlinUI::init() { p = get_utf8_value_cb(p, cb_read_byte, wc); const bool eol = !wc; // zero ends the string // End or a break between phrases? - if (eol || wc == ' ' || wc == '-' || wc == '+' || wc == '.') { - if (!c && wc == ' ') { if (wrd) wrd++; continue; } // collapse extra spaces + if (eol || wc == ' ' || wc == '-' || wc == '+' || wc == '.' || wc == '\n') { + const bool newline_after = wc == '\n'; + if (!c && (wc == ' ' || newline_after)) { if (wrd) wrd++; continue; } // collapse extra spaces // Past the right and the word is not too long? if (col + c > LCD_WIDTH && col >= (LCD_WIDTH) / 4) _newline(); // should it wrap? c += !eol; // +1 so the space will be printed @@ -451,6 +452,7 @@ void MarlinUI::init() { lcd_put_lchar(wc); // character to the LCD } if (eol) break; // all done! + if (newline_after) _newline(); wrd = nullptr; // set up for next word } else c++; // count word characters @@ -467,20 +469,20 @@ void MarlinUI::init() { } } - void MarlinUI::draw_select_screen_prompt(FSTR_P const pref, const char * const string/*=nullptr*/, FSTR_P const suff/*=nullptr*/) { - const uint8_t plen = utf8_strlen(pref), slen = suff ? utf8_strlen(suff) : 0; + void MarlinUI::draw_select_screen_prompt(FSTR_P const fpre, const char * const string/*=nullptr*/, FSTR_P const fsuf/*=nullptr*/) { + const uint8_t plen = utf8_strlen_P(FTOP(fpre)), slen = fsuf ? utf8_strlen_P(FTOP(fsuf)) : 0; uint8_t col = 0, row = 0; if (!string && plen + slen <= LCD_WIDTH) { col = (LCD_WIDTH - plen - slen) / 2; row = LCD_HEIGHT > 3 ? 1 : 0; } if (LCD_HEIGHT >= 8) row = LCD_HEIGHT / 2 - 2; - wrap_string_P(col, row, FTOP(pref), true); + wrap_string_P(col, row, FTOP(fpre), true); if (string) { if (col) { col = 0; row++; } // Move to the start of the next line wrap_string(col, row, string); } - if (suff) wrap_string_P(col, row, FTOP(suff)); + if (fsuf) wrap_string_P(col, row, FTOP(fsuf)); } #endif // !HAS_GRAPHICAL_TFT @@ -497,7 +499,7 @@ void MarlinUI::init() { ui.manual_move.menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; ui.encoderPosition = dir; switch (axis) { - case X_AXIS: + TERN_(HAS_X_AXIS, case X_AXIS:) TERN_(HAS_Y_AXIS, case Y_AXIS:) TERN_(HAS_Z_AXIS, case Z_AXIS:) lcd_move_axis(axis); @@ -848,7 +850,7 @@ void MarlinUI::init() { TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder ); - //SERIAL_ECHOLNPGM("Add planner.move with Axis ", AS_CHAR(AXIS_CHAR(axis)), " at FR ", fr_mm_s); + //SERIAL_ECHOLNPGM("Add planner.move with Axis ", C(AXIS_CHAR(axis)), " at FR ", fr_mm_s); axis = NO_AXIS_ENUM; @@ -865,7 +867,7 @@ void MarlinUI::init() { TERN_(MULTI_E_MANUAL, if (move_axis == E_AXIS) e_index = eindex); start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves axis = move_axis; - //SERIAL_ECHOLNPGM("Post Move with Axis ", AS_CHAR(AXIS_CHAR(axis)), " soon."); + //SERIAL_ECHOLNPGM("Post Move with Axis ", C(AXIS_CHAR(axis)), " soon."); } #if ENABLED(AUTO_BED_LEVELING_UBL) @@ -1655,11 +1657,13 @@ void MarlinUI::init() { #endif - void MarlinUI::flow_fault() { - LCD_ALERTMESSAGE(MSG_FLOWMETER_FAULT); - BUZZ(1000, 440); - TERN_(HAS_MARLINUI_MENU, return_to_status()); - } + #if ENABLED(FLOWMETER_SAFETY) + void MarlinUI::flow_fault() { + LCD_ALERTMESSAGE(MSG_FLOWMETER_FAULT); + BUZZ(1000, 440); + TERN_(HAS_MARLINUI_MENU, return_to_status()); + } + #endif void MarlinUI::pause_print() { #if HAS_MARLINUI_MENU diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index ced5efdcb2d6..3d58c7f9c77c 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -297,16 +297,17 @@ class MarlinUI { } #endif + #if HAS_PRINT_PROGRESS_PERMYRIAD + typedef uint16_t progress_t; + #define PROGRESS_SCALE 100U + #define PROGRESS_MASK 0x7FFF + #else + typedef uint8_t progress_t; + #define PROGRESS_SCALE 1U + #define PROGRESS_MASK 0x7F + #endif + #if HAS_PRINT_PROGRESS - #if HAS_PRINT_PROGRESS_PERMYRIAD - typedef uint16_t progress_t; - #define PROGRESS_SCALE 100U - #define PROGRESS_MASK 0x7FFF - #else - typedef uint8_t progress_t; - #define PROGRESS_SCALE 1U - #define PROGRESS_MASK 0x7F - #endif #if ENABLED(SET_PROGRESS_PERCENT) static progress_t progress_override; static void set_progress(const progress_t p) { progress_override = _MIN(p, 100U * (PROGRESS_SCALE)); } @@ -561,7 +562,7 @@ class MarlinUI { #if HAS_TOUCH_BUTTONS static uint8_t touch_buttons; - static uint8_t repeat_delay; + static uint16_t repeat_delay; #else static constexpr uint8_t touch_buttons = 0; #endif @@ -630,7 +631,7 @@ class MarlinUI { static float ubl_mesh_value(); #endif - static void draw_select_screen_prompt(FSTR_P const pref, const char * const string=nullptr, FSTR_P const suff=nullptr); + static void draw_select_screen_prompt(FSTR_P const fpre, const char * const string=nullptr, FSTR_P const fsuf=nullptr); #else diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 8205d5a26f68..80fba484f48e 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -48,7 +48,7 @@ //////////////////////////////////////////// #if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) - bool leveling_was_active; // = false + bool menu_leveling_was_active; // = false #endif #if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION) uint8_t manual_probe_index; // = 0 @@ -138,7 +138,7 @@ void MenuEditItemBase::goto_edit_screen( void * const ev, // Edit value pointer const int32_t minv, // Encoder minimum const int32_t maxv, // Encoder maximum - const uint16_t ep, // Initial encoder value + const uint32_t ep, // Initial encoder value const screenFunc_t cs, // MenuItem_type::draw_edit_screen => MenuEditItemBase::edit() const screenFunc_t cb, // Callback after edit const bool le // Flag to call cb() during editing @@ -352,13 +352,13 @@ bool MarlinUI::update_selection() { void MenuItem_confirm::select_screen( FSTR_P const yes, FSTR_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, - FSTR_P const pref, const char * const string/*=nullptr*/, FSTR_P const suff/*=nullptr*/ + FSTR_P const fpre, const char * const string/*=nullptr*/, FSTR_P const fsuf/*=nullptr*/ ) { ui.defer_status_screen(); const bool ui_selection = !yes ? false : !no || ui.update_selection(), got_click = ui.use_click(); if (got_click || ui.should_draw()) { - draw_select_screen(yes, no, ui_selection, pref, string, suff); + draw_select_screen(yes, no, ui_selection, fpre, string, fsuf); if (got_click) { selectFunc_t callFunc = ui_selection ? yesFunc : noFunc; if (callFunc) callFunc(); else ui.goto_previous_screen(); diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index c269871c0259..7654d60aa207 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -64,25 +64,25 @@ class MenuItemBase { // Implementation-specific: // Draw an item either selected (pre_char) or not (space) with post_char // Menus may set up itemIndex, itemStringC/F and pass them to string-building or string-emitting functions - static void _draw(const bool sel, const uint8_t row, FSTR_P const fstr, const char pre_char, const char post_char); + static void _draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char pre_char, const char post_char); // Draw an item either selected ('>') or not (space) with post_char - FORCE_INLINE static void _draw(const bool sel, const uint8_t row, FSTR_P const fstr, const char post_char) { - _draw(sel, row, fstr, '>', post_char); + FORCE_INLINE static void _draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char post_char) { + _draw(sel, row, ftpl, '>', post_char); } }; // STATIC_ITEM(LABEL,...) class MenuItem_static : public MenuItemBase { public: - static void draw(const uint8_t row, FSTR_P const fstr, const uint8_t style=SS_DEFAULT, const char * const vstr=nullptr); + static void draw(const uint8_t row, FSTR_P const ftpl, const uint8_t style=SS_DEFAULT, const char * const vstr=nullptr); }; // BACK_ITEM(LABEL) class MenuItem_back : public MenuItemBase { public: - FORCE_INLINE static void draw(const bool sel, const uint8_t row, FSTR_P const fstr) { - _draw(sel, row, fstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); + FORCE_INLINE static void draw(const bool sel, const uint8_t row, FSTR_P const ftpl) { + _draw(sel, row, ftpl, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); } // Back Item action goes back one step in history FORCE_INLINE static void action(FSTR_P const=nullptr) { ui.go_back(); } @@ -101,31 +101,31 @@ class MenuItem_confirm : public MenuItemBase { FSTR_P const yes, // Right option label FSTR_P const no, // Left option label const bool yesno, // Is "yes" selected? - FSTR_P const pref, // Prompt prefix + FSTR_P const fpre, // Prompt prefix const char * const string, // Prompt runtime string - FSTR_P const suff // Prompt suffix + FSTR_P const fsuf // Prompt suffix ); static void select_screen( FSTR_P const yes, FSTR_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, - FSTR_P const pref, const char * const string=nullptr, FSTR_P const suff=nullptr + FSTR_P const fpre, const char * const string=nullptr, FSTR_P const fsuf=nullptr ); static void select_screen( FSTR_P const yes, FSTR_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, - FSTR_P const pref, FSTR_P const fstr, FSTR_P const suff=nullptr + FSTR_P const fpre, FSTR_P const fstr, FSTR_P const fsuf=nullptr ) { #ifdef __AVR__ char str[strlen_P(FTOP(fstr)) + 1]; strcpy_P(str, FTOP(fstr)); - select_screen(yes, no, yesFunc, noFunc, pref, str, suff); + select_screen(yes, no, yesFunc, noFunc, fpre, str, fsuf); #else - select_screen(yes, no, yesFunc, noFunc, pref, FTOP(fstr), suff); + select_screen(yes, no, yesFunc, noFunc, fpre, FTOP(fstr), fsuf); #endif } // Shortcut for prompt with "NO"/ "YES" labels - FORCE_INLINE static void confirm_screen(selectFunc_t yesFunc, selectFunc_t noFunc, FSTR_P const pref, const char * const string=nullptr, FSTR_P const suff=nullptr) { - select_screen(GET_TEXT_F(MSG_YES), GET_TEXT_F(MSG_NO), yesFunc, noFunc, pref, string, suff); + FORCE_INLINE static void confirm_screen(selectFunc_t yesFunc, selectFunc_t noFunc, FSTR_P const fpre, const char * const string=nullptr, FSTR_P const fsuf=nullptr) { + select_screen(GET_TEXT_F(MSG_YES), GET_TEXT_F(MSG_NO), yesFunc, noFunc, fpre, string, fsuf); } }; @@ -168,7 +168,7 @@ class MenuEditItemBase : public MenuItemBase { void * const ev, // Edit value pointer const int32_t minv, // Encoder minimum const int32_t maxv, // Encoder maximum - const uint16_t ep, // Initial encoder value + const uint32_t ep, // Initial encoder value const screenFunc_t cs, // MenuItem_type::draw_edit_screen => MenuEditItemBase::edit() const screenFunc_t cb, // Callback after edit const bool le // Flag to call cb() during editing @@ -265,7 +265,7 @@ inline void clear_menu_history() { screen_history_depth = 0; } #define STICKY_SCREEN(S) []{ ui.defer_status_screen(); ui.goto_screen(S); } #if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION) - extern bool leveling_was_active; + extern bool menu_leveling_was_active; #endif #if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION) diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index e1d680181d6e..a37a6d4659d1 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -279,7 +279,7 @@ void menu_backlash(); #if ENABLED(MPC_EDIT_MENU) #define MPC_EDIT_DEFS(N) \ - MPC_t &c = thermalManager.temp_hotend[N].constants; \ + MPC_t &c = thermalManager.temp_hotend[N].mpc; \ TERN_(MPC_INCLUDE_FAN, editable.decimal = c.ambient_xfer_coeff_fan0 + c.fan255_adjustment) #endif @@ -380,7 +380,7 @@ void menu_backlash(); #define MPC_EDIT_ITEMS(N) \ _MPC_EDIT_ITEMS(N); \ EDIT_ITEM_FAST_N(float43, N, MSG_MPC_AMBIENT_XFER_COEFF_FAN_E, &editable.decimal, 0, 1, []{ \ - MPC_t &c = thermalManager.temp_hotend[MenuItemBase::itemIndex].constants; \ + MPC_t &c = thermalManager.temp_hotend[MenuItemBase::itemIndex].mpc; \ c.fan255_adjustment = editable.decimal - c.ambient_xfer_coeff_fan0; \ }) #else @@ -476,9 +476,23 @@ void menu_backlash(); // M201 / M204 Accelerations void menu_advanced_acceleration() { - float max_accel = planner.settings.max_acceleration_mm_per_s2[A_AXIS]; - TERN_(HAS_Y_AXIS, NOLESS(max_accel, planner.settings.max_acceleration_mm_per_s2[B_AXIS])); - TERN_(HAS_Z_AXIS, NOLESS(max_accel, planner.settings.max_acceleration_mm_per_s2[C_AXIS])); + float max_accel = ( + #if NUM_AXES + _MAX(NUM_AXIS_LIST( + planner.settings.max_acceleration_mm_per_s2[A_AXIS], + planner.settings.max_acceleration_mm_per_s2[B_AXIS], + planner.settings.max_acceleration_mm_per_s2[C_AXIS], + planner.settings.max_acceleration_mm_per_s2[I_AXIS], + planner.settings.max_acceleration_mm_per_s2[J_AXIS], + planner.settings.max_acceleration_mm_per_s2[K_AXIS], + planner.settings.max_acceleration_mm_per_s2[U_AXIS], + planner.settings.max_acceleration_mm_per_s2[V_AXIS], + planner.settings.max_acceleration_mm_per_s2[W_AXIS] + )) + #else + 0 + #endif + ); // M201 settings constexpr xyze_ulong_t max_accel_edit = @@ -580,12 +594,6 @@ void menu_backlash(); START_MENU(); BACK_ITEM(MSG_ADVANCED_SETTINGS); - #if HAS_JUNCTION_DEVIATION - EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.001f, TERN(LIN_ADVANCE, 0.3f, 0.5f) - OPTARG(LIN_ADVANCE, planner.recalculate_max_e_jerk) - ); - #endif - constexpr xyze_float_t max_jerk_edit = #ifdef MAX_JERK_EDIT_VALUES MAX_JERK_EDIT_VALUES @@ -598,7 +606,7 @@ void menu_backlash(); ; LOOP_LOGICAL_AXES(a) { - if (a == C_AXIS || TERN0(HAS_EXTRUDERS, a == E_AXIS)) + if (TERN0(HAS_C_AXIS, a == C_AXIS) || TERN0(HAS_EXTRUDERS, a == E_AXIS)) EDIT_ITEM_FAST_N(float52sign, a, MSG_VN_JERK, &planner.max_jerk[a], 0.1f, max_jerk_edit[a]); else EDIT_ITEM_FAST_N(float3, a, MSG_VN_JERK, &planner.max_jerk[a], 1.0f, max_jerk_edit[a]); diff --git a/Marlin/src/lcd/menu/menu_backlash.cpp b/Marlin/src/lcd/menu/menu_backlash.cpp index 33788c93903d..a5f1f3746bf0 100644 --- a/Marlin/src/lcd/menu/menu_backlash.cpp +++ b/Marlin/src/lcd/menu/menu_backlash.cpp @@ -34,7 +34,7 @@ void menu_backlash() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); editable.uint8 = backlash.get_correction_uint8(); EDIT_ITEM_FAST(percent, MSG_BACKLASH_CORRECTION, &editable.uint8, backlash.all_off, backlash.all_on, []{ backlash.set_correction_uint8(editable.uint8); }); @@ -50,7 +50,9 @@ void menu_backlash() { EDIT_ITEM_FAST_N(float43, _AXIS(N), MSG_BACKLASH_N, &editable.decimal, 0.0f, 9.9f, []{ backlash.set_distance_mm(_AXIS(N), editable.decimal); }); \ } while (0); - if (_CAN_CALI(A)) EDIT_BACKLASH_DISTANCE(A); + #if HAS_X_AXIS && _CAN_CALI(A) + EDIT_BACKLASH_DISTANCE(A); + #endif #if HAS_Y_AXIS && _CAN_CALI(B) EDIT_BACKLASH_DISTANCE(B); #endif diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index 1f2c00179327..cf1997499dc6 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -53,7 +53,7 @@ // // LCD probed points are from defaults - constexpr uint8_t total_probe_points = TERN(AUTO_BED_LEVELING_3POINT, 3, GRID_MAX_POINTS); + constexpr grid_count_t total_probe_points = TERN(AUTO_BED_LEVELING_3POINT, 3, GRID_MAX_POINTS); // // Bed leveling is done. Wait for G29 to complete. @@ -293,7 +293,7 @@ void menu_bed_leveling() { #endif #if ENABLED(LCD_BED_TRAMMING) - SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); #endif #if ENABLED(EEPROM_SETTINGS) diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_tramming.cpp similarity index 83% rename from Marlin/src/lcd/menu/menu_bed_corners.cpp rename to Marlin/src/lcd/menu/menu_bed_tramming.cpp index 84a2c11a8d2e..c5d425bfcfab 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_tramming.cpp @@ -21,7 +21,7 @@ */ // -// Level Bed Corners menu +// Bed Tramming menu // #include "../../inc/MarlinConfigPre.h" @@ -54,7 +54,7 @@ #endif float last_z; int good_points; - bool corner_probing_done, wait_for_probe; + bool tramming_done, wait_for_probe; #if HAS_MARLINUI_U8GLIB #include "../dogm/marlinui_DOGM.h" @@ -66,6 +66,11 @@ static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please update your configuration."); +#define LF 1 +#define RF 2 +#define RB 3 +#define LB 4 + #ifndef BED_TRAMMING_LEVELING_ORDER #define BED_TRAMMING_LEVELING_ORDER { LF, RF, LB, RB } // Default //#define BED_TRAMMING_LEVELING_ORDER { LF, LB, RF } // 3 hard-coded points @@ -75,18 +80,14 @@ static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please //#define BED_TRAMMING_LEVELING_ORDER { LB, RB } // 3-Point tramming - Front #endif -#define LF 1 -#define RF 2 -#define RB 3 -#define LB 4 constexpr int lco[] = BED_TRAMMING_LEVELING_ORDER; -constexpr bool level_corners_3_points = COUNT(lco) == 2; -static_assert(level_corners_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners."); +constexpr bool tramming_3_points = COUNT(lco) == 2; +static_assert(tramming_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners."); constexpr int lcodiff = ABS(lco[0] - lco[1]); static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two BED_TRAMMING_LEVELING_ORDER corners must be on the same edge."); -constexpr int nr_edge_points = level_corners_3_points ? 3 : 4; +constexpr int nr_edge_points = tramming_3_points ? 3 : 4; constexpr int available_points = nr_edge_points + ENABLED(BED_TRAMMING_INCLUDE_CENTER); constexpr int center_index = TERN(BED_TRAMMING_INCLUDE_CENTER, available_points - 1, -1); constexpr float inset_lfrb[4] = BED_TRAMMING_INSET_LFRB; @@ -98,9 +99,9 @@ static int8_t bed_corner; /** * Select next corner coordinates */ -static void _lcd_level_bed_corners_get_next_position() { +static void _lcd_bed_tramming_get_next_position() { - if (level_corners_3_points) { + if (tramming_3_points) { if (bed_corner >= available_points) bed_corner = 0; // Above max position -> move back to first corner switch (bed_corner) { case 0 ... 1: @@ -141,9 +142,9 @@ static void _lcd_level_bed_corners_get_next_position() { else { current_position = lf; // Left front switch (lco[bed_corner]) { - case RF: current_position.x = rb.x; break; // Right front - case RB: current_position = rb; break; // Right rear - case LB: current_position.y = rb.y; break; // Left rear + case RF: current_position.x = rb.x; break; // Right Front + case RB: current_position = rb; break; // Right Back + case LB: current_position.y = rb.y; break; // Left Back } } } @@ -198,7 +199,7 @@ static void _lcd_level_bed_corners_get_next_position() { if (!ui.should_draw()) return; MenuItem_confirm::select_screen( GET_TEXT_F(MSG_BUTTON_DONE), GET_TEXT_F(MSG_BUTTON_SKIP) - , []{ corner_probing_done = true; wait_for_probe = false; } + , []{ tramming_done = true; wait_for_probe = false; } , []{ wait_for_probe = false; } , GET_TEXT_F(MSG_BED_TRAMMING_RAISE) ); @@ -207,23 +208,25 @@ static void _lcd_level_bed_corners_get_next_position() { void _lcd_draw_level_prompt() { if (!ui.should_draw()) return; MenuItem_confirm::select_screen( - GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE)), - TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr) + GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE)) + , TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr) , []{ queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); ui.return_to_status(); } , TERN(HAS_LEVELING, ui.goto_previous_screen_no_defer, []{}) , GET_TEXT_F(MSG_BED_TRAMMING_IN_RANGE) ); } - bool _lcd_level_bed_corners_probe(bool verify=false) { - if (verify) do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP); // do clearance if needed + bool _lcd_bed_tramming_probe(bool verify=false) { + if (verify) line_to_z(BED_TRAMMING_Z_HOP); // do clearance if needed TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action do_blocking_move_to_z(last_z - BED_TRAMMING_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered endstops.hit_on_purpose(); set_current_from_steppers_for_axis(Z_AXIS); sync_plan_position(); + TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow()); // Stow in LOW SPEED MODE on every trigger + // Triggered outside tolerance range? if (ABS(current_position.z - last_z) > BED_TRAMMING_PROBE_TOLERANCE) { last_z = current_position.z; // Above tolerance. Set a new Z for subsequent corners. @@ -231,13 +234,13 @@ static void _lcd_level_bed_corners_get_next_position() { } return true; // probe triggered } - do_blocking_move_to_z(last_z); // go back to tolerance middle point before raise + line_to_z(last_z); // go back to tolerance middle point before raise return false; // probe not triggered } - bool _lcd_level_bed_corners_raise() { + bool _lcd_bed_tramming_raise() { bool probe_triggered = false; - corner_probing_done = false; + tramming_done = false; wait_for_probe = true; ui.goto_screen(_lcd_draw_raise); // show raise screen ui.set_selection(true); @@ -264,25 +267,25 @@ static void _lcd_level_bed_corners_get_next_position() { ui.refresh(LCDVIEW_REDRAW_NOW); _lcd_draw_probing(); // update screen with # of good points - do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance + line_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance - _lcd_level_bed_corners_get_next_position(); // Select next corner coordinates + _lcd_bed_tramming_get_next_position(); // Select next corner coordinates current_position -= probe.offset_xy; // Account for probe offsets do_blocking_move_to_xy(current_position); // Goto corner TERN_(BLTOUCH, if (bltouch.high_speed_mode) bltouch.deploy()); // Deploy in HIGH SPEED MODE - if (!_lcd_level_bed_corners_probe()) { // Probe down to tolerance - if (_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed - #if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify - while (!_lcd_level_bed_corners_probe(true)) { // Loop while corner verified - if (!_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed - if (corner_probing_done) return; // Done was selected + if (!_lcd_bed_tramming_probe()) { // Probe down to tolerance + if (_lcd_bed_tramming_raise()) { // Prompt user to raise bed if needed + #if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify + while (!_lcd_bed_tramming_probe(true)) { // Loop while corner verified + if (!_lcd_bed_tramming_raise()) { // Prompt user to raise bed if needed + if (tramming_done) return; // Done was selected break; // Skip was selected } } #endif } - else if (corner_probing_done) // Done was selected + else if (tramming_done) // Done was selected return; } @@ -293,9 +296,9 @@ static void _lcd_level_bed_corners_get_next_position() { #if ENABLED(BLTOUCH) if (bltouch.high_speed_mode) { - // In HIGH SPEED MODE do clearance and stow at the very end - do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP); + // In HIGH SPEED MODE do stow and clearance at the very end bltouch.stow(); + do_z_clearance(BED_TRAMMING_Z_HOP); } #endif @@ -309,7 +312,7 @@ static void _lcd_level_bed_corners_get_next_position() { line_to_z(BED_TRAMMING_Z_HOP); // Select next corner coordinates - _lcd_level_bed_corners_get_next_position(); + _lcd_bed_tramming_get_next_position(); line_to_current_position(manual_feedrate_mm_s.x); line_to_z(BED_TRAMMING_HEIGHT); @@ -318,15 +321,19 @@ static void _lcd_level_bed_corners_get_next_position() { #endif // !BED_TRAMMING_USE_PROBE -static void _lcd_level_bed_corners_homing() { +void _lcd_bed_tramming_homing() { _lcd_draw_homing(); if (!all_axes_homed()) return; + #if ENABLED(BED_TRAMMING_USE_PROBE) + _lcd_test_corners(); - if (corner_probing_done) ui.goto_previous_screen_no_defer(); - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + if (tramming_done) ui.goto_previous_screen_no_defer(); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); endstops.enable_z_probe(false); - #else + + #else // !BED_TRAMMING_USE_PROBE + bed_corner = 0; ui.goto_screen([]{ MenuItem_confirm::select_screen( @@ -334,7 +341,7 @@ static void _lcd_level_bed_corners_homing() { , _lcd_goto_next_corner , []{ line_to_z(BED_TRAMMING_Z_HOP); // Raise Z off the bed when done - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); ui.goto_previous_screen_no_defer(); } , GET_TEXT_F(TERN(BED_TRAMMING_INCLUDE_CENTER, MSG_LEVEL_BED_NEXT_POINT, MSG_NEXT_CORNER)) @@ -343,10 +350,11 @@ static void _lcd_level_bed_corners_homing() { }); ui.set_selection(true); _lcd_goto_next_corner(); - #endif + + #endif // !BED_TRAMMING_USE_PROBE } -void _lcd_level_bed_corners() { +void _lcd_bed_tramming() { ui.defer_status_screen(); if (!all_axes_trusted()) { set_all_unhomed(); @@ -355,11 +363,11 @@ void _lcd_level_bed_corners() { // Disable leveling so the planner won't mess with us #if HAS_LEVELING - leveling_was_active = planner.leveling_active; + menu_leveling_was_active = planner.leveling_active; set_bed_leveling_enabled(false); #endif - ui.goto_screen(_lcd_level_bed_corners_homing); + ui.goto_screen(_lcd_bed_tramming_homing); } #endif // HAS_MARLINUI_MENU && LCD_BED_TRAMMING diff --git a/Marlin/src/lcd/menu/menu_cancelobject.cpp b/Marlin/src/lcd/menu/menu_cancelobject.cpp index 881168eccb2a..bcbd90ee3a60 100644 --- a/Marlin/src/lcd/menu/menu_cancelobject.cpp +++ b/Marlin/src/lcd/menu/menu_cancelobject.cpp @@ -56,7 +56,7 @@ void menu_cancelobject() { const int8_t ao = cancelable.active_object; START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // Draw cancelable items in a loop for (int8_t i = -1; i < cancelable.object_count; i++) { diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 29d432347fcf..a743f3ed22c7 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -181,10 +181,10 @@ void menu_advanced_settings(); #if ENABLED(DUAL_X_CARRIAGE) EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); #else - EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].x, -99.0f, 99.0f, _recalc_offsets); #endif - EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets); - EDIT_ITEM_FAST_N(float42_52, Z_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].y, -99.0f, 99.0f, _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, Z_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].z, -10.0f, 10.0f, _recalc_offsets); #if ENABLED(EEPROM_SETTINGS) ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings); #endif @@ -360,7 +360,7 @@ void menu_advanced_settings(); void custom_menus_configuration() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #define HAS_CUSTOM_ITEM_CONF(N) (defined(CONFIG_MENU_ITEM_##N##_DESC) && defined(CONFIG_MENU_ITEM_##N##_GCODE)) @@ -472,7 +472,7 @@ void menu_configuration() { const bool busy = printer_busy(); START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Debug Menu when certain options are enabled diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 528f30c68753..14a7c86c9c65 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -132,7 +132,7 @@ void menu_delta_calibrate() { #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(DELTA_AUTO_CALIBRATION) GCODES_ITEM(MSG_DELTA_AUTO_CALIBRATE, F("G33")); diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index e5d319c670f9..46ebf85ba4b8 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -130,7 +130,7 @@ void menu_change_filament() { #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // Change filament #if E_STEPPERS == 1 @@ -250,6 +250,12 @@ static FSTR_P pause_header() { }while(0) void menu_pause_option() { + #if HAS_FILAMENT_SENSOR + const bool still_out = runout.filament_ran_out; + #else + constexpr bool still_out = false; + #endif + START_MENU(); #if LCD_HEIGHT > 2 STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER); @@ -257,11 +263,8 @@ void menu_pause_option() { ACTION_ITEM(MSG_FILAMENT_CHANGE_OPTION_PURGE, []{ pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; }); #if HAS_FILAMENT_SENSOR - const bool still_out = runout.filament_ran_out; if (still_out) EDIT_ITEM(bool, MSG_RUNOUT_SENSOR, &runout.enabled, runout.reset); - #else - constexpr bool still_out = false; #endif if (!still_out) diff --git a/Marlin/src/lcd/menu/menu_game.cpp b/Marlin/src/lcd/menu/menu_game.cpp index fa56d7eee266..750c3c7e8210 100644 --- a/Marlin/src/lcd/menu/menu_game.cpp +++ b/Marlin/src/lcd/menu/menu_game.cpp @@ -29,7 +29,7 @@ void menu_game() { START_MENU(); - BACK_ITEM(TERN(LCD_INFO_MENU, MSG_INFO_MENU, MSG_MAIN)); + BACK_ITEM(TERN(LCD_INFO_MENU, MSG_INFO_MENU, MSG_MAIN_MENU)); #if ENABLED(MARLIN_BRICKOUT) SUBMENU(MSG_BRICKOUT, brickout.enter_game); #endif diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 1b41c8e9cc89..bc0c15f3170b 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -276,7 +276,7 @@ void menu_info_board() { // void menu_info() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) SUBMENU(MSG_INFO_PRINTER_MENU, TERN(SHOW_CUSTOM_BOOTSCREEN, menu_show_custom_bootscreen, menu_show_marlin_bootscreen)); #else diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index 0902466b952d..a98f87a3623c 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -372,19 +372,29 @@ class MenuItem_bool : public MenuEditItemBase { NEXT_ITEM(); \ }while(0) -// PSTRING_ITEM is like STATIC_ITEM but it takes -// two PSTRs with the style as the last parameter. - -#define PSTRING_ITEM_F(FLABEL, PVAL, STYL) do{ \ - constexpr int m = 20; \ - char msg[m+1]; \ - msg[0] = ':'; msg[1] = ' '; \ - strncpy_P(msg+2, PSTR(PVAL), m-2); \ - if (msg[m-1] & 0x80) msg[m-1] = '\0'; \ - STATIC_ITEM_F(FLABEL, STYL, msg); \ +// PSTRING_ITEM is like STATIC_ITEM +// but also takes a PSTR and style. + +#define PSTRING_ITEM_F_P(FLABEL, PVAL, STYL) do{ \ + constexpr int m = 20; \ + char msg[m + 1]; \ + if (_menuLineNr == _thisItemNr) { \ + msg[0] = ':'; msg[1] = ' '; \ + strncpy_P(msg + 2, PVAL, m - 2); \ + if (msg[m - 1] & 0x80) msg[m - 1] = '\0'; \ + } \ + STATIC_ITEM_F(FLABEL, STYL, msg); \ }while(0) -#define PSTRING_ITEM(LABEL, V...) PSTRING_ITEM_F(GET_TEXT_F(LABEL), ##V) +#define PSTRING_ITEM_N_F_P(N, V...) do{ \ + if (_menuLineNr == _thisItemNr) \ + MenuItemBase::init(N); \ + PSTRING_ITEM_F_P(V); \ +}while(0) + +#define PSTRING_ITEM_N_P(N, LABEL, V...) PSTRING_ITEM_N_F_P(N, GET_TEXT_F(LABEL), ##V) +#define PSTRING_ITEM_P(LABEL, V...) PSTRING_ITEM_F_P(GET_TEXT_F(LABEL), ##V) +#define PSTRING_ITEM(LABEL, S, V...) PSTRING_ITEM_P(LABEL, PSTR(S), ##V) #define STATIC_ITEM(LABEL, V...) STATIC_ITEM_F(GET_TEXT_F(LABEL), ##V) #define STATIC_ITEM_N(N, LABEL, V...) STATIC_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V) @@ -541,7 +551,7 @@ class MenuItem_bool : public MenuEditItemBase { #define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V) #if ENABLED(LCD_BED_TRAMMING) - void _lcd_level_bed_corners(); + void _lcd_bed_tramming(); #endif #if HAS_FAN diff --git a/Marlin/src/lcd/menu/menu_language.cpp b/Marlin/src/lcd/menu/menu_language.cpp index 2ea4359c6bb7..c92b86095013 100644 --- a/Marlin/src/lcd/menu/menu_language.cpp +++ b/Marlin/src/lcd/menu/menu_language.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" -#if HAS_MULTI_LANGUAGE +#if HAS_MENU_MULTI_LANGUAGE #include "menu_item.h" #include "../../MarlinCore.h" @@ -39,7 +39,7 @@ static void set_lcd_language(const uint8_t inlang) { void menu_language() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); MENU_ITEM_F(function, FPSTR(GET_LANGUAGE_NAME(1)), []{ set_lcd_language(0); }); MENU_ITEM_F(function, FPSTR(GET_LANGUAGE_NAME(2)), []{ set_lcd_language(1); }); @@ -56,4 +56,4 @@ void menu_language() { END_MENU(); } -#endif // HAS_MULTI_LANGUAGE +#endif // HAS_MENU_MULTI_LANGUAGE diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 7c5c7809f711..c7390b98cb20 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -126,7 +126,7 @@ void menu_led() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(LED_CONTROL_MENU) if (TERN1(PSU_CONTROL, powerManager.psu_on)) { diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 62ce1e7330eb..c244438cd0bd 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -114,7 +114,7 @@ void menu_configuration(); void custom_menus_main() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #define HAS_CUSTOM_ITEM_MAIN(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) @@ -292,7 +292,7 @@ void menu_main() { #if ENABLED(TFT_COLOR_UI) // Menu display issue on item removal with multi language selection menu if (encoderTopLine > 0) encoderTopLine--; - ui.refresh(LCDVIEW_CALL_REDRAW_NEXT); + ui.refresh(LCDVIEW_CLEAR_CALL_REDRAW); #endif }); #endif @@ -303,9 +303,11 @@ void menu_main() { #if HAS_SD_DETECT ACTION_ITEM(MSG_NO_MEDIA, nullptr); // "No Media" #else - GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Attach Media #if ENABLED(MULTI_VOLUME) - GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21 Attach USB Media + GCODES_ITEM(MSG_ATTACH_SD_MEDIA, F("M21S")); // M21S Attach SD Card + GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21U Attach USB Media + #else + GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21")); // M21 Attach Media #endif #endif } @@ -407,7 +409,7 @@ void menu_main() { #if ENABLED(TFT_COLOR_UI) // Menu display issue on item removal with multi language selection menu if (encoderTopLine > 0) encoderTopLine--; - ui.refresh(LCDVIEW_CALL_REDRAW_NEXT); + ui.refresh(LCDVIEW_CLEAR_CALL_REDRAW); #endif }); #endif @@ -418,10 +420,12 @@ void menu_main() { #if HAS_SD_DETECT ACTION_ITEM(MSG_NO_MEDIA, nullptr); // "No Media" #else - GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Attach Media - #if ENABLED(MULTI_VOLUME) - GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21 Attach USB Media - #endif + #if ENABLED(MULTI_VOLUME) + GCODES_ITEM(MSG_ATTACH_SD_MEDIA, F("M21S")); // M21S Attach SD Card + GCODES_ITEM(MSG_ATTACH_USB_MEDIA, F("M21U")); // M21U Attach USB Media + #else + GCODES_ITEM(MSG_ATTACH_MEDIA, F("M21")); // M21 Attach Media + #endif #endif } // END MEDIA MENU diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index ba59617422de..daa396601f2d 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -73,14 +73,11 @@ class MenuItem_sdfile : public MenuItem_sdbase { #endif #if ENABLED(SD_MENU_CONFIRM_START) MenuItem_submenu::action(fstr, []{ - char * const longest = card.longest_filename(); - char buffer[strlen(longest) + 2]; - buffer[0] = ' '; - strcpy(buffer + 1, longest); + char * const filename = card.longest_filename(); MenuItem_confirm::select_screen( GET_TEXT_F(MSG_BUTTON_PRINT), GET_TEXT_F(MSG_BUTTON_CANCEL), sdcard_start_selected_file, nullptr, - GET_TEXT_F(MSG_START_PRINT), buffer, F("?") + GET_TEXT_F(MSG_START_PRINT), filename, F("?") ); }); #else @@ -119,7 +116,7 @@ void menu_media_filelist() { #if ENABLED(MULTI_VOLUME) ACTION_ITEM(MSG_BACK, []{ ui.goto_screen(menu_media); }); #else - BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN) : GET_TEXT_F(MSG_BACK)); + BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN_MENU) : GET_TEXT_F(MSG_BACK)); #endif if (card.flag.workDirIsRoot) { #if !HAS_SD_DETECT @@ -148,7 +145,7 @@ void menu_media_filelist() { #if ENABLED(MULTI_VOLUME) void menu_media_select() { START_MENU(); - BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN) : GET_TEXT_F(MSG_BACK)); + BACK_ITEM_F(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT_F(MSG_MAIN_MENU) : GET_TEXT_F(MSG_BACK)); #if ENABLED(VOLUME_SD_ONBOARD) ACTION_ITEM(MSG_SD_CARD, []{ card.changeMedia(&card.media_driver_sdcard); card.mount(); ui.goto_screen(menu_media_filelist); }); #endif diff --git a/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/src/lcd/menu/menu_mixer.cpp index a867da896b07..21c18c820989 100644 --- a/Marlin/src/lcd/menu/menu_mixer.cpp +++ b/Marlin/src/lcd/menu/menu_mixer.cpp @@ -225,7 +225,7 @@ void lcd_mixer_mix_edit() { void menu_mixer() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); v_index = mixer.get_current_vtool(); EDIT_ITEM(uint8, MSG_ACTIVE_VTOOL, &v_index, 0, MIXING_VIRTUAL_TOOLS - 1, _lcd_mixer_select_vtool, ENABLED(HAS_DUAL_MIXING)); diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp index 0b2fa51e4a8c..347a585de130 100644 --- a/Marlin/src/lcd/menu/menu_mmu2.cpp +++ b/Marlin/src/lcd/menu/menu_mmu2.cpp @@ -104,7 +104,7 @@ void action_mmu2_reset() { void menu_mmu2() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); SUBMENU(MSG_MMU2_LOAD_FILAMENT, menu_mmu2_load_filament); SUBMENU(MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_load_to_nozzle); SUBMENU(MSG_MMU2_EJECT_FILAMENT, menu_mmu2_eject_filament); diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 2fac23596925..5c16a56f6914 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -316,7 +316,7 @@ void menu_motion() { // // ^ Main // - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Move Axis @@ -403,7 +403,7 @@ void menu_motion() { #endif #if ENABLED(LCD_BED_TRAMMING) && DISABLED(LCD_BED_LEVELING) - SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); #endif #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) diff --git a/Marlin/src/lcd/menu/menu_power_monitor.cpp b/Marlin/src/lcd/menu/menu_power_monitor.cpp index 3cd9909e5cf7..3d718c108a77 100644 --- a/Marlin/src/lcd/menu/menu_power_monitor.cpp +++ b/Marlin/src/lcd/menu/menu_power_monitor.cpp @@ -33,7 +33,7 @@ void menu_power_monitor() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(POWER_MONITOR_CURRENT) { diff --git a/Marlin/src/lcd/menu/menu_probe_offset.cpp b/Marlin/src/lcd/menu/menu_probe_offset.cpp index c7cbebaade82..34172de4581a 100644 --- a/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -51,7 +51,7 @@ inline void z_clearance_move() { void set_offset_and_go_back(const_float_t z) { probe.offset.z = z; SET_SOFT_ENDSTOP_LOOSE(false); - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); + TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active)); ui.goto_previous_screen_no_defer(); } @@ -119,7 +119,7 @@ void prepare_for_probe_offset_wizard() { // Move Nozzle to Probing/Homing Position ui.wait_for_move = true; current_position += probe.offset_xy; - line_to_current_position(MMM_TO_MMS(XY_PROBE_FEEDRATE)); + line_to_current_position(XY_PROBE_FEEDRATE_MM_S); ui.synchronize(GET_TEXT_F(MSG_PROBE_WIZARD_MOVING)); ui.wait_for_move = false; @@ -143,7 +143,7 @@ void goto_probe_offset_wizard() { // Store Bed-Leveling-State and disable #if HAS_LEVELING - leveling_was_active = planner.leveling_active; + menu_leveling_was_active = planner.leveling_active; set_bed_leveling_enabled(false); #endif diff --git a/Marlin/src/lcd/menu/menu_spindle_laser.cpp b/Marlin/src/lcd/menu/menu_spindle_laser.cpp index de16316987e6..e053361fb07e 100644 --- a/Marlin/src/lcd/menu/menu_spindle_laser.cpp +++ b/Marlin/src/lcd/menu/menu_spindle_laser.cpp @@ -39,7 +39,7 @@ #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); #if ENABLED(SPINDLE_LASER_USE_PWM) // Change the cutter's "current power" value without turning the cutter on or off diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index c9253b5fa1d1..56f80b89130a 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -162,7 +162,7 @@ void menu_temperature() { #endif START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Nozzle: @@ -222,7 +222,7 @@ void menu_temperature() { DEFINE_SINGLENOZZLE_ITEM(); #if HAS_FAN0 - _FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED); + _FAN_EDIT_ITEMS(0, FIRST_FAN_SPEED); #endif #if HAS_FAN1 && REDUNDANT_PART_COOLING_FAN != 1 FAN_EDIT_ITEMS(1); @@ -291,7 +291,7 @@ void menu_temperature() { void menu_preheat_only() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); for (uint8_t m = 0; m < PREHEAT_COUNT; ++m) { editable.int8 = m; diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming_wizard.cpp similarity index 100% rename from Marlin/src/lcd/menu/menu_tramming.cpp rename to Marlin/src/lcd/menu/menu_tramming_wizard.cpp diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index ca7085bd35e6..f63e88653eba 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -109,7 +109,7 @@ void menu_tune() { START_MENU(); - BACK_ITEM(MSG_MAIN); + BACK_ITEM(MSG_MAIN_MENU); // // Speed: diff --git a/Marlin/src/lcd/menu/menu_x_twist.cpp b/Marlin/src/lcd/menu/menu_x_twist.cpp index 5633b9b5d3c2..56872b73ee25 100644 --- a/Marlin/src/lcd/menu/menu_x_twist.cpp +++ b/Marlin/src/lcd/menu/menu_x_twist.cpp @@ -46,7 +46,7 @@ float measured_z, z_offset; void xatc_wizard_done() { if (!ui.wait_for_move) { xatc.print_points(); - set_bed_leveling_enabled(leveling_was_active); + set_bed_leveling_enabled(menu_leveling_was_active); SET_SOFT_ENDSTOP_LOOSE(false); ui.goto_screen(menu_advanced_settings); } @@ -141,7 +141,7 @@ void xatc_wizard_goto_next_point() { xatc.set_enabled(true); current_position += probe.offset_xy; current_position.z = (XATC_START_Z) - probe.offset.z + measured_z; - line_to_current_position(MMM_TO_MMS(XY_PROBE_FEEDRATE)); + line_to_current_position(XY_PROBE_FEEDRATE_MM_S); ui.wait_for_move = false; } else @@ -199,7 +199,7 @@ void xatc_wizard_homing() { void xatc_wizard_continue() { // Store Bed-Leveling-State and disable #if HAS_LEVELING - leveling_was_active = planner.leveling_active; + menu_leveling_was_active = planner.leveling_active; set_bed_leveling_enabled(false); #endif diff --git a/Marlin/src/lcd/tft/canvas.cpp b/Marlin/src/lcd/tft/canvas.cpp index e8b89bad7060..c852dd96b9a4 100644 --- a/Marlin/src/lcd/tft/canvas.cpp +++ b/Marlin/src/lcd/tft/canvas.cpp @@ -41,7 +41,7 @@ void CANVAS::New(uint16_t x, uint16_t y, uint16_t width, uint16_t height) { void CANVAS::Continue() { startLine = endLine; - endLine = TFT_BUFFER_SIZE < width * (height - startLine) ? startLine + TFT_BUFFER_SIZE / width : height; + endLine = TFT_BUFFER_WORDS < width * (height - startLine) ? startLine + TFT_BUFFER_WORDS / width : height; } bool CANVAS::ToScreen() { diff --git a/Marlin/src/lcd/tft/tft.h b/Marlin/src/lcd/tft/tft.h index 6df4c22d5191..9e6092705114 100644 --- a/Marlin/src/lcd/tft/tft.h +++ b/Marlin/src/lcd/tft/tft.h @@ -53,21 +53,21 @@ #error "Unsupported display resolution!" #endif -#ifndef TFT_BUFFER_SIZE +#ifndef TFT_BUFFER_WORDS #ifdef STM32F103xB - #define TFT_BUFFER_SIZE 1024 + #define TFT_BUFFER_WORDS 1024 #elif defined(STM32F103xE) - #define TFT_BUFFER_SIZE 19200 // 320 * 60 + #define TFT_BUFFER_WORDS 19200 // 320 * 60 #elif defined(STM32F1) - #define TFT_BUFFER_SIZE 8192 + #define TFT_BUFFER_WORDS 8192 #else - #define TFT_BUFFER_SIZE 19200 // 320 * 60 + #define TFT_BUFFER_WORDS 19200 // 320 * 60 #endif #endif -#if TFT_BUFFER_SIZE > DMA_MAX_SIZE +#if TFT_BUFFER_WORDS > DMA_MAX_WORDS // DMA Count parameter is uint16_t - #error "TFT_BUFFER_SIZE can not exceed DMA_MAX_SIZE" + #error "TFT_BUFFER_WORDS can not exceed DMA_MAX_WORDS" #endif class TFT { @@ -78,7 +78,7 @@ class TFT { public: static TFT_Queue queue; - static uint16_t buffer[TFT_BUFFER_SIZE]; + static uint16_t buffer[TFT_BUFFER_WORDS]; static void init(); static void set_font(const uint8_t *Font) { string.set_font(Font); } diff --git a/Marlin/src/lcd/tft/tft_queue.cpp b/Marlin/src/lcd/tft/tft_queue.cpp index 19dd810dc7dc..2ce421cae18e 100644 --- a/Marlin/src/lcd/tft/tft_queue.cpp +++ b/Marlin/src/lcd/tft/tft_queue.cpp @@ -86,9 +86,9 @@ void TFT_Queue::fill(queueTask_t *task) { task->state = TASK_STATE_IN_PROGRESS; } - if (task_parameters->count > DMA_MAX_SIZE) { - count = DMA_MAX_SIZE; - task_parameters->count -= DMA_MAX_SIZE; + if (task_parameters->count > DMA_MAX_WORDS) { + count = DMA_MAX_WORDS; + task_parameters->count -= DMA_MAX_WORDS; } else { count = task_parameters->count; diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp index d589b0465b7f..cd285b0d4a80 100644 --- a/Marlin/src/lcd/tft/tft_string.cpp +++ b/Marlin/src/lcd/tft/tft_string.cpp @@ -25,7 +25,7 @@ #if HAS_GRAPHICAL_TFT #include "tft_string.h" -#include "../fontutils.h" +#include "../utf8.h" #include "../marlinui.h" //#define DEBUG_TFT_FONT @@ -88,7 +88,7 @@ void TFT_String::set() { * Add a string, applying substitutions for the following characters: * * $ displays the string given by fstr or cstr - * = displays '0'....'10' for indexes 0 - 10 + * { displays '0'....'10' for indexes 0 - 10 * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) * @ displays an axis name such as XYZUVW, or E for an extruder @@ -101,9 +101,9 @@ void TFT_String::add(const char *tpl, const int8_t index, const char *cstr/*=nul if (wc > 255) wc |= 0x0080; const uint8_t ch = uint8_t(wc & 0x00FF); - if (ch == '=' || ch == '~' || ch == '*') { + if (ch == '{' || ch == '~' || ch == '*') { if (index >= 0) { - int8_t inum = index + ((ch == '=') ? 0 : LCD_FIRST_TOOL); + int8_t inum = index + ((ch == '{') ? 0 : LCD_FIRST_TOOL); if (ch == '*') add_character('E'); if (inum >= 10) { add_character('0' + (inum / 10)); inum %= 10; } add_character('0' + inum); diff --git a/Marlin/src/lcd/tft/tft_string.h b/Marlin/src/lcd/tft/tft_string.h index d43e0b0df2b4..1c3af88981b7 100644 --- a/Marlin/src/lcd/tft/tft_string.h +++ b/Marlin/src/lcd/tft/tft_string.h @@ -25,7 +25,7 @@ #include -#include "../fontutils.h" +#include "../utf8.h" extern const uint8_t ISO10646_1_5x7[]; extern const uint8_t font10x20[]; diff --git a/Marlin/src/lcd/tft_io/tft_io.h b/Marlin/src/lcd/tft_io/tft_io.h index 30c20f70fe38..32f2de9265e2 100644 --- a/Marlin/src/lcd/tft_io/tft_io.h +++ b/Marlin/src/lcd/tft_io/tft_io.h @@ -33,8 +33,8 @@ #error "TFT IO only supports SPI, FSMC or LTDC interface." #endif -#ifndef DMA_MAX_SIZE - #error "MAX_DMA_SIZE is not configured for this platform." +#ifndef DMA_MAX_WORDS + #error "DMA_MAX_WORDS is not configured for this platform." #endif // Each TFT Driver is responsible for its default color mode. diff --git a/Marlin/src/lcd/touch/touch_buttons.cpp b/Marlin/src/lcd/touch/touch_buttons.cpp index 7c55c62c533b..d6c891bd8a9c 100644 --- a/Marlin/src/lcd/touch/touch_buttons.cpp +++ b/Marlin/src/lcd/touch/touch_buttons.cpp @@ -65,7 +65,7 @@ void TouchButtons::init() { } uint8_t TouchButtons::read_buttons() { - #ifdef HAS_WIRED_LCD + #if HAS_WIRED_LCD int16_t x, y; #if ENABLED(TFT_TOUCH_DEVICE_XPT2046) diff --git a/Marlin/src/lcd/fontutils.cpp b/Marlin/src/lcd/utf8.cpp similarity index 91% rename from Marlin/src/lcd/fontutils.cpp rename to Marlin/src/lcd/utf8.cpp index 46329fd4be62..716b6d73c6b1 100644 --- a/Marlin/src/lcd/fontutils.cpp +++ b/Marlin/src/lcd/utf8.cpp @@ -21,8 +21,8 @@ */ /** - * @file fontutils.cpp - * @brief help functions for font and char + * @file utf8.cpp + * @brief Helper functions for UTF-8 strings * @author Yunhui Fu (yhfudev@gmail.com) * @version 1.0 * @date 2016-08-19 @@ -36,7 +36,7 @@ #include "../MarlinCore.h" #endif -#include "fontutils.h" +#include "utf8.h" uint8_t read_byte_ram(const uint8_t *str) { return *str; } uint8_t read_byte_rom(const uint8_t *str) { return pgm_read_byte(str); } @@ -90,13 +90,15 @@ int pf_bsearch_r(void *userdata, size_t num_data, pf_bsearch_cb_comp_t cb_comp, return -1; } -/* Returns true if passed byte is first byte of UTF-8 char sequence */ +// Is the passed byte the first byte of a UTF-8 char sequence? static inline bool utf8_is_start_byte_of_char(const uint8_t b) { return 0x80 != (b & 0xC0); } -/* This function gets the character at the pstart position, interpreting UTF8 multibyte sequences - and returns the pointer to the next character */ +/** + * Get the character at pstart, interpreting UTF8 multibyte sequences. + * Return the pointer to the next character. + */ const uint8_t* get_utf8_value_cb(const uint8_t *pstart, read_byte_cb_t cb_read_byte, lchar_t &pval) { uint32_t val = 0; const uint8_t *p = pstart; @@ -173,13 +175,8 @@ static inline uint8_t utf8_strlen_cb(const char *pstart, read_byte_cb_t cb_read_ return cnt; } -uint8_t utf8_strlen(const char *pstart) { - return utf8_strlen_cb(pstart, read_byte_ram); -} - -uint8_t utf8_strlen_P(PGM_P pstart) { - return utf8_strlen_cb(pstart, read_byte_rom); -} +uint8_t utf8_strlen(const char *pstart) { return utf8_strlen_cb(pstart, read_byte_ram); } +uint8_t utf8_strlen_P(PGM_P pstart) { return utf8_strlen_cb(pstart, read_byte_rom); } static inline uint8_t utf8_byte_pos_by_char_num_cb(const char *pstart, read_byte_cb_t cb_read_byte, const uint8_t charnum) { uint8_t *p = (uint8_t *)pstart; diff --git a/Marlin/src/lcd/fontutils.h b/Marlin/src/lcd/utf8.h similarity index 97% rename from Marlin/src/lcd/fontutils.h rename to Marlin/src/lcd/utf8.h index 69edf1a0c839..603181857174 100644 --- a/Marlin/src/lcd/fontutils.h +++ b/Marlin/src/lcd/utf8.h @@ -21,8 +21,8 @@ */ /** - * @file fontutils.h - * @brief help functions for font and char + * @file utf8.h + * @brief Helper functions for UTF-8 strings * @author Yunhui Fu (yhfudev@gmail.com) * @version 1.0 * @date 2016-08-19 diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 0460c6f70ce7..ed06322e2b31 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -961,7 +961,7 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr, // Isolate the next subitem name const uint8_t len = name_end - atom_ptr; char dosSubdirname[len + 1]; - strlcpy(dosSubdirname, atom_ptr, len + 1); + strncpy(dosSubdirname, atom_ptr, len); if (echo) SERIAL_ECHOLN(dosSubdirname); @@ -1067,7 +1067,7 @@ void CardReader::cdroot() { #endif #else // Copy filenames into the static array - #define _SET_SORTNAME(I) strlcpy(sortnames[I], longest_filename(), sizeof(sortnames[I])) + #define _SET_SORTNAME(I) strncpy(sortnames[I], longest_filename(), SORTED_LONGNAME_MAXLEN) #if SORTED_LONGNAME_MAXLEN == LONG_FILENAME_LENGTH // Short name sorting always use LONG_FILENAME_LENGTH with no trailing nul #define SET_SORTNAME(I) _SET_SORTNAME(I) diff --git a/buildroot/share/dwin/bin/DWIN_ICO.py b/buildroot/share/dwin/bin/DWIN_ICO.py index 3ddc734022ee..436a98701de0 100644 --- a/buildroot/share/dwin/bin/DWIN_ICO.py +++ b/buildroot/share/dwin/bin/DWIN_ICO.py @@ -113,8 +113,7 @@ def _splitEntryData(self, infile, outDir): # Seek file position, read length bytes, and write to new output file. print('%02d: offset: 0x%06x len: 0x%04x width: %d height: %d' % (count, entry.offset, entry.length, entry.width, entry.height)) - outfilename = os.path.join(outDir, - '%03d-%s.jpg' % (count, _iconNames[count])) + outfilename = os.path.join(outDir, '%03d-ICON_%s.jpg' % (count, _iconNames7[count])) with open(outfilename, 'wb') as outfile: infile.seek(entry.offset) blob = infile.read(entry.length) @@ -246,97 +245,97 @@ def serialize(self): 0, 0, 0, 0, 0) return rawdata -_iconNames = { - 0 : 'ICON_LOGO', - 1 : 'ICON_Print_0', - 2 : 'ICON_Print_1', - 3 : 'ICON_Prepare_0', - 4 : 'ICON_Prepare_1', - 5 : 'ICON_Control_0', - 6 : 'ICON_Control_1', - 7 : 'ICON_Leveling_0', - 8 : 'ICON_Leveling_1', - 9 : 'ICON_HotendTemp', - 10 : 'ICON_BedTemp', - 11 : 'ICON_Speed', - 12 : 'ICON_Zoffset', - 13 : 'ICON_Back', - 14 : 'ICON_File', - 15 : 'ICON_PrintTime', - 16 : 'ICON_RemainTime', - 17 : 'ICON_Setup_0', - 18 : 'ICON_Setup_1', - 19 : 'ICON_Pause_0', - 20 : 'ICON_Pause_1', - 21 : 'ICON_Continue_0', - 22 : 'ICON_Continue_1', - 23 : 'ICON_Stop_0', - 24 : 'ICON_Stop_1', - 25 : 'ICON_Bar', - 26 : 'ICON_More', - 27 : 'ICON_Axis', - 28 : 'ICON_CloseMotor', - 29 : 'ICON_Homing', - 30 : 'ICON_SetHome', - 31 : 'ICON_PLAPreheat', - 32 : 'ICON_ABSPreheat', - 33 : 'ICON_Cool', - 34 : 'ICON_Language', - 35 : 'ICON_MoveX', - 36 : 'ICON_MoveY', - 37 : 'ICON_MoveZ', - 38 : 'ICON_Extruder', - # no 39 - 40 : 'ICON_Temperature', - 41 : 'ICON_Motion', - 42 : 'ICON_WriteEEPROM', - 43 : 'ICON_ReadEEPROM', - 44 : 'ICON_ResumeEEPROM', - 45 : 'ICON_Info', - 46 : 'ICON_SetEndTemp', - 47 : 'ICON_SetBedTemp', - 48 : 'ICON_FanSpeed', - 49 : 'ICON_SetPLAPreheat', - 50 : 'ICON_SetABSPreheat', - 51 : 'ICON_MaxSpeed', - 52 : 'ICON_MaxAccelerated', - 53 : 'ICON_MaxJerk', - 54 : 'ICON_Step', - 55 : 'ICON_PrintSize', - 56 : 'ICON_Version', - 57 : 'ICON_Contact', - 58 : 'ICON_StockConfiguraton', - 59 : 'ICON_MaxSpeedX', - 60 : 'ICON_MaxSpeedY', - 61 : 'ICON_MaxSpeedZ', - 62 : 'ICON_MaxSpeedE', - 63 : 'ICON_MaxAccX', - 64 : 'ICON_MaxAccY', - 65 : 'ICON_MaxAccZ', - 66 : 'ICON_MaxAccE', - 67 : 'ICON_MaxSpeedJerkX', - 68 : 'ICON_MaxSpeedJerkY', - 69 : 'ICON_MaxSpeedJerkZ', - 70 : 'ICON_MaxSpeedJerkE', - 71 : 'ICON_StepX', - 72 : 'ICON_StepY', - 73 : 'ICON_StepZ', - 74 : 'ICON_StepE', - 75 : 'ICON_Setspeed', - 76 : 'ICON_SetZOffset', - 77 : 'ICON_Rectangle', - 78 : 'ICON_BLTouch', - 79 : 'ICON_TempTooLow', - 80 : 'ICON_AutoLeveling', - 81 : 'ICON_TempTooHigh', - 82 : 'ICON_NoTips_C', - 83 : 'ICON_NoTips_E', - 84 : 'ICON_Continue_C', - 85 : 'ICON_Continue_E', - 86 : 'ICON_Cancel_C', - 87 : 'ICON_Cancel_E', - 88 : 'ICON_Confirm_C', - 89 : 'ICON_Confirm_E', - 90 : 'ICON_Info_0', - 91 : 'ICON_Info_1' - } +_iconNames7 = { + 0 : "LOGO_Creality", + 1 : "Print_0", + 2 : "Print_1", + 3 : "Prepare_0", + 4 : "Prepare_1", + 5 : "Control_0", + 6 : "Control_1", + 7 : "Leveling_0", + 8 : "Leveling_1", + 9 : "HotendTemp", + 10 : "BedTemp", + 11 : "Speed", + 12 : "Zoffset", + 13 : "Back", + 14 : "File", + 15 : "PrintTime", + 16 : "RemainTime", + 17 : "Setup_0", + 18 : "Setup_1", + 19 : "Pause_0", + 20 : "Pause_1", + 21 : "Continue_0", + 22 : "Continue_1", + 23 : "Stop_0", + 24 : "Stop_1", + 25 : "Bar", + 26 : "More", + 27 : "Axis", + 28 : "CloseMotor", + 29 : "Homing", + 30 : "SetHome", + 31 : "PLAPreheat", + 32 : "ABSPreheat", + 33 : "Cool", + 34 : "Language", + 35 : "MoveX", + 36 : "MoveY", + 37 : "MoveZ", + 38 : "Extruder", + # Skip 39 + 40 : "Temperature", + 41 : "Motion", + 42 : "WriteEEPROM", + 43 : "ReadEEPROM", + 44 : "ResetEEPROM", + 45 : "Info", + 46 : "SetEndTemp", + 47 : "SetBedTemp", + 48 : "FanSpeed", + 49 : "SetPLAPreheat", + 50 : "SetABSPreheat", + 51 : "MaxSpeed", + 52 : "MaxAccelerated", + 53 : "MaxJerk", + 54 : "Step", + 55 : "PrintSize", + 56 : "Version", + 57 : "Contact", + 58 : "StockConfiguraton", + 59 : "MaxSpeedX", + 60 : "MaxSpeedY", + 61 : "MaxSpeedZ", + 62 : "MaxSpeedE", + 63 : "MaxAccX", + 64 : "MaxAccY", + 65 : "MaxAccZ", + 66 : "MaxAccE", + 67 : "MaxSpeedJerkX", + 68 : "MaxSpeedJerkY", + 69 : "MaxSpeedJerkZ", + 70 : "MaxSpeedJerkE", + 71 : "StepX", + 72 : "StepY", + 73 : "StepZ", + 74 : "StepE", + 75 : "Setspeed", + 76 : "SetZOffset", + 77 : "Rectangle", + 78 : "BLTouch", + 79 : "TempTooLow", + 80 : "AutoLeveling", + 81 : "TempTooHigh", + 82 : "NoTips_C", + 83 : "NoTips_E", + 84 : "Continue_C", + 85 : "Continue_E", + 86 : "Cancel_C", + 87 : "Cancel_E", + 88 : "Confirm_C", + 89 : "Confirm_E", + 90 : "Info_0", + 91 : "Info_1" +} diff --git a/buildroot/share/dwin/icons-2/000-ICON_BootLogo.jpg b/buildroot/share/dwin/icons-3/000-ICON_BootLogo.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/000-ICON_BootLogo.jpg rename to buildroot/share/dwin/icons-3/000-ICON_BootLogo.jpg diff --git a/buildroot/share/dwin/icons-2/001-ICON_OpenSourceFirmware.jpg b/buildroot/share/dwin/icons-3/001-ICON_OpenSourceFirmware.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/001-ICON_OpenSourceFirmware.jpg rename to buildroot/share/dwin/icons-3/001-ICON_OpenSourceFirmware.jpg diff --git a/buildroot/share/dwin/icons-2/002-ICON_GitHub.jpg b/buildroot/share/dwin/icons-3/002-ICON_GitHub.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/002-ICON_GitHub.jpg rename to buildroot/share/dwin/icons-3/002-ICON_GitHub.jpg diff --git a/buildroot/share/dwin/icons-2/003-ICON_Website.jpg b/buildroot/share/dwin/icons-3/003-ICON_Website.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/003-ICON_Website.jpg rename to buildroot/share/dwin/icons-3/003-ICON_Website.jpg diff --git a/buildroot/share/dwin/icons-2/004-ICON_Copyright.jpg b/buildroot/share/dwin/icons-3/004-ICON_Copyright.jpg similarity index 100% rename from buildroot/share/dwin/icons-2/004-ICON_Copyright.jpg rename to buildroot/share/dwin/icons-3/004-ICON_Copyright.jpg diff --git a/buildroot/share/dwin/icons-3/000-ICON_LOGO_Marlin.jpg b/buildroot/share/dwin/icons-4/000-ICON_LOGO_Marlin.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/000-ICON_LOGO_Marlin.jpg rename to buildroot/share/dwin/icons-4/000-ICON_LOGO_Marlin.jpg diff --git a/buildroot/share/dwin/icons-3/001-ICON_HotendOff.jpg b/buildroot/share/dwin/icons-4/001-ICON_HotendOff.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/001-ICON_HotendOff.jpg rename to buildroot/share/dwin/icons-4/001-ICON_HotendOff.jpg diff --git a/buildroot/share/dwin/icons-3/002-ICON_HotendOn.jpg b/buildroot/share/dwin/icons-4/002-ICON_HotendOn.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/002-ICON_HotendOn.jpg rename to buildroot/share/dwin/icons-4/002-ICON_HotendOn.jpg diff --git a/buildroot/share/dwin/icons-3/003-ICON_BedOff.jpg b/buildroot/share/dwin/icons-4/003-ICON_BedOff.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/003-ICON_BedOff.jpg rename to buildroot/share/dwin/icons-4/003-ICON_BedOff.jpg diff --git a/buildroot/share/dwin/icons-3/004-ICON_BedOn.jpg b/buildroot/share/dwin/icons-4/004-ICON_BedOn.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/004-ICON_BedOn.jpg rename to buildroot/share/dwin/icons-4/004-ICON_BedOn.jpg diff --git a/buildroot/share/dwin/icons-3/005-ICON_Fan0.jpg b/buildroot/share/dwin/icons-4/005-ICON_Fan0.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/005-ICON_Fan0.jpg rename to buildroot/share/dwin/icons-4/005-ICON_Fan0.jpg diff --git a/buildroot/share/dwin/icons-3/006-ICON_Fan1.jpg b/buildroot/share/dwin/icons-4/006-ICON_Fan1.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/006-ICON_Fan1.jpg rename to buildroot/share/dwin/icons-4/006-ICON_Fan1.jpg diff --git a/buildroot/share/dwin/icons-3/007-ICON_Fan2.jpg b/buildroot/share/dwin/icons-4/007-ICON_Fan2.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/007-ICON_Fan2.jpg rename to buildroot/share/dwin/icons-4/007-ICON_Fan2.jpg diff --git a/buildroot/share/dwin/icons-3/008-ICON_Fan3.jpg b/buildroot/share/dwin/icons-4/008-ICON_Fan3.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/008-ICON_Fan3.jpg rename to buildroot/share/dwin/icons-4/008-ICON_Fan3.jpg diff --git a/buildroot/share/dwin/icons-3/009-ICON_Halted.jpg b/buildroot/share/dwin/icons-4/009-ICON_Halted.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/009-ICON_Halted.jpg rename to buildroot/share/dwin/icons-4/009-ICON_Halted.jpg diff --git a/buildroot/share/dwin/icons-3/010-ICON_Question.jpg b/buildroot/share/dwin/icons-4/010-ICON_Question.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/010-ICON_Question.jpg rename to buildroot/share/dwin/icons-4/010-ICON_Question.jpg diff --git a/buildroot/share/dwin/icons-3/011-ICON_Alert.jpg b/buildroot/share/dwin/icons-4/011-ICON_Alert.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/011-ICON_Alert.jpg rename to buildroot/share/dwin/icons-4/011-ICON_Alert.jpg diff --git a/buildroot/share/dwin/icons-3/012-ICON_RotateCW.jpg b/buildroot/share/dwin/icons-4/012-ICON_RotateCW.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/012-ICON_RotateCW.jpg rename to buildroot/share/dwin/icons-4/012-ICON_RotateCW.jpg diff --git a/buildroot/share/dwin/icons-3/013-ICON_RotateCCW.jpg b/buildroot/share/dwin/icons-4/013-ICON_RotateCCW.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/013-ICON_RotateCCW.jpg rename to buildroot/share/dwin/icons-4/013-ICON_RotateCCW.jpg diff --git a/buildroot/share/dwin/icons-3/014-ICON_UpArrow.jpg b/buildroot/share/dwin/icons-4/014-ICON_UpArrow.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/014-ICON_UpArrow.jpg rename to buildroot/share/dwin/icons-4/014-ICON_UpArrow.jpg diff --git a/buildroot/share/dwin/icons-3/015-ICON_DownArrow.jpg b/buildroot/share/dwin/icons-4/015-ICON_DownArrow.jpg similarity index 100% rename from buildroot/share/dwin/icons-3/015-ICON_DownArrow.jpg rename to buildroot/share/dwin/icons-4/015-ICON_DownArrow.jpg diff --git a/buildroot/share/dwin/icons-6/000-ICON_LOGO_Creality.jpg b/buildroot/share/dwin/icons-7/000-ICON_LOGO_Creality.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/000-ICON_LOGO_Creality.jpg rename to buildroot/share/dwin/icons-7/000-ICON_LOGO_Creality.jpg diff --git a/buildroot/share/dwin/icons-6/001-ICON_Print_0.jpg b/buildroot/share/dwin/icons-7/001-ICON_Print_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/001-ICON_Print_0.jpg rename to buildroot/share/dwin/icons-7/001-ICON_Print_0.jpg diff --git a/buildroot/share/dwin/icons-6/002-ICON_Print_1.jpg b/buildroot/share/dwin/icons-7/002-ICON_Print_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/002-ICON_Print_1.jpg rename to buildroot/share/dwin/icons-7/002-ICON_Print_1.jpg diff --git a/buildroot/share/dwin/icons-6/003-ICON_Prepare_0.jpg b/buildroot/share/dwin/icons-7/003-ICON_Prepare_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/003-ICON_Prepare_0.jpg rename to buildroot/share/dwin/icons-7/003-ICON_Prepare_0.jpg diff --git a/buildroot/share/dwin/icons-6/004-ICON_Prepare_1.jpg b/buildroot/share/dwin/icons-7/004-ICON_Prepare_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/004-ICON_Prepare_1.jpg rename to buildroot/share/dwin/icons-7/004-ICON_Prepare_1.jpg diff --git a/buildroot/share/dwin/icons-6/005-ICON_Control_0.jpg b/buildroot/share/dwin/icons-7/005-ICON_Control_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/005-ICON_Control_0.jpg rename to buildroot/share/dwin/icons-7/005-ICON_Control_0.jpg diff --git a/buildroot/share/dwin/icons-6/006-ICON_Control_1.jpg b/buildroot/share/dwin/icons-7/006-ICON_Control_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/006-ICON_Control_1.jpg rename to buildroot/share/dwin/icons-7/006-ICON_Control_1.jpg diff --git a/buildroot/share/dwin/icons-6/007-ICON_Leveling_0.jpg b/buildroot/share/dwin/icons-7/007-ICON_Leveling_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/007-ICON_Leveling_0.jpg rename to buildroot/share/dwin/icons-7/007-ICON_Leveling_0.jpg diff --git a/buildroot/share/dwin/icons-6/008-ICON_Leveling_1.jpg b/buildroot/share/dwin/icons-7/008-ICON_Leveling_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/008-ICON_Leveling_1.jpg rename to buildroot/share/dwin/icons-7/008-ICON_Leveling_1.jpg diff --git a/buildroot/share/dwin/icons-6/009-ICON_HotendTemp.jpg b/buildroot/share/dwin/icons-7/009-ICON_HotendTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/009-ICON_HotendTemp.jpg rename to buildroot/share/dwin/icons-7/009-ICON_HotendTemp.jpg diff --git a/buildroot/share/dwin/icons-6/010-ICON_BedTemp.jpg b/buildroot/share/dwin/icons-7/010-ICON_BedTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/010-ICON_BedTemp.jpg rename to buildroot/share/dwin/icons-7/010-ICON_BedTemp.jpg diff --git a/buildroot/share/dwin/icons-6/011-ICON_Speed.jpg b/buildroot/share/dwin/icons-7/011-ICON_Speed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/011-ICON_Speed.jpg rename to buildroot/share/dwin/icons-7/011-ICON_Speed.jpg diff --git a/buildroot/share/dwin/icons-6/012-ICON_Zoffset.jpg b/buildroot/share/dwin/icons-7/012-ICON_Zoffset.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/012-ICON_Zoffset.jpg rename to buildroot/share/dwin/icons-7/012-ICON_Zoffset.jpg diff --git a/buildroot/share/dwin/icons-6/013-ICON_Back.jpg b/buildroot/share/dwin/icons-7/013-ICON_Back.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/013-ICON_Back.jpg rename to buildroot/share/dwin/icons-7/013-ICON_Back.jpg diff --git a/buildroot/share/dwin/icons-6/014-ICON_File.jpg b/buildroot/share/dwin/icons-7/014-ICON_File.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/014-ICON_File.jpg rename to buildroot/share/dwin/icons-7/014-ICON_File.jpg diff --git a/buildroot/share/dwin/icons-6/015-ICON_PrintTime.jpg b/buildroot/share/dwin/icons-7/015-ICON_PrintTime.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/015-ICON_PrintTime.jpg rename to buildroot/share/dwin/icons-7/015-ICON_PrintTime.jpg diff --git a/buildroot/share/dwin/icons-6/016-ICON_RemainTime.jpg b/buildroot/share/dwin/icons-7/016-ICON_RemainTime.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/016-ICON_RemainTime.jpg rename to buildroot/share/dwin/icons-7/016-ICON_RemainTime.jpg diff --git a/buildroot/share/dwin/icons-6/017-ICON_Setup_0.jpg b/buildroot/share/dwin/icons-7/017-ICON_Setup_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/017-ICON_Setup_0.jpg rename to buildroot/share/dwin/icons-7/017-ICON_Setup_0.jpg diff --git a/buildroot/share/dwin/icons-6/018-ICON_Setup_1.jpg b/buildroot/share/dwin/icons-7/018-ICON_Setup_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/018-ICON_Setup_1.jpg rename to buildroot/share/dwin/icons-7/018-ICON_Setup_1.jpg diff --git a/buildroot/share/dwin/icons-6/019-ICON_Pause_0.jpg b/buildroot/share/dwin/icons-7/019-ICON_Pause_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/019-ICON_Pause_0.jpg rename to buildroot/share/dwin/icons-7/019-ICON_Pause_0.jpg diff --git a/buildroot/share/dwin/icons-6/020-ICON_Pause_1.jpg b/buildroot/share/dwin/icons-7/020-ICON_Pause_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/020-ICON_Pause_1.jpg rename to buildroot/share/dwin/icons-7/020-ICON_Pause_1.jpg diff --git a/buildroot/share/dwin/icons-6/021-ICON_Continue_0.jpg b/buildroot/share/dwin/icons-7/021-ICON_Continue_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/021-ICON_Continue_0.jpg rename to buildroot/share/dwin/icons-7/021-ICON_Continue_0.jpg diff --git a/buildroot/share/dwin/icons-6/022-ICON_Continue_1.jpg b/buildroot/share/dwin/icons-7/022-ICON_Continue_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/022-ICON_Continue_1.jpg rename to buildroot/share/dwin/icons-7/022-ICON_Continue_1.jpg diff --git a/buildroot/share/dwin/icons-6/023-ICON_Stop_0.jpg b/buildroot/share/dwin/icons-7/023-ICON_Stop_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/023-ICON_Stop_0.jpg rename to buildroot/share/dwin/icons-7/023-ICON_Stop_0.jpg diff --git a/buildroot/share/dwin/icons-6/024-ICON_Stop_1.jpg b/buildroot/share/dwin/icons-7/024-ICON_Stop_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/024-ICON_Stop_1.jpg rename to buildroot/share/dwin/icons-7/024-ICON_Stop_1.jpg diff --git a/buildroot/share/dwin/icons-6/025-ICON_Bar.jpg b/buildroot/share/dwin/icons-7/025-ICON_Bar.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/025-ICON_Bar.jpg rename to buildroot/share/dwin/icons-7/025-ICON_Bar.jpg diff --git a/buildroot/share/dwin/icons-6/026-ICON_More.jpg b/buildroot/share/dwin/icons-7/026-ICON_More.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/026-ICON_More.jpg rename to buildroot/share/dwin/icons-7/026-ICON_More.jpg diff --git a/buildroot/share/dwin/icons-6/027-ICON_Axis.jpg b/buildroot/share/dwin/icons-7/027-ICON_Axis.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/027-ICON_Axis.jpg rename to buildroot/share/dwin/icons-7/027-ICON_Axis.jpg diff --git a/buildroot/share/dwin/icons-6/028-ICON_CloseMotor.jpg b/buildroot/share/dwin/icons-7/028-ICON_CloseMotor.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/028-ICON_CloseMotor.jpg rename to buildroot/share/dwin/icons-7/028-ICON_CloseMotor.jpg diff --git a/buildroot/share/dwin/icons-6/029-ICON_Homing.jpg b/buildroot/share/dwin/icons-7/029-ICON_Homing.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/029-ICON_Homing.jpg rename to buildroot/share/dwin/icons-7/029-ICON_Homing.jpg diff --git a/buildroot/share/dwin/icons-6/030-ICON_SetHome.jpg b/buildroot/share/dwin/icons-7/030-ICON_SetHome.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/030-ICON_SetHome.jpg rename to buildroot/share/dwin/icons-7/030-ICON_SetHome.jpg diff --git a/buildroot/share/dwin/icons-6/031-ICON_PLAPreheat.jpg b/buildroot/share/dwin/icons-7/031-ICON_PLAPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/031-ICON_PLAPreheat.jpg rename to buildroot/share/dwin/icons-7/031-ICON_PLAPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/032-ICON_ABSPreheat.jpg b/buildroot/share/dwin/icons-7/032-ICON_ABSPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/032-ICON_ABSPreheat.jpg rename to buildroot/share/dwin/icons-7/032-ICON_ABSPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/033-ICON_Cool.jpg b/buildroot/share/dwin/icons-7/033-ICON_Cool.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/033-ICON_Cool.jpg rename to buildroot/share/dwin/icons-7/033-ICON_Cool.jpg diff --git a/buildroot/share/dwin/icons-6/034-ICON_Language.jpg b/buildroot/share/dwin/icons-7/034-ICON_Language.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/034-ICON_Language.jpg rename to buildroot/share/dwin/icons-7/034-ICON_Language.jpg diff --git a/buildroot/share/dwin/icons-6/035-ICON_MoveX.jpg b/buildroot/share/dwin/icons-7/035-ICON_MoveX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/035-ICON_MoveX.jpg rename to buildroot/share/dwin/icons-7/035-ICON_MoveX.jpg diff --git a/buildroot/share/dwin/icons-6/036-ICON_MoveY.jpg b/buildroot/share/dwin/icons-7/036-ICON_MoveY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/036-ICON_MoveY.jpg rename to buildroot/share/dwin/icons-7/036-ICON_MoveY.jpg diff --git a/buildroot/share/dwin/icons-6/037-ICON_MoveZ.jpg b/buildroot/share/dwin/icons-7/037-ICON_MoveZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/037-ICON_MoveZ.jpg rename to buildroot/share/dwin/icons-7/037-ICON_MoveZ.jpg diff --git a/buildroot/share/dwin/icons-6/038-ICON_Extruder.jpg b/buildroot/share/dwin/icons-7/038-ICON_Extruder.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/038-ICON_Extruder.jpg rename to buildroot/share/dwin/icons-7/038-ICON_Extruder.jpg diff --git a/buildroot/share/dwin/icons-6/040-ICON_Temperature.jpg b/buildroot/share/dwin/icons-7/040-ICON_Temperature.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/040-ICON_Temperature.jpg rename to buildroot/share/dwin/icons-7/040-ICON_Temperature.jpg diff --git a/buildroot/share/dwin/icons-6/041-ICON_Motion.jpg b/buildroot/share/dwin/icons-7/041-ICON_Motion.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/041-ICON_Motion.jpg rename to buildroot/share/dwin/icons-7/041-ICON_Motion.jpg diff --git a/buildroot/share/dwin/icons-6/042-ICON_WriteEEPROM.jpg b/buildroot/share/dwin/icons-7/042-ICON_WriteEEPROM.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/042-ICON_WriteEEPROM.jpg rename to buildroot/share/dwin/icons-7/042-ICON_WriteEEPROM.jpg diff --git a/buildroot/share/dwin/icons-6/043-ICON_ReadEEPROM.jpg b/buildroot/share/dwin/icons-7/043-ICON_ReadEEPROM.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/043-ICON_ReadEEPROM.jpg rename to buildroot/share/dwin/icons-7/043-ICON_ReadEEPROM.jpg diff --git a/buildroot/share/dwin/icons-6/044-ICON_ResumeEEPROM.jpg b/buildroot/share/dwin/icons-7/044-ICON_ResetEEPROM.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/044-ICON_ResumeEEPROM.jpg rename to buildroot/share/dwin/icons-7/044-ICON_ResetEEPROM.jpg diff --git a/buildroot/share/dwin/icons-6/045-ICON_Info.jpg b/buildroot/share/dwin/icons-7/045-ICON_Info.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/045-ICON_Info.jpg rename to buildroot/share/dwin/icons-7/045-ICON_Info.jpg diff --git a/buildroot/share/dwin/icons-6/046-ICON_SetEndTemp.jpg b/buildroot/share/dwin/icons-7/046-ICON_SetEndTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/046-ICON_SetEndTemp.jpg rename to buildroot/share/dwin/icons-7/046-ICON_SetEndTemp.jpg diff --git a/buildroot/share/dwin/icons-6/047-ICON_SetBedTemp.jpg b/buildroot/share/dwin/icons-7/047-ICON_SetBedTemp.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/047-ICON_SetBedTemp.jpg rename to buildroot/share/dwin/icons-7/047-ICON_SetBedTemp.jpg diff --git a/buildroot/share/dwin/icons-6/048-ICON_FanSpeed.jpg b/buildroot/share/dwin/icons-7/048-ICON_FanSpeed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/048-ICON_FanSpeed.jpg rename to buildroot/share/dwin/icons-7/048-ICON_FanSpeed.jpg diff --git a/buildroot/share/dwin/icons-6/049-ICON_SetPLAPreheat.jpg b/buildroot/share/dwin/icons-7/049-ICON_SetPLAPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/049-ICON_SetPLAPreheat.jpg rename to buildroot/share/dwin/icons-7/049-ICON_SetPLAPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/050-ICON_SetABSPreheat.jpg b/buildroot/share/dwin/icons-7/050-ICON_SetABSPreheat.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/050-ICON_SetABSPreheat.jpg rename to buildroot/share/dwin/icons-7/050-ICON_SetABSPreheat.jpg diff --git a/buildroot/share/dwin/icons-6/051-ICON_MaxSpeed.jpg b/buildroot/share/dwin/icons-7/051-ICON_MaxSpeed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/051-ICON_MaxSpeed.jpg rename to buildroot/share/dwin/icons-7/051-ICON_MaxSpeed.jpg diff --git a/buildroot/share/dwin/icons-6/052-ICON_MaxAccelerated.jpg b/buildroot/share/dwin/icons-7/052-ICON_MaxAccelerated.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/052-ICON_MaxAccelerated.jpg rename to buildroot/share/dwin/icons-7/052-ICON_MaxAccelerated.jpg diff --git a/buildroot/share/dwin/icons-6/053-ICON_MaxJerk.jpg b/buildroot/share/dwin/icons-7/053-ICON_MaxJerk.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/053-ICON_MaxJerk.jpg rename to buildroot/share/dwin/icons-7/053-ICON_MaxJerk.jpg diff --git a/buildroot/share/dwin/icons-6/054-ICON_Step.jpg b/buildroot/share/dwin/icons-7/054-ICON_Step.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/054-ICON_Step.jpg rename to buildroot/share/dwin/icons-7/054-ICON_Step.jpg diff --git a/buildroot/share/dwin/icons-6/055-ICON_PrintSize.jpg b/buildroot/share/dwin/icons-7/055-ICON_PrintSize.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/055-ICON_PrintSize.jpg rename to buildroot/share/dwin/icons-7/055-ICON_PrintSize.jpg diff --git a/buildroot/share/dwin/icons-6/056-ICON_Version.jpg b/buildroot/share/dwin/icons-7/056-ICON_Version.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/056-ICON_Version.jpg rename to buildroot/share/dwin/icons-7/056-ICON_Version.jpg diff --git a/buildroot/share/dwin/icons-6/057-ICON_Contact.jpg b/buildroot/share/dwin/icons-7/057-ICON_Contact.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/057-ICON_Contact.jpg rename to buildroot/share/dwin/icons-7/057-ICON_Contact.jpg diff --git a/buildroot/share/dwin/icons-6/058-ICON_StockConfiguraton.jpg b/buildroot/share/dwin/icons-7/058-ICON_StockConfiguraton.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/058-ICON_StockConfiguraton.jpg rename to buildroot/share/dwin/icons-7/058-ICON_StockConfiguraton.jpg diff --git a/buildroot/share/dwin/icons-6/059-ICON_MaxSpeedX.jpg b/buildroot/share/dwin/icons-7/059-ICON_MaxSpeedX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/059-ICON_MaxSpeedX.jpg rename to buildroot/share/dwin/icons-7/059-ICON_MaxSpeedX.jpg diff --git a/buildroot/share/dwin/icons-6/060-ICON_MaxSpeedY.jpg b/buildroot/share/dwin/icons-7/060-ICON_MaxSpeedY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/060-ICON_MaxSpeedY.jpg rename to buildroot/share/dwin/icons-7/060-ICON_MaxSpeedY.jpg diff --git a/buildroot/share/dwin/icons-6/061-ICON_MaxSpeedZ.jpg b/buildroot/share/dwin/icons-7/061-ICON_MaxSpeedZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/061-ICON_MaxSpeedZ.jpg rename to buildroot/share/dwin/icons-7/061-ICON_MaxSpeedZ.jpg diff --git a/buildroot/share/dwin/icons-6/062-ICON_MaxSpeedE.jpg b/buildroot/share/dwin/icons-7/062-ICON_MaxSpeedE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/062-ICON_MaxSpeedE.jpg rename to buildroot/share/dwin/icons-7/062-ICON_MaxSpeedE.jpg diff --git a/buildroot/share/dwin/icons-6/063-ICON_MaxAccX.jpg b/buildroot/share/dwin/icons-7/063-ICON_MaxAccX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/063-ICON_MaxAccX.jpg rename to buildroot/share/dwin/icons-7/063-ICON_MaxAccX.jpg diff --git a/buildroot/share/dwin/icons-6/064-ICON_MaxAccY.jpg b/buildroot/share/dwin/icons-7/064-ICON_MaxAccY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/064-ICON_MaxAccY.jpg rename to buildroot/share/dwin/icons-7/064-ICON_MaxAccY.jpg diff --git a/buildroot/share/dwin/icons-6/065-ICON_MaxAccZ.jpg b/buildroot/share/dwin/icons-7/065-ICON_MaxAccZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/065-ICON_MaxAccZ.jpg rename to buildroot/share/dwin/icons-7/065-ICON_MaxAccZ.jpg diff --git a/buildroot/share/dwin/icons-6/066-ICON_MaxAccE.jpg b/buildroot/share/dwin/icons-7/066-ICON_MaxAccE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/066-ICON_MaxAccE.jpg rename to buildroot/share/dwin/icons-7/066-ICON_MaxAccE.jpg diff --git a/buildroot/share/dwin/icons-6/067-ICON_MaxSpeedJerkX.jpg b/buildroot/share/dwin/icons-7/067-ICON_MaxSpeedJerkX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/067-ICON_MaxSpeedJerkX.jpg rename to buildroot/share/dwin/icons-7/067-ICON_MaxSpeedJerkX.jpg diff --git a/buildroot/share/dwin/icons-6/068-ICON_MaxSpeedJerkY.jpg b/buildroot/share/dwin/icons-7/068-ICON_MaxSpeedJerkY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/068-ICON_MaxSpeedJerkY.jpg rename to buildroot/share/dwin/icons-7/068-ICON_MaxSpeedJerkY.jpg diff --git a/buildroot/share/dwin/icons-6/069-ICON_MaxSpeedJerkZ.jpg b/buildroot/share/dwin/icons-7/069-ICON_MaxSpeedJerkZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/069-ICON_MaxSpeedJerkZ.jpg rename to buildroot/share/dwin/icons-7/069-ICON_MaxSpeedJerkZ.jpg diff --git a/buildroot/share/dwin/icons-6/070-ICON_MaxSpeedJerkE.jpg b/buildroot/share/dwin/icons-7/070-ICON_MaxSpeedJerkE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/070-ICON_MaxSpeedJerkE.jpg rename to buildroot/share/dwin/icons-7/070-ICON_MaxSpeedJerkE.jpg diff --git a/buildroot/share/dwin/icons-6/071-ICON_StepX.jpg b/buildroot/share/dwin/icons-7/071-ICON_StepX.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/071-ICON_StepX.jpg rename to buildroot/share/dwin/icons-7/071-ICON_StepX.jpg diff --git a/buildroot/share/dwin/icons-6/072-ICON_StepY.jpg b/buildroot/share/dwin/icons-7/072-ICON_StepY.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/072-ICON_StepY.jpg rename to buildroot/share/dwin/icons-7/072-ICON_StepY.jpg diff --git a/buildroot/share/dwin/icons-6/073-ICON_StepZ.jpg b/buildroot/share/dwin/icons-7/073-ICON_StepZ.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/073-ICON_StepZ.jpg rename to buildroot/share/dwin/icons-7/073-ICON_StepZ.jpg diff --git a/buildroot/share/dwin/icons-6/074-ICON_StepE.jpg b/buildroot/share/dwin/icons-7/074-ICON_StepE.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/074-ICON_StepE.jpg rename to buildroot/share/dwin/icons-7/074-ICON_StepE.jpg diff --git a/buildroot/share/dwin/icons-6/075-ICON_Setspeed.jpg b/buildroot/share/dwin/icons-7/075-ICON_Setspeed.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/075-ICON_Setspeed.jpg rename to buildroot/share/dwin/icons-7/075-ICON_Setspeed.jpg diff --git a/buildroot/share/dwin/icons-6/076-ICON_SetZOffset.jpg b/buildroot/share/dwin/icons-7/076-ICON_SetZOffset.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/076-ICON_SetZOffset.jpg rename to buildroot/share/dwin/icons-7/076-ICON_SetZOffset.jpg diff --git a/buildroot/share/dwin/icons-6/077-ICON_Rectangle.jpg b/buildroot/share/dwin/icons-7/077-ICON_Rectangle.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/077-ICON_Rectangle.jpg rename to buildroot/share/dwin/icons-7/077-ICON_Rectangle.jpg diff --git a/buildroot/share/dwin/icons-6/078-ICON_BLTouch.jpg b/buildroot/share/dwin/icons-7/078-ICON_BLTouch.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/078-ICON_BLTouch.jpg rename to buildroot/share/dwin/icons-7/078-ICON_BLTouch.jpg diff --git a/buildroot/share/dwin/icons-6/079-ICON_TempTooLow.jpg b/buildroot/share/dwin/icons-7/079-ICON_TempTooLow.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/079-ICON_TempTooLow.jpg rename to buildroot/share/dwin/icons-7/079-ICON_TempTooLow.jpg diff --git a/buildroot/share/dwin/icons-6/080-ICON_AutoLeveling.jpg b/buildroot/share/dwin/icons-7/080-ICON_AutoLeveling.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/080-ICON_AutoLeveling.jpg rename to buildroot/share/dwin/icons-7/080-ICON_AutoLeveling.jpg diff --git a/buildroot/share/dwin/icons-6/081-ICON_TempTooHigh.jpg b/buildroot/share/dwin/icons-7/081-ICON_TempTooHigh.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/081-ICON_TempTooHigh.jpg rename to buildroot/share/dwin/icons-7/081-ICON_TempTooHigh.jpg diff --git a/buildroot/share/dwin/icons-6/082-ICON_NoTips_C.jpg b/buildroot/share/dwin/icons-7/082-ICON_NoTips_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/082-ICON_NoTips_C.jpg rename to buildroot/share/dwin/icons-7/082-ICON_NoTips_C.jpg diff --git a/buildroot/share/dwin/icons-6/083-ICON_NoTips_E.jpg b/buildroot/share/dwin/icons-7/083-ICON_NoTips_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/083-ICON_NoTips_E.jpg rename to buildroot/share/dwin/icons-7/083-ICON_NoTips_E.jpg diff --git a/buildroot/share/dwin/icons-6/084-ICON_Continue_C.jpg b/buildroot/share/dwin/icons-7/084-ICON_Continue_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/084-ICON_Continue_C.jpg rename to buildroot/share/dwin/icons-7/084-ICON_Continue_C.jpg diff --git a/buildroot/share/dwin/icons-6/085-ICON_Continue_E.jpg b/buildroot/share/dwin/icons-7/085-ICON_Continue_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/085-ICON_Continue_E.jpg rename to buildroot/share/dwin/icons-7/085-ICON_Continue_E.jpg diff --git a/buildroot/share/dwin/icons-6/086-ICON_Cancel_C.jpg b/buildroot/share/dwin/icons-7/086-ICON_Cancel_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/086-ICON_Cancel_C.jpg rename to buildroot/share/dwin/icons-7/086-ICON_Cancel_C.jpg diff --git a/buildroot/share/dwin/icons-6/087-ICON_Cancel_E.jpg b/buildroot/share/dwin/icons-7/087-ICON_Cancel_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/087-ICON_Cancel_E.jpg rename to buildroot/share/dwin/icons-7/087-ICON_Cancel_E.jpg diff --git a/buildroot/share/dwin/icons-6/088-ICON_Confirm_C.jpg b/buildroot/share/dwin/icons-7/088-ICON_Confirm_C.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/088-ICON_Confirm_C.jpg rename to buildroot/share/dwin/icons-7/088-ICON_Confirm_C.jpg diff --git a/buildroot/share/dwin/icons-6/089-ICON_Confirm_E.jpg b/buildroot/share/dwin/icons-7/089-ICON_Confirm_E.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/089-ICON_Confirm_E.jpg rename to buildroot/share/dwin/icons-7/089-ICON_Confirm_E.jpg diff --git a/buildroot/share/dwin/icons-6/090-ICON_Info_0.jpg b/buildroot/share/dwin/icons-7/090-ICON_Info_0.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/090-ICON_Info_0.jpg rename to buildroot/share/dwin/icons-7/090-ICON_Info_0.jpg diff --git a/buildroot/share/dwin/icons-6/091-ICON_Info_1.jpg b/buildroot/share/dwin/icons-7/091-ICON_Info_1.jpg similarity index 100% rename from buildroot/share/dwin/icons-6/091-ICON_Info_1.jpg rename to buildroot/share/dwin/icons-7/091-ICON_Info_1.jpg diff --git a/buildroot/share/dwin/make_jpgs.sh b/buildroot/share/dwin/make_jpgs.sh index 0acace7388df..c114757a0622 100755 --- a/buildroot/share/dwin/make_jpgs.sh +++ b/buildroot/share/dwin/make_jpgs.sh @@ -1,31 +1,31 @@ #!/usr/bin/env bash -mkdir -p icons-3 +mkdir -p icons-4 -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_off.svg ./icons-3/001-ICON_HotendOff.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_on.svg ./icons-3/002-ICON_HotendOn.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_off.svg ./icons-4/001-ICON_HotendOff.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/hotend_on.svg ./icons-4/002-ICON_HotendOn.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_off.svg ./icons-3/003-ICON_BedOff.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_on.svg ./icons-3/004-ICON_BedOn.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_off.svg ./icons-4/003-ICON_BedOff.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_on.svg ./icons-4/004-ICON_BedOn.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/fan.svg ./icons-3/005-ICON_Fan0.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 22.5 ./icons-svg/fan.svg ./icons-3/006-ICON_Fan1.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 45 ./icons-svg/fan.svg ./icons-3/007-ICON_Fan2.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 67.5 ./icons-svg/fan.svg ./icons-3/008-ICON_Fan3.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/fan.svg ./icons-4/005-ICON_Fan0.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 22.5 ./icons-svg/fan.svg ./icons-4/006-ICON_Fan1.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 45 ./icons-svg/fan.svg ./icons-4/007-ICON_Fan2.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 -distort SRT 67.5 ./icons-svg/fan.svg ./icons-4/008-ICON_Fan3.jpg -convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/halted.svg ./icons-3/009-ICON_Halted.jpg -convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/question.svg ./icons-3/010-ICON_Question.jpg -convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/alert.svg ./icons-3/011-ICON_Alert.jpg +convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/halted.svg ./icons-4/009-ICON_Halted.jpg +convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/question.svg ./icons-4/010-ICON_Question.jpg +convert -size 96x96 -background "#333e44" -quality 100 -sampling-factor 4:4:4 ./icons-svg/alert.svg ./icons-4/011-ICON_Alert.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_cw.svg ./icons-3/012-ICON_RotateCW.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_ccw.svg ./icons-3/013-ICON_RotateCCW.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/up_arrow.svg ./icons-3/014-ICON_UpArrow.jpg -convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/down_arrow.svg ./icons-3/015-ICON_DownArrow.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_cw.svg ./icons-4/012-ICON_RotateCW.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/rotate_ccw.svg ./icons-4/013-ICON_RotateCCW.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/up_arrow.svg ./icons-4/014-ICON_UpArrow.jpg +convert -size 48x48 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/down_arrow.svg ./icons-4/015-ICON_DownArrow.jpg -convert -size 48x8 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bedline.svg ./icons-3/016-ICON_Bedline.jpg +convert -size 48x8 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bedline.svg ./icons-4/016-ICON_Bedline.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_off.svg ./icons-3/017-ICON_BedLeveledOff.jpg -convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_on.svg ./icons-3/018-ICON_BedLeveledOn.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_off.svg ./icons-4/017-ICON_BedLeveledOff.jpg +convert -size 48x36 -background "#080808" -quality 100 -sampling-factor 4:4:4 ./icons-svg/bed_leveled_on.svg ./icons-4/018-ICON_BedLeveledOn.jpg -rm 3.ICO -./bin/makeIco.py icons-3 3.ICO +rm -f 4.ICO +./bin/makeIco.py icons-4 4.ICO