mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Various fixes (#444)
- Add missing symbols for TactilitySDK - Disable display idle logic when there's no LVGL display
This commit is contained in:
parent
fa544f9b3c
commit
2ca8ae62fb
@ -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()) {
|
||||||
|
|||||||
5
TactilityC/Private/symbols/string.h
Normal file
5
TactilityC/Private/symbols/string.h
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <private/elf_symbol.h>
|
||||||
|
|
||||||
|
extern const esp_elfsym string_symbols[];
|
||||||
14
TactilityC/Source/symbols/string.cpp
Normal file
14
TactilityC/Source/symbols/string.cpp
Normal 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
|
||||||
|
};
|
||||||
@ -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) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user