Skip to content

Commit 816eb7f

Browse files
committed
components/M5Unified: Change the default orientation of the screen.
1. The M5GFX rotates the screen 270 degrees. 2. Use lvgl and do not rotate the screen. Signed-off-by: lbuque <[email protected]>
1 parent 29cd412 commit 816eb7f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

m5stack/components/M5Unified/mpy_m5unified.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,9 @@ mp_obj_t m5_begin(size_t n_args, const mp_obj_t *args) {
480480

481481
// }
482482

483+
if (M5.getBoard() == m5::board_t::board_M5Tab5) {
484+
M5.Lcd.setRotation(3);
485+
}
483486
M5.Display.clear();
484487
// default display
485488
m5_display.gfx = (void *)(&(M5.Display));

m5stack/modules/startup/tab5/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def startup(self, ssid: str, pswd: str, timeout: int = 60) -> None:
2525
self.launcher = Launcher()
2626

2727
def _init_lvgl(self):
28+
M5.Lcd.setRotation(0)
2829
M5.Lcd.lvgl_init()
2930

3031
disp_buf0 = lv.draw_buf_create(

0 commit comments

Comments
 (0)