mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 14:28:36 -07:00
Merge remote-tracking branch 'ofw/dev' into yeet-lfs
This commit is contained in:
@@ -97,7 +97,7 @@ void animation_manager_set_interact_callback(
|
||||
animation_manager->interact_callback = callback;
|
||||
}
|
||||
|
||||
static void animation_manager_check_blocking_callback(const void* message, void* context) {
|
||||
static void animation_manager_storage_callback(const void* message, void* context) {
|
||||
const StorageEvent* storage_event = message;
|
||||
|
||||
switch(storage_event->type) {
|
||||
@@ -116,6 +116,22 @@ static void animation_manager_check_blocking_callback(const void* message, void*
|
||||
}
|
||||
}
|
||||
|
||||
static void animation_manager_dolphin_callback(const void* message, void* context) {
|
||||
const DolphinPubsubEvent* dolphin_event = message;
|
||||
|
||||
switch(*dolphin_event) {
|
||||
case DolphinPubsubEventUpdate:
|
||||
furi_assert(context);
|
||||
AnimationManager* animation_manager = context;
|
||||
if(animation_manager->check_blocking_callback) {
|
||||
animation_manager->check_blocking_callback(animation_manager->context);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void animation_manager_timer_callback(void* context) {
|
||||
furi_assert(context);
|
||||
AnimationManager* animation_manager = context;
|
||||
@@ -296,12 +312,12 @@ AnimationManager* animation_manager_alloc(void) {
|
||||
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
animation_manager->pubsub_subscription_storage = furi_pubsub_subscribe(
|
||||
storage_get_pubsub(storage), animation_manager_check_blocking_callback, animation_manager);
|
||||
storage_get_pubsub(storage), animation_manager_storage_callback, animation_manager);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
Dolphin* dolphin = furi_record_open(RECORD_DOLPHIN);
|
||||
animation_manager->pubsub_subscription_dolphin = furi_pubsub_subscribe(
|
||||
dolphin_get_pubsub(dolphin), animation_manager_check_blocking_callback, animation_manager);
|
||||
dolphin_get_pubsub(dolphin), animation_manager_dolphin_callback, animation_manager);
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
|
||||
animation_manager->blocking_shown_sd_ok = true;
|
||||
|
||||
Reference in New Issue
Block a user