Services: simplify api (#2540)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov 2023-06-09 04:02:47 -07:00 committed by GitHub
parent 62939dd28b
commit 0e4344a83c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 94 additions and 100 deletions

View File

@ -377,7 +377,7 @@ int32_t hid_usb_app(void* p) {
bt_hid_connection_status_changed_callback(BtStatusConnected, app); bt_hid_connection_status_changed_callback(BtStatusConnected, app);
DOLPHIN_DEED(DolphinDeedPluginStart); dolphin_deed(DolphinDeedPluginStart);
view_dispatcher_run(app->view_dispatcher); view_dispatcher_run(app->view_dispatcher);
@ -417,7 +417,7 @@ int32_t hid_ble_app(void* p) {
furi_hal_bt_start_advertising(); furi_hal_bt_start_advertising();
bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app); bt_set_status_changed_callback(app->bt, bt_hid_connection_status_changed_callback, app);
DOLPHIN_DEED(DolphinDeedPluginStart); dolphin_deed(DolphinDeedPluginStart);
view_dispatcher_run(app->view_dispatcher); view_dispatcher_run(app->view_dispatcher);

View File

@ -1112,7 +1112,7 @@ void mfkey32(ProgramState* program_state) {
} }
if(keyarray_size > 0) { if(keyarray_size > 0) {
// TODO: Should we use DolphinDeedNfcMfcAdd? // TODO: Should we use DolphinDeedNfcMfcAdd?
DOLPHIN_DEED(DolphinDeedNfcMfcAdd); dolphin_deed(DolphinDeedNfcMfcAdd);
} }
napi_mf_classic_nonce_array_free(nonce_arr); napi_mf_classic_nonce_array_free(nonce_arr);
napi_mf_classic_dict_free(user_dict); napi_mf_classic_dict_free(user_dict);

View File

@ -19,7 +19,7 @@ void picopass_scene_device_info_on_enter(void* context) {
FuriString* wiegand_str = furi_string_alloc(); FuriString* wiegand_str = furi_string_alloc();
FuriString* sio_str = furi_string_alloc(); FuriString* sio_str = furi_string_alloc();
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
// Setup view // Setup view
PicopassBlock* AA1 = picopass->dev->dev_data.AA1; PicopassBlock* AA1 = picopass->dev->dev_data.AA1;

View File

@ -10,7 +10,7 @@ void picopass_read_card_worker_callback(PicopassWorkerEvent event, void* context
void picopass_scene_read_card_on_enter(void* context) { void picopass_scene_read_card_on_enter(void* context) {
Picopass* picopass = context; Picopass* picopass = context;
DOLPHIN_DEED(DolphinDeedNfcRead); dolphin_deed(DolphinDeedNfcRead);
// Setup view // Setup view
Popup* popup = picopass->popup; Popup* popup = picopass->popup;

View File

@ -21,7 +21,7 @@ void picopass_scene_read_card_success_on_enter(void* context) {
FuriString* wiegand_str = furi_string_alloc(); FuriString* wiegand_str = furi_string_alloc();
FuriString* sio_str = furi_string_alloc(); FuriString* sio_str = furi_string_alloc();
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
// Send notification // Send notification
notification_message(picopass->notifications, &sequence_success); notification_message(picopass->notifications, &sequence_success);

View File

@ -19,7 +19,7 @@ void picopass_scene_read_factory_success_on_enter(void* context) {
FuriString* title = furi_string_alloc_set("Factory Default"); FuriString* title = furi_string_alloc_set("Factory Default");
FuriString* subtitle = furi_string_alloc_set(""); FuriString* subtitle = furi_string_alloc_set("");
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
// Send notification // Send notification
notification_message(picopass->notifications, &sequence_success); notification_message(picopass->notifications, &sequence_success);

View File

@ -8,7 +8,7 @@ void picopass_scene_save_success_popup_callback(void* context) {
void picopass_scene_save_success_on_enter(void* context) { void picopass_scene_save_success_on_enter(void* context) {
Picopass* picopass = context; Picopass* picopass = context;
DOLPHIN_DEED(DolphinDeedNfcSave); dolphin_deed(DolphinDeedNfcSave);
// Setup view // Setup view
Popup* popup = picopass->popup; Popup* popup = picopass->popup;

View File

@ -9,7 +9,7 @@ void picopass_write_card_worker_callback(PicopassWorkerEvent event, void* contex
void picopass_scene_write_card_on_enter(void* context) { void picopass_scene_write_card_on_enter(void* context) {
Picopass* picopass = context; Picopass* picopass = context;
DOLPHIN_DEED(DolphinDeedNfcSave); dolphin_deed(DolphinDeedNfcSave);
// Setup view // Setup view
Popup* popup = picopass->popup; Popup* popup = picopass->popup;

View File

@ -18,7 +18,7 @@ void picopass_scene_write_card_success_on_enter(void* context) {
Widget* widget = picopass->widget; Widget* widget = picopass->widget;
FuriString* str = furi_string_alloc_set("Write Success!"); FuriString* str = furi_string_alloc_set("Write Success!");
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
// Send notification // Send notification
notification_message(picopass->notifications, &sequence_success); notification_message(picopass->notifications, &sequence_success);

View File

@ -9,7 +9,7 @@ void picopass_write_key_worker_callback(PicopassWorkerEvent event, void* context
void picopass_scene_write_key_on_enter(void* context) { void picopass_scene_write_key_on_enter(void* context) {
Picopass* picopass = context; Picopass* picopass = context;
DOLPHIN_DEED(DolphinDeedNfcSave); dolphin_deed(DolphinDeedNfcSave);
// Setup view // Setup view
Popup* popup = picopass->popup; Popup* popup = picopass->popup;

View File

@ -346,7 +346,7 @@ int32_t snake_game_app(void* p) {
notification_message_block(notification, &sequence_display_backlight_enforce_on); notification_message_block(notification, &sequence_display_backlight_enforce_on);
DOLPHIN_DEED(DolphinDeedPluginGameStart); dolphin_deed(DolphinDeedPluginGameStart);
SnakeEvent event; SnakeEvent event;
for(bool processing = true; processing;) { for(bool processing = true; processing;) {

View File

@ -426,7 +426,7 @@ static int32_t bad_usb_worker(void* context) {
if(flags & WorkerEvtEnd) { if(flags & WorkerEvtEnd) {
break; break;
} else if(flags & WorkerEvtStartStop) { // Start executing script } else if(flags & WorkerEvtStartStop) { // Start executing script
DOLPHIN_DEED(DolphinDeedBadUsbPlayScript); dolphin_deed(DolphinDeedBadUsbPlayScript);
delay_val = 0; delay_val = 0;
bad_usb->buf_len = 0; bad_usb->buf_len = 0;
bad_usb->st.line_cur = 0; bad_usb->st.line_cur = 0;
@ -449,7 +449,7 @@ static int32_t bad_usb_worker(void* context) {
if(flags & WorkerEvtEnd) { if(flags & WorkerEvtEnd) {
break; break;
} else if(flags & WorkerEvtConnect) { // Start executing script } else if(flags & WorkerEvtConnect) { // Start executing script
DOLPHIN_DEED(DolphinDeedBadUsbPlayScript); dolphin_deed(DolphinDeedBadUsbPlayScript);
delay_val = 0; delay_val = 0;
bad_usb->buf_len = 0; bad_usb->buf_len = 0;
bad_usb->st.line_cur = 0; bad_usb->st.line_cur = 0;

View File

@ -89,7 +89,7 @@ bool gpio_scene_start_on_event(void* context, SceneManagerEvent event) {
} else if(event.event == GpioStartEventUsbUart) { } else if(event.event == GpioStartEventUsbUart) {
scene_manager_set_scene_state(app->scene_manager, GpioSceneStart, GpioItemUsbUart); scene_manager_set_scene_state(app->scene_manager, GpioSceneStart, GpioItemUsbUart);
if(!furi_hal_usb_is_locked()) { if(!furi_hal_usb_is_locked()) {
DOLPHIN_DEED(DolphinDeedGpioUartBridge); dolphin_deed(DolphinDeedGpioUartBridge);
scene_manager_next_scene(app->scene_manager, GpioSceneUsbUart); scene_manager_next_scene(app->scene_manager, GpioSceneUsbUart);
} else { } else {
scene_manager_next_scene(app->scene_manager, GpioSceneUsbUartCloseRpc); scene_manager_next_scene(app->scene_manager, GpioSceneUsbUartCloseRpc);

View File

@ -282,14 +282,14 @@ int32_t ibutton_app(void* arg) {
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
ibutton->view_dispatcher, ibutton->gui, ViewDispatcherTypeDesktop); ibutton->view_dispatcher, ibutton->gui, ViewDispatcherTypeDesktop);
scene_manager_next_scene(ibutton->scene_manager, iButtonSceneRpc); scene_manager_next_scene(ibutton->scene_manager, iButtonSceneRpc);
DOLPHIN_DEED(DolphinDeedIbuttonEmulate); dolphin_deed(DolphinDeedIbuttonEmulate);
} else { } else {
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
ibutton->view_dispatcher, ibutton->gui, ViewDispatcherTypeFullscreen); ibutton->view_dispatcher, ibutton->gui, ViewDispatcherTypeFullscreen);
if(key_loaded) { //-V547 if(key_loaded) { //-V547
scene_manager_next_scene(ibutton->scene_manager, iButtonSceneEmulate); scene_manager_next_scene(ibutton->scene_manager, iButtonSceneEmulate);
DOLPHIN_DEED(DolphinDeedIbuttonEmulate); dolphin_deed(DolphinDeedIbuttonEmulate);
} else { } else {
scene_manager_next_scene(ibutton->scene_manager, iButtonSceneStart); scene_manager_next_scene(ibutton->scene_manager, iButtonSceneStart);
} }

View File

@ -38,7 +38,7 @@ bool ibutton_scene_read_on_event(void* context, SceneManagerEvent event) {
ibutton_notification_message(ibutton, iButtonNotificationMessageSuccess); ibutton_notification_message(ibutton, iButtonNotificationMessageSuccess);
scene_manager_next_scene(scene_manager, iButtonSceneReadSuccess); scene_manager_next_scene(scene_manager, iButtonSceneReadSuccess);
DOLPHIN_DEED(DolphinDeedIbuttonReadSuccess); dolphin_deed(DolphinDeedIbuttonReadSuccess);
} else { } else {
scene_manager_next_scene(scene_manager, iButtonSceneReadError); scene_manager_next_scene(scene_manager, iButtonSceneReadError);

View File

@ -75,7 +75,7 @@ bool ibutton_scene_read_key_menu_on_event(void* context, SceneManagerEvent event
scene_manager_next_scene(scene_manager, iButtonSceneSaveName); scene_manager_next_scene(scene_manager, iButtonSceneSaveName);
} else if(event.event == SubmenuIndexEmulate) { } else if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(scene_manager, iButtonSceneEmulate); scene_manager_next_scene(scene_manager, iButtonSceneEmulate);
DOLPHIN_DEED(DolphinDeedIbuttonEmulate); dolphin_deed(DolphinDeedIbuttonEmulate);
} else if(event.event == SubmenuIndexViewData) { } else if(event.event == SubmenuIndexViewData) {
scene_manager_next_scene(scene_manager, iButtonSceneViewData); scene_manager_next_scene(scene_manager, iButtonSceneViewData);
} else if(event.event == SubmenuIndexWriteBlank) { } else if(event.event == SubmenuIndexWriteBlank) {

View File

@ -58,9 +58,9 @@ bool ibutton_scene_save_name_on_event(void* context, SceneManagerEvent event) {
// Nothing, do not count editing as saving // Nothing, do not count editing as saving
} else if(scene_manager_has_previous_scene( } else if(scene_manager_has_previous_scene(
ibutton->scene_manager, iButtonSceneAddType)) { ibutton->scene_manager, iButtonSceneAddType)) {
DOLPHIN_DEED(DolphinDeedIbuttonAdd); dolphin_deed(DolphinDeedIbuttonAdd);
} else { } else {
DOLPHIN_DEED(DolphinDeedIbuttonSave); dolphin_deed(DolphinDeedIbuttonSave);
} }
} else { } else {

View File

@ -48,7 +48,7 @@ bool ibutton_scene_saved_key_menu_on_event(void* context, SceneManagerEvent even
consumed = true; consumed = true;
if(event.event == SubmenuIndexEmulate) { if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(scene_manager, iButtonSceneEmulate); scene_manager_next_scene(scene_manager, iButtonSceneEmulate);
DOLPHIN_DEED(DolphinDeedIbuttonEmulate); dolphin_deed(DolphinDeedIbuttonEmulate);
} else if(event.event == SubmenuIndexWriteBlank) { } else if(event.event == SubmenuIndexWriteBlank) {
ibutton->write_mode = iButtonWriteModeBlank; ibutton->write_mode = iButtonWriteModeBlank;
scene_manager_next_scene(scene_manager, iButtonSceneWrite); scene_manager_next_scene(scene_manager, iButtonSceneWrite);

View File

@ -33,7 +33,7 @@ bool ibutton_scene_start_on_event(void* context, SceneManagerEvent event) {
consumed = true; consumed = true;
if(event.event == SubmenuIndexRead) { if(event.event == SubmenuIndexRead) {
scene_manager_next_scene(ibutton->scene_manager, iButtonSceneRead); scene_manager_next_scene(ibutton->scene_manager, iButtonSceneRead);
DOLPHIN_DEED(DolphinDeedIbuttonRead); dolphin_deed(DolphinDeedIbuttonRead);
} else if(event.event == SubmenuIndexSaved) { } else if(event.event == SubmenuIndexSaved) {
scene_manager_next_scene(ibutton->scene_manager, iButtonSceneSelectKey); scene_manager_next_scene(ibutton->scene_manager, iButtonSceneSelectKey);
} else if(event.event == SubmenuIndexAdd) { } else if(event.event == SubmenuIndexAdd) {

View File

@ -319,7 +319,7 @@ void infrared_tx_start_signal(Infrared* infrared, InfraredSignal* signal) {
infrared_worker_set_decoded_signal(infrared->worker, message); infrared_worker_set_decoded_signal(infrared->worker, message);
} }
DOLPHIN_DEED(DolphinDeedIrSend); dolphin_deed(DolphinDeedIrSend);
infrared_play_notification_message(infrared, InfraredNotificationMessageBlinkStartSend); infrared_play_notification_message(infrared, InfraredNotificationMessageBlinkStartSend);
infrared_worker_tx_set_get_signal_callback( infrared_worker_tx_set_get_signal_callback(

View File

@ -70,7 +70,7 @@ bool infrared_scene_universal_common_on_event(void* context, SceneManagerEvent e
uint32_t record_count; uint32_t record_count;
if(infrared_brute_force_start( if(infrared_brute_force_start(
brute_force, infrared_custom_event_get_value(event.event), &record_count)) { brute_force, infrared_custom_event_get_value(event.event), &record_count)) {
DOLPHIN_DEED(DolphinDeedIrSend); dolphin_deed(DolphinDeedIrSend);
infrared_scene_universal_common_show_popup(infrared, record_count); infrared_scene_universal_common_show_popup(infrared, record_count);
} else { } else {
scene_manager_next_scene(scene_manager, InfraredSceneErrorDatabases); scene_manager_next_scene(scene_manager, InfraredSceneErrorDatabases);

View File

@ -28,7 +28,7 @@ bool infrared_scene_learn_on_event(void* context, SceneManagerEvent event) {
if(event.event == InfraredCustomEventTypeSignalReceived) { if(event.event == InfraredCustomEventTypeSignalReceived) {
infrared_play_notification_message(infrared, InfraredNotificationMessageSuccess); infrared_play_notification_message(infrared, InfraredNotificationMessageSuccess);
scene_manager_next_scene(infrared->scene_manager, InfraredSceneLearnSuccess); scene_manager_next_scene(infrared->scene_manager, InfraredSceneLearnSuccess);
DOLPHIN_DEED(DolphinDeedIrLearnSuccess); dolphin_deed(DolphinDeedIrLearnSuccess);
consumed = true; consumed = true;
} }
} }

View File

@ -50,7 +50,7 @@ bool infrared_scene_learn_enter_name_on_event(void* context, SceneManagerEvent e
if(success) { if(success) {
scene_manager_next_scene(scene_manager, InfraredSceneLearnDone); scene_manager_next_scene(scene_manager, InfraredSceneLearnDone);
DOLPHIN_DEED(DolphinDeedIrSave); dolphin_deed(DolphinDeedIrSave);
} else { } else {
dialog_message_show_storage_error(infrared->dialogs, "Failed to save file"); dialog_message_show_storage_error(infrared->dialogs, "Failed to save file");
const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart}; const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};

View File

@ -183,14 +183,14 @@ int32_t lfrfid_app(void* p) {
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeDesktop); app->view_dispatcher, app->gui, ViewDispatcherTypeDesktop);
scene_manager_next_scene(app->scene_manager, LfRfidSceneRpc); scene_manager_next_scene(app->scene_manager, LfRfidSceneRpc);
DOLPHIN_DEED(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
} else { } else {
furi_string_set(app->file_path, args); furi_string_set(app->file_path, args);
lfrfid_load_key_data(app, app->file_path, true); lfrfid_load_key_data(app, app->file_path, true);
view_dispatcher_attach_to_gui( view_dispatcher_attach_to_gui(
app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen); app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate); scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
DOLPHIN_DEED(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
} }
} else { } else {

View File

@ -58,12 +58,12 @@ bool lfrfid_scene_extra_actions_on_event(void* context, SceneManagerEvent event)
if(event.event == SubmenuIndexASK) { if(event.event == SubmenuIndexASK) {
app->read_type = LFRFIDWorkerReadTypeASKOnly; app->read_type = LFRFIDWorkerReadTypeASKOnly;
scene_manager_next_scene(app->scene_manager, LfRfidSceneRead); scene_manager_next_scene(app->scene_manager, LfRfidSceneRead);
DOLPHIN_DEED(DolphinDeedRfidRead); dolphin_deed(DolphinDeedRfidRead);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexPSK) { } else if(event.event == SubmenuIndexPSK) {
app->read_type = LFRFIDWorkerReadTypePSKOnly; app->read_type = LFRFIDWorkerReadTypePSKOnly;
scene_manager_next_scene(app->scene_manager, LfRfidSceneRead); scene_manager_next_scene(app->scene_manager, LfRfidSceneRead);
DOLPHIN_DEED(DolphinDeedRfidRead); dolphin_deed(DolphinDeedRfidRead);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexRAW) { } else if(event.event == SubmenuIndexRAW) {
scene_manager_next_scene(app->scene_manager, LfRfidSceneRawName); scene_manager_next_scene(app->scene_manager, LfRfidSceneRawName);

View File

@ -81,7 +81,7 @@ bool lfrfid_scene_read_on_event(void* context, SceneManagerEvent event) {
notification_message(app->notifications, &sequence_success); notification_message(app->notifications, &sequence_success);
furi_string_reset(app->file_name); furi_string_reset(app->file_name);
scene_manager_next_scene(app->scene_manager, LfRfidSceneReadSuccess); scene_manager_next_scene(app->scene_manager, LfRfidSceneReadSuccess);
DOLPHIN_DEED(DolphinDeedRfidReadSuccess); dolphin_deed(DolphinDeedRfidReadSuccess);
consumed = true; consumed = true;
} else if(event.event == LfRfidEventReadStartPSK) { } else if(event.event == LfRfidEventReadStartPSK) {
if(app->read_type == LFRFIDWorkerReadTypeAuto) { if(app->read_type == LFRFIDWorkerReadTypeAuto) {

View File

@ -44,7 +44,7 @@ bool lfrfid_scene_read_key_menu_on_event(void* context, SceneManagerEvent event)
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexEmulate) { } else if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate); scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
DOLPHIN_DEED(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
consumed = true; consumed = true;
} }
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneReadKeyMenu, event.event); scene_manager_set_scene_state(app->scene_manager, LfRfidSceneReadKeyMenu, event.event);

View File

@ -59,9 +59,9 @@ bool lfrfid_scene_save_name_on_event(void* context, SceneManagerEvent event) {
if(scene_manager_has_previous_scene(scene_manager, LfRfidSceneSavedKeyMenu)) { if(scene_manager_has_previous_scene(scene_manager, LfRfidSceneSavedKeyMenu)) {
// Nothing, do not count editing as saving // Nothing, do not count editing as saving
} else if(scene_manager_has_previous_scene(scene_manager, LfRfidSceneSaveType)) { } else if(scene_manager_has_previous_scene(scene_manager, LfRfidSceneSaveType)) {
DOLPHIN_DEED(DolphinDeedRfidAdd); dolphin_deed(DolphinDeedRfidAdd);
} else { } else {
DOLPHIN_DEED(DolphinDeedRfidSave); dolphin_deed(DolphinDeedRfidSave);
} }
} else { } else {
scene_manager_search_and_switch_to_previous_scene( scene_manager_search_and_switch_to_previous_scene(

View File

@ -43,7 +43,7 @@ bool lfrfid_scene_saved_key_menu_on_event(void* context, SceneManagerEvent event
if(event.type == SceneManagerEventTypeCustom) { if(event.type == SceneManagerEventTypeCustom) {
if(event.event == SubmenuIndexEmulate) { if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate); scene_manager_next_scene(app->scene_manager, LfRfidSceneEmulate);
DOLPHIN_DEED(DolphinDeedRfidEmulate); dolphin_deed(DolphinDeedRfidEmulate);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexWrite) { } else if(event.event == SubmenuIndexWrite) {
scene_manager_next_scene(app->scene_manager, LfRfidSceneWrite); scene_manager_next_scene(app->scene_manager, LfRfidSceneWrite);

View File

@ -49,7 +49,7 @@ bool lfrfid_scene_start_on_event(void* context, SceneManagerEvent event) {
if(event.event == SubmenuIndexRead) { if(event.event == SubmenuIndexRead) {
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneStart, SubmenuIndexRead); scene_manager_set_scene_state(app->scene_manager, LfRfidSceneStart, SubmenuIndexRead);
scene_manager_next_scene(app->scene_manager, LfRfidSceneRead); scene_manager_next_scene(app->scene_manager, LfRfidSceneRead);
DOLPHIN_DEED(DolphinDeedRfidRead); dolphin_deed(DolphinDeedRfidRead);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexSaved) { } else if(event.event == SubmenuIndexSaved) {
// Like in the other apps, explicitly save the scene state // Like in the other apps, explicitly save the scene state

View File

@ -286,18 +286,18 @@ int32_t nfc_app(void* p) {
if(nfc_device_load(nfc->dev, p, true)) { if(nfc_device_load(nfc->dev, p, true)) {
if(nfc->dev->format == NfcDeviceSaveFormatMifareUl) { if(nfc->dev->format == NfcDeviceSaveFormatMifareUl) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightEmulate);
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} else if(nfc->dev->format == NfcDeviceSaveFormatMifareClassic) { } else if(nfc->dev->format == NfcDeviceSaveFormatMifareClassic) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicEmulate);
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} else if(nfc->dev->format == NfcDeviceSaveFormatNfcV) { } else if(nfc->dev->format == NfcDeviceSaveFormatNfcV) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVEmulate);
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} else if(nfc->dev->format == NfcDeviceSaveFormatBankCard) { } else if(nfc->dev->format == NfcDeviceSaveFormatBankCard) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneDeviceInfo); scene_manager_next_scene(nfc->scene_manager, NfcSceneDeviceInfo);
} else { } else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid); scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} }
} else { } else {
// Exit app // Exit app

View File

@ -111,7 +111,7 @@ bool nfc_scene_mf_classic_dict_attack_on_event(void* context, SceneManagerEvent
} else { } else {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} }
} else if(event.event == NfcWorkerEventAborted) { } else if(event.event == NfcWorkerEventAborted) {
@ -123,7 +123,7 @@ bool nfc_scene_mf_classic_dict_attack_on_event(void* context, SceneManagerEvent
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicReadSuccess);
// Counting failed attempts too // Counting failed attempts too
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} }
} else if(event.event == NfcWorkerEventCardDetected) { } else if(event.event == NfcWorkerEventCardDetected) {

View File

@ -37,7 +37,7 @@ bool nfc_scene_mf_classic_keys_add_on_event(void* context, SceneManagerEvent eve
nfc->scene_manager, NfcSceneMfClassicKeysWarnDuplicate); nfc->scene_manager, NfcSceneMfClassicKeysWarnDuplicate);
} else if(mf_classic_dict_add_key(dict, nfc->byte_input_store)) { } else if(mf_classic_dict_add_key(dict, nfc->byte_input_store)) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneSaveSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneSaveSuccess);
DOLPHIN_DEED(DolphinDeedNfcMfcAdd); dolphin_deed(DolphinDeedNfcMfcAdd);
} else { } else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneDictNotFound); scene_manager_next_scene(nfc->scene_manager, NfcSceneDictNotFound);
} }

View File

@ -54,14 +54,14 @@ bool nfc_scene_mf_classic_menu_on_event(void* context, SceneManagerEvent event)
} else if(event.event == SubmenuIndexEmulate) { } else if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicEmulate);
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) { if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
DOLPHIN_DEED(DolphinDeedNfcAddEmulate); dolphin_deed(DolphinDeedNfcAddEmulate);
} else { } else {
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} }
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexDetectReader) { } else if(event.event == SubmenuIndexDetectReader) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneDetectReader); scene_manager_next_scene(nfc->scene_manager, NfcSceneDetectReader);
DOLPHIN_DEED(DolphinDeedNfcDetectReader); dolphin_deed(DolphinDeedNfcDetectReader);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexInfo) { } else if(event.event == SubmenuIndexInfo) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcDataInfo);

View File

@ -34,7 +34,7 @@ static void nfc_scene_mf_classic_update_setup_view(Nfc* nfc) {
void nfc_scene_mf_classic_update_on_enter(void* context) { void nfc_scene_mf_classic_update_on_enter(void* context) {
Nfc* nfc = context; Nfc* nfc = context;
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
scene_manager_set_scene_state( scene_manager_set_scene_state(
nfc->scene_manager, NfcSceneMfClassicUpdate, NfcSceneMfClassicUpdateStateCardSearch); nfc->scene_manager, NfcSceneMfClassicUpdate, NfcSceneMfClassicUpdateStateCardSearch);

View File

@ -8,7 +8,7 @@ void nfc_scene_mf_classic_update_success_popup_callback(void* context) {
void nfc_scene_mf_classic_update_success_on_enter(void* context) { void nfc_scene_mf_classic_update_success_on_enter(void* context) {
Nfc* nfc = context; Nfc* nfc = context;
DOLPHIN_DEED(DolphinDeedNfcSave); dolphin_deed(DolphinDeedNfcSave);
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);

View File

@ -34,7 +34,7 @@ static void nfc_scene_mf_classic_write_setup_view(Nfc* nfc) {
void nfc_scene_mf_classic_write_on_enter(void* context) { void nfc_scene_mf_classic_write_on_enter(void* context) {
Nfc* nfc = context; Nfc* nfc = context;
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
scene_manager_set_scene_state( scene_manager_set_scene_state(
nfc->scene_manager, NfcSceneMfClassicWrite, NfcSceneMfClassicWriteStateCardSearch); nfc->scene_manager, NfcSceneMfClassicWrite, NfcSceneMfClassicWriteStateCardSearch);

View File

@ -8,7 +8,7 @@ void nfc_scene_mf_classic_write_success_popup_callback(void* context) {
void nfc_scene_mf_classic_write_success_on_enter(void* context) { void nfc_scene_mf_classic_write_success_on_enter(void* context) {
Nfc* nfc = context; Nfc* nfc = context;
DOLPHIN_DEED(DolphinDeedNfcSave); dolphin_deed(DolphinDeedNfcSave);
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);

View File

@ -50,9 +50,9 @@ bool nfc_scene_mf_desfire_menu_on_event(void* context, SceneManagerEvent event)
} else if(event.event == SubmenuIndexEmulateUid) { } else if(event.event == SubmenuIndexEmulateUid) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid); scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) { if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
DOLPHIN_DEED(DolphinDeedNfcAddEmulate); dolphin_deed(DolphinDeedNfcAddEmulate);
} else { } else {
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} }
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexInfo) { } else if(event.event == SubmenuIndexInfo) {

View File

@ -60,9 +60,9 @@ bool nfc_scene_mf_ultralight_menu_on_event(void* context, SceneManagerEvent even
} else if(event.event == SubmenuIndexEmulate) { } else if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightEmulate);
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) { if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
DOLPHIN_DEED(DolphinDeedNfcAddEmulate); dolphin_deed(DolphinDeedNfcAddEmulate);
} else { } else {
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} }
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexUnlock) { } else if(event.event == SubmenuIndexUnlock) {

View File

@ -61,7 +61,7 @@ bool nfc_scene_mf_ultralight_unlock_warn_on_event(void* context, SceneManagerEve
if(event.type == SceneManagerEventTypeCustom) { if(event.type == SceneManagerEventTypeCustom) {
if(event.event == DialogExResultRight) { if(event.event == DialogExResultRight) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadAuth); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadAuth);
DOLPHIN_DEED(DolphinDeedNfcRead); dolphin_deed(DolphinDeedNfcRead);
consumed = true; consumed = true;
} else if(event.event == DialogExResultLeft) { } else if(event.event == DialogExResultLeft) {
if(auth_method == MfUltralightAuthMethodAuto) { if(auth_method == MfUltralightAuthMethodAuto) {
@ -79,7 +79,7 @@ bool nfc_scene_mf_ultralight_unlock_warn_on_event(void* context, SceneManagerEve
if(event.type == SceneManagerEventTypeCustom) { if(event.type == SceneManagerEventTypeCustom) {
if(event.event == DialogExResultCenter) { if(event.event == DialogExResultCenter) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadAuth); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadAuth);
DOLPHIN_DEED(DolphinDeedNfcRead); dolphin_deed(DolphinDeedNfcRead);
consumed = true; consumed = true;
} }
} }

View File

@ -43,9 +43,9 @@ bool nfc_scene_nfca_menu_on_event(void* context, SceneManagerEvent event) {
} else if(event.event == SubmenuIndexEmulateUid) { } else if(event.event == SubmenuIndexEmulateUid) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid); scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) { if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
DOLPHIN_DEED(DolphinDeedNfcAddEmulate); dolphin_deed(DolphinDeedNfcAddEmulate);
} else { } else {
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} }
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexInfo) { } else if(event.event == SubmenuIndexInfo) {

View File

@ -32,7 +32,7 @@ bool nfc_scene_nfcv_key_input_on_event(void* context, SceneManagerEvent event) {
if(event.type == SceneManagerEventTypeCustom) { if(event.type == SceneManagerEventTypeCustom) {
if(event.event == NfcCustomEventByteInputDone) { if(event.event == NfcCustomEventByteInputDone) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVUnlock); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVUnlock);
DOLPHIN_DEED(DolphinDeedNfcRead); dolphin_deed(DolphinDeedNfcRead);
consumed = true; consumed = true;
} }
} }

View File

@ -42,9 +42,9 @@ bool nfc_scene_nfcv_menu_on_event(void* context, SceneManagerEvent event) {
} else if(event.event == SubmenuIndexEmulate) { } else if(event.event == SubmenuIndexEmulate) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVEmulate); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVEmulate);
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) { if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
DOLPHIN_DEED(DolphinDeedNfcAddEmulate); dolphin_deed(DolphinDeedNfcAddEmulate);
} else { } else {
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
} }
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexInfo) { } else if(event.event == SubmenuIndexInfo) {

View File

@ -76,7 +76,7 @@ void nfc_scene_nfcv_unlock_set_state(Nfc* nfc, NfcSceneNfcVUnlockState state) {
popup_set_timeout(popup, 1500); popup_set_timeout(popup, 1500);
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup); view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
} else if(state == NfcSceneNfcVUnlockStateAlreadyUnlocked) { } else if(state == NfcSceneNfcVUnlockStateAlreadyUnlocked) {
popup_reset(popup); popup_reset(popup);

View File

@ -45,7 +45,7 @@ bool nfc_scene_nfcv_unlock_menu_on_event(void* context, SceneManagerEvent event)
} else if(event.event == SubmenuIndexNfcVUnlockMenuTonieBox) { } else if(event.event == SubmenuIndexNfcVUnlockMenuTonieBox) {
nfc->dev->dev_data.nfcv_data.auth_method = NfcVAuthMethodTonieBox; nfc->dev->dev_data.nfcv_data.auth_method = NfcVAuthMethodTonieBox;
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVUnlock); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVUnlock);
DOLPHIN_DEED(DolphinDeedNfcRead); dolphin_deed(DolphinDeedNfcRead);
consumed = true; consumed = true;
} }
scene_manager_set_scene_state(nfc->scene_manager, NfcSceneNfcVUnlockMenu, event.event); scene_manager_set_scene_state(nfc->scene_manager, NfcSceneNfcVUnlockMenu, event.event);

View File

@ -61,34 +61,34 @@ bool nfc_scene_read_on_event(void* context, SceneManagerEvent event) {
(event.event == NfcWorkerEventReadUidNfcV)) { (event.event == NfcWorkerEventReadUidNfcV)) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneReadCardSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneReadCardSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadUidNfcA) { } else if(event.event == NfcWorkerEventReadUidNfcA) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcaReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcaReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadNfcV) { } else if(event.event == NfcWorkerEventReadNfcV) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneNfcVReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadMfUltralight) { } else if(event.event == NfcWorkerEventReadMfUltralight) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
// Set unlock password input to 0xFFFFFFFF only on fresh read // Set unlock password input to 0xFFFFFFFF only on fresh read
memset(nfc->byte_input_store, 0xFF, sizeof(nfc->byte_input_store)); memset(nfc->byte_input_store, 0xFF, sizeof(nfc->byte_input_store));
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfUltralightReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadMfClassicDone) { } else if(event.event == NfcWorkerEventReadMfClassicDone) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadMfDesfire) { } else if(event.event == NfcWorkerEventReadMfDesfire) {
notification_message(nfc->notifications, &sequence_success); notification_message(nfc->notifications, &sequence_success);
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfDesfireReadSuccess); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfDesfireReadSuccess);
DOLPHIN_DEED(DolphinDeedNfcReadSuccess); dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true; consumed = true;
} else if(event.event == NfcWorkerEventReadMfClassicDictAttackRequired) { } else if(event.event == NfcWorkerEventReadMfClassicDictAttackRequired) {
if(mf_classic_dict_check_presence(MfClassicDictTypeSystem)) { if(mf_classic_dict_check_presence(MfClassicDictTypeSystem)) {

View File

@ -67,9 +67,9 @@ bool nfc_scene_save_name_on_event(void* context, SceneManagerEvent event) {
if(!scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSavedMenu)) { if(!scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSavedMenu)) {
// Nothing, do not count editing as saving // Nothing, do not count editing as saving
} else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) { } else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
DOLPHIN_DEED(DolphinDeedNfcAddSave); dolphin_deed(DolphinDeedNfcAddSave);
} else { } else {
DOLPHIN_DEED(DolphinDeedNfcSave); dolphin_deed(DolphinDeedNfcSave);
} }
consumed = true; consumed = true;
} else { } else {

View File

@ -124,11 +124,11 @@ bool nfc_scene_saved_menu_on_event(void* context, SceneManagerEvent event) {
} else { } else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid); scene_manager_next_scene(nfc->scene_manager, NfcSceneEmulateUid);
} }
DOLPHIN_DEED(DolphinDeedNfcEmulate); dolphin_deed(DolphinDeedNfcEmulate);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexDetectReader) { } else if(event.event == SubmenuIndexDetectReader) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneDetectReader); scene_manager_next_scene(nfc->scene_manager, NfcSceneDetectReader);
DOLPHIN_DEED(DolphinDeedNfcDetectReader); dolphin_deed(DolphinDeedNfcDetectReader);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexWrite) { } else if(event.event == SubmenuIndexWrite) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicWrite); scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicWrite);

