Various improvements (#46)

- Specify IDF SDK version in a safer way
- Fix for crash when polling SD card presence (Need to implement a universal locking mechanism later on)
- Updated `ideas.md`
- SD card task prio set to low
This commit is contained in:
Ken Van Hoeylandt 2024-02-17 17:41:56 +01:00 committed by GitHub
parent de34cbfd7a
commit 5fef25fb13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 19 additions and 3 deletions

View File

@ -3,4 +3,4 @@ dependencies:
espressif/esp_lcd_touch_cst816s: "^1.0.3"
espressif/esp_lcd_touch_gt911: "^1.0.0"
espressif/esp_lcd_touch: "1.1.1"
idf: '>=5.1.2'
idf: '~5.1.2'

View File

@ -5,6 +5,7 @@
#include "esp_vfs_fat.h"
#include "sdmmc_cmd.h"
#include "ui/lvgl_sync.h"
#define TAG "tdeck_sdcard"
@ -126,7 +127,18 @@ static void sdcard_unmount(void* context) {
static bool sdcard_is_mounted(void* context) {
MountData* data = (MountData*)context;
return (data != NULL) && (sdmmc_get_status(data->card) == ESP_OK);
/**
* The SD card and the screen are on the same SPI bus.
* Writing and reading to the bus from 2 devices at the same time causes crashes.
* This work-around ensures that this check is only happening when LVGL isn't rendering.
*/
if (tt_lvgl_lock(100)) {
bool result = (data != NULL) && (sdmmc_get_status(data->card) == ESP_OK);
tt_lvgl_unlock();
return result;
} else {
return false;
}
}
const SdCard tdeck_sdcard = {

View File

@ -9,6 +9,9 @@
- Wi-Fi connect app should show info about connection result
- Check service/app id on registration to see if it is a duplicate id
- Fix screenshot app on ESP32: it currently blocks when allocating memory
- Localisation of texts
- Portrait support for GPIO app
- App lifecycle docs mention on_create/on_destroy but app lifecycle is on_start/on_stop
# Core Ideas
- Make a HAL? It would mainly be there to support PC development. It's a lot of effort for supporting what's effectively a dev-only feature.
@ -17,7 +20,7 @@
- 2 wire speaker support
- tt_app_start() and similar functions as proxies for Loader app start/stop/etc.
- tt_app_set_result() for apps that need to return data to other apps (e.g. file selection)
- Make a statusbar service that apps can register icons to. Gui can observe its status changes?
- Introduce co-routines for calling wifi/lvgl/etc functionality.
# App Improvement Ideas
- Sort desktop apps by name.

View File

@ -33,6 +33,7 @@ static ServiceData* service_data_alloc() {
.statusbar_icon_id = tt_statusbar_icon_add(NULL),
.interrupted = false
};
tt_thread_set_priority(data->thread, ThreadPriorityLow);
return data;
}