Comments (7)
Good catch. So basically right now the demo won't ever enable the touch controller. @C47D did we actually need to only conditionally include those headers? Was there a warning that this resolved?
from lv_port_esp32.
Hi,
I actually used it to avoid registering lv_indev_drv_t indev_drv
when using the ESP32-WroverKit v4.1 (which soesn't include the touch controller).
https://github.com/littlevgl/lv_port_esp32_ili9341/blob/d797cb40dcf57d357fd530c9e8a40fd5872b3bd9/main/main.c#L54-L60
Should we apply the following patch?
diff --git a/main/main.c b/main/main.c
index 35d47ef..cabb2ec 100644 --- a/main/main.c
+++ b/main/main.c
@@ -21,10 +21,8 @@
#include "disp_spi.h"
#include "ili9341.h"
-#if ENABLE_TOUCH_INPUT
#include "tp_spi.h"
#include "xpt2046.h"
-#endif
static void IRAM_ATTR lv_tick_task(void);
@@ -51,7 +49,7 @@ void app_main()
disp_drv.buffer = &disp_buf;
lv_disp_drv_register(&disp_drv);
-#if ENABLE_TOUCH_INPUT
+#if (ENABLE_TOUCH_INPUT == 1)
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.read_cb = xpt2046_read;
from lv_port_esp32.
The #ifdef related to the driver registration in line 53 was already there, the patch in question only made the #includes conditional, but they are conditional on a macro set in that same include file, so basically it will never be defined and the touch panel will never be registered. I don't think we need the includes to be conditional.
from lv_port_esp32.
Sorry I kind of talked past your comment; yes your patch will fix it but line 54 is fine as it was I think.
from lv_port_esp32.
If we compare the value of ENABLE_TOUCH_INPUT to 0 or 1 the code surrounded by the #if
will only be active if the user enables the touch input, otherwise (the #if
alone) that code will always be enabled, with touch input enabled or not. Please let me know if I'm wrong (just returned to work after a long weekend :P).
from lv_port_esp32.
#if will include the block if the value of the expression is non-zero. If ENABLE_TOUCH_INPUT is 0, the code is not included, otherwise it is. I added this code in an earlier PR because on the M5 if you enable the touchpad driver with default settings there is a GPIO conflict and you'll never even see anything appear on the screen.
from lv_port_esp32.
Sorry, didn't knew that, just submitted a PR trying to solve the issue, please let me know if it does.
from lv_port_esp32.
Related Issues (20)
- Cannot build project with LVGL as component HOT 1
- SPI display drivers do not play nice with other spi devices
- esp32-s3 invalid dma channel HOT 1
- Portrait mode of demos doesn't display correctly
- The link to the forum when you write a PR/issue is incorrect HOT 1
- build with esp-idf-4.4.3 fails HOT 1
- failed to run idf.py menuconfig HOT 3
- updated LVGL+squareline studio+ ESP32 HOT 2
- Demo on older esp-wrover-kit board ( not v4.1) HOT 2
- Display not showing the correct windows while running this example HOT 2
- Sunton ESP32-8048S070 board HOT 8
- How can I add my own components to the project
- Unable to compile on esp-idf version 5.0 HOT 4
- undefined reference to `lv_obj_set_scroll_propagation'
- Cant turn off LV_USE_FLEX
- Horizontal scrolling HOT 4
- fatal error: Arduino_H7_Video.h: No such file or directory
- ESP32C3 - non-LVGL task (temp reading) causes TFT display to go blank and stay blank on second run of task HOT 1
- ssd1306 driver
- ssd1306
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_port_esp32.