mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Remove redundant extra API
This commit is contained in:
Submodule applications/external updated: 7b65d07fba...8706bacad2
@@ -482,7 +482,13 @@ static void nfc_protocol_support_scene_save_name_on_enter(NfcApp* instance) {
|
||||
if(name_is_empty) {
|
||||
furi_string_set(instance->file_path, NFC_APP_FOLDER);
|
||||
FuriString* prefix = furi_string_alloc();
|
||||
nfc_device_get_abbreviated_name(instance->nfc_device, prefix);
|
||||
furi_string_set(prefix, nfc_device_get_name(instance->nfc_device, NfcDeviceNameTypeFull));
|
||||
furi_string_replace(prefix, "Mifare", "MF");
|
||||
furi_string_replace(prefix, " Classic", "C"); // MFC
|
||||
furi_string_replace(prefix, "Desfire", "Des"); // MF Des
|
||||
furi_string_replace(prefix, "Ultralight", "UL"); // MF UL
|
||||
furi_string_replace(prefix, " Plus", "+"); // NTAG I2C+
|
||||
furi_string_replace(prefix, " (Unknown)", "");
|
||||
furi_string_replace_all(prefix, " ", "_");
|
||||
name_generator_make_auto(
|
||||
instance->text_store, NFC_TEXT_STORE_SIZE, furi_string_get_cstr(prefix));
|
||||
|
||||
@@ -74,19 +74,6 @@ const char* nfc_device_get_name(const NfcDevice* instance, NfcDeviceNameType nam
|
||||
return nfc_devices[instance->protocol]->get_name(instance->protocol_data, name_type);
|
||||
}
|
||||
|
||||
void nfc_device_get_abbreviated_name(const NfcDevice* instance, FuriString* name) {
|
||||
furi_assert(instance);
|
||||
furi_assert(instance->protocol < NfcProtocolNum);
|
||||
|
||||
furi_string_set(name, nfc_device_get_name(instance, NfcDeviceNameTypeFull));
|
||||
furi_string_replace(name, "Mifare", "MF");
|
||||
furi_string_replace(name, " Classic", "C"); // MFC
|
||||
furi_string_replace(name, "Desfire", "Des"); // MF Des
|
||||
furi_string_replace(name, "Ultralight", "UL"); // MF UL
|
||||
furi_string_replace(name, " Plus", "+"); // NTAG I2C+
|
||||
furi_string_replace(name, " (Unknown)", "");
|
||||
}
|
||||
|
||||
const uint8_t* nfc_device_get_uid(const NfcDevice* instance, size_t* uid_len) {
|
||||
furi_check(instance);
|
||||
furi_check(uid_len);
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <core/string.h>
|
||||
|
||||
#include "protocols/nfc_device_base.h"
|
||||
#include "protocols/nfc_protocol.h"
|
||||
@@ -138,16 +137,6 @@ const char* nfc_device_get_protocol_name(NfcProtocol protocol);
|
||||
*/
|
||||
const char* nfc_device_get_name(const NfcDevice* instance, NfcDeviceNameType name_type);
|
||||
|
||||
/**
|
||||
* @brief Get the abbreviated name of an NfcDevice instance.
|
||||
*
|
||||
* The return value may change depending on the instance's internal state.
|
||||
*
|
||||
* @param[in] instance pointer to the instance to be queried.
|
||||
* @param[out] name FuriString to save the abbreviated device name to.
|
||||
*/
|
||||
void nfc_device_get_abbreviated_name(const NfcDevice* instance, FuriString* name);
|
||||
|
||||
/**
|
||||
* @brief Get the unique identifier (UID) of an NfcDevice instance.
|
||||
*
|
||||
|
||||
@@ -2792,7 +2792,6 @@ Function,+,nfc_device_alloc,NfcDevice*,
|
||||
Function,+,nfc_device_clear,void,NfcDevice*
|
||||
Function,+,nfc_device_copy_data,void,"const NfcDevice*, NfcProtocol, NfcDeviceData*"
|
||||
Function,+,nfc_device_free,void,NfcDevice*
|
||||
Function,+,nfc_device_get_abbreviated_name,void,"const NfcDevice*, FuriString*"
|
||||
Function,+,nfc_device_get_data,const NfcDeviceData*,"const NfcDevice*, NfcProtocol"
|
||||
Function,+,nfc_device_get_name,const char*,"const NfcDevice*, NfcDeviceNameType"
|
||||
Function,+,nfc_device_get_protocol,NfcProtocol,const NfcDevice*
|
||||
|
||||
|
Reference in New Issue
Block a user