From 7ec4cb4b7aa83c086fdee342488364a0f19b26ee Mon Sep 17 00:00:00 2001 From: DerSkythe Date: Sat, 8 Oct 2022 02:24:19 +0400 Subject: [PATCH] Fix compile errors --- applications/main/application.fam | 14 ++-- .../scenes/subbrute_scene_load_file.c | 6 +- .../scenes/subbrute_scene_load_select.c | 3 - .../scenes/subbrute_scene_save_name.c | 13 ++-- applications/plugins/subbrute/subbrute.c | 8 +-- .../plugins/subbrute/subbrute_device.c | 40 ++++++------ .../plugins/subbrute/subbrute_device.h | 55 +++++++++------- .../plugins/subbrute/subbrute_device_i.h | 64 ------------------- applications/plugins/subbrute/subbrute_i.h | 4 +- .../plugins/subbrute/subbrute_protocols.c | 15 +++-- .../plugins/subbrute/subbrute_protocols.h | 24 +++++-- .../plugins/subbrute/subbrute_protocols_i.h | 18 ------ .../subbrute/views/subbrute_attack_view.c | 15 +---- .../subbrute/views/subbrute_main_view.c | 4 +- 14 files changed, 106 insertions(+), 177 deletions(-) delete mode 100644 applications/plugins/subbrute/subbrute_device_i.h delete mode 100644 applications/plugins/subbrute/subbrute_protocols_i.h diff --git a/applications/main/application.fam b/applications/main/application.fam index a3d310093..639640b72 100644 --- a/applications/main/application.fam +++ b/applications/main/application.fam @@ -4,17 +4,17 @@ App( apptype=FlipperAppType.METAPACKAGE, provides=[ "gpio", - "ibutton", - "infrared", - "lfrfid", - "nfc", + #"ibutton", + #"infrared", + #"lfrfid", + #"nfc", "subghz", - "bad_usb", - "u2f", + #"bad_usb", + #"u2f", "fap_loader", "archive", "clock", - "unirfremix", + #"unirfremix", ], ) diff --git a/applications/plugins/subbrute/scenes/subbrute_scene_load_file.c b/applications/plugins/subbrute/scenes/subbrute_scene_load_file.c index 911dd21c4..dc26403c3 100644 --- a/applications/plugins/subbrute/scenes/subbrute_scene_load_file.c +++ b/applications/plugins/subbrute/scenes/subbrute_scene_load_file.c @@ -34,7 +34,8 @@ void subbrute_scene_load_file_on_enter(void* context) { furi_string_get_cstr(app_folder)); #endif if(res) { - load_result = subbrute_device_load_from_file(instance->device, load_path); + load_result = + subbrute_device_load_from_file(instance->device, furi_string_get_cstr(load_path)); if(load_result == SubBruteFileResultOk) { load_result = subbrute_device_attack_set(instance->device, SubBruteAttackLoadFile); if(load_result == SubBruteFileResultOk) { @@ -51,8 +52,7 @@ void subbrute_scene_load_file_on_enter(void* context) { FuriString* dialog_msg; dialog_msg = furi_string_alloc(); - furi_string_cat_printf( - dialog_msg, "Cannot parse\nfile: %s", subbrute_device_error_get_desc(load_result)); + furi_string_cat_printf(dialog_msg, "Cannot parse\nfile: %s", subbrute_device_error_get_desc(load_result)); dialog_message_show_storage_error(instance->dialogs, furi_string_get_cstr(dialog_msg)); furi_string_free(dialog_msg); scene_manager_search_and_switch_to_previous_scene( diff --git a/applications/plugins/subbrute/scenes/subbrute_scene_load_select.c b/applications/plugins/subbrute/scenes/subbrute_scene_load_select.c index 46021ba71..e9fafd4da 100644 --- a/applications/plugins/subbrute/scenes/subbrute_scene_load_select.c +++ b/applications/plugins/subbrute/scenes/subbrute_scene_load_select.c @@ -7,9 +7,6 @@ void subbrute_scene_load_select_callback(SubBruteCustomEvent event, void* contex furi_assert(context); SubBruteState* instance = (SubBruteState*)context; -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "subbrute_scene_load_select_callback"); -#endif view_dispatcher_send_custom_event(instance->view_dispatcher, event); } diff --git a/applications/plugins/subbrute/scenes/subbrute_scene_save_name.c b/applications/plugins/subbrute/scenes/subbrute_scene_save_name.c index 937bf52ae..9a010a2ba 100644 --- a/applications/plugins/subbrute/scenes/subbrute_scene_save_name.c +++ b/applications/plugins/subbrute/scenes/subbrute_scene_save_name.c @@ -1,5 +1,6 @@ #include "../subbrute_i.h" #include "subbrute_scene.h" +#include #include #define TAG "SubBruteSceneSaveFile" @@ -20,10 +21,11 @@ void subbrute_scene_save_name_on_enter(void* context) { SUBBRUTE_MAX_LEN_NAME, true); - string_set_str(instance->file_path, SUBBRUTE_PATH); + furi_string_reset(instance->file_path); + furi_string_set_str(instance->file_path, SUBBRUTE_PATH); - ValidatorIsFile* validator_is_file = - validator_is_file_alloc_init(string_get_cstr(instance->file_path), SUBBRUTE_FILE_EXT, ""); + ValidatorIsFile* validator_is_file = validator_is_file_alloc_init( + furi_string_get_cstr(instance->file_path), SUBBRUTE_FILE_EXT, ""); text_input_set_validator(text_input, validator_is_file_callback, validator_is_file); view_dispatcher_switch_to_view(instance->view_dispatcher, SubBruteViewTextInput); @@ -44,10 +46,11 @@ bool subbrute_scene_save_name_on_event(void* context, SceneManagerEvent event) { #endif bool success = false; 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); - if(subbrute_device_save_file(instance->device, string_get_cstr(instance->file_path))) { + if(subbrute_device_save_file(instance->device, furi_string_get_cstr(instance->file_path))) { scene_manager_next_scene(instance->scene_manager, SubBruteSceneSaveSuccess); success = true; consumed = true; @@ -73,5 +76,5 @@ void subbrute_scene_save_name_on_exit(void* context) { text_input_reset(instance->text_input); - string_reset(instance->file_path); + furi_string_reset(instance->file_path); } diff --git a/applications/plugins/subbrute/subbrute.c b/applications/plugins/subbrute/subbrute.c index f07febc43..200b42c3c 100644 --- a/applications/plugins/subbrute/subbrute.c +++ b/applications/plugins/subbrute/subbrute.c @@ -26,7 +26,7 @@ SubBruteState* subbrute_alloc() { SubBruteState* instance = malloc(sizeof(SubBruteState)); memset(instance->text_store, 0, sizeof(instance->text_store)); - string_init(instance->file_path); + instance->file_path = furi_string_alloc(); instance->scene_manager = scene_manager_alloc(&subbrute_scene_handlers, instance); instance->view_dispatcher = view_dispatcher_alloc(); @@ -187,13 +187,9 @@ void subbrute_free(SubBruteState* instance) { furi_record_close(RECORD_GUI); instance->gui = NULL; - string_clear(instance->file_path); - string_init(instance->file_path); + furi_string_free(instance->file_path); // The rest -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "free instance"); -#endif free(instance); } diff --git a/applications/plugins/subbrute/subbrute_device.c b/applications/plugins/subbrute/subbrute_device.c index 0be231cf7..311b6eba2 100644 --- a/applications/plugins/subbrute/subbrute_device.c +++ b/applications/plugins/subbrute/subbrute_device.c @@ -1,8 +1,10 @@ #include "subbrute_device.h" +//#include "subbrute_device.h" -#include #include -#include +#include +#include +#include #include #define TAG "SubBruteDevice" @@ -50,17 +52,11 @@ SubBruteDevice* subbrute_device_alloc() { void subbrute_device_free(SubBruteDevice* instance) { furi_assert(instance); -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "subbrute_device_free"); -#endif // I don't know how to free this instance->decoder_result = NULL; if(instance->receiver != NULL) { -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "subghz_receiver_free"); -#endif subghz_receiver_free(instance->receiver); instance->receiver = NULL; } @@ -73,10 +69,6 @@ void subbrute_device_free(SubBruteDevice* instance) { subghz_environment_free(instance->environment); instance->environment = NULL; -#ifdef FURI_DEBUG - FURI_LOG_D(TAG, "before free"); -#endif - furi_thread_free(instance->thread); subbrute_device_free_protocol_info(instance); @@ -186,6 +178,9 @@ SubBruteAttacks subbrute_device_get_attack(SubBruteDevice* instance) { bool subbrute_device_is_worker_running(SubBruteDevice* instance) { return instance->worker_running; } +uint64_t subbrute_device_get_max_value(SubBruteDevice* instance) { + return instance->max_value; +} uint64_t subbrute_device_get_step(SubBruteDevice* instance) { return instance->key_index; } @@ -267,7 +262,7 @@ bool subbrute_device_transmit_current_key(SubBruteDevice* instance) { uint32_t ticks = furi_get_tick(); if((ticks - instance->last_time_tx_data) < SUBBRUTE_MANUAL_TRANSMIT_INTERVAL) { #if FURI_DEBUG - FURI_LOG_D(TAG, "Need to wait, current: %d", ticks - instance->last_time_tx_data); + FURI_LOG_D(TAG, "Need to wait, current: %ld", ticks - instance->last_time_tx_data); #endif return false; } @@ -403,7 +398,7 @@ bool subbrute_device_create_packet_parsed( stream, subbrute_key_small_no_tail, instance->protocol_info->bits, - string_get_cstr(candidate), + furi_string_get_cstr(candidate), instance->protocol_info->repeat); } } else { @@ -420,7 +415,7 @@ bool subbrute_device_create_packet_parsed( stream, subbrute_key_file_key, instance->file_template, - string_get_cstr(candidate), + furi_string_get_cstr(candidate), instance->protocol_info->repeat); } } @@ -512,10 +507,10 @@ SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* instance, SubBrute return SubBruteFileResultOk; } -uint8_t subbrute_device_load_from_file(SubBruteDevice* instance, FuriString* file_path) { +uint8_t subbrute_device_load_from_file(SubBruteDevice* instance, const char* file_path) { furi_assert(instance); #ifdef FURI_DEBUG - FURI_LOG_D(TAG, "subbrute_device_load_from_file: %s", furi_string_get_cstr(file_path)); + FURI_LOG_D(TAG, "subbrute_device_load_from_file: %s", file_path); #endif SubBruteFileResult result = SubBruteFileResultUnknown; @@ -531,8 +526,8 @@ uint8_t subbrute_device_load_from_file(SubBruteDevice* instance, FuriString* fil furi_hal_subghz_reset(); do { - if(!flipper_format_file_open_existing(fff_data_file, furi_string_get_cstr(file_path))) { - FURI_LOG_E(TAG, "Error open file %s", furi_string_get_cstr(file_path)); + if(!flipper_format_file_open_existing(fff_data_file, file_path)) { + FURI_LOG_E(TAG, "Error open file %s", file_path); result = SubBruteFileResultErrorOpenFile; break; } @@ -743,4 +738,11 @@ const char* subbrute_device_error_get_desc(SubBruteFileResult error_id) { break; } return result; +} + +void subbrute_device_free_protocol_info(SubBruteDevice* instance) { + furi_assert(instance); + + free(instance->protocol_info); + instance->protocol_info = NULL; } \ No newline at end of file diff --git a/applications/plugins/subbrute/subbrute_device.h b/applications/plugins/subbrute/subbrute_device.h index 801b3f635..bdcaa11bd 100644 --- a/applications/plugins/subbrute/subbrute_device.h +++ b/applications/plugins/subbrute/subbrute_device.h @@ -1,6 +1,6 @@ #pragma once -#include "subbrute_device_i.h" +#include "subbrute_protocols.h" #include #include #include @@ -14,22 +14,6 @@ #define SUBBRUTE_PAYLOAD_SIZE 16 -typedef enum { - SubBruteAttackCAME12bit303, - SubBruteAttackCAME12bit307, - SubBruteAttackCAME12bit433, - SubBruteAttackCAME12bit868, - SubBruteAttackNICE12bit433, - SubBruteAttackNICE12bit868, - SubBruteAttackChamberlain9bit300, - SubBruteAttackChamberlain9bit315, - SubBruteAttackChamberlain9bit390, - SubBruteAttackLinear10bit300, - SubBruteAttackLinear10bit310, - SubBruteAttackLoadFile, - SubBruteAttackTotalCount, -} SubBruteAttacks; - typedef enum { SubBruteFileResultUnknown, SubBruteFileResultOk, @@ -45,16 +29,16 @@ typedef enum { SubBruteFileResultMissingOrIncorrectBit, SubBruteFileResultMissingOrIncorrectKey, SubBruteFileResultMissingOrIncorrectTe, - SubBruteFileResultBigBitSize, } SubBruteFileResult; typedef enum { SubBruteDeviceStateIDLE, SubBruteDeviceStateReady, SubBruteDeviceStateTx, - SubBruteDeviceStateFinished, + SubBruteDeviceStateFinished } SubBruteDeviceState; +typedef void (*SubBruteDeviceWorkerCallback)(void* context, SubBruteDeviceState state); typedef struct { SubBruteDeviceState state; SubBruteProtocol* protocol_info; @@ -88,11 +72,34 @@ typedef struct { // Callback for changed states SubBruteDeviceWorkerCallback callback; void* context; -}; +} SubBruteDevice; + +SubBruteDevice* subbrute_device_alloc(); +void subbrute_device_free(SubBruteDevice* instance); + +bool subbrute_device_save_file(SubBruteDevice* instance, const char* key_name); +const char* subbrute_device_error_get_desc(SubBruteFileResult error_id); +SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* context, SubBruteAttacks type); +uint8_t subbrute_device_load_from_file(SubBruteDevice* context, const char* file_path); + +bool subbrute_device_is_worker_running(SubBruteDevice* instance); +SubBruteAttacks subbrute_device_get_attack(SubBruteDevice* instance); +uint64_t subbrute_device_get_max_value(SubBruteDevice* instance); +uint64_t subbrute_device_get_step(SubBruteDevice* instance); +uint64_t subbrute_device_add_step(SubBruteDevice* instance, int8_t step); +void subbrute_device_set_load_index(SubBruteDevice* instance, uint64_t load_index); +void subbrute_device_reset_step(SubBruteDevice* instance); +const char* subbrute_device_get_file_key(SubBruteDevice* instance); + +bool subbrute_worker_start(SubBruteDevice* instance); +void subbrute_worker_stop(SubBruteDevice* instance); +bool subbrute_device_transmit_current_key(SubBruteDevice* instance); +bool subbrute_device_can_manual_transmit(SubBruteDevice* instance); +void subbrute_device_set_callback( + SubBruteDevice* instance, + SubBruteDeviceWorkerCallback callback, + void* context); -/* - * PRIVATE METHODS - */ void subbrute_device_free_protocol_info(SubBruteDevice* instance); int32_t subbrute_worker_thread(void* context); void subbrute_device_attack_set_default_values( @@ -104,4 +111,4 @@ bool subbrute_device_create_packet_parsed( uint64_t step, bool small); void subbrute_device_send_callback(SubBruteDevice* instance); -void subbrute_device_subghz_transmit(SubBruteDevice* instance, FlipperFormat* flipper_format); \ No newline at end of file +void subbrute_device_subghz_transmit(SubBruteDevice* instance, FlipperFormat* flipper_format); diff --git a/applications/plugins/subbrute/subbrute_device_i.h b/applications/plugins/subbrute/subbrute_device_i.h deleted file mode 100644 index 02b934ba7..000000000 --- a/applications/plugins/subbrute/subbrute_device_i.h +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - -#include "subbrute_protocols.h" - -#define SUBBRUTE_TEXT_STORE_SIZE 256 - -#define SUBBRUTE_MAX_LEN_NAME 64 -#define SUBBRUTE_PATH EXT_PATH("subghz") -#define SUBBRUTE_FILE_EXT ".sub" - -#define SUBBRUTE_PAYLOAD_SIZE 16 - -typedef enum { - SubBruteFileResultUnknown, - SubBruteFileResultOk, - SubBruteFileResultErrorOpenFile, - SubBruteFileResultMissingOrIncorrectHeader, - SubBruteFileResultFrequencyNotAllowed, - SubBruteFileResultMissingOrIncorrectFrequency, - SubBruteFileResultPresetInvalid, - SubBruteFileResultMissingProtocol, - SubBruteFileResultProtocolNotSupported, - SubBruteFileResultDynamicProtocolNotValid, - SubBruteFileResultProtocolNotFound, - SubBruteFileResultMissingOrIncorrectBit, - SubBruteFileResultMissingOrIncorrectKey, - SubBruteFileResultMissingOrIncorrectTe, -} SubBruteFileResult; - -typedef enum { - SubBruteDeviceStateIDLE, - SubBruteDeviceStateReady, - SubBruteDeviceStateTx, - SubBruteDeviceStateFinished -} SubBruteDeviceState; - -typedef void (*SubBruteDeviceWorkerCallback)(void* context, SubBruteDeviceState state); -typedef struct SubBruteDevice SubBruteDevice; - -SubBruteDevice* subbrute_device_alloc(); -void subbrute_device_free(SubBruteDevice* instance); -bool subbrute_device_save_file(SubBruteDevice* instance, const char* key_name); -const char* subbrute_device_error_get_desc(SubBruteFileResult error_id); -SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* context, SubBruteAttacks type); -uint8_t subbrute_device_load_from_file(SubBruteDevice* context, string_t file_path); - - -bool subbrute_device_is_worker_running(SubBruteDevice* instance); -SubBruteAttacks subbrute_device_get_attack(SubBruteDevice* instance); -uint64_t subbrute_device_get_max_value(SubBruteDevice* instance); -uint64_t subbrute_device_get_step(SubBruteDevice* instance); -uint64_t subbrute_device_add_step(SubBruteDevice* instance, int8_t step); -void subbrute_device_set_load_index(SubBruteDevice* instance, uint64_t load_index); -void subbrute_device_reset_step(SubBruteDevice* instance); -const char* subbrute_device_get_file_key(SubBruteDevice* instance); - -bool subbrute_worker_start(SubBruteDevice* instance); -void subbrute_worker_stop(SubBruteDevice* instance); -bool subbrute_device_transmit_current_key(SubBruteDevice* instance); -bool subbrute_device_can_manual_transmit(SubBruteDevice* instance); -void subbrute_device_set_callback( - SubBruteDevice* instance, - SubBruteDeviceWorkerCallback callback, - void* context); diff --git a/applications/plugins/subbrute/subbrute_i.h b/applications/plugins/subbrute/subbrute_i.h index bf8ab7ebc..02f91f93d 100644 --- a/applications/plugins/subbrute/subbrute_i.h +++ b/applications/plugins/subbrute/subbrute_i.h @@ -22,7 +22,7 @@ #include #include "subbrute.h" -#include "subbrute_device_i.h" +#include "subbrute_device.h" #include "views/subbrute_attack_view.h" #include "views/subbrute_main_view.h" @@ -51,7 +51,7 @@ struct SubBruteState { // Text store char text_store[SUBBRUTE_MAX_LEN_NAME]; - string_t file_path; + FuriString* file_path; // Views SubBruteMainView* view_main; diff --git a/applications/plugins/subbrute/subbrute_protocols.c b/applications/plugins/subbrute/subbrute_protocols.c index 3d857233b..3bedcb23c 100644 --- a/applications/plugins/subbrute/subbrute_protocols.c +++ b/applications/plugins/subbrute/subbrute_protocols.c @@ -1,6 +1,8 @@ #include "subbrute_protocols.h" static const SubBruteProtocol subbrute_protocols[SubBruteAttackTotalCount] = { + [SubBruteAttackCAME12bit303] = + {303875000, 12, 0, 3, FuriHalSubGhzPresetOok650Async, CAMEFileProtocol}, [SubBruteAttackCAME12bit307] = {307800000, 12, 0, 3, FuriHalSubGhzPresetOok650Async, CAMEFileProtocol}, [SubBruteAttackCAME12bit433] = @@ -38,6 +40,7 @@ static const SubBruteProtocol subbrute_protocols[SubBruteAttackTotalCount] = { //}; static const char* subbrute_protocol_names[] = { + [SubBruteAttackCAME12bit303] = "CAME 12bit 303MHz", [SubBruteAttackCAME12bit307] = "CAME 12bit 307MHz", [SubBruteAttackCAME12bit433] = "CAME 12bit 433MHz", [SubBruteAttackCAME12bit868] = "CAME 12bit 868MHz", @@ -106,9 +109,9 @@ const char* subbrute_protocol_file(SubBruteFileProtocol protocol) { return subbrute_protocol_file_types[protocol]; } -FuriHalSubGhzPreset subbrute_protocol_convert_preset(string_t preset_name) { - for(size_t i = FuriHalSubGhzPresetIDLE; i -#include #include +#include //typedef enum { // FrequencyProtocolField, @@ -25,6 +24,22 @@ typedef enum { TotalFileProtocol, } SubBruteFileProtocol; +typedef enum { + SubBruteAttackCAME12bit303, + SubBruteAttackCAME12bit307, + SubBruteAttackCAME12bit433, + SubBruteAttackCAME12bit868, + SubBruteAttackNICE12bit433, + SubBruteAttackNICE12bit868, + SubBruteAttackChamberlain9bit300, + SubBruteAttackChamberlain9bit315, + SubBruteAttackChamberlain9bit390, + SubBruteAttackLinear10bit300, + SubBruteAttackLinear10bit310, + SubBruteAttackLoadFile, + SubBruteAttackTotalCount, +} SubBruteAttacks; + typedef struct { uint32_t frequency; uint8_t bits; @@ -38,5 +53,6 @@ SubBruteProtocol* subbrute_protocol_alloc(void); SubBruteProtocol* subbrute_protocol(SubBruteAttacks index); const char* subbrute_protocol_preset(FuriHalSubGhzPreset preset); const char* subbrute_protocol_file(SubBruteFileProtocol protocol); -FuriHalSubGhzPreset subbrute_protocol_convert_preset(string_t preset_name); -SubBruteFileProtocol subbrute_protocol_file_protocol_name(string_t name); \ No newline at end of file +FuriHalSubGhzPreset subbrute_protocol_convert_preset(FuriString* preset_name); +SubBruteFileProtocol subbrute_protocol_file_protocol_name(FuriString* name); +const char* subbrute_protocol_name(SubBruteAttacks index); \ No newline at end of file diff --git a/applications/plugins/subbrute/subbrute_protocols_i.h b/applications/plugins/subbrute/subbrute_protocols_i.h deleted file mode 100644 index b7e5f1713..000000000 --- a/applications/plugins/subbrute/subbrute_protocols_i.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -typedef enum { - SubBruteAttackCAME12bit307, - SubBruteAttackCAME12bit433, - SubBruteAttackCAME12bit868, - SubBruteAttackNICE12bit433, - SubBruteAttackNICE12bit868, - SubBruteAttackChamberlain9bit300, - SubBruteAttackChamberlain9bit315, - SubBruteAttackChamberlain9bit390, - SubBruteAttackLinear10bit300, - SubBruteAttackLinear10bit310, - SubBruteAttackLoadFile, - SubBruteAttackTotalCount, -} SubBruteAttacks; - -const char* subbrute_protocol_name(SubBruteAttacks index); \ No newline at end of file diff --git a/applications/plugins/subbrute/views/subbrute_attack_view.c b/applications/plugins/subbrute/views/subbrute_attack_view.c index da333a9a2..197cf8239 100644 --- a/applications/plugins/subbrute/views/subbrute_attack_view.c +++ b/applications/plugins/subbrute/views/subbrute_attack_view.c @@ -1,6 +1,6 @@ #include "subbrute_attack_view.h" #include "../subbrute_i.h" -#include "../subbrute_protocols_i.h" +#include "../subbrute_protocols.h" #include "assets_icons.h" #include @@ -299,10 +299,6 @@ void elements_button_top_left(Canvas* canvas, const char* str) { const uint8_t y = 0; canvas_draw_box(canvas, x, y, button_width, button_height); -#ifdef FURI_DEBUG - FURI_LOG_D( - TAG, "lbox, x: %d, y: %d, width: %d, height: %d", x, y, button_width, button_height); -#endif // canvas_draw_line(canvas, x + button_width + 0, y, x + button_width + 0, y + button_height - 0); // // canvas_draw_line(canvas, x + button_width + 1, y, x + button_width + 1, y + button_height - 1); // canvas_draw_line(canvas, x + button_width + 2, y, x + button_width + 2, y + button_height - 2); @@ -330,15 +326,6 @@ void elements_button_top_right(Canvas* canvas, const char* str) { const uint8_t y = 0; canvas_draw_box(canvas, x - button_width, y, button_width, button_height); -#ifdef FURI_DEBUG - FURI_LOG_D( - TAG, - "rbox, x: %d, y: %d, width: %d, height: %d", - x - button_width, - y, - button_width, - button_height); -#endif // canvas_draw_line(canvas, x - button_width - 1, y, x + button_width - 1, y + button_height - 0); // canvas_draw_line(canvas, x - button_width - 2, y, x + button_width - 2, y + button_height - 1); // canvas_draw_line(canvas, x - button_width - 3, y, x + button_width - 3, y + button_height - 2); diff --git a/applications/plugins/subbrute/views/subbrute_main_view.c b/applications/plugins/subbrute/views/subbrute_main_view.c index e6a19d6f0..c3f56cae2 100644 --- a/applications/plugins/subbrute/views/subbrute_main_view.c +++ b/applications/plugins/subbrute/views/subbrute_main_view.c @@ -1,6 +1,6 @@ #include "subbrute_main_view.h" #include "../subbrute_i.h" -#include "../subbrute_protocols_i.h" +#include "../subbrute_protocols.h" #include #include @@ -86,7 +86,7 @@ void subbrute_main_view_draw(Canvas* canvas, SubBruteMainViewModel* model) { canvas_set_font(canvas, FontPrimary); canvas_draw_box(canvas, 0, 0, canvas_width(canvas), STATUS_BAR_Y_SHIFT); canvas_invert_color(canvas); - canvas_draw_str_aligned(canvas, 64, 3, AlignCenter, AlignTop, "Sub-GHz Bruteforcer"); + canvas_draw_str_aligned(canvas, 64, 3, AlignCenter, AlignTop, "Sub-GHz BruteForcer v3"); canvas_invert_color(canvas); if(m->is_select_byte) {