From 9db5bd000b6a07b8dcb6d6568df8411efe57a133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davide=20Rombol=C3=A0?= Date: Sat, 18 Feb 2023 10:49:57 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20IA=5FCREALITY=20screen=20rotation?= =?UTF-8?q?=20(#25397)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 2 ++ Marlin/src/lcd/extui/ia_creality/creality_extui.cpp | 4 +++- buildroot/tests/FYSETC_F6 | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6363b79360..480520e28e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -3048,6 +3048,8 @@ //#define DGUS_LCD_UI ORIGIN #if DGUS_UI_IS(MKS) #define USE_MKS_GREEN_UI +#elif DGUS_UI_IS(IA_CREALITY) + //#define LCD_SCREEN_ROTATE 90 // Portrait Mode or 800x480 displays #endif // diff --git a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp index 0275902557..fed5fc7165 100644 --- a/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp +++ b/Marlin/src/lcd/extui/ia_creality/creality_extui.cpp @@ -1682,8 +1682,10 @@ namespace ExtUI { | (Settings.display_sound ? _BV(3) : 0) // 3: audio | (Settings.display_standby ? _BV(2) : 0) // 2: backlight on standby | (Settings.screen_rotation == 10 ? _BV(1) : 0) // 1 & 0: Inversion - #if EITHER(MachineCR10Smart, MachineCR10SmartPro) + #if LCD_SCREEN_ROTATE == 90 | _BV(0) // Portrait Mode or 800x480 display has 0 point rotated 90deg from 480x272 display + #elif LCD_SCREEN_ROTATE + #error "Only 90° rotation is supported for the selected LCD." #endif ; diff --git a/buildroot/tests/FYSETC_F6 b/buildroot/tests/FYSETC_F6 index 5129ff9807..d970a23590 100755 --- a/buildroot/tests/FYSETC_F6 +++ b/buildroot/tests/FYSETC_F6 @@ -13,6 +13,14 @@ restore_configs opt_set MOTHERBOARD BOARD_FYSETC_F6_13 LCD_SERIAL_PORT 1 DGUS_LCD_UI FYSETC exec_test $1 $2 "FYSETC F6 1.3 with DGUS (FYSETC)" "$3" +# +# Test IA_CREALITY +# +restore_configs +opt_set MOTHERBOARD BOARD_FYSETC_F6_13 LCD_SERIAL_PORT 1 DGUS_LCD_UI IA_CREALITY LCD_SCREEN_ROTATE 90 +opt_enable ADVANCED_PAUSE_FEATURE LCD_BED_TRAMMING CLASSIC_JERK BABYSTEPPING AUTO_BED_LEVELING_BILINEAR NOZZLE_PARK_FEATURE PROBE_MANUALLY +exec_test $1 $2 "FYSETC F6 1.3 with DGUS (IA_CREALITY)" "$3" + # # Delta Config (generic) + UBL + ALLEN_KEY + EEPROM_SETTINGS + OLED_PANEL_TINYBOY2 #