Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix / Improve TFT Color UI layout #26068

Closed

Conversation

thinkyhead
Copy link
Member

  • Color UI Portrait layouts 272x480 and 600x1024.
  • Perform touch calibration in clockwise order.
  • Add sub-handlers for MarlinUI::rotate_progress. (May just add more HAS_EXTRA_PROGRESS conditions.)
  • Color UI refinements to MarlinUI::draw_status_screen for SHOW_ELAPSED_TIME and SHOW_REMAINING_TIME.
  • Minor adjustments to ColorUI layouts.

@ellensp
Copy link
Contributor

ellensp commented Jul 10, 2023

There is a layout issue on 480x320. The bottom center dial is to low and the status message hides part of it.

icon issue

test setup

config diff:

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index c59bbba32a..037d2fdd5b 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -68,7 +68,7 @@
 
 // Choose the name from boards.h that matches your setup
 #ifndef MOTHERBOARD
-  #define MOTHERBOARD BOARD_RAMPS_14_EFB
+  #define MOTHERBOARD BOARD_SIMULATED
 #endif
 
 /**
@@ -2300,12 +2300,12 @@
  *   M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
  *   M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
  */
-//#define EEPROM_SETTINGS     // Persistent storage with M500 and M501
+#define EEPROM_SETTINGS     // Persistent storage with M500 and M501
 //#define DISABLE_M503        // Saves ~2700 bytes of flash. Disable for release!
 #define EEPROM_CHITCHAT       // Give feedback on EEPROM commands. Disable to save PROGMEM.
 #define EEPROM_BOOT_SILENT    // Keep M503 quiet and only give errors during first load
 #if ENABLED(EEPROM_SETTINGS)
-  //#define EEPROM_AUTO_INIT  // Init EEPROM automatically on any errors.
+  #define EEPROM_AUTO_INIT  // Init EEPROM automatically on any errors.
   //#define EEPROM_INIT_NOW   // Init EEPROM on first boot after a new build.
 #endif
 
@@ -2590,7 +2590,7 @@
  * SD Card support is disabled by default. If your controller has an SD slot,
  * you must uncomment the following option or it won't work.
  */
-//#define SDSUPPORT
+#define SDSUPPORT
 
 /**
  * SD CARD: ENABLE CRC
@@ -3263,19 +3263,19 @@
 //
 // Generic TFT with detailed options
 //
-//#define TFT_GENERIC
+#define TFT_GENERIC
 #if ENABLED(TFT_GENERIC)
   // :[ 'AUTO', 'ST7735', 'ST7789', 'ST7796', 'R61505', 'ILI9328', 'ILI9341', 'ILI9488' ]
   #define TFT_DRIVER AUTO
 
   // Interface. Enable one of the following options:
   //#define TFT_INTERFACE_FSMC
-  //#define TFT_INTERFACE_SPI
+  #define TFT_INTERFACE_SPI
 
   // TFT Resolution. Enable one of the following options:
   //#define TFT_RES_320x240
   //#define TFT_RES_480x272
-  //#define TFT_RES_480x320
+  #define TFT_RES_480x320
   //#define TFT_RES_1024x600
 #endif
 
@@ -3290,7 +3290,7 @@
  *   root of your SD card, together with the compiled firmware.
  */
 //#define TFT_CLASSIC_UI
-//#define TFT_COLOR_UI
+#define TFT_COLOR_UI
 //#define TFT_LVGL_UI
 
 #if ENABLED(TFT_COLOR_UI)
@@ -3336,7 +3336,7 @@
 //
 // Touch Screen Settings
 //
-//#define TOUCH_SCREEN
+#define TOUCH_SCREEN
 #if ENABLED(TOUCH_SCREEN)
   #define BUTTON_DELAY_EDIT      50 // (ms) Button repeat delay for edit screens
   #define BUTTON_DELAY_MENU     250 // (ms) Button repeat delay for menus
diff --git a/platformio.ini b/platformio.ini
index e3bdb6f586..4060b2ad50 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -13,7 +13,7 @@
 [platformio]
 src_dir      = Marlin
 boards_dir   = buildroot/share/PlatformIO/boards
-default_envs = mega2560
+default_envs = simulator_linux_debug
 include_dir  = Marlin
 extra_configs =
     Marlin/config.ini

@jmz52
Copy link
Contributor

jmz52 commented Jul 13, 2023

Well, it seems we done somewhat similar but in a very different way.
The fixes and improvements I've made in #26077 are not compatible with some of the code from this PR.
I propose to use my variant of Color_UI layout changes as it split UI layout into resolution-independent code and resolution-dependent header files, making it easier to maintain code and develop layouts for new resolutions.

@thinkyhead thinkyhead closed this Jul 17, 2023
@thinkyhead thinkyhead deleted the bf2_tft_layout_PR branch July 17, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants