Просмотр исходного кода

Do not add repeats in saved file

Fixes issues described in our telegram chat
MX 2 лет назад
Родитель
Сommit
6f034d5ad3
3 измененных файлов с 8 добавлено и 17 удалено
  1. 1 3
      subbrute_device.c
  2. 6 11
      subbrute_protocols.c
  3. 1 3
      subbrute_protocols.h

+ 1 - 3
subbrute_device.c

@@ -104,7 +104,6 @@ bool subbrute_device_save_file(SubBruteDevice* instance, const char* dev_file_na
                 instance->current_step,
                 instance->current_step,
                 instance->file_protocol_info->bits,
                 instance->file_protocol_info->bits,
                 instance->file_protocol_info->te,
                 instance->file_protocol_info->te,
-                instance->file_protocol_info->repeat,
                 instance->bit_index,
                 instance->bit_index,
                 instance->key_from_file,
                 instance->key_from_file,
                 instance->two_bytes);
                 instance->two_bytes);
@@ -116,8 +115,7 @@ bool subbrute_device_save_file(SubBruteDevice* instance, const char* dev_file_na
                 instance->protocol_info->file,
                 instance->protocol_info->file,
                 instance->current_step,
                 instance->current_step,
                 instance->protocol_info->bits,
                 instance->protocol_info->bits,
-                instance->protocol_info->te,
-                instance->protocol_info->repeat);
+                instance->protocol_info->te);
         }
         }
 
 
         result = true;
         result = true;

+ 6 - 11
subbrute_protocols.c

@@ -771,8 +771,7 @@ void subbrute_protocol_default_generate_file(
     SubBruteFileProtocol file,
     SubBruteFileProtocol file,
     uint64_t step,
     uint64_t step,
     uint8_t bits,
     uint8_t bits,
-    uint32_t te,
-    uint8_t repeat) {
+    uint32_t te) {
     FuriString* candidate = furi_string_alloc();
     FuriString* candidate = furi_string_alloc();
     subbrute_protocol_create_candidate_for_default(candidate, file, step);
     subbrute_protocol_create_candidate_for_default(candidate, file, step);
 
 
@@ -790,8 +789,7 @@ void subbrute_protocol_default_generate_file(
             subbrute_protocol_file(file),
             subbrute_protocol_file(file),
             bits,
             bits,
             furi_string_get_cstr(candidate),
             furi_string_get_cstr(candidate),
-            te,
-            repeat);
+            te);
     } else {
     } else {
         stream_write_format(
         stream_write_format(
             stream,
             stream,
@@ -800,8 +798,7 @@ void subbrute_protocol_default_generate_file(
             subbrute_protocol_preset(preset),
             subbrute_protocol_preset(preset),
             subbrute_protocol_file(file),
             subbrute_protocol_file(file),
             bits,
             bits,
-            furi_string_get_cstr(candidate),
-            repeat);
+            furi_string_get_cstr(candidate));
     }
     }
 
 
     furi_string_free(candidate);
     furi_string_free(candidate);
@@ -815,7 +812,6 @@ void subbrute_protocol_file_generate_file(
     uint64_t step,
     uint64_t step,
     uint8_t bits,
     uint8_t bits,
     uint32_t te,
     uint32_t te,
-    uint8_t repeat,
     uint8_t bit_index,
     uint8_t bit_index,
     uint64_t file_key,
     uint64_t file_key,
     bool two_bytes) {
     bool two_bytes) {
@@ -826,6 +822,7 @@ void subbrute_protocol_file_generate_file(
         candidate, step, bit_index, file_key, two_bytes);
         candidate, step, bit_index, file_key, two_bytes);
 
 
     stream_clean(stream);
     stream_clean(stream);
+
     if(te) {
     if(te) {
         stream_write_format(
         stream_write_format(
             stream,
             stream,
@@ -835,8 +832,7 @@ void subbrute_protocol_file_generate_file(
             subbrute_protocol_file(file),
             subbrute_protocol_file(file),
             bits,
             bits,
             furi_string_get_cstr(candidate),
             furi_string_get_cstr(candidate),
-            te,
-            repeat);
+            te);
     } else {
     } else {
         stream_write_format(
         stream_write_format(
             stream,
             stream,
@@ -845,8 +841,7 @@ void subbrute_protocol_file_generate_file(
             subbrute_protocol_preset(preset),
             subbrute_protocol_preset(preset),
             subbrute_protocol_file(file),
             subbrute_protocol_file(file),
             bits,
             bits,
-            furi_string_get_cstr(candidate),
-            repeat);
+            furi_string_get_cstr(candidate));
     }
     }
 
 
     furi_string_free(candidate);
     furi_string_free(candidate);

+ 1 - 3
subbrute_protocols.h

@@ -110,8 +110,7 @@ void subbrute_protocol_default_generate_file(
     SubBruteFileProtocol file,
     SubBruteFileProtocol file,
     uint64_t step,
     uint64_t step,
     uint8_t bits,
     uint8_t bits,
-    uint32_t te,
-    uint8_t repeat);
+    uint32_t te);
 void subbrute_protocol_file_generate_file(
 void subbrute_protocol_file_generate_file(
     Stream* stream,
     Stream* stream,
     uint32_t frequency,
     uint32_t frequency,
@@ -120,7 +119,6 @@ void subbrute_protocol_file_generate_file(
     uint64_t step,
     uint64_t step,
     uint8_t bits,
     uint8_t bits,
     uint32_t te,
     uint32_t te,
-    uint8_t repeat,
     uint8_t bit_index,
     uint8_t bit_index,
     uint64_t file_key,
     uint64_t file_key,
     bool two_bytes);
     bool two_bytes);