[FL-1995] New dolphin animations (part 1) (#835)

* Desktop Animation (part 1): Ugly naked ohmygod architecture
* fix butthurt, fix locked scene
* Change SD icons, fixes
* Fix level update animation
* Fixes, correct butthurt
* Clean up code
* furi_assert(0) -> furi_crash("msg")
* Gui: rename none layer to desktop, update docs.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2021-11-24 20:21:12 +04:00
committed by GitHub
parent 92c499b41b
commit 9b8a139e2b
235 changed files with 1869 additions and 661 deletions

View File

@@ -391,6 +391,10 @@ void storage_file_free(File* file) {
free(file);
}
FuriPubSub* storage_get_pubsub(Storage* storage) {
return storage->pubsub;
}
bool storage_simply_remove_recursive(Storage* storage, const char* path) {
furi_assert(storage);
furi_assert(path);

View File

@@ -19,9 +19,11 @@ typedef struct {
struct Storage {
osMessageQueueId_t message_queue;
StorageData storage[STORAGE_COUNT];
StorageStatus prev_ext_storage_status;
StorageSDGui sd_gui;
FuriPubSub* pubsub;
};
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -2,6 +2,7 @@
#include "storage-i.h"
#include "storage-message.h"
#include "storage-processing.h"
#include "storage/storage-glue.h"
#include "storages/storage-int.h"
#include "storages/storage-ext.h"
@@ -31,6 +32,7 @@ static void storage_app_sd_icon_draw_callback(Canvas* canvas, void* context) {
Storage* storage_app_alloc() {
Storage* app = malloc(sizeof(Storage));
app->message_queue = osMessageQueueNew(8, sizeof(StorageMessage), NULL);
app->pubsub = furi_pubsub_alloc();
for(uint8_t i = 0; i < STORAGE_COUNT; i++) {
storage_data_init(&app->storage[i]);
@@ -61,6 +63,11 @@ void storage_tick(Storage* app) {
}
}
if(app->storage[ST_EXT].status != app->prev_ext_storage_status) {
app->prev_ext_storage_status = app->storage[ST_EXT].status;
furi_pubsub_publish(app->pubsub, &app->storage[ST_EXT].status);
}
// storage not enabled but was enabled (sd card unmount)
if(app->storage[ST_EXT].status == StorageStatusNotReady && app->sd_gui.enabled == true) {
app->sd_gui.enabled = false;
@@ -93,4 +100,4 @@ int32_t storage_srv(void* p) {
}
return 0;
}
}

View File

@@ -18,6 +18,8 @@ File* storage_file_alloc(Storage* storage);
*/
void storage_file_free(File* file);
FuriPubSub* storage_get_pubsub(Storage* storage);
/******************* File Functions *******************/
/** Opens an existing file or create a new one.