Merge branch 'ofw-dev' into dev

This commit is contained in:
MX
2023-06-09 14:13:11 +03:00
62 changed files with 135 additions and 137 deletions

View File

@@ -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) {

View File

@@ -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