You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The touchscreen hardware itself seems to work correctly, but LVGL/launcher input does not.
#131
Title:[Bug] MaixCAM Pro: Touchscreen works in direct MaixPy test but fails in Launcher/LVGL menu
Describe the bug
On the MaixCAM Pro, the touchscreen hardware works perfectly when accessed directly via MaixPy, but fails to register inputs correctly within the standard launcher/LVGL menu UI.
Taps do not trigger expected actions, and the UI appears non-responsive. However, further investigation suggests this is not a hardware issue, but rather an integration bug involving LVGL input handling, specifically related to the read0() vs. read() methods in the pointing device driver.
Environment
Board: MaixCAM Pro
MaixPy version: 4.12.4
MaixCDK: Custom build from source
Affected UI: Launcher / Menu
Expected Behavior
The launcher/menu should respond to touch normally.
Touch press/release should map correctly into LVGL pointer events.
Behavior in the launcher should be consistent with direct touchscreen tests.
Actual Behavior
The standard launcher/menu does not handle touch correctly.
A direct touch script works flawlessly (coordinates, press detection, display updates).
Interesting Edge Case: When working on a custom folder/category UI, I noticed that if I kill the active menu process while the custom UI remains visible, touch input suddenly starts working. This strongly points to an event routing or state handling conflict in the main process.
Working Direct Test (MaixPy)
This simple test works correctly, confirming the hardware and basic driver are fine:
I traced the LVGL touch input path to components/3rd_party/lvgl/driver/pointing_device.cpp.
I noticed that the LVGL input code uses read0(), whereas my working direct script uses read().
Hypothesis:read0() may expose a raw/lower-level state, potentially updating coordinates before the pressed state is stable. As a result, LVGL receives coordinates without a correct PRESSED state, causing the menu logic (which relies on stable press/release transitions) to fail.
Local Fix: I locally patched pointing_device.cpp to use read() instead of read0(), and the UI behavior seemed correct.
Questions for Maintainers
Is read0() specifically intended to be the correct API for LVGL touch input on the MaixCAM Pro, or is this an oversight?
What is the exact semantic difference between read0() and read()? (e.g., raw vs. processed/stable state).
Is it a known issue that the launcher/menu process might consume or mishandle touch events, given that killing it restores touch functionality in a background UI?
Would you accept a PR changing the LVGL input from read0() to read(), or does the LVGL bridge need to cache the last valid coordinates/state differently?
Data I can provide upon request
Exact base firmware image name/date and commit hashes (MaixPy & MaixCDK).
My patched pointing_device.cpp.
Debug logs comparing read0() and read().
Video demonstrating the direct script working, the normal launcher failing, and the custom UI working after the menu process is killed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Title:
[Bug] MaixCAM Pro: Touchscreen works in direct MaixPy test but fails in Launcher/LVGL menuDescribe the bug
On the MaixCAM Pro, the touchscreen hardware works perfectly when accessed directly via MaixPy, but fails to register inputs correctly within the standard launcher/LVGL menu UI.
Taps do not trigger expected actions, and the UI appears non-responsive. However, further investigation suggests this is not a hardware issue, but rather an integration bug involving LVGL input handling, specifically related to the
read0()vs.read()methods in the pointing device driver.Environment
Expected Behavior
Actual Behavior
Working Direct Test (MaixPy)
This simple test works correctly, confirming the hardware and basic driver are fine:
Investigation & Hypothesis
I traced the LVGL touch input path to
components/3rd_party/lvgl/driver/pointing_device.cpp.I noticed that the LVGL input code uses
read0(), whereas my working direct script usesread().read0()may expose a raw/lower-level state, potentially updating coordinates before the pressed state is stable. As a result, LVGL receives coordinates without a correctPRESSEDstate, causing the menu logic (which relies on stable press/release transitions) to fail.pointing_device.cppto useread()instead ofread0(), and the UI behavior seemed correct.Questions for Maintainers
read0()specifically intended to be the correct API for LVGL touch input on the MaixCAM Pro, or is this an oversight?read0()andread()? (e.g., raw vs. processed/stable state).read0()toread(), or does the LVGL bridge need to cache the last valid coordinates/state differently?Data I can provide upon request
pointing_device.cpp.read0()andread().All reactions