Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgornekich <n.gorbadey@gmail.com>2022-02-02 18:58:52 +0300
committerGitHub <noreply@github.com>2022-02-02 18:58:52 +0300
commit838df4c9ea67d390e609d7919cbdc1ca0bb26412 (patch)
tree94b2523d641d3d92326ad7fcc11ce656a43599d8
parentd2c4f15af5f79756343df95640fad404ee1af6f8 (diff)
[FL-2229] New assets paths (#978)
* assets: change resources paths * apps: rework nfc, irda and subghz with new assets path * subghz: remove unused paths * subghz: fix incorrect path * badusb and u2f fix Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: nminaylov <nm29719@gmail.com>
-rw-r--r--applications/archive/helpers/archive_browser.h2
-rw-r--r--applications/bad_usb/scenes/bad_usb_scene_file_select.c2
-rw-r--r--applications/irda/scene/irda_app_scene.h4
-rwxr-xr-xapplications/nfc/helpers/nfc_emv_parser.c7
-rw-r--r--applications/subghz/scenes/subghz_scene_read_raw.c2
-rw-r--r--applications/subghz/scenes/subghz_scene_save_name.c2
-rw-r--r--applications/subghz/subghz.c8
-rw-r--r--applications/subghz/subghz_cli.c8
-rwxr-xr-x[-rw-r--r--]applications/subghz/subghz_i.c20
-rw-r--r--applications/u2f/u2f_data.c4
-rwxr-xr-xassets/resources/irda/assets/tv.ir (renamed from assets/resources/irda/universal/tv.ir)0
-rw-r--r--assets/resources/nfc/assets/aid.nfc (renamed from assets/resources/nfc/emv/aid.nfc)0
-rw-r--r--assets/resources/nfc/assets/country_code.nfc (renamed from assets/resources/nfc/emv/country_code.nfc)0
-rw-r--r--assets/resources/nfc/assets/currency_code.nfc (renamed from assets/resources/nfc/emv/currency_code.nfc)0
-rw-r--r--assets/resources/subghz/assets/came_atomo (renamed from assets/resources/subghz/came_atomo)0
-rw-r--r--assets/resources/subghz/assets/keeloq_mfcodes (renamed from assets/resources/subghz/keeloq_mfcodes)0
-rw-r--r--assets/resources/subghz/assets/keeloq_mfcodes_user (renamed from assets/resources/subghz/keeloq_mfcodes_user)0
-rw-r--r--assets/resources/subghz/assets/nice_flor_s_rx (renamed from assets/resources/subghz/nice_flor_s_rx)0
-rw-r--r--assets/resources/subghz/assets/nice_flor_s_tx (renamed from assets/resources/subghz/nice_flor_s_tx)0
-rw-r--r--assets/resources/u2f/assets/cert.der (renamed from assets/resources/u2f/cert.der)bin365 -> 365 bytes
-rw-r--r--assets/resources/u2f/assets/cert_key.u2f (renamed from assets/resources/u2f/cert_key.u2f)0
-rw-r--r--lib/subghz/protocols/subghz_protocol_common.h2
-rwxr-xr-x[-rw-r--r--]lib/subghz/protocols/subghz_protocol_raw.c7
23 files changed, 28 insertions, 40 deletions
diff --git a/applications/archive/helpers/archive_browser.h b/applications/archive/helpers/archive_browser.h
index 519fab75..44bce914 100644
--- a/applications/archive/helpers/archive_browser.h
+++ b/applications/archive/helpers/archive_browser.h
@@ -8,7 +8,7 @@ static const char* tab_default_paths[] = {
[ArchiveTabFavorites] = "/any/favorites",
[ArchiveTabIButton] = "/any/ibutton",
[ArchiveTabNFC] = "/any/nfc",
- [ArchiveTabSubGhz] = "/any/subghz/saved",
+ [ArchiveTabSubGhz] = "/any/subghz",
[ArchiveTabLFRFID] = "/any/lfrfid",
[ArchiveTabIrda] = "/any/irda",
[ArchiveTabBrowser] = "/any",
diff --git a/applications/bad_usb/scenes/bad_usb_scene_file_select.c b/applications/bad_usb/scenes/bad_usb_scene_file_select.c
index 2ba673bc..678a003c 100644
--- a/applications/bad_usb/scenes/bad_usb_scene_file_select.c
+++ b/applications/bad_usb/scenes/bad_usb_scene_file_select.c
@@ -19,7 +19,7 @@ void bad_usb_scene_file_select_on_enter(void* context) {
BadUsbApp* bad_usb = context;
if(bad_usb_file_select(bad_usb)) {
- scene_manager_next_scene(bad_usb->scene_manager, BadUsbAppViewWork);
+ scene_manager_next_scene(bad_usb->scene_manager, BadUsbSceneWork);
} else {
//scene_manager_previous_scene(bad_usb->scene_manager);
view_dispatcher_stop(bad_usb->view_dispatcher);
diff --git a/applications/irda/scene/irda_app_scene.h b/applications/irda/scene/irda_app_scene.h
index 81915924..9de48e18 100644
--- a/applications/irda/scene/irda_app_scene.h
+++ b/applications/irda/scene/irda_app_scene.h
@@ -159,7 +159,7 @@ class IrdaAppSceneUniversalTV : public IrdaAppSceneUniversalCommon {
public:
void on_enter(IrdaApp* app) final;
IrdaAppSceneUniversalTV()
- : IrdaAppSceneUniversalCommon("/ext/irda/universal/tv.ir") {
+ : IrdaAppSceneUniversalCommon("/ext/irda/assets/tv.ir") {
}
~IrdaAppSceneUniversalTV() {
}
@@ -169,7 +169,7 @@ class IrdaAppSceneUniversalAudio : public IrdaAppSceneUniversalCommon {
public:
void on_enter(IrdaApp* app) final;
IrdaAppSceneUniversalAudio()
- : IrdaAppSceneUniversalCommon("/ext/irda/universal/audio.ir") {
+ : IrdaAppSceneUniversalCommon("/ext/irda/assets/audio.ir") {
}
~IrdaAppSceneUniversalAudio() {
}
diff --git a/applications/nfc/helpers/nfc_emv_parser.c b/applications/nfc/helpers/nfc_emv_parser.c
index 54c6c203..4012ff45 100755
--- a/applications/nfc/helpers/nfc_emv_parser.c
+++ b/applications/nfc/helpers/nfc_emv_parser.c
@@ -44,7 +44,7 @@ bool nfc_emv_parser_get_aid_name(
for(uint8_t i = 0; i < aid_len; i++) {
string_cat_printf(key, "%02X", aid[i]);
}
- if(nfc_emv_parser_search_data(storage, "/ext/nfc/emv/aid.nfc", key, aid_name)) {
+ if(nfc_emv_parser_search_data(storage, "/ext/nfc/assets/aid.nfc", key, aid_name)) {
parsed = true;
}
string_clear(key);
@@ -58,7 +58,7 @@ bool nfc_emv_parser_get_country_name(
bool parsed = false;
string_t key;
string_init_printf(key, "%04X", country_code);
- if(nfc_emv_parser_search_data(storage, "/ext/nfc/emv/country_code.nfc", key, country_name)) {
+ if(nfc_emv_parser_search_data(storage, "/ext/nfc/assets/country_code.nfc", key, country_name)) {
parsed = true;
}
string_clear(key);
@@ -72,7 +72,8 @@ bool nfc_emv_parser_get_currency_name(
bool parsed = false;
string_t key;
string_init_printf(key, "%04X", currency_code);
- if(nfc_emv_parser_search_data(storage, "/ext/nfc/emv/currency_code.nfc", key, currency_name)) {
+ if(nfc_emv_parser_search_data(
+ storage, "/ext/nfc/assets/currency_code.nfc", key, currency_name)) {
parsed = true;
}
string_clear(key);
diff --git a/applications/subghz/scenes/subghz_scene_read_raw.c b/applications/subghz/scenes/subghz_scene_read_raw.c
index 481138dc..170d3c7d 100644
--- a/applications/subghz/scenes/subghz_scene_read_raw.c
+++ b/applications/subghz/scenes/subghz_scene_read_raw.c
@@ -23,7 +23,7 @@ bool subghz_scene_read_raw_update_filename(SubGhz* subghz) {
path_extract_filename_no_ext(string_get_cstr(temp_str), temp_str);
strcpy(subghz->file_name, string_get_cstr(temp_str));
string_printf(
- temp_str, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION);
+ temp_str, "%s/%s%s", SUBGHZ_APP_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION);
subghz_protocol_raw_set_last_file_name(
(SubGhzProtocolRAW*)subghz->txrx->protocol_result, string_get_cstr(temp_str));
diff --git a/applications/subghz/scenes/subghz_scene_save_name.c b/applications/subghz/scenes/subghz_scene_save_name.c
index 142ba7c9..ee1df00f 100644
--- a/applications/subghz/scenes/subghz_scene_save_name.c
+++ b/applications/subghz/scenes/subghz_scene_save_name.c
@@ -39,7 +39,7 @@ void subghz_scene_save_name_on_enter(void* context) {
dev_name_empty);
ValidatorIsFile* validator_is_file =
- validator_is_file_alloc_init(SUBGHZ_APP_PATH_FOLDER, SUBGHZ_APP_EXTENSION);
+ validator_is_file_alloc_init(SUBGHZ_APP_FOLDER, SUBGHZ_APP_EXTENSION);
text_input_set_validator(text_input, validator_is_file_callback, validator_is_file);
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewTextInput);
diff --git a/applications/subghz/subghz.c b/applications/subghz/subghz.c
index f13c86d6..4f442562 100644
--- a/applications/subghz/subghz.c
+++ b/applications/subghz/subghz.c
@@ -284,10 +284,10 @@ int32_t subghz_app(void* p) {
//Load database
bool load_database =
- subghz_parser_load_keeloq_file(subghz->txrx->parser, "/ext/subghz/keeloq_mfcodes");
- subghz_parser_load_keeloq_file(subghz->txrx->parser, "/ext/subghz/keeloq_mfcodes_user");
- subghz_parser_load_nice_flor_s_file(subghz->txrx->parser, "/ext/subghz/nice_flor_s_rx");
- subghz_parser_load_came_atomo_file(subghz->txrx->parser, "/ext/subghz/came_atomo");
+ subghz_parser_load_keeloq_file(subghz->txrx->parser, "/ext/subghz/assets/keeloq_mfcodes");
+ subghz_parser_load_keeloq_file(subghz->txrx->parser, "/ext/subghz/assets/keeloq_mfcodes_user");
+ subghz_parser_load_nice_flor_s_file(subghz->txrx->parser, "/ext/subghz/assets/nice_flor_s_rx");
+ subghz_parser_load_came_atomo_file(subghz->txrx->parser, "/ext/subghz/assets/came_atomo");
// Check argument and run corresponding scene
if(p && subghz_key_load(subghz, p)) {
diff --git a/applications/subghz/subghz_cli.c b/applications/subghz/subghz_cli.c
index b91b9a4b..c54533d9 100644
--- a/applications/subghz/subghz_cli.c
+++ b/applications/subghz/subghz_cli.c
@@ -215,10 +215,10 @@ void subghz_cli_command_rx(Cli* cli, string_t args, void* context) {
furi_check(instance->stream);
SubGhzParser* parser = subghz_parser_alloc();
- subghz_parser_load_keeloq_file(parser, "/ext/subghz/keeloq_mfcodes");
- subghz_parser_load_keeloq_file(parser, "/ext/subghz/keeloq_mfcodes_user");
- subghz_parser_load_nice_flor_s_file(parser, "/ext/subghz/nice_flor_s_rx");
- subghz_parser_load_came_atomo_file(parser, "/ext/subghz/came_atomo");
+ subghz_parser_load_keeloq_file(parser, "/ext/subghz/assets/keeloq_mfcodes");
+ subghz_parser_load_keeloq_file(parser, "/ext/subghz/assets/keeloq_mfcodes_user");
+ subghz_parser_load_nice_flor_s_file(parser, "/ext/subghz/assets/nice_flor_s_rx");
+ subghz_parser_load_came_atomo_file(parser, "/ext/subghz/assets/came_atomo");
subghz_parser_enable_dump_text(parser, subghz_cli_command_rx_text_callback, instance);
// Configure radio
diff --git a/applications/subghz/subghz_i.c b/applications/subghz/subghz_i.c
index 5a1f67fe..87537ca2 100644..100755
--- a/applications/subghz/subghz_i.c
+++ b/applications/subghz/subghz_i.c
@@ -284,7 +284,7 @@ bool subghz_get_next_name_file(SubGhz* subghz) {
if(strcmp(subghz->file_name, "")) {
//get the name of the next free file
storage_get_next_filename(
- storage, SUBGHZ_RAW_PATH_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION, temp_str);
+ storage, SUBGHZ_RAW_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION, temp_str);
strcpy(subghz->file_name, string_get_cstr(temp_str));
res = true;
@@ -319,15 +319,9 @@ bool subghz_save_protocol_to_file(SubGhz* subghz, const char* dev_name) {
dialog_message_show_storage_error(subghz->dialogs, "Cannot create\nfolder");
break;
}
- // Create saved directory if necessary
- if(!storage_simply_mkdir(storage, SUBGHZ_APP_PATH_FOLDER)) {
- dialog_message_show_storage_error(subghz->dialogs, "Cannot create\nfolder");
- break;
- }
// First remove subghz device file if it was saved
- string_printf(
- dev_file_name, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, dev_name, SUBGHZ_APP_EXTENSION);
+ string_printf(dev_file_name, "%s/%s%s", SUBGHZ_APP_FOLDER, dev_name, SUBGHZ_APP_EXTENSION);
if(!storage_simply_remove(storage, string_get_cstr(dev_file_name))) {
break;
@@ -386,7 +380,7 @@ bool subghz_load_protocol_from_file(SubGhz* subghz) {
// Input events and views are managed by file_select
bool res = dialog_file_select_show(
subghz->dialogs,
- SUBGHZ_APP_PATH_FOLDER,
+ SUBGHZ_APP_FOLDER,
SUBGHZ_APP_EXTENSION,
subghz->file_name,
sizeof(subghz->file_name),
@@ -394,7 +388,7 @@ bool subghz_load_protocol_from_file(SubGhz* subghz) {
if(res) {
string_printf(
- file_name, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION);
+ file_name, "%s/%s%s", SUBGHZ_APP_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION);
res = subghz_key_load(subghz, string_get_cstr(file_name));
}
@@ -413,10 +407,10 @@ bool subghz_rename_file(SubGhz* subghz) {
Storage* storage = furi_record_open("storage");
string_init_printf(
- old_path, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, subghz->file_name_tmp, SUBGHZ_APP_EXTENSION);
+ old_path, "%s/%s%s", SUBGHZ_APP_FOLDER, subghz->file_name_tmp, SUBGHZ_APP_EXTENSION);
string_init_printf(
- new_path, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION);
+ new_path, "%s/%s%s", SUBGHZ_APP_FOLDER, subghz->file_name, SUBGHZ_APP_EXTENSION);
FS_Error fs_result =
storage_common_rename(storage, string_get_cstr(old_path), string_get_cstr(new_path));
@@ -439,7 +433,7 @@ bool subghz_delete_file(SubGhz* subghz) {
Storage* storage = furi_record_open("storage");
string_t file_path;
string_init_printf(
- file_path, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, subghz->file_name_tmp, SUBGHZ_APP_EXTENSION);
+ file_path, "%s/%s%s", SUBGHZ_APP_FOLDER, subghz->file_name_tmp, SUBGHZ_APP_EXTENSION);
bool result = storage_simply_remove(storage, string_get_cstr(file_path));
furi_record_close("storage");
diff --git a/applications/u2f/u2f_data.c b/applications/u2f/u2f_data.c
index 1de86164..f517d222 100644
--- a/applications/u2f/u2f_data.c
+++ b/applications/u2f/u2f_data.c
@@ -8,8 +8,8 @@
#define TAG "U2F"
#define U2F_DATA_FOLDER "/any/u2f/"
-#define U2F_CERT_FILE U2F_DATA_FOLDER "cert.der"
-#define U2F_CERT_KEY_FILE U2F_DATA_FOLDER "cert_key.u2f"
+#define U2F_CERT_FILE U2F_DATA_FOLDER "assets/cert.der"
+#define U2F_CERT_KEY_FILE U2F_DATA_FOLDER "assets/cert_key.u2f"
#define U2F_KEY_FILE U2F_DATA_FOLDER "key.u2f"
#define U2F_CNT_FILE U2F_DATA_FOLDER "cnt.u2f"
diff --git a/assets/resources/irda/universal/tv.ir b/assets/resources/irda/assets/tv.ir
index 1031db63..1031db63 100755
--- a/assets/resources/irda/universal/tv.ir
+++ b/assets/resources/irda/assets/tv.ir
diff --git a/assets/resources/nfc/emv/aid.nfc b/assets/resources/nfc/assets/aid.nfc
index 43854f3d..43854f3d 100644
--- a/assets/resources/nfc/emv/aid.nfc
+++ b/assets/resources/nfc/assets/aid.nfc
diff --git a/assets/resources/nfc/emv/country_code.nfc b/assets/resources/nfc/assets/country_code.nfc
index 8b19ab83..8b19ab83 100644
--- a/assets/resources/nfc/emv/country_code.nfc
+++ b/assets/resources/nfc/assets/country_code.nfc
diff --git a/assets/resources/nfc/emv/currency_code.nfc b/assets/resources/nfc/assets/currency_code.nfc
index 31c575b3..31c575b3 100644
--- a/assets/resources/nfc/emv/currency_code.nfc
+++ b/assets/resources/nfc/assets/currency_code.nfc
diff --git a/assets/resources/subghz/came_atomo b/assets/resources/subghz/assets/came_atomo
index 0952f3f2..0952f3f2 100644
--- a/assets/resources/subghz/came_atomo
+++ b/assets/resources/subghz/assets/came_atomo
diff --git a/assets/resources/subghz/keeloq_mfcodes b/assets/resources/subghz/assets/keeloq_mfcodes
index c969b592..c969b592 100644
--- a/assets/resources/subghz/keeloq_mfcodes
+++ b/assets/resources/subghz/assets/keeloq_mfcodes
diff --git a/assets/resources/subghz/keeloq_mfcodes_user b/assets/resources/subghz/assets/keeloq_mfcodes_user
index f013afa2..f013afa2 100644
--- a/assets/resources/subghz/keeloq_mfcodes_user
+++ b/assets/resources/subghz/assets/keeloq_mfcodes_user
diff --git a/assets/resources/subghz/nice_flor_s_rx b/assets/resources/subghz/assets/nice_flor_s_rx
index e63e47b0..e63e47b0 100644
--- a/assets/resources/subghz/nice_flor_s_rx
+++ b/assets/resources/subghz/assets/nice_flor_s_rx
diff --git a/assets/resources/subghz/nice_flor_s_tx b/assets/resources/subghz/assets/nice_flor_s_tx
index a98dcb07..a98dcb07 100644
--- a/assets/resources/subghz/nice_flor_s_tx
+++ b/assets/resources/subghz/assets/nice_flor_s_tx
diff --git a/assets/resources/u2f/cert.der b/assets/resources/u2f/assets/cert.der
index 73efb231..73efb231 100644
--- a/assets/resources/u2f/cert.der
+++ b/assets/resources/u2f/assets/cert.der
Binary files differ
diff --git a/assets/resources/u2f/cert_key.u2f b/assets/resources/u2f/assets/cert_key.u2f
index 116d1411..116d1411 100644
--- a/assets/resources/u2f/cert_key.u2f
+++ b/assets/resources/u2f/assets/cert_key.u2f
diff --git a/lib/subghz/protocols/subghz_protocol_common.h b/lib/subghz/protocols/subghz_protocol_common.h
index 155b6a89..1441e4d5 100644
--- a/lib/subghz/protocols/subghz_protocol_common.h
+++ b/lib/subghz/protocols/subghz_protocol_common.h
@@ -15,9 +15,7 @@
#define DURATION_DIFF(x, y) ((x < y) ? (y - x) : (x - y))
#define SUBGHZ_APP_FOLDER "/any/subghz"
-#define SUBGHZ_APP_PATH_FOLDER "/any/subghz/saved"
#define SUBGHZ_RAW_FOLDER "/ext/subghz"
-#define SUBGHZ_RAW_PATH_FOLDER "/ext/subghz/saved"
#define SUBGHZ_APP_EXTENSION ".sub"
#define SUBGHZ_ENCODER_UPLOAD_MAX_SIZE 2048
diff --git a/lib/subghz/protocols/subghz_protocol_raw.c b/lib/subghz/protocols/subghz_protocol_raw.c
index 9f36cdce..8b2bcf19 100644..100755
--- a/lib/subghz/protocols/subghz_protocol_raw.c
+++ b/lib/subghz/protocols/subghz_protocol_raw.c
@@ -176,15 +176,10 @@ bool subghz_protocol_raw_save_to_file_init(
if(!storage_simply_mkdir(instance->storage, SUBGHZ_RAW_FOLDER)) {
break;
}
- // Create saved directory if necessary
- if(!storage_simply_mkdir(instance->storage, SUBGHZ_RAW_PATH_FOLDER)) {
- break;
- }
string_set(instance->file_name, dev_name);
// First remove subghz device file if it was saved
- string_printf(
- dev_file_name, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, dev_name, SUBGHZ_APP_EXTENSION);
+ string_printf(dev_file_name, "%s/%s%s", SUBGHZ_RAW_FOLDER, dev_name, SUBGHZ_APP_EXTENSION);
if(!storage_simply_remove(instance->storage, string_get_cstr(dev_file_name))) {
break;