[FL-2828] Dolphin score points update #1809
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
#include "../gpio_app_i.h"
 | 
			
		||||
#include "furi_hal_power.h"
 | 
			
		||||
#include "furi_hal_usb.h"
 | 
			
		||||
#include <dolphin/dolphin.h>
 | 
			
		||||
 | 
			
		||||
enum GpioItem {
 | 
			
		||||
    GpioItemUsbUart,
 | 
			
		||||
@@ -88,6 +89,7 @@ bool gpio_scene_start_on_event(void* context, SceneManagerEvent event) {
 | 
			
		||||
        } else if(event.event == GpioStartEventUsbUart) {
 | 
			
		||||
            scene_manager_set_scene_state(app->scene_manager, GpioSceneStart, GpioItemUsbUart);
 | 
			
		||||
            if(!furi_hal_usb_is_locked()) {
 | 
			
		||||
                DOLPHIN_DEED(DolphinDeedGpioUartBridge);
 | 
			
		||||
                scene_manager_next_scene(app->scene_manager, GpioSceneUsbUart);
 | 
			
		||||
            } else {
 | 
			
		||||
                scene_manager_next_scene(app->scene_manager, GpioSceneUsbUartCloseRpc);
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ bool infrared_scene_universal_common_on_event(void* context, SceneManagerEvent e
 | 
			
		||||
                uint32_t record_count;
 | 
			
		||||
                if(infrared_brute_force_start(
 | 
			
		||||
                       brute_force, infrared_custom_event_get_value(event.event), &record_count)) {
 | 
			
		||||
                    DOLPHIN_DEED(DolphinDeedIrBruteForce);
 | 
			
		||||
                    DOLPHIN_DEED(DolphinDeedIrSend);
 | 
			
		||||
                    infrared_scene_universal_common_show_popup(infrared, record_count);
 | 
			
		||||
                } else {
 | 
			
		||||
                    scene_manager_next_scene(scene_manager, InfraredSceneErrorDatabases);
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ void nfc_scene_detect_reader_callback(void* context) {
 | 
			
		||||
 | 
			
		||||
void nfc_scene_detect_reader_on_enter(void* context) {
 | 
			
		||||
    Nfc* nfc = context;
 | 
			
		||||
    DOLPHIN_DEED(DolphinDeedNfcEmulate);
 | 
			
		||||
    DOLPHIN_DEED(DolphinDeedNfcDetectReader);
 | 
			
		||||
 | 
			
		||||
    detect_reader_set_callback(nfc->detect_reader, nfc_scene_detect_reader_callback, nfc);
 | 
			
		||||
    detect_reader_set_nonces_max(nfc->detect_reader, NFC_SCENE_DETECT_READER_PAIR_NONCES_MAX);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
#include "../nfc_i.h"
 | 
			
		||||
#include <dolphin/dolphin.h>
 | 
			
		||||
 | 
			
		||||
enum SubmenuIndex {
 | 
			
		||||
    SubmenuIndexSave,
 | 
			
		||||
@@ -35,6 +36,8 @@ bool nfc_scene_mf_classic_menu_on_event(void* context, SceneManagerEvent event)
 | 
			
		||||
 | 
			
		||||
    if(event.type == SceneManagerEventTypeCustom) {
 | 
			
		||||
        if(event.event == SubmenuIndexSave) {
 | 
			
		||||
            DOLPHIN_DEED(DolphinDeedNfcMfcAdd);
 | 
			
		||||
 | 
			
		||||
            scene_manager_set_scene_state(
 | 
			
		||||
                nfc->scene_manager, NfcSceneMfClassicMenu, SubmenuIndexSave);
 | 
			
		||||
            nfc->dev->format = NfcDeviceSaveFormatMifareClassic;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,6 @@ void nfc_scene_mf_ultralight_read_auth_result_widget_callback(
 | 
			
		||||
 | 
			
		||||
void nfc_scene_mf_ultralight_read_auth_result_on_enter(void* context) {
 | 
			
		||||
    Nfc* nfc = context;
 | 
			
		||||
    DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
 | 
			
		||||
 | 
			
		||||
    // Setup dialog view
 | 
			
		||||
    FuriHalNfcDevData* nfc_data = &nfc->dev->dev_data.nfc_data;
 | 
			
		||||
@@ -38,6 +37,7 @@ void nfc_scene_mf_ultralight_read_auth_result_on_enter(void* context) {
 | 
			
		||||
    widget_add_string_element(
 | 
			
		||||
        widget, 0, 17, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(temp_str));
 | 
			
		||||
    if(mf_ul_data->auth_success) {
 | 
			
		||||
        DOLPHIN_DEED(DolphinDeedNfcReadSuccess);
 | 
			
		||||
        furi_string_printf(
 | 
			
		||||
            temp_str,
 | 
			
		||||
            "Password: %02X %02X %02X %02X",
 | 
			
		||||
@@ -54,6 +54,8 @@ void nfc_scene_mf_ultralight_read_auth_result_on_enter(void* context) {
 | 
			
		||||
            config_pages->auth_data.pack.raw[1]);
 | 
			
		||||
        widget_add_string_element(
 | 
			
		||||
            widget, 0, 39, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(temp_str));
 | 
			
		||||
    } else {
 | 
			
		||||
        DOLPHIN_DEED(DolphinDeedNfcMfulError);
 | 
			
		||||
    }
 | 
			
		||||
    furi_string_printf(
 | 
			
		||||
        temp_str, "Pages Read: %d/%d", mf_ul_data->data_read / 4, mf_ul_data->data_size / 4);
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ bool nfc_scene_set_uid_on_event(void* context, SceneManagerEvent event) {
 | 
			
		||||
 | 
			
		||||
    if(event.type == SceneManagerEventTypeCustom) {
 | 
			
		||||
        if(event.event == NfcCustomEventByteInputDone) {
 | 
			
		||||
            DOLPHIN_DEED(DolphinDeedNfcAdd);
 | 
			
		||||
            DOLPHIN_DEED(DolphinDeedNfcAddSave);
 | 
			
		||||
            if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSavedMenu)) {
 | 
			
		||||
                nfc->dev->dev_data.nfc_data = nfc->dev_edit_data;
 | 
			
		||||
                if(nfc_device_save(nfc->dev, nfc->dev->dev_name)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user