View File

@ -51,7 +51,7 @@ bool nfc_scene_start_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state(nfc->scene_manager, NfcSceneStart, SubmenuIndexRead); scene_manager_set_scene_state(nfc->scene_manager, NfcSceneStart, SubmenuIndexRead);
nfc->dev->dev_data.read_mode = NfcReadModeAuto; nfc->dev->dev_data.read_mode = NfcReadModeAuto;
scene_manager_next_scene(nfc->scene_manager, NfcSceneRead); scene_manager_next_scene(nfc->scene_manager, NfcSceneRead);
DOLPHIN_DEED(DolphinDeedNfcRead); dolphin_deed(DolphinDeedNfcRead);
consumed = true; consumed = true;
} else if(event.event == SubmenuIndexDetectReader) { } else if(event.event == SubmenuIndexDetectReader) {
scene_manager_set_scene_state( scene_manager_set_scene_state(
@ -60,7 +60,7 @@ bool nfc_scene_start_on_event(void* context, SceneManagerEvent event) {
if(sd_exist) { if(sd_exist) {
nfc_device_data_clear(&nfc->dev->dev_data); nfc_device_data_clear(&nfc->dev->dev_data);
scene_manager_next_scene(nfc->scene_manager, NfcSceneDetectReader); scene_manager_next_scene(nfc->scene_manager, NfcSceneDetectReader);
DOLPHIN_DEED(DolphinDeedNfcDetectReader); dolphin_deed(DolphinDeedNfcDetectReader);
} else { } else {
scene_manager_next_scene(nfc->scene_manager, NfcSceneDictNotFound); scene_manager_next_scene(nfc->scene_manager, NfcSceneDictNotFound);
} }

View File

@ -204,7 +204,7 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {
} else { } else {
if(scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneSaved) || if(scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneSaved) ||
!scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneStart)) { !scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneStart)) {
DOLPHIN_DEED(DolphinDeedSubGhzSend); dolphin_deed(DolphinDeedSubGhzSend);
} }
// set callback end tx // set callback end tx
subghz_txrx_set_raw_file_encoder_worker_callback_end( subghz_txrx_set_raw_file_encoder_worker_callback_end(
@ -259,7 +259,7 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {
} else { } else {
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx); SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
if(subghz_protocol_raw_save_to_file_init(decoder_raw, RAW_FILE_NAME, &preset)) { if(subghz_protocol_raw_save_to_file_init(decoder_raw, RAW_FILE_NAME, &preset)) {
DOLPHIN_DEED(DolphinDeedSubGhzRawRec); dolphin_deed(DolphinDeedSubGhzRawRec);
subghz_txrx_rx_start(subghz->txrx); subghz_txrx_rx_start(subghz->txrx);
subghz->state_notifications = SubGhzNotificationStateRx; subghz->state_notifications = SubGhzNotificationStateRx;
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateAddKey); subghz_rx_key_state_set(subghz, SubGhzRxKeyStateAddKey);

View File

@ -163,7 +163,7 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
case SubGhzCustomEventViewReceiverOK: case SubGhzCustomEventViewReceiverOK:
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver); subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiverInfo); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiverInfo);
DOLPHIN_DEED(DolphinDeedSubGhzReceiverInfo); dolphin_deed(DolphinDeedSubGhzReceiverInfo);
consumed = true; consumed = true;
break; break;
case SubGhzCustomEventViewReceiverConfig: case SubGhzCustomEventViewReceiverConfig:

View File

@ -137,9 +137,9 @@ bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) {
// Ditto, for RAW signals // Ditto, for RAW signals
} else if(scene_manager_has_previous_scene( } else if(scene_manager_has_previous_scene(
subghz->scene_manager, SubGhzSceneSetType)) { subghz->scene_manager, SubGhzSceneSetType)) {
DOLPHIN_DEED(DolphinDeedSubGhzAddManually); dolphin_deed(DolphinDeedSubGhzAddManually);
} else { } else {
DOLPHIN_DEED(DolphinDeedSubGhzSave); dolphin_deed(DolphinDeedSubGhzSave);
} }
return true; return true;
} else { } else {

View File

@ -92,7 +92,7 @@ bool subghz_scene_start_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state( scene_manager_set_scene_state(
subghz->scene_manager, SubGhzSceneStart, SubmenuIndexFrequencyAnalyzer); subghz->scene_manager, SubGhzSceneStart, SubmenuIndexFrequencyAnalyzer);
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneFrequencyAnalyzer); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneFrequencyAnalyzer);
DOLPHIN_DEED(DolphinDeedSubGhzFrequencyAnalyzer); dolphin_deed(DolphinDeedSubGhzFrequencyAnalyzer);
return true; return true;
} else if(event.event == SubmenuIndexTest) { } else if(event.event == SubmenuIndexTest) {
scene_manager_set_scene_state( scene_manager_set_scene_state(

View File

@ -61,7 +61,7 @@ bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) {
if(subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx))) { if(subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx))) {
subghz->state_notifications = SubGhzNotificationStateTx; subghz->state_notifications = SubGhzNotificationStateTx;
subghz_scene_transmitter_update_data_show(subghz); subghz_scene_transmitter_update_data_show(subghz);
DOLPHIN_DEED(DolphinDeedSubGhzSend); dolphin_deed(DolphinDeedSubGhzSend);
} }
return true; return true;
} else if(event.event == SubGhzCustomEventViewTransmitterSendStop) { } else if(event.event == SubGhzCustomEventViewTransmitterSendStop) {

View File

@ -68,7 +68,7 @@ bool u2f_scene_main_on_event(void* context, SceneManagerEvent event) {
notification_message(app->notifications, &sequence_blink_magenta_10); notification_message(app->notifications, &sequence_blink_magenta_10);
} else if(event.event == U2fCustomEventAuthSuccess) { } else if(event.event == U2fCustomEventAuthSuccess) {
notification_message_block(app->notifications, &sequence_set_green_255); notification_message_block(app->notifications, &sequence_set_green_255);
DOLPHIN_DEED(DolphinDeedU2fAuthorized); dolphin_deed(DolphinDeedU2fAuthorized);
furi_timer_start(app->timer, U2F_SUCCESS_TIMEOUT); furi_timer_start(app->timer, U2F_SUCCESS_TIMEOUT);
app->event_cur = U2fCustomEventNone; app->event_cur = U2fCustomEventNone;
u2f_view_set_state(app->u2f_view, U2fMsgSuccess); u2f_view_set_state(app->u2f_view, U2fMsgSuccess);

View File

@ -34,13 +34,13 @@ bool desktop_scene_debug_on_event(void* context, SceneManagerEvent event) {
break; break;
case DesktopDebugEventDeed: case DesktopDebugEventDeed:
dolphin_deed(dolphin, DolphinDeedTestRight); dolphin_deed(DolphinDeedTestRight);
desktop_debug_get_dolphin_data(desktop->debug_view); desktop_debug_get_dolphin_data(desktop->debug_view);
consumed = true; consumed = true;
break; break;
case DesktopDebugEventWrongDeed: case DesktopDebugEventWrongDeed:
dolphin_deed(dolphin, DolphinDeedTestLeft); dolphin_deed(DolphinDeedTestLeft);
desktop_debug_get_dolphin_data(desktop->debug_view); desktop_debug_get_dolphin_data(desktop->debug_view);
consumed = true; consumed = true;
break; break;

View File

@ -13,12 +13,13 @@
static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin); static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin);
void dolphin_deed(Dolphin* dolphin, DolphinDeed deed) { void dolphin_deed(DolphinDeed deed) {
furi_assert(dolphin); Dolphin* dolphin = (Dolphin*)furi_record_open(RECORD_DOLPHIN);
DolphinEvent event; DolphinEvent event;
event.type = DolphinEventTypeDeed; event.type = DolphinEventTypeDeed;
event.deed = deed; event.deed = deed;
dolphin_event_send_async(dolphin, &event); dolphin_event_send_async(dolphin, &event);
furi_record_close(RECORD_DOLPHIN);
} }
DolphinStats dolphin_stats(Dolphin* dolphin) { DolphinStats dolphin_stats(Dolphin* dolphin) {

View File

@ -26,18 +26,11 @@ typedef enum {
DolphinPubsubEventUpdate, DolphinPubsubEventUpdate,
} DolphinPubsubEvent; } 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. /** Deed complete notification. Call it on deed completion.
* See dolphin_deed.h for available deeds. In futures it will become part of assets. * See dolphin_deed.h for available deeds. In futures it will become part of assets.
* Thread safe, async * Thread safe, async
*/ */
void dolphin_deed(Dolphin* dolphin, DolphinDeed deed); void dolphin_deed(DolphinDeed deed);
/** Retrieve dolphin stats /** Retrieve dolphin stats
* Thread safe, blocking * Thread safe, blocking

View File

@ -1,5 +1,5 @@
entry,status,name,type,params entry,status,name,type,params
Version,+,29.0,, Version,+,30.0,,
Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,, Header,+,applications/services/cli/cli_vcp.h,,
@ -648,7 +648,7 @@ Function,+,dir_walk_read,DirWalkResult,"DirWalk*, FuriString*, FileInfo*"
Function,+,dir_walk_set_filter_cb,void,"DirWalk*, DirWalkFilterCb, void*" Function,+,dir_walk_set_filter_cb,void,"DirWalk*, DirWalkFilterCb, void*"
Function,+,dir_walk_set_recursive,void,"DirWalk*, _Bool" Function,+,dir_walk_set_recursive,void,"DirWalk*, _Bool"
Function,-,div,div_t,"int, int" Function,-,div,div_t,"int, int"
Function,+,dolphin_deed,void,"Dolphin*, DolphinDeed" Function,+,dolphin_deed,void,DolphinDeed
Function,+,dolphin_deed_get_app,DolphinApp,DolphinDeed Function,+,dolphin_deed_get_app,DolphinApp,DolphinDeed
Function,+,dolphin_deed_get_app_limit,uint8_t,DolphinApp Function,+,dolphin_deed_get_app_limit,uint8_t,DolphinApp
Function,+,dolphin_deed_get_weight,uint8_t,DolphinDeed Function,+,dolphin_deed_get_weight,uint8_t,DolphinDeed

1 entry status name type params
2 Version + 29.0 30.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
648 Function + dir_walk_set_filter_cb void DirWalk*, DirWalkFilterCb, void*
649 Function + dir_walk_set_recursive void DirWalk*, _Bool
650 Function - div div_t int, int
651 Function + dolphin_deed void Dolphin*, DolphinDeed DolphinDeed
652 Function + dolphin_deed_get_app DolphinApp DolphinDeed
653 Function + dolphin_deed_get_app_limit uint8_t DolphinApp
654 Function + dolphin_deed_get_weight uint8_t DolphinDeed

View File

@ -1,5 +1,5 @@
entry,status,name,type,params entry,status,name,type,params
Version,+,29.0,, Version,+,30.0,,
Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,, Header,+,applications/services/cli/cli_vcp.h,,
@ -775,7 +775,7 @@ Function,+,dir_walk_read,DirWalkResult,"DirWalk*, FuriString*, FileInfo*"
Function,+,dir_walk_set_filter_cb,void,"DirWalk*, DirWalkFilterCb, void*" Function,+,dir_walk_set_filter_cb,void,"DirWalk*, DirWalkFilterCb, void*"
Function,+,dir_walk_set_recursive,void,"DirWalk*, _Bool" Function,+,dir_walk_set_recursive,void,"DirWalk*, _Bool"
Function,-,div,div_t,"int, int" Function,-,div,div_t,"int, int"
Function,+,dolphin_deed,void,"Dolphin*, DolphinDeed" Function,+,dolphin_deed,void,DolphinDeed
Function,+,dolphin_deed_get_app,DolphinApp,DolphinDeed Function,+,dolphin_deed_get_app,DolphinApp,DolphinDeed
Function,+,dolphin_deed_get_app_limit,uint8_t,DolphinApp Function,+,dolphin_deed_get_app_limit,uint8_t,DolphinApp
Function,+,dolphin_deed_get_weight,uint8_t,DolphinDeed Function,+,dolphin_deed_get_weight,uint8_t,DolphinDeed

1 entry status name type params
2 Version + 29.0 30.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
775 Function + dir_walk_set_filter_cb void DirWalk*, DirWalkFilterCb, void*
776 Function + dir_walk_set_recursive void DirWalk*, _Bool
777 Function - div div_t int, int
778 Function + dolphin_deed void Dolphin*, DolphinDeed DolphinDeed
779 Function + dolphin_deed_get_app DolphinApp DolphinDeed
780 Function + dolphin_deed_get_app_limit uint8_t DolphinApp
781 Function + dolphin_deed_get_weight uint8_t DolphinDeed