Skip to content

Fix: move Tab5 display rotation from display config to lvgl config - #106

Open
lboue wants to merge 2 commits into
m5stack:mainfrom
lboue:fix/tab5-lvgl-rotation
Open

Fix: move Tab5 display rotation from display config to lvgl config#106
lboue wants to merge 2 commits into
m5stack:mainfrom
lboue:fix/tab5-lvgl-rotation

Conversation

@lboue

@lboue lboue commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Problem

ESPHome now rejects rotation under the mipi_dsi display config when LVGL manages the display, failing esphome config with:

use of 'rotation' in the display config is not compatible with LVGL, please set rotation in the LVGL config instead.

#99

This currently breaks common/tab5-ha-hmi.yaml on recent ESPHome releases (confirmed against 2026.7.4 and 2026.8.0-dev).

Fix

Move the existing rotation: 270° from display: to lvgl.rotation: 270.

Testing

Validated with esphome config (both a fresh 2026.7.4 install and a 2026.8.0-dev environment) — config now loads successfully instead of failing.

lboue added 2 commits August 7, 2026 14:52
ESPHome now rejects `rotation` under the mipi_dsi display config when
LVGL manages the display, failing config validation with:
"use of 'rotation' in the display config is not compatible with LVGL,
please set rotation in the LVGL config instead."

Move the existing 270° rotation to `lvgl.rotation` to restore a
working config.
LVGL now performs the 270° display rotation itself (since rotation
moved from `display:` to `lvgl:`), and it already rotates touch
input to match via LvglComponent::rotate_coordinates(). The
touchscreen's own `transform: swap_xy + mirror_x` (combined with the
1280x720 calibration bounds) is mathematically the same 270°
rotation, so touches were being rotated twice — net ~180° off,
explaining touches registering on the wrong widget (e.g. bottom
instead of left nav rail).

Drop the touchscreen-level transform and calibrate to the panel's
native (pre-rotation) portrait resolution (720x1280) instead, so
LVGL performs the rotation exactly once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant