Skip to content

Commit 2ca8ae6

Browse files
Various fixes (#444)
- Add missing symbols for TactilitySDK - Disable display idle logic when there's no LVGL display
1 parent fa544f9 commit 2ca8ae6

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

Tactility/Source/service/displayidle/DisplayIdle.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ class DisplayIdleService final : public Service {
2525
// Settings are now cached and event-driven (no file I/O in timer callback!)
2626
// This prevents watchdog timeout from blocking the Timer Service task
2727

28+
if (lv_disp_get_default() == nullptr) {
29+
return;
30+
}
31+
2832
// Query LVGL inactivity once for both checks
2933
uint32_t inactive_ms = 0;
3034
if (lvgl::lock(100)) {
3135
inactive_ms = lv_disp_get_inactive_time(nullptr);
3236
lvgl::unlock();
37+
} else {
38+
return;
3339
}
3440

41+
// TODO: The following logic only works with the first display. There might be multiple displays.
3542
// Handle display backlight
3643
auto display = getDisplay();
3744
if (display != nullptr && display->supportsBacklightDuty()) {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#pragma once
2+
3+
#include <private/elf_symbol.h>
4+
5+
extern const esp_elfsym string_symbols[];
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <private/elf_symbol.h>
2+
#include <symbols/string.h>
3+
4+
#include <string>
5+
6+
extern "C" void _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcjPKcjj(void*, char*, unsigned int, char const*, unsigned int, unsigned int);
7+
8+
const esp_elfsym string_symbols[] = {
9+
// Note: You have to use the mangled names here
10+
{ "_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcjPKcjj", (void*)&_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE15_M_replace_coldEPcjPKcjj},
11+
// { "", (void*)&(std::) },
12+
// delimiter
13+
ESP_ELFSYM_END
14+
};

TactilityC/Source/tt_init.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "symbols/esp_http_client.h"
2626
#include "symbols/pthread.h"
2727
#include "symbols/stl.h"
28+
#include "symbols/string.h"
2829
#include "symbols/cplusplus.h"
2930
#include "symbols/freertos.h"
3031
#ifndef CONFIG_IDF_TARGET_ESP32P4
@@ -633,10 +634,11 @@ uintptr_t tt_symbol_resolver(const char* symbolName) {
633634
#endif
634635
stl_symbols,
635636
cplusplus_symbols,
636-
esp_event_symbols,
637-
esp_http_client_symbols,
638637
pthread_symbols,
639638
freertos_symbols,
639+
string_symbols,
640+
esp_event_symbols,
641+
esp_http_client_symbols,
640642
};
641643

642644
for (const auto* symbols : all_symbols) {

0 commit comments

Comments
 (0)