Statusbar improvements (#36)
- Added sdcard service: it updates a statusbar icon and it can auto-unmount sdcards that were physically ejected by the user. - Added `is_mounted` check for sdcard drivers - Refactored assets: moved them from `tactility-esp/` to `data/` - Made assets work with sim build - Refactored wifi statusbar icons - Refactored wifi_manage app access point icons - Support not having an initial image icon when registering a new icon in statusbars. When a statusbar icon is added, it is now visible/invisible depending on whether an image was specified. - Keep track of app memory on app start to find memory leaks (needs fine-tuning in the future) - `tt_init()` assigns `config_instance` earlier, so it can be used during service init
This commit is contained in:
committed by
GitHub
parent
29ea47a7ba
commit
5558edccce
@@ -66,8 +66,14 @@ static void sdcard_unmount(void* context) {
|
||||
free(data);
|
||||
}
|
||||
|
||||
static bool sdcard_is_mounted(void* context) {
|
||||
MountData* data = (MountData*)context;
|
||||
return (data != NULL) && (sdmmc_get_status(data->card) == ESP_OK);
|
||||
}
|
||||
|
||||
const SdCard twodotfour_sdcard = {
|
||||
.mount = &sdcard_mount,
|
||||
.unmount = &sdcard_unmount,
|
||||
.is_mounted = &sdcard_is_mounted,
|
||||
.mount_behaviour = SDCARD_MOUNT_BEHAVIOUR_ANYTIME
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user