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:
parent
de34cbfd7a
commit
5fef25fb13
@ -3,4 +3,4 @@ dependencies:
|
|||||||
espressif/esp_lcd_touch_cst816s: "^1.0.3"
|
espressif/esp_lcd_touch_cst816s: "^1.0.3"
|
||||||
espressif/esp_lcd_touch_gt911: "^1.0.0"
|
espressif/esp_lcd_touch_gt911: "^1.0.0"
|
||||||
espressif/esp_lcd_touch: "1.1.1"
|
espressif/esp_lcd_touch: "1.1.1"
|
||||||
idf: '>=5.1.2'
|
idf: '~5.1.2'
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "esp_vfs_fat.h"
|
#include "esp_vfs_fat.h"
|
||||||
#include "sdmmc_cmd.h"
|
#include "sdmmc_cmd.h"
|
||||||
|
#include "ui/lvgl_sync.h"
|
||||||
|
|
||||||
#define TAG "tdeck_sdcard"
|
#define TAG "tdeck_sdcard"
|
||||||
|
|
||||||
@ -126,7 +127,18 @@ static void sdcard_unmount(void* context) {
|
|||||||
|
|
||||||
static bool sdcard_is_mounted(void* context) {
|
static bool sdcard_is_mounted(void* context) {
|
||||||
MountData* data = (MountData*)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 = {
|
const SdCard tdeck_sdcard = {
|
||||||
|
|||||||
@ -9,6 +9,9 @@
|
|||||||
- Wi-Fi connect app should show info about connection result
|
- Wi-Fi connect app should show info about connection result
|
||||||
- Check service/app id on registration to see if it is a duplicate id
|
- 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
|
- 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
|
# 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.
|
- 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
|
- 2 wire speaker support
|
||||||
- tt_app_start() and similar functions as proxies for Loader app start/stop/etc.
|
- 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)
|
- 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
|
# App Improvement Ideas
|
||||||
- Sort desktop apps by name.
|
- Sort desktop apps by name.
|
||||||
|
|||||||
@ -33,6 +33,7 @@ static ServiceData* service_data_alloc() {
|
|||||||
.statusbar_icon_id = tt_statusbar_icon_add(NULL),
|
.statusbar_icon_id = tt_statusbar_icon_add(NULL),
|
||||||
.interrupted = false
|
.interrupted = false
|
||||||
};
|
};
|
||||||
|
tt_thread_set_priority(data->thread, ThreadPriorityLow);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user