Browse Source

Squashed 'nfc_rfid_detector/' changes from 30603d7c6..764e63f76

764e63f76 Revert "upd rfid freq detector"
18ff6c658 upd rfid freq detector
e6cc06d73 update ofw plugins, add new plugins
bce0224af move base pack here
REVERT: 30603d7c6 New random file name API fix (#40)
REVERT: 0c411f1b7 RFID detector: rename app NFC/RFID Detector -> RFID detector , delete "about" scene (#38)
REVERT: d73f0e5e3 Clock, music player, snake game from firmware repo (#19)
REVERT: 255059cb2 Added fap_version field to all apps (#15)
REVERT: 72317a879 Add descriptions for all the faps (#13)
REVERT: 564772541 Manifest cleanup
REVERT: 24c39f071 Added app descriptions (#8)
REVERT: ccc6e20b4 Prepare nfc_rfid for fap catalog (#2)
REVERT: b7c727ebc Move apps from flipperzero firmware into separate repository

git-subtree-dir: nfc_rfid_detector
git-subtree-split: 764e63f76757e60e070a21a55b4a547671507f95
Willy-JL 2 years ago
parent
commit
eaa76b6a05

+ 0 - 7
.catalog/README.md

@@ -1,7 +0,0 @@
-# NFC&LFRFID Field Detector
-
-This application allows you to detect the presence of NFC and LF RFID fields. It can be used to check what technology is used in a reader that you don't have documentation for, or to check whether a reader is working properly.
-
-## Usage
-
-Open the app and bring your Flipper Zero up to the reader. The app will display the detected field type (NFC or LF RFID). For LF RFID, the app will also display the exact frequency of the field. If the reader is using both NFC and LF RFID, the app will display both.

+ 0 - 4
.catalog/changelog.md

@@ -1,4 +0,0 @@
-## 1.1
- - App rename, removed About screen
-## 1.0
- - Initial release

BIN
.catalog/gallery/nfc-rfid-both-detected.png


BIN
.catalog/gallery/nfc-rfid-detection.png


BIN
.catalog/gallery/nfc-rfid-nfc-detected.png


BIN
.catalog/gallery/nfc-rfid-rfid-detected.png


+ 2 - 2
application.fam

@@ -1,13 +1,13 @@
 App(
 App(
     appid="nfc_rfid_detector",
     appid="nfc_rfid_detector",
-    name="RFID detector",
+    name="NFC/RFID detector",
     apptype=FlipperAppType.EXTERNAL,
     apptype=FlipperAppType.EXTERNAL,
     targets=["f7"],
     targets=["f7"],
     entry_point="nfc_rfid_detector_app",
     entry_point="nfc_rfid_detector_app",
     requires=["gui"],
     requires=["gui"],
     stack_size=4 * 1024,
     stack_size=4 * 1024,
     fap_description="Identify the reader type: NFC (13 MHz) and/or RFID (125 KHz).",
     fap_description="Identify the reader type: NFC (13 MHz) and/or RFID (125 KHz).",
-    fap_version="1.1",
+    fap_version="1.0",
     fap_icon="nfc_rfid_detector_10px.png",
     fap_icon="nfc_rfid_detector_10px.png",
     fap_category="Tools",
     fap_category="Tools",
     fap_icon_assets="images",
     fap_icon_assets="images",

+ 1 - 1
helpers/nfc_rfid_detector_types.h

@@ -5,7 +5,7 @@
 
 
 #define NFC_RFID_DETECTOR_VERSION_APP "0.1"
 #define NFC_RFID_DETECTOR_VERSION_APP "0.1"
 #define NFC_RFID_DETECTOR_DEVELOPED "SkorP"
 #define NFC_RFID_DETECTOR_DEVELOPED "SkorP"
-#define NFC_RFID_DETECTOR_GITHUB "https://github.com/flipperdevices/flipperzero-good-faps"
+#define NFC_RFID_DETECTOR_GITHUB "https://github.com/flipperdevices/flipperzero-firmware"
 
 
 typedef enum {
 typedef enum {
     NfcRfidDetectorViewVariableItemList,
     NfcRfidDetectorViewVariableItemList,

+ 1 - 1
nfc_rfid_detector_app.c

@@ -62,7 +62,7 @@ NfcRfidDetectorApp* nfc_rfid_detector_app_alloc() {
         NfcRfidDetectorViewFieldPresence,
         NfcRfidDetectorViewFieldPresence,
         nfc_rfid_detector_view_field_presence_get_view(app->nfc_rfid_detector_field_presence));
         nfc_rfid_detector_view_field_presence_get_view(app->nfc_rfid_detector_field_presence));
 
 
-    scene_manager_next_scene(app->scene_manager, NfcRfidDetectorSceneFieldPresence);
+    scene_manager_next_scene(app->scene_manager, NfcRfidDetectorSceneStart);
 
 
     return app;
     return app;
 }
 }

+ 69 - 0
scenes/nfc_rfid_detector_scene_about.c

@@ -0,0 +1,69 @@
+#include "../nfc_rfid_detector_app_i.h"
+
+void nfc_rfid_detector_scene_about_widget_callback(
+    GuiButtonType result,
+    InputType type,
+    void* context) {
+    NfcRfidDetectorApp* app = context;
+    if(type == InputTypeShort) {
+        view_dispatcher_send_custom_event(app->view_dispatcher, result);
+    }
+}
+
+void nfc_rfid_detector_scene_about_on_enter(void* context) {
+    NfcRfidDetectorApp* app = context;
+
+    FuriString* temp_str;
+    temp_str = furi_string_alloc();
+    furi_string_printf(temp_str, "\e#%s\n", "Information");
+
+    furi_string_cat_printf(temp_str, "Version: %s\n", NFC_RFID_DETECTOR_VERSION_APP);
+    furi_string_cat_printf(temp_str, "Developed by: %s\n", NFC_RFID_DETECTOR_DEVELOPED);
+    furi_string_cat_printf(temp_str, "Github: %s\n\n", NFC_RFID_DETECTOR_GITHUB);
+
+    furi_string_cat_printf(temp_str, "\e#%s\n", "Description");
+    furi_string_cat_printf(
+        temp_str,
+        "This application allows\nyou to determine what\ntype of electromagnetic\nfield the reader is using.\nFor LF RFID you can also\nsee the carrier frequency\n\n");
+
+    widget_add_text_box_element(
+        app->widget,
+        0,
+        0,
+        128,
+        14,
+        AlignCenter,
+        AlignBottom,
+        "\e#\e!                                                      \e!\n",
+        false);
+    widget_add_text_box_element(
+        app->widget,
+        0,
+        2,
+        128,
+        14,
+        AlignCenter,
+        AlignBottom,
+        "\e#\e!      NFC/RFID detector      \e!\n",
+        false);
+    widget_add_text_scroll_element(app->widget, 0, 16, 128, 50, furi_string_get_cstr(temp_str));
+    furi_string_free(temp_str);
+
+    view_dispatcher_switch_to_view(app->view_dispatcher, NfcRfidDetectorViewWidget);
+}
+
+bool nfc_rfid_detector_scene_about_on_event(void* context, SceneManagerEvent event) {
+    NfcRfidDetectorApp* app = context;
+    bool consumed = false;
+    UNUSED(app);
+    UNUSED(event);
+
+    return consumed;
+}
+
+void nfc_rfid_detector_scene_about_on_exit(void* context) {
+    NfcRfidDetectorApp* app = context;
+
+    // Clear views
+    widget_reset(app->widget);
+}

+ 2 - 0
scenes/nfc_rfid_detector_scene_config.h

@@ -1 +1,3 @@
+ADD_SCENE(nfc_rfid_detector, start, Start)
+ADD_SCENE(nfc_rfid_detector, about, About)
 ADD_SCENE(nfc_rfid_detector, field_presence, FieldPresence)
 ADD_SCENE(nfc_rfid_detector, field_presence, FieldPresence)

+ 58 - 0
scenes/nfc_rfid_detector_scene_start.c

@@ -0,0 +1,58 @@
+#include "../nfc_rfid_detector_app_i.h"
+
+typedef enum {
+    SubmenuIndexNfcRfidDetectorFieldPresence,
+    SubmenuIndexNfcRfidDetectorAbout,
+} SubmenuIndex;
+
+void nfc_rfid_detector_scene_start_submenu_callback(void* context, uint32_t index) {
+    NfcRfidDetectorApp* app = context;
+    view_dispatcher_send_custom_event(app->view_dispatcher, index);
+}
+
+void nfc_rfid_detector_scene_start_on_enter(void* context) {
+    UNUSED(context);
+    NfcRfidDetectorApp* app = context;
+    Submenu* submenu = app->submenu;
+
+    submenu_add_item(
+        submenu,
+        "Detect field type",
+        SubmenuIndexNfcRfidDetectorFieldPresence,
+        nfc_rfid_detector_scene_start_submenu_callback,
+        app);
+    submenu_add_item(
+        submenu,
+        "About",
+        SubmenuIndexNfcRfidDetectorAbout,
+        nfc_rfid_detector_scene_start_submenu_callback,
+        app);
+
+    submenu_set_selected_item(
+        submenu, scene_manager_get_scene_state(app->scene_manager, NfcRfidDetectorSceneStart));
+
+    view_dispatcher_switch_to_view(app->view_dispatcher, NfcRfidDetectorViewSubmenu);
+}
+
+bool nfc_rfid_detector_scene_start_on_event(void* context, SceneManagerEvent event) {
+    NfcRfidDetectorApp* app = context;
+    bool consumed = false;
+
+    if(event.type == SceneManagerEventTypeCustom) {
+        if(event.event == SubmenuIndexNfcRfidDetectorAbout) {
+            scene_manager_next_scene(app->scene_manager, NfcRfidDetectorSceneAbout);
+            consumed = true;
+        } else if(event.event == SubmenuIndexNfcRfidDetectorFieldPresence) {
+            scene_manager_next_scene(app->scene_manager, NfcRfidDetectorSceneFieldPresence);
+            consumed = true;
+        }
+        scene_manager_set_scene_state(app->scene_manager, NfcRfidDetectorSceneStart, event.event);
+    }
+
+    return consumed;
+}
+
+void nfc_rfid_detector_scene_start_on_exit(void* context) {
+    NfcRfidDetectorApp* app = context;
+    submenu_reset(app->submenu);
+}