LvglSync removed (#591)
Replaced all usages with lvgl-module functions.
This commit is contained in:
committed by
GitHub
parent
03a6285328
commit
3354924359
@@ -1,19 +1,18 @@
|
||||
#include <Tactility/service/gui/GuiService.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <Tactility/LogMessages.h>
|
||||
#include <Tactility/Tactility.h>
|
||||
#include <Tactility/app/AppInstance.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Statusbar.h>
|
||||
#include <Tactility/lvgl/UsbHidInput.h>
|
||||
#include <Tactility/service/ServiceRegistration.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace tt::service::gui {
|
||||
|
||||
extern const ServiceManifest manifest;
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#include "Tactility/lvgl/Keyboard.h"
|
||||
#include "Tactility/lvgl/LvglSync.h"
|
||||
#include "Tactility/service/gui/GuiService.h"
|
||||
|
||||
#include <tactility/check.h>
|
||||
#include <Tactility/lvgl/Keyboard.h>
|
||||
#include <Tactility/service/gui/GuiService.h>
|
||||
#include <Tactility/TactilityConfig.h>
|
||||
#include <Tactility/service/espnow/EspNowService.h>
|
||||
|
||||
#include <tactility/check.h>
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
namespace tt::service::gui {
|
||||
|
||||
static void show_keyboard(lv_event_t* event) {
|
||||
@@ -53,7 +54,7 @@ void GuiService::keyboardAddTextArea(lv_obj_t* textarea) {
|
||||
lock();
|
||||
|
||||
if (isStarted) {
|
||||
check(lvgl::lock(0), "lvgl should already be locked before calling this method");
|
||||
check(lvgl_try_lock(0), "lvgl should already be locked before calling this method");
|
||||
|
||||
if (softwareKeyboardIsEnabled()) {
|
||||
lv_obj_add_event_cb(textarea, show_keyboard, LV_EVENT_FOCUSED, nullptr);
|
||||
@@ -66,7 +67,7 @@ void GuiService::keyboardAddTextArea(lv_obj_t* textarea) {
|
||||
lvgl::software_keyboard_activate(keyboardGroup);
|
||||
}
|
||||
|
||||
lvgl::unlock();
|
||||
lvgl_unlock();
|
||||
}
|
||||
|
||||
unlock();
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
#include <Tactility/LogMessages.h>
|
||||
#include <Tactility/CpuAffinity.h>
|
||||
#include <Tactility/TactilityCore.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/service/screenshot/ScreenshotTask.h>
|
||||
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#include <lv_screenshot.h>
|
||||
|
||||
#include <format>
|
||||
|
||||
#include <tactility/log.h>
|
||||
|
||||
namespace tt::service::screenshot {
|
||||
|
||||
constexpr auto* TAG = "ScreenshotTask";
|
||||
@@ -50,13 +51,13 @@ void ScreenshotTask::setFinished() {
|
||||
}
|
||||
|
||||
static void makeScreenshot(const std::string& filename) {
|
||||
if (lvgl::lock(50 / portTICK_PERIOD_MS)) {
|
||||
if (lvgl_try_lock(50 / portTICK_PERIOD_MS)) {
|
||||
if (lv_screenshot_create(lv_scr_act(), LV_100ASK_SCREENSHOT_SV_PNG, filename.c_str())) {
|
||||
LOG_I(TAG, "Screenshot saved to %s", filename.c_str());
|
||||
} else {
|
||||
LOG_E(TAG, "Screenshot not saved to %s", filename.c_str());
|
||||
}
|
||||
lvgl::unlock();
|
||||
lvgl_unlock();
|
||||
} else {
|
||||
LOG_E(TAG, LOG_MESSAGE_MUTEX_LOCK_FAILED_FMT, "LVGL");
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
#include <Tactility/Mutex.h>
|
||||
#include <Tactility/Timer.h>
|
||||
#include <Tactility/bluetooth/Bluetooth.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/service/ServiceContext.h>
|
||||
#include <Tactility/service/ServicePaths.h>
|
||||
#include <Tactility/service/ServiceRegistration.h>
|
||||
#include <Tactility/service/wifi/Wifi.h>
|
||||
|
||||
#include <tactility/check.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/bluetooth.h>
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <tactility/drivers/usb_host_midi.h>
|
||||
#include <tactility/drivers/usb_host_msc.h>
|
||||
#include <tactility/filesystem/file_system.h>
|
||||
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <lvgl/icons/statusbar.h>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#include <tactility/check.h>
|
||||
#include <Tactility/service/webserver/WebServerService.h>
|
||||
#include <Tactility/service/webserver/AssetVersion.h>
|
||||
#include <Tactility/service/ServiceManifest.h>
|
||||
#include <Tactility/settings/WebServerSettings.h>
|
||||
#include <Tactility/MountPoints.h>
|
||||
@@ -10,28 +8,29 @@
|
||||
#include <Tactility/lvgl/Statusbar.h>
|
||||
#include <Tactility/Mutex.h>
|
||||
|
||||
#include <tactility/check.h>
|
||||
|
||||
#include <Tactility/TactilityConfig.h>
|
||||
#include <Tactility/app/AppRegistration.h>
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/app/App.h>
|
||||
#include <Tactility/service/wifi/Wifi.h>
|
||||
#include <esp_wifi_default.h>
|
||||
#include <Tactility/network/HttpdReq.h>
|
||||
#include <Tactility/network/Url.h>
|
||||
#include <Tactility/Paths.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Lvgl.h>
|
||||
#include <Tactility/StringUtils.h>
|
||||
|
||||
#include <ranges>
|
||||
#include <tactility/filesystem/file_system.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <lvgl/icons/statusbar.h>
|
||||
|
||||
#if TT_FEATURE_SCREENSHOT_ENABLED
|
||||
#include <lv_screenshot.h>
|
||||
#endif
|
||||
|
||||
#include <lvgl/icons/statusbar.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
@@ -42,16 +41,16 @@
|
||||
#include <esp_netif.h>
|
||||
#include <esp_system.h>
|
||||
#include <esp_vfs_fat.h>
|
||||
#include <esp_wifi_default.h>
|
||||
#include <esp_wifi.h>
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <iomanip>
|
||||
#include <lwip/ip4_addr.h>
|
||||
#include <mbedtls/base64.h>
|
||||
#include <ranges>
|
||||
#include <sstream>
|
||||
|
||||
#include <tactility/log.h>
|
||||
|
||||
namespace tt::service::webserver {
|
||||
|
||||
constexpr auto* TAG = "WebServerService";
|
||||
@@ -1477,9 +1476,9 @@ esp_err_t WebServerService::handleApiScreenshot(httpd_req_t* request) {
|
||||
std::string lvgl_screenshot_path = lvgl::PATH_PREFIX + screenshot_path;
|
||||
|
||||
// Capture screenshot using LVGL
|
||||
if (lvgl::lock(pdMS_TO_TICKS(100))) {
|
||||
if (lvgl_try_lock(pdMS_TO_TICKS(100))) {
|
||||
bool success = lv_screenshot_create(lv_scr_act(), LV_100ASK_SCREENSHOT_SV_PNG, lvgl_screenshot_path.c_str());
|
||||
lvgl::unlock();
|
||||
lvgl_unlock();
|
||||
|
||||
if (!success) {
|
||||
LOG_E(TAG, "lv_screenshot_create failed for path: %s", lvgl_screenshot_path.c_str());
|
||||
|
||||
Reference in New Issue
Block a user