diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index bd88cf5861..e8d6abab0c 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -2882,7 +2882,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ mesh_conf.goto_mesh_value = true; mesh_conf.mesh_x = mesh_conf.mesh_y = 0; Popup_Handler(MoveWait); - mesh_conf.manual_move();; + mesh_conf.manual_move(); Draw_Menu(UBLMesh); #endif #elif HAS_BED_PROBE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp index 40ec16a9df..6d42fd41e4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp @@ -1,6 +1,6 @@ -/***************************** - * bio_advanced_settings.cpp * - *****************************/ +/************************* + * advanced_settings.cpp * + *************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * @@ -28,6 +28,9 @@ using namespace FTDI; using namespace Theme; +#define GRID_COLS 2 +#define GRID_ROWS 9 + void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { CommandProcessor cmd; @@ -38,58 +41,30 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { CommandProcessor cmd; cmd.colors(normal_btn) - .font(Theme::font_medium) - #define GRID_ROWS 9 - #define GRID_COLS 2 + .font(Theme::font_medium) .tag(2) .button(BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU)) - .enabled( - #if HAS_TRINAMIC_CONFIG - 1 - #endif - ) + .enabled(ENABLED(HAS_TRINAMIC_CONFIG)) .tag(3) .button(BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) - .enabled( - #if HAS_TRINAMIC_CONFIG - 1 - #endif - ) + .enabled(ENABLED(HAS_TRINAMIC_CONFIG)) .tag(4) .button(BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS)) .tag(5) .button(BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) - .enabled( - #if HAS_MULTI_HOTEND - 1 - #endif - ) + .enabled(ENABLED(HAS_MULTI_HOTEND)) .tag(6) .button(BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) .tag(7) .button(BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) .tag(8) .button(BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY)) .tag(9) .button(BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION)) - #if HAS_JUNCTION_DEVIATION - .tag(10) .button(BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JUNCTION_DEVIATION)) - #else - .tag(10) .button(BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK)) - #endif - .enabled( - #if ENABLED(BACKLASH_GCODE) - 1 - #endif - ) + .tag(10) .button(BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(TERN(HAS_JUNCTION_DEVIATION, MSG_JUNCTION_DEVIATION, MSG_JERK))) + .enabled(ENABLED(BACKLASH_GCODE)) .tag(11) .button(BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH)) - .enabled( - #if ENABLED(LIN_ADVANCE) - 1 - #endif - ) + .enabled(ENABLED(LIN_ADVANCE)) .tag(12) .button(BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_LINEAR_ADVANCE)) .tag(13) .button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE)) .tag(14) .button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS)) - .colors(action_btn) + .colors(action_btn) .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); - #undef GRID_COLS - #undef GRID_ROWS } } @@ -100,35 +75,26 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: GOTO_SCREEN(DisplayTuningScreen); break; #if HAS_TRINAMIC_CONFIG - case 3: GOTO_SCREEN(StepperCurrentScreen); break; - case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break; + case 3: GOTO_SCREEN(StepperCurrentScreen); break; + case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break; #endif case 5: GOTO_SCREEN(EndstopStatesScreen); break; #if HAS_MULTI_HOTEND - case 6: GOTO_SCREEN(NozzleOffsetScreen); break; + case 6: GOTO_SCREEN(NozzleOffsetScreen); break; #endif - case 7: GOTO_SCREEN(StepsScreen); break; case 8: GOTO_SCREEN(MaxVelocityScreen); break; case 9: GOTO_SCREEN(DefaultAccelerationScreen); break; - case 10: - #if HAS_JUNCTION_DEVIATION - GOTO_SCREEN(JunctionDeviationScreen); - #else - GOTO_SCREEN(JerkScreen); - #endif - break; + case 10: GOTO_SCREEN(TERN(HAS_JUNCTION_DEVIATION, JunctionDeviationScreen, JerkScreen)); break; #if ENABLED(BACKLASH_GCODE) - case 11: GOTO_SCREEN(BacklashCompensationScreen); break; + case 11: GOTO_SCREEN(BacklashCompensationScreen); break; #endif #if ENABLED(LIN_ADVANCE) - case 12: GOTO_SCREEN(LinearAdvanceScreen); break; + case 12: GOTO_SCREEN(LinearAdvanceScreen); break; #endif case 13: GOTO_SCREEN(InterfaceSettingsScreen); break; case 14: GOTO_SCREEN(RestoreFailsafeDialogBox); break; - - default: - return false; + default: return false; } return true; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h index 29a21fe5d9..fc30093b76 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h @@ -1,6 +1,6 @@ -/*************************** - * bio_advanced_settings.h * - ***************************/ +/*********************** + * advanced_settings.h * + ***********************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp index a5511f94b9..b614eada07 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp @@ -1,6 +1,6 @@ -/**************************** - * bio_confirm_home_xyz.cpp * - ****************************/ +/************************ + * confirm_home_xyz.cpp * + ************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h index 151b784b93..34895c9d01 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h @@ -1,6 +1,6 @@ -/**************************** - * bio_confirm_home_e.h * - ****************************/ +/******************** + * confirm_home_e.h * + ********************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp index e34df42b84..8aab340021 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp @@ -1,6 +1,6 @@ -/**************************** - * bio_confirm_home_xyz.cpp * - ****************************/ +/************************ + * confirm_home_xyz.cpp * + ************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h index d8cb1cdb67..1c1aa369e8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h @@ -1,6 +1,6 @@ -/************************** - * bio_confirm_home_xyz.h * - **************************/ +/********************** + * confirm_home_xyz.h * + **********************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * 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 adc84dfa25..edae2cb042 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 @@ -1,6 +1,6 @@ -/********************* - * bio_main_menu.cpp * - *********************/ +/***************** + * main_menu.cpp * + *****************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * @@ -28,9 +28,10 @@ using namespace FTDI; using namespace Theme; +#define GRID_COLS 2 +#define GRID_ROWS 10 + void MainMenu::onRedraw(draw_mode_t what) { - #define GRID_ROWS 10 - #define GRID_COLS 2 if (what & BACKGROUND) { CommandProcessor cmd; @@ -56,9 +57,6 @@ void MainMenu::onRedraw(draw_mode_t what) { .colors(action_btn) .tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } - - #undef GRID_COLS - #undef GRID_ROWS } bool MainMenu::onTouchEnd(uint8_t tag) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h index fdf977fcbf..37bbe3dd5e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h @@ -1,6 +1,6 @@ -/********************* - * bio_main_menu.cpp * - *********************/ +/***************** + * main_menu.cpp * + *****************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp index 6d177c5a7b..79a49c79a6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp @@ -1,6 +1,6 @@ -/******************************* - * bio_printing_dialog_box.cpp * - *******************************/ +/*************************** + * printing_dialog_box.cpp * + ***************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h index b55038bef2..f260b74413 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h @@ -1,6 +1,6 @@ -/***************************** - * bio_printing_dialog_box.h * - *****************************/ +/************************* + * printing_dialog_box.h * + *************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h index 7294c4aa0b..81d47179f4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h @@ -96,10 +96,10 @@ enum { #include "../generic/z_offset_screen.h" #include "../generic/files_screen.h" -#include "bio_status_screen.h" -#include "bio_main_menu.h" -#include "bio_tune_menu.h" -#include "bio_advanced_settings.h" -#include "bio_printing_dialog_box.h" -#include "bio_confirm_home_xyz.h" -#include "bio_confirm_home_e.h" +#include "status_screen.h" +#include "main_menu.h" +#include "tune_menu.h" +#include "advanced_settings.h" +#include "printing_dialog_box.h" +#include "confirm_home_xyz.h" +#include "confirm_home_e.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp index 6e4668eb36..a6674bed90 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp @@ -1,6 +1,6 @@ -/************************* - * bio_status_screen.cpp * - *************************/ +/********************* + * status_screen.cpp * + *********************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h index 458ddd19a0..d074e82de6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h @@ -1,6 +1,6 @@ -/************************* - * bio_status_screen.cpp * - *************************/ +/********************* + * status_screen.cpp * + *********************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp index 48eff0a661..d5b3897c4d 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp @@ -1,6 +1,6 @@ -/********************* - * bio_tune_menu.cpp * - *********************/ +/***************** + * tune_menu.cpp * + *****************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * @@ -29,10 +29,10 @@ using namespace FTDI; using namespace Theme; using namespace ExtUI; -void TuneMenu::onRedraw(draw_mode_t what) { - #define GRID_ROWS 8 - #define GRID_COLS 2 +#define GRID_COLS 2 +#define GRID_ROWS 8 +void TuneMenu::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { CommandProcessor cmd; cmd.cmd(CLEAR_COLOR_RGB(bg_color)) @@ -56,8 +56,6 @@ void TuneMenu::onRedraw(draw_mode_t what) { .enabled(!isPrinting()).tag(7).button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS)) .colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } - #undef GRID_COLS - #undef GRID_ROWS } bool TuneMenu::onTouchEnd(uint8_t tag) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h index 52fe694f37..8677bb5e2d 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h @@ -1,6 +1,6 @@ -/******************* - * bio_tune_menu.h * - *******************/ +/*************** + * tune_menu.h * + ***************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h index 754f6e93e1..dc70f6c0fc 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h @@ -1,3 +1,6 @@ +/****************** + * ui_landscape.h * + ******************/ /**************************************************************************** * This program is free software: you can redistribute it and/or modify * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h index e8b4281122..7aaf62b7b8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h @@ -1,3 +1,6 @@ +/***************** + * ui_portrait.h * + *****************/ /**************************************************************************** * This program is free software: you can redistribute it and/or modify * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp index 7549e8d54e..888f2c2cdd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp @@ -29,8 +29,8 @@ using namespace FTDI; using namespace ExtUI; using namespace Theme; -#define GRID_ROWS 4 #define GRID_COLS 3 +#define GRID_ROWS 4 #define STEPS_PER_MM_POS BTN_POS(1,1), BTN_SIZE(1,1) #define TMC_CURRENT_POS BTN_POS(2,1), BTN_SIZE(1,1) #define LIN_ADVANCE_POS BTN_POS(3,1), BTN_SIZE(1,1) @@ -53,11 +53,11 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { CommandProcessor cmd; cmd.colors(normal_btn) - .font(Theme::font_medium) + .font(Theme::font_medium) .tag(2) .button(STEPS_PER_MM_POS, GET_TEXT_F(MSG_STEPS_PER_MM)) - .enabled(ENABLED(HAS_TRINAMIC_CONFIG)) + .enabled(ENABLED(HAS_TRINAMIC_CONFIG)) .tag(3) .button(TMC_CURRENT_POS, GET_TEXT_F(MSG_TMC_CURRENT)) - .enabled(ENABLED(LIN_ADVANCE)) + .enabled(ENABLED(LIN_ADVANCE)) .tag(4) .button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE)) .tag(5) .button(VELOCITY_POS, GET_TEXT_F(MSG_VELOCITY)) .tag(6) .button(ACCELERATION_POS, GET_TEXT_F(MSG_ACCELERATION)) @@ -66,7 +66,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .tag(9) .button(INTERFACE_POS, GET_TEXT_F(MSG_INTERFACE)) .tag(10).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU)) .tag(11).button(RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS)) - .colors(action_btn) + .colors(action_btn) .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } 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 5ea9eed037..5e61bdb12f 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 @@ -33,8 +33,8 @@ using namespace FTDI; using namespace ExtUI; using namespace Theme; -#define GRID_ROWS 5 #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) @@ -60,9 +60,9 @@ void LevelingMenu::onRedraw(draw_mode_t what) { .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) .font(font_medium).colors(normal_btn) .tag(2).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) - .enabled(ENABLED(HAS_MESH)) + .enabled(ENABLED(HAS_MESH)) .tag(3).button(SHOW_MESH_POS, GET_TEXT_F(MSG_MESH_VIEW)) - .enabled(ENABLED(HAS_MESH)) + .enabled(ENABLED(HAS_MESH)) .tag(4).button(EDIT_MESH_POS, GET_TEXT_F(MSG_EDIT_MESH)) #undef GRID_COLS #define GRID_COLS 2 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 2d404aff6c..ee299a7f64 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 @@ -29,8 +29,8 @@ using namespace FTDI; using namespace Theme; -#define GRID_ROWS 6 #define GRID_COLS 2 +#define GRID_ROWS 6 #define ZPROBE_ZOFFSET_POS BTN_POS(1,1), BTN_SIZE(1,1) #define MOVE_XYZ_POS BTN_POS(1,2), BTN_SIZE(1,1) @@ -57,14 +57,14 @@ void MainMenu::onRedraw(draw_mode_t what) { .font(Theme::font_medium) .tag( 2).button(MOVE_XYZ_POS, GET_TEXT_F(MSG_XYZ_MOVE)) .tag( 3).button(TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) - .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE)) + .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE)) .tag( 4).button(ZPROBE_ZOFFSET_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) .tag( 5).button(MOVE_E_POS, GET_TEXT_F(MSG_E_MOVE)) .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)) .tag( 9).button(DISABLE_STEPPERS_POS, GET_TEXT_F(MSG_DISABLE_STEPPERS)) - .enabled(HAS_LEVELING) + .enabled(ENABLED(HAS_LEVELING)) .tag(10).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) .tag(11).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) 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 b5ce108106..b01aa81dd4 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 @@ -28,8 +28,8 @@ using namespace FTDI; using namespace ExtUI; using namespace Theme; -#define GRID_ROWS 5 #define GRID_COLS 2 +#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)); 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 d428f686b7..ab52a59b9a 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 @@ -74,7 +74,7 @@ return val; } - utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) { + utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) { utf8_char_t val = *(uint8_t*)c++; if ((val & 0xC0) == 0xC0) while ((*c & 0xC0) == 0x80) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp index a83cc07515..8e0a01e1c8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp @@ -64,8 +64,8 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1) #endif #else - #define GRID_ROWS 6 #define GRID_COLS 3 + #define GRID_ROWS 6 #define ZPROBE_ZOFFSET_POS BTN_POS(1,1), BTN_SIZE(1,1) #define CASE_LIGHT_POS BTN_POS(1,4), BTN_SIZE(1,1) #define STEPS_PER_MM_POS BTN_POS(2,1), BTN_SIZE(1,1) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp index bcdcad17be..2fc6aec095 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp @@ -54,8 +54,8 @@ void CustomUserMenus::onRedraw(draw_mode_t what) { #endif #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 11 #define GRID_COLS (1 + _MORE_THAN_TEN) + #define GRID_ROWS 11 #define USER_ITEM_POS(N) BTN_POS((1+((N-1)/10)), ((N-1) % 10 + 1)), BTN_SIZE(1,1) #define BACK_POS BTN_POS(1,11), BTN_SIZE(1,1) #else @@ -64,8 +64,8 @@ void CustomUserMenus::onRedraw(draw_mode_t what) { #else #define _MORE_THAN_FIVE 0 #endif - #define GRID_ROWS 6 #define GRID_COLS (1 + _MORE_THAN_FIVE + _MORE_THAN_TEN + _MORE_THAN_FIFTEEN) + #define GRID_ROWS 6 #define USER_ITEM_POS(N) BTN_POS((1+((N-1)/5)), ((N-1) % 5 + 1)), BTN_SIZE(1,1) #define BACK_POS BTN_POS(1,6), BTN_SIZE(GRID_COLS,1) #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp index 34c754d535..2ec8a3bbd1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp @@ -52,8 +52,8 @@ void DeveloperMenu::onRedraw(draw_mode_t what) { cmd.cmd(COLOR_RGB(bg_text_enabled)); #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 10 #define GRID_COLS 1 + #define GRID_ROWS 10 cmd.font(font_large) .text ( BTN_POS(1,1), BTN_SIZE(1,1), F("Developer Menu")) .colors(normal_btn) .tag(2).font(font_medium) .button(BTN_POS(1,2), BTN_SIZE(1,1), F("Show All Widgets")) @@ -68,8 +68,8 @@ void DeveloperMenu::onRedraw(draw_mode_t what) { .tag(1).colors(action_btn) .button(BTN_POS(1,10), BTN_SIZE(1,1), F("Back")); #else - #define GRID_ROWS 6 #define GRID_COLS 2 + #define GRID_ROWS 6 cmd.font(font_medium) .text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Developer Menu")) .colors(normal_btn) .tag(2).font(font_small) .button(BTN_POS(1,2), BTN_SIZE(1,1), F("Show All Widgets")) 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 c7042e760e..f7e57cf0b9 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 @@ -37,6 +37,13 @@ void EndstopStatesScreen::onExit() { BaseScreen::onExit(); } +#define GRID_COLS 6 +#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_DISABLED(X,Y,LABEL,PIN) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL); + void EndstopStatesScreen::onRedraw(draw_mode_t) { CommandProcessor cmd; cmd.cmd(CLEAR_COLOR_RGB(bg_color)) @@ -44,20 +51,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { .cmd(CLEAR(true,true,true)) .tag(0); - #define GRID_ROWS 7 - #define GRID_COLS 6 - - #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_DISABLED(X,Y,LABEL,PIN) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL); - - cmd.font( - #if ENABLED(TOUCH_UI_PORTRAIT) - font_large - #else - font_medium - #endif - ) + 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 @@ -121,8 +115,6 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { cmd.font(font_medium) .colors(action_btn) .tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BUTTON_DONE)); - #undef GRID_COLS - #undef GRID_ROWS } bool EndstopStatesScreen::onTouchEnd(uint8_t tag) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp index 9c9e70cebf..777698c398 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp @@ -30,15 +30,15 @@ using namespace ExtUI; using namespace Theme; #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 9 #define GRID_COLS 2 + #define GRID_ROWS 9 #define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) #define RUNOUT_SENSOR_POS BTN_POS(1,2), BTN_SIZE(2,1) #define LIN_ADVANCE_POS BTN_POS(1,3), BTN_SIZE(2,1) #define BACK_POS BTN_POS(1,9), BTN_SIZE(2,1) #else - #define GRID_ROWS 6 #define GRID_COLS 2 + #define GRID_ROWS 6 #define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) #define RUNOUT_SENSOR_POS BTN_POS(1,2), BTN_SIZE(2,1) #define LIN_ADVANCE_POS BTN_POS(1,3), BTN_SIZE(2,1) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp index 6f428fa174..00768dbaf7 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp @@ -28,7 +28,7 @@ #if ENABLED(TOUCH_UI_PORTRAIT) #define GRID_COLS 6 - #define GRID_ROWS 15 + #define GRID_ROWS 15 #define FILES_PER_PAGE 11 #define PREV_DIR LEFT #define NEXT_DIR RIGHT @@ -40,7 +40,7 @@ #define BTN1_POS BTN_POS(1,14), BTN_SIZE(3,2) #define BTN2_POS BTN_POS(4,14), BTN_SIZE(3,2) #else - #define GRID_COLS 12 + #define GRID_COLS 12 #define GRID_ROWS 8 #define FILES_PER_PAGE 6 #define PREV_DIR UP diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp index 5b160c80df..fa4516daab 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp @@ -52,14 +52,13 @@ void InterfaceSettingsScreen::onEntry() { BaseScreen::onEntry(); } +#define GRID_COLS 4 +#define GRID_ROWS TERN(TOUCH_UI_PORTRAIT, 7, 6) + void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { CommandProcessor cmd; if (what & BACKGROUND) { - - #define GRID_COLS 4 - #define GRID_ROWS TERN(TOUCH_UI_PORTRAIT, 7, 6) - cmd.cmd(CLEAR_COLOR_RGB(bg_color)) .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) @@ -128,7 +127,7 @@ bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) { LockScreen::disable(); break; #endif - case 5: UIData::enable_animations(!UIData::animations_enabled());; break; + case 5: UIData::enable_animations(!UIData::animations_enabled()); break; case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true; default: return false; @@ -148,8 +147,6 @@ bool InterfaceSettingsScreen::onTouchStart(uint8_t tag) { } #undef EDGE_R #define EDGE_R 0 - #undef GRID_COLS - #undef GRID_ROWS return true; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp index bb44a87176..61f8caa277 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp @@ -27,6 +27,9 @@ using namespace FTDI; +#define GRID_COLS 4 +#define GRID_ROWS 8 + // The kill screen is an oddball that happens after Marlin has killed the events // loop. So we only have a show() method rather than onRedraw(). The KillScreen // should not be used as a model for other UI screens as it is an exception. @@ -39,18 +42,12 @@ void KillScreen::show(const char *message) { .cmd(CLEAR(true,true,true)) .tag(0); - #define GRID_COLS 4 - #define GRID_ROWS 8 - cmd.font(Theme::font_large) .cmd(COLOR_RGB(Theme::bg_text_enabled)) .text(BTN_POS(1,2), BTN_SIZE(4,1), message) .text(BTN_POS(1,3), BTN_SIZE(4,1), GET_TEXT_F(MSG_HALTED)) .text(BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_PLEASE_RESET)); - #undef GRID_COLS - #undef GRID_ROWS - cmd.cmd(DL::DL_DISPLAY) .cmd(CMD_SWAP) .execute(); 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 ce6045018b..499f741540 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 @@ -37,8 +37,8 @@ void LanguageMenu::onRedraw(draw_mode_t) { .colors(normal_btn) .font(Theme::font_medium); - #define GRID_ROWS 8 #define GRID_COLS 1 + #define GRID_ROWS 8 cmd.tag(1).button(BTN_POS(1,1), BTN_SIZE(1,1), GET_LANGUAGE_NAME(1)); cmd.tag(2).button(BTN_POS(1,2), BTN_SIZE(1,1), GET_LANGUAGE_NAME(2)); 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 11db21aca9..2fb9d18498 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 @@ -34,8 +34,8 @@ using namespace ExtUI; using namespace Theme; #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 8 #define GRID_COLS 2 + #define GRID_ROWS 8 #define LEVELING_TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) #define LEVEL_AXIS_POS BTN_POS(1,2), BTN_SIZE(2,1) #define BED_MESH_TITLE_POS BTN_POS(1,3), BTN_SIZE(2,1) @@ -48,8 +48,8 @@ using namespace Theme; #define BLTOUCH_TEST_POS BTN_POS(2,7), BTN_SIZE(1,1) #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1) #else - #define GRID_ROWS 6 #define GRID_COLS 3 + #define GRID_ROWS 6 #define LEVELING_TITLE_POS BTN_POS(1,1), BTN_SIZE(3,1) #define LEVEL_AXIS_POS BTN_POS(1,2), BTN_SIZE(3,1) #define BED_MESH_TITLE_POS BTN_POS(1,3), BTN_SIZE(2,1) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp index df8eabbe61..82b9b2bd19 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp @@ -39,6 +39,9 @@ void LockScreen::onEntry() { BaseScreen::onEntry(); } +#define GRID_COLS 1 +#define GRID_ROWS TERN(TOUCH_UI_PORTRAIT, 10, 7) + void LockScreen::onRedraw(draw_mode_t what) { CommandProcessor cmd; @@ -50,14 +53,6 @@ void LockScreen::onRedraw(draw_mode_t what) { } if (what & FOREGROUND) { - #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_COLS 1 - #define GRID_ROWS 10 - #else - #define GRID_COLS 1 - #define GRID_ROWS 7 - #endif - #undef MARGIN_T #undef MARGIN_B #define MARGIN_T 3 @@ -108,9 +103,6 @@ void LockScreen::onRedraw(draw_mode_t what) { #undef MARGIN_B #define MARGIN_T MARGIN_DEFAULT #define MARGIN_B MARGIN_DEFAULT - - #undef GRID_COLS - #undef GRID_ROWS } } 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 6ccda405fc..001f97490b 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 @@ -37,8 +37,8 @@ void MainMenu::onRedraw(draw_mode_t what) { } #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 8 #define GRID_COLS 2 + #define GRID_ROWS 8 #define ABOUT_PRINTER_POS BTN_POS(1,1), BTN_SIZE(2,1) #define ADVANCED_SETTINGS_POS BTN_POS(1,2), BTN_SIZE(2,1) #if ENABLED(CUSTOM_MENU_MAIN) @@ -55,8 +55,8 @@ void MainMenu::onRedraw(draw_mode_t what) { #define CLEAN_NOZZLE_POS BTN_POS(2,7), BTN_SIZE(1,1) #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1) #else - #define GRID_ROWS 5 #define GRID_COLS 6 + #define GRID_ROWS 5 #define ADVANCED_SETTINGS_POS BTN_POS(1,1), BTN_SIZE(3,1) #define ABOUT_PRINTER_POS BTN_POS(4,1), BTN_SIZE(3,1) #define AUTO_HOME_POS BTN_POS(1,2), BTN_SIZE(3,1) @@ -80,15 +80,15 @@ void MainMenu::onRedraw(draw_mode_t what) { cmd.colors(normal_btn) .font(Theme::font_medium) .tag( 2).button(AUTO_HOME_POS, GET_TEXT_F(MSG_AUTO_HOME)) - .enabled(ENABLED(NOZZLE_CLEAN_FEATURE)) + .enabled(ENABLED(NOZZLE_CLEAN_FEATURE)) .tag( 3).button(CLEAN_NOZZLE_POS, GET_TEXT_F(MSG_CLEAN_NOZZLE)) .tag( 4).button(MOVE_AXIS_POS, GET_TEXT_F(MSG_MOVE_AXIS)) .tag( 5).button(DISABLE_STEPPERS_POS,GET_TEXT_F(MSG_DISABLE_STEPPERS)) .tag( 6).button(TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) - .enabled(IF_DISABLED(TOUCH_UI_LULZBOT_BIO, 1)) + .enabled(DISABLED(TOUCH_UI_LULZBOT_BIO)) .tag( 7).button(FILAMENTCHANGE_POS, GET_TEXT_F(MSG_FILAMENTCHANGE)) .tag( 8).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) - .enabled(TERN_(HAS_LEVELING, 1)) + .enabled(ENABLED(HAS_LEVELING)) .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) 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 7310577995..43f33fb3bf 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 @@ -31,17 +31,12 @@ using namespace FTDI; using namespace Theme; -#if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 16 -#else - #define GRID_ROWS 16 -#endif +#define GRID_COLS 3 +#define GRID_ROWS 16 void StatusScreen::draw_axis_position(draw_mode_t what) { CommandProcessor cmd; - #define GRID_COLS 3 - #if ENABLED(TOUCH_UI_PORTRAIT) #define X_LBL_POS BTN_POS(1, 9), BTN_SIZE(1,2) #define Y_LBL_POS BTN_POS(1,11), BTN_SIZE(1,2) @@ -106,15 +101,10 @@ void StatusScreen::draw_axis_position(draw_mode_t what) { .text(Y_VAL_POS, y_str) .text(Z_VAL_POS, z_str); } - - #undef GRID_COLS } -#if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_COLS 8 -#else - #define GRID_COLS 12 -#endif +#undef GRID_COLS +#define GRID_COLS TERN(TOUCH_UI_PORTRAIT, 8, 12) void StatusScreen::draw_temperature(draw_mode_t what) { using namespace Theme; @@ -293,11 +283,10 @@ void StatusScreen::draw_progress(draw_mode_t what) { .text(PROGRESS_POS, progress_str); #endif } - - #undef GRID_COLS } void StatusScreen::draw_interaction_buttons(draw_mode_t what) { + #undef GRID_COLS #define GRID_COLS 4 if (what & FOREGROUND) { using namespace ExtUI; @@ -321,10 +310,10 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) { .colors(!has_media ? action_btn : normal_btn) .tag(4).button(MENU_BTN_POS, GET_TEXT_F(MSG_BUTTON_MENU)); } - #undef GRID_COLS } void StatusScreen::draw_status_message(draw_mode_t what, const char *message) { + #undef GRID_COLS #define GRID_COLS 1 #if ENABLED(TOUCH_UI_PORTRAIT) @@ -341,7 +330,6 @@ void StatusScreen::draw_status_message(draw_mode_t what, const char *message) { draw_text_box(cmd, STATUS_POS, message, OPT_CENTER, font_large); } - #undef GRID_COLS } void StatusScreen::setStatusMessage(FSTR_P message) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp index 5475d67a80..6ef8bb4525 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp @@ -28,6 +28,9 @@ using namespace FTDI; using namespace Theme; +#define GRID_COLS 2 +#define GRID_ROWS 7 + void TouchRegistersScreen::onRedraw(draw_mode_t) { const uint32_t T_Transform_A = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_A); const uint32_t T_Transform_B = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_B); @@ -42,8 +45,6 @@ void TouchRegistersScreen::onRedraw(draw_mode_t) { .cmd(CLEAR(true,true,true)) .tag(0); - #define GRID_ROWS 7 - #define GRID_COLS 2 cmd.tag(0) .font(font_xsmall) .fgcolor(transformA) .button(BTN_POS(1,1), BTN_SIZE(1,1), F("TOUCH_XFORM_A")) @@ -69,8 +70,6 @@ void TouchRegistersScreen::onRedraw(draw_mode_t) { cmd.colors(action_btn).font(font_medium) .tag(1).button(BTN_POS(2,7), BTN_SIZE(1,1), F("Back")); - #undef GRID_COLS - #undef GRID_ROWS } bool TouchRegistersScreen::onTouchEnd(uint8_t tag) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp index 98150ceccb..0370c44174 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp @@ -30,6 +30,9 @@ using namespace FTDI; using namespace Theme; +#define GRID_COLS 2 +#define GRID_ROWS TERN(TOUCH_UI_PORTRAIT, 9, 5) + void TuneMenu::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { CommandProcessor cmd; @@ -38,8 +41,6 @@ void TuneMenu::onRedraw(draw_mode_t what) { } #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 9 - #define GRID_COLS 2 #define TEMPERATURE_POS BTN_POS(1,1), BTN_SIZE(2,1) #define FIL_CHANGE_POS BTN_POS(1,2), BTN_SIZE(2,1) #define FILAMENT_POS BTN_POS(1,3), BTN_SIZE(2,1) @@ -51,8 +52,6 @@ void TuneMenu::onRedraw(draw_mode_t what) { #define ADVANCED_SETTINGS_POS BTN_POS(1,9), BTN_SIZE(1,1) #define BACK_POS BTN_POS(2,9), BTN_SIZE(1,1) #else - #define GRID_ROWS 5 - #define GRID_COLS 2 #define TEMPERATURE_POS BTN_POS(1,1), BTN_SIZE(1,1) #define NUDGE_NOZ_POS BTN_POS(2,1), BTN_SIZE(1,1) #define FIL_CHANGE_POS BTN_POS(1,2), BTN_SIZE(1,1) @@ -94,8 +93,6 @@ void TuneMenu::onRedraw(draw_mode_t what) { .tag(1).colors(action_btn) .button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } - #undef GRID_COLS - #undef GRID_ROWS } bool TuneMenu::onTouchEnd(uint8_t tag) { diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index f830fc9821..111608dd46 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -87,6 +87,9 @@ namespace Language_de { LSTR MSG_HOME_OFFSET_I = _UxGT("Homeversatz ") STR_I; LSTR MSG_HOME_OFFSET_J = _UxGT("Homeversatz ") STR_J; LSTR MSG_HOME_OFFSET_K = _UxGT("Homeversatz ") STR_K; + LSTR MSG_HOME_OFFSET_U = _UxGT("Homeversatz ") STR_U; + LSTR MSG_HOME_OFFSET_V = _UxGT("Homeversatz ") STR_V; + LSTR MSG_HOME_OFFSET_W = _UxGT("Homeversatz ") STR_W; LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Homeversatz aktiv"); LSTR MSG_TRAMMING_WIZARD = _UxGT("Tramming Assistent"); LSTR MSG_SELECT_ORIGIN = _UxGT("Wählen Sie Ursprung"); @@ -329,6 +332,14 @@ namespace Language_de { LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune fehlge.! Falscher Extruder"); LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune fehlge.! Temperatur zu hoch."); LSTR MSG_PID_TIMEOUT = _UxGT("Autotune fehlge.! Timeout."); + LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("teste Wärmeverlust"); + LSTR MSG_MPC_AUTOTUNE = _UxGT("Autotune MPC"); + LSTR MSG_MPC_EDIT = _UxGT("MPC * bearbeiten"); + LSTR MSG_MPC_POWER_E = _UxGT("* Leistung"); + LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Block C *"); + LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensor res *"); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ambient h *"); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Amb. h fan *"); LSTR MSG_SELECT = _UxGT("Auswählen"); LSTR MSG_SELECT_E = _UxGT("Auswählen *"); LSTR MSG_ACC = _UxGT("Beschleunigung"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 2ba729d6d3..9906f78c60 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -381,7 +381,7 @@ namespace Language_en { LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Block C *"); LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensor res *"); LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ambient h *"); - LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN255_E= _UxGT("Amb. h fan *"); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Amb. h fan *"); LSTR MSG_SELECT = _UxGT("Select"); LSTR MSG_SELECT_E = _UxGT("Select *"); LSTR MSG_ACC = _UxGT("Accel"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 3e65dde786..82c595aa8c 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -353,7 +353,7 @@ namespace Language_it { LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("C blocco *"); LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Reattiv.Sens. *"); LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("H ambiente *"); - LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN255_E= _UxGT("H Amb. vent. *"); + LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("H Amb. vent. *"); LSTR MSG_SELECT = _UxGT("Seleziona"); LSTR MSG_SELECT_E = _UxGT("Seleziona *"); LSTR MSG_ACC = _UxGT("Accel"); diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index bd4ec49889..5040972525 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -352,7 +352,7 @@ void menu_backlash(); #if ENABLED(MPC_INCLUDE_FAN) #define MPC_EDIT_ITEMS(N) \ _MPC_EDIT_ITEMS(N); \ - EDIT_ITEM_FAST_N(float43, N, MSG_MPC_AMBIENT_XFER_COEFF_FAN255_E, &editable.decimal, 0, 1, []{ \ + 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; \ c.fan255_adjustment = editable.decimal - c.ambient_xfer_coeff_fan0; \ }) diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 8bc0a90c05..413eb8c98c 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -84,7 +84,7 @@ #endif #define Z_MAX_PIN 7 -#ifndef Z_MIN_PIN 7 +#ifndef Z_MIN_PIN #define Z_MIN_PIN 10 // Z- #endif