mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 00:10:30 +00:00
266d4b3234
* feat: happy mode * feat: remove sad dolphin when powering off in happy mode * style: address review comments * Dolphin: add missing furi_checks * Komi: add missing region initialization on startup Co-authored-by: あく <alleteam@gmail.com>
38 lines
809 B
C
38 lines
809 B
C
#pragma once
|
|
|
|
#include <furi.h>
|
|
|
|
#include <core/pubsub.h>
|
|
|
|
#include "dolphin.h"
|
|
#include "helpers/dolphin_state.h"
|
|
|
|
typedef enum {
|
|
DolphinEventTypeDeed,
|
|
DolphinEventTypeStats,
|
|
DolphinEventTypeFlush,
|
|
DolphinEventTypeLevel,
|
|
DolphinEventTypeReloadState,
|
|
DolphinEventTypeSettingsGet,
|
|
DolphinEventTypeSettingsSet,
|
|
} DolphinEventType;
|
|
|
|
typedef struct {
|
|
DolphinEventType type;
|
|
FuriEventFlag* flag;
|
|
union {
|
|
DolphinDeed deed;
|
|
DolphinStats* stats;
|
|
DolphinSettings* settings;
|
|
};
|
|
} DolphinEvent;
|
|
|
|
struct Dolphin {
|
|
DolphinState* state;
|
|
FuriPubSub* pubsub;
|
|
FuriMessageQueue* event_queue;
|
|
FuriEventLoop* event_loop;
|
|
FuriEventLoopTimer* butthurt_timer;
|
|
FuriEventLoopTimer* flush_timer;
|
|
FuriEventLoopTimer* clear_limits_timer;
|
|
};
|