mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
fix saving files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
App(
|
||||
appid="SubGHz_Bruteforcer",
|
||||
name="Sub-GHz Bruteforcer",
|
||||
appid="SubGHz_Bruteforcer_v3",
|
||||
name="Sub-GHz Bruteforcer v3",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="subbrute_app",
|
||||
cdefines=["APP_SUB_BRUTE"],
|
||||
|
||||
@@ -47,7 +47,7 @@ bool subbrute_scene_save_name_on_event(void* context, SceneManagerEvent event) {
|
||||
if(strcmp(instance->text_store, "")) {
|
||||
furi_string_reset(instance->file_path);
|
||||
furi_string_cat_printf(
|
||||
instance->file_path, "/%s%s", instance->text_store, SUBBRUTE_FILE_EXT);
|
||||
instance->file_path, "%s/%s%s", SUBBRUTE_PATH, instance->text_store, SUBBRUTE_FILE_EXT);
|
||||
|
||||
if(subbrute_device_save_file(instance->device, furi_string_get_cstr(instance->file_path))) {
|
||||
scene_manager_next_scene(instance->scene_manager, SubBruteSceneSaveSuccess);
|
||||
|
||||
@@ -20,7 +20,7 @@ SubBruteDevice* subbrute_device_alloc() {
|
||||
instance->environment = subghz_environment_alloc();
|
||||
|
||||
#ifdef FURI_DEBUG
|
||||
subbrute_device_attack_set_default_values(instance, SubBruteAttackLoadFile);
|
||||
subbrute_device_attack_set_default_values(instance, SubBruteAttackCAME12bit433);
|
||||
#else
|
||||
subbrute_device_attack_set_default_values(instance, SubBruteAttackCAME12bit433);
|
||||
#endif
|
||||
@@ -88,6 +88,7 @@ bool subbrute_device_save_file(SubBruteDevice* instance, const char* dev_file_na
|
||||
bool result = false;
|
||||
do {
|
||||
if(!flipper_format_file_open_always(file, dev_file_name)) {
|
||||
FURI_LOG_E(TAG, "Failed to open file: %s", dev_file_name);
|
||||
break;
|
||||
}
|
||||
Stream* stream = flipper_format_get_raw_stream(file);
|
||||
|
||||
@@ -362,8 +362,8 @@ void subbrute_protocol_default_generate_file(
|
||||
stream,
|
||||
subbrute_key_file_start_with_tail,
|
||||
frequency,
|
||||
preset,
|
||||
file,
|
||||
subbrute_protocol_preset(preset),
|
||||
subbrute_protocol_file(file),
|
||||
bits,
|
||||
furi_string_get_cstr(candidate),
|
||||
te,
|
||||
@@ -373,8 +373,8 @@ void subbrute_protocol_default_generate_file(
|
||||
stream,
|
||||
subbrute_key_file_start_no_tail,
|
||||
frequency,
|
||||
preset,
|
||||
file,
|
||||
subbrute_protocol_preset(preset),
|
||||
subbrute_protocol_file(file),
|
||||
bits,
|
||||
furi_string_get_cstr(candidate),
|
||||
repeat);
|
||||
@@ -409,8 +409,8 @@ void subbrute_protocol_file_generate_file(
|
||||
stream,
|
||||
subbrute_key_file_start_with_tail,
|
||||
frequency,
|
||||
preset,
|
||||
file,
|
||||
subbrute_protocol_preset(preset),
|
||||
subbrute_protocol_file(file),
|
||||
bits,
|
||||
furi_string_get_cstr(candidate),
|
||||
te,
|
||||
@@ -420,8 +420,8 @@ void subbrute_protocol_file_generate_file(
|
||||
stream,
|
||||
subbrute_key_file_start_no_tail,
|
||||
frequency,
|
||||
preset,
|
||||
file,
|
||||
subbrute_protocol_preset(preset),
|
||||
subbrute_protocol_file(file),
|
||||
bits,
|
||||
furi_string_get_cstr(candidate),
|
||||
repeat);
|
||||
|
||||
Reference in New Issue
Block a user