Various fixes (#444)

- Add missing symbols for TactilitySDK
- Disable display idle logic when there's no LVGL display
This commit is contained in:
Ken Van Hoeylandt 2026-01-04 01:50:33 +01:00 committed by GitHub
parent fa544f9b3c
commit 2ca8ae62fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 2 deletions

View File

@ -25,13 +25,20 @@ class DisplayIdleService final : public Service {
// Settings are now cached and event-driven (no file I/O in timer callback!) // Settings are now cached and event-driven (no file I/O in timer callback!)
// This prevents watchdog timeout from blocking the Timer Service task // This prevents watchdog timeout from blocking the Timer Service task
if (lv_disp_get_default() == nullptr) {
return;
}
// Query LVGL inactivity once for both checks // Query LVGL inactivity once for both checks
uint32_t inactive_ms = 0; uint32_t inactive_ms = 0;
if (lvgl::lock(100)) { if (lvgl::lock(100)) {
inactive_ms = lv_disp_get_inactive_time(nullptr); inactive_ms = lv_disp_get_inactive_time(nullptr);
lvgl::unlock(); lvgl::unlock();
} else {
return;
} }
// TODO: The following logic only works with the first display. There might be multiple displays.
// Handle display backlight // Handle display backlight
auto display = getDisplay(); auto display = getDisplay();
if (display != nullptr && display->supportsBacklightDuty()) { if (display != nullptr && display->supportsBacklightDuty()) {

View File

@ -0,0 +1,5 @@
#pragma once
#include <private/elf_symbol.h>
extern const esp_elfsym string_symbols[];

View File

@ -0,0 +1,14 @@
#include <private/elf_symbol.h>
#include <symbols/string.h>
#include <string>
extern "C" void _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcjPKcjj(void*, char*, unsigned int, char const*, unsigned int, unsigned int);
const esp_elfsym string_symbols[] = {
// Note: You have to use the mangled names here
{ "_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcjPKcjj", (void*)&_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcjPKcjj},
// { "", (void*)&(std::) },
// delimiter
ESP_ELFSYM_END
};

View File

@ -25,6 +25,7 @@
#include "symbols/esp_http_client.h" #include "symbols/esp_http_client.h"
#include "symbols/pthread.h" #include "symbols/pthread.h"
#include "symbols/stl.h" #include "symbols/stl.h"
#include "symbols/string.h"
#include "symbols/cplusplus.h" #include "symbols/cplusplus.h"
#include "symbols/freertos.h" #include "symbols/freertos.h"
#ifndef CONFIG_IDF_TARGET_ESP32P4 #ifndef CONFIG_IDF_TARGET_ESP32P4
@ -633,10 +634,11 @@ uintptr_t tt_symbol_resolver(const char* symbolName) {
#endif #endif
stl_symbols, stl_symbols,
cplusplus_symbols, cplusplus_symbols,
esp_event_symbols,
esp_http_client_symbols,
pthread_symbols, pthread_symbols,
freertos_symbols, freertos_symbols,
string_symbols,
esp_event_symbols,
esp_http_client_symbols,
}; };
for (const auto* symbols : all_symbols) { for (const auto* symbols : all_symbols) {