Merge develop into main (#318)

- Disable `DisplayDriver` for `St7701Display` (on CYD 4848)
- Improve `GraphicsDemo`: check for feature capability and show alert dialog if there's an issue
- `DevelopmentService` installs to `/data` instead of `/sdcard`
- Fixed `tt_app_get_data_directory()` and `tt_app_get_data_directory_lvgl()` (C++ to C)
- `tt_kernel.h` now defines `MAX_TICKS`
- `tt_init.cpp` now exports `esp_log()` which is required since ESP-IDF 5.5
This commit is contained in:
Ken Van Hoeylandt
2025-09-06 14:44:41 +02:00
committed by GitHub
parent a9b69010d8
commit c0ed8f0a44
9 changed files with 66 additions and 22 deletions
+12 -10
View File
@@ -33,38 +33,40 @@ void tt_app_stop() {
tt::app::stop();
}
void tt_app_get_data_directory(AppPathsHandle handle, char* buffer, size_t& size) {
void tt_app_get_data_directory(AppPathsHandle handle, char* buffer, size_t* size) {
assert(buffer != nullptr);
assert(size > 0);
assert(size != nullptr);
assert(*size > 0);
auto paths = HANDLE_AS_APP_CONTEXT(handle)->getPaths();
auto data_path = paths->getDataDirectory();
auto expected_length = data_path.length() + 1;
if (size < expected_length) {
if (*size < expected_length) {
TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", size, expected_length);
size = 0;
*size = 0;
buffer[0] = 0;
return;
}
strcpy(buffer, data_path.c_str());
size = data_path.length();
*size = data_path.length();
}
void tt_app_get_data_directory_lvgl(AppPathsHandle handle, char* buffer, size_t& size) {
void tt_app_get_data_directory_lvgl(AppPathsHandle handle, char* buffer, size_t* size) {
assert(buffer != nullptr);
assert(size > 0);
assert(size != nullptr);
assert(*size > 0);
auto paths = HANDLE_AS_APP_CONTEXT(handle)->getPaths();
auto data_path = paths->getDataDirectoryLvgl();
auto expected_length = data_path.length() + 1;
if (size < expected_length) {
if (*size < expected_length) {
TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", size, expected_length);
size = 0;
*size = 0;
buffer[0] = 0;
return;
}
strcpy(buffer, data_path.c_str());
size = data_path.length();
*size = data_path.length();
}
}