Newbie in search of help, just purchased my first 7" esp32 WaveShare board and wanted to build my first project with SquareLine, I know that support between the two has come to an end, I guess I’m late to the party, I love the ease of use it has when building a GUI, I have been playing around with the examples from the Waveshare site, I built a simple example with Squareline and a ili9341 display using TFT_epsi and was able to get working what I needed for the basics but now with the Waveshare 7" I’ve hit the wall, I guess its because it uses the ESP panel library.
I took the 7inch_LVGL_Example from the site and wanted to add a Squareline GUI but it seems to run fine, its just a simple task of outputting serial stops, in fact it seems to stop outputting with in the setup function after. lvgl_port_init call
Serial.println(“Creating UI”); This does not get sent the serial monitor.
The only way to keep the GUI running is to remove the call the timer handler, with it the GUI freezes.
I’m using LVGL 8.3.11
Serial.println("Initializing LVGL");
lvgl_port_init(board->getLCD(), board->getTouch());
Serial.println("Creating UI");
#include <Arduino.h>
#include <esp_display_panel.hpp>
#include <lvgl.h>
#include "lvgl_v8_port.h"
#include <ui.h>
using namespace esp_panel::drivers;
using namespace esp_panel::board;
long TC0 = 0;
void setup()
{
String title = "LVGL porting example";
Serial.begin(115200);
Serial.println("Initializing board");
Board *board = new Board();
board->init();
#if LVGL_PORT_AVOID_TEARING_MODE
auto lcd = board->getLCD();
// When avoid tearing function is enabled, the frame buffer number should be set in the board driver
lcd->configFrameBufferNumber(LVGL_PORT_DISP_BUFFER_NUM);
#if ESP_PANEL_DRIVERS_BUS_ENABLE_RGB && CONFIG_IDF_TARGET_ESP32S3
auto lcd_bus = lcd->getBus();
/**
* As the anti-tearing feature typically consumes more PSRAM bandwidth, for the ESP32-S3, we need to utilize the
* "bounce buffer" functionality to enhance the RGB data bandwidth.
* This feature will consume `bounce_buffer_size * bytes_per_pixel * 2` of SRAM memory.
*/
if (lcd_bus->getBasicAttributes().type == ESP_PANEL_BUS_TYPE_RGB) {
static_cast<BusRGB *>(lcd_bus)->configRGB_BounceBufferSize(lcd->getFrameWidth() * 10);
}
#endif
#endif
assert(board->begin());
Serial.println("Initializing LVGL");
lvgl_port_init(board->getLCD(), board->getTouch());
Serial.println("Creating UI");
/* Lock the mutex due to the LVGL APIs are not thread-safe */
lvgl_port_lock(-1);
lvgl_port_unlock();
ui_init();
Serial.println("Setup End");
}
void loop()
{
lv_timer_handler(); /* let the GUI do its work */
delay(5);
if ((millis() - TC0) > 1000)
{
TC0 = millis();
Serial.println("Running!");
}
}