mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 04:41:26 +04:00
@@ -13,12 +13,13 @@
|
||||
|
||||
static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin);
|
||||
|
||||
void dolphin_deed(Dolphin* dolphin, DolphinDeed deed) {
|
||||
furi_assert(dolphin);
|
||||
void dolphin_deed(DolphinDeed deed) {
|
||||
Dolphin* dolphin = (Dolphin*)furi_record_open(RECORD_DOLPHIN);
|
||||
DolphinEvent event;
|
||||
event.type = DolphinEventTypeDeed;
|
||||
event.deed = deed;
|
||||
dolphin_event_send_async(dolphin, &event);
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
}
|
||||
|
||||
DolphinStats dolphin_stats(Dolphin* dolphin) {
|
||||
|
||||
@@ -26,18 +26,11 @@ typedef enum {
|
||||
DolphinPubsubEventUpdate,
|
||||
} DolphinPubsubEvent;
|
||||
|
||||
#define DOLPHIN_DEED(deed) \
|
||||
do { \
|
||||
Dolphin* dolphin = (Dolphin*)furi_record_open("dolphin"); \
|
||||
dolphin_deed(dolphin, deed); \
|
||||
furi_record_close("dolphin"); \
|
||||
} while(0)
|
||||
|
||||
/** Deed complete notification. Call it on deed completion.
|
||||
* See dolphin_deed.h for available deeds. In futures it will become part of assets.
|
||||
* Thread safe, async
|
||||
*/
|
||||
void dolphin_deed(Dolphin* dolphin, DolphinDeed deed);
|
||||
void dolphin_deed(DolphinDeed deed);
|
||||
|
||||
/** Retrieve dolphin stats
|
||||
* Thread safe, blocking
|
||||
|
||||
Reference in New Issue
Block a user