-
Notifications
You must be signed in to change notification settings - Fork 177
Multi-touch gesture support #682
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
base: master
Are you sure you want to change the base?
Changes from all commits
b5f2df0
a5634c6
e3ed08e
ab346fc
545dd1b
6b0dd59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| # Changelog | ||
|
|
||
| ## 2.7.0 | ||
|
|
||
| ### Features | ||
|
|
||
| - Added support for multi-touch gestures. | ||
|
|
||
| ## 2.6.3 | ||
|
|
||
| ### Fixes | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -275,6 +275,22 @@ Display rotation can be changed at runtime. | |
| > [!NOTE] | ||
| > During the hardware rotating, the component call [`esp_lcd`](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/lcd.html) API. When using software rotation, you cannot use neither `direct_mode` nor `full_refresh` in the driver. See [LVGL documentation](https://docs.lvgl.io/8.3/porting/display.html?highlight=sw_rotate) for more info. | ||
|
|
||
| ### Detecting gestures | ||
|
|
||
| LVGL (version 9.4 and higher) includes support for software detection of multi-touch gestures. | ||
| This detection can be enabled by setting the `LVGL_PORT_ENABLE_GESTURES` config and having `ESP_LCD_TOUCH_MAX_POINTS` > 1. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've enabled it for |
||
| Example usage of the gesture callback can be found in LVGL [documentation](https://docs.lvgl.io/master/details/main-modules/indev/gestures.html). | ||
|
|
||
| The LVGL port task is responsible for passing the touch coordinates to the gesture recognizers and calling the registered callback when a gesture is detected. | ||
|
|
||
| To correctly distinguish two finger swipe from rotation, we recommend changing the default value (which is 0) for the rotation threshold. | ||
| From our testing we recommend starting with 0.15 radians. | ||
|
|
||
| ``` | ||
| lv_indev_t indev = bsp_display_get_input_dev(); | ||
| lv_indev_set_rotation_rad_threshold(indev, 0.15f); | ||
| ``` | ||
|
|
||
| ### Using PSRAM canvas | ||
|
|
||
| If the SRAM is insufficient, you can use the PSRAM as a canvas and use a small trans_buffer to carry it, this makes drawing more efficient. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.