Skip to content

Commit

Permalink
Merge pull request #40 from gid9798/include_fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
xMasterX authored Sep 4, 2023
2 parents 5777b0a + 1bd0582 commit 4b486c8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
8 changes: 2 additions & 6 deletions helpers/subbrute_radio_device_loader.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
//#include "../../../lib/subghz/protocols/protocol_items.h"
//#include "../../../firmware//targets/f7/furi_hal/furi_hal_subghz.h"
#include <furi/core/check.h>
//#include "../../../furi/core/check.h"
// furi/core/check.h

#include <applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h>
#include <lib/subghz/devices/cc1101_int/cc1101_int_interconnect.h>
#include <applications/main/subghz/helpers/subghz_types.h>
#include <lib/subghz/devices/devices.h>

#include "subbrute_radio_device_loader.h"

#define TAG "SubBruteRadioDeviceLoader"
Expand Down
9 changes: 6 additions & 3 deletions helpers/subbrute_radio_device_loader.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#pragma once

#include <lib/subghz/devices/devices.h>
#include <applications/main/subghz/helpers/subghz_types.h>
#include <lib/subghz/devices/cc1101_int/cc1101_int_interconnect.h>
#include "subghz/helpers/subghz_types.h"

/** SubGhzRadioDeviceType */
typedef enum {
SubGhzRadioDeviceTypeInternal,
SubGhzRadioDeviceTypeExternalCC1101,
} SubGhzRadioDeviceType;

const SubGhzDevice* subbrute_radio_device_loader_set(
const SubGhzDevice* current_radio_device,
Expand Down
2 changes: 1 addition & 1 deletion scenes/subbrute_scene_load_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void subbrute_scene_load_file_on_enter(void* context) {
if(load_result == SubBruteFileResultOk) {
instance->settings->last_index = SubBruteAttackLoadFile;
subbrute_settings_set_repeats(
instance->settings, subbrute_main_view_get_extra_repeats(instance->view_main));
instance->settings, subbrute_main_view_get_repeats(instance->view_main));
uint8_t extra_repeats = subbrute_settings_get_current_repeats(instance->settings);

load_result = subbrute_device_attack_set(
Expand Down
2 changes: 1 addition & 1 deletion scenes/subbrute_scene_load_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool subbrute_scene_load_select_on_event(void* context, SceneManagerEvent event)

instance->settings->last_index = instance->device->attack;
subbrute_settings_set_repeats(
instance->settings, subbrute_main_view_get_extra_repeats(instance->view_main));
instance->settings, subbrute_main_view_get_repeats(instance->view_main));
uint8_t total_repeats = subbrute_settings_get_current_repeats(instance->settings);

instance->device->max_value = subbrute_protocol_calc_max_value(
Expand Down
4 changes: 2 additions & 2 deletions scenes/subbrute_scene_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool subbrute_scene_start_on_event(void* context, SceneManagerEvent event) {
if(event.event == SubBruteCustomEventTypeMenuSelected) {
instance->settings->last_index = subbrute_main_view_get_index(instance->view_main);
subbrute_settings_set_repeats(
instance->settings, subbrute_main_view_get_extra_repeats(instance->view_main));
instance->settings, subbrute_main_view_get_repeats(instance->view_main));
uint8_t total_repeats = subbrute_settings_get_current_repeats(instance->settings);

if((subbrute_device_attack_set(
Expand Down Expand Up @@ -83,7 +83,7 @@ bool subbrute_scene_start_on_event(void* context, SceneManagerEvent event) {
//exit app
instance->settings->last_index = subbrute_main_view_get_index(instance->view_main);
subbrute_settings_set_repeats(
instance->settings, subbrute_main_view_get_extra_repeats(instance->view_main));
instance->settings, subbrute_main_view_get_repeats(instance->view_main));
subbrute_settings_save(instance->settings);

scene_manager_stop(instance->scene_manager);
Expand Down
2 changes: 1 addition & 1 deletion views/subbrute_main_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ SubBruteAttacks subbrute_main_view_get_index(SubBruteMainView* instance) {
return instance->index;
}

const uint8_t* subbrute_main_view_get_extra_repeats(SubBruteMainView* instance) {
const uint8_t* subbrute_main_view_get_repeats(SubBruteMainView* instance) {
furi_assert(instance);
return instance->repeat_values;
}
Expand Down
2 changes: 1 addition & 1 deletion views/subbrute_main_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void subbrute_main_view_set_index(
bool two_bytes,
uint64_t key_from_file);
SubBruteAttacks subbrute_main_view_get_index(SubBruteMainView* instance);
const uint8_t* subbrute_main_view_get_extra_repeats(SubBruteMainView* instance);
const uint8_t* subbrute_main_view_get_repeats(SubBruteMainView* instance);
bool subbrute_main_view_get_two_bytes(SubBruteMainView* instance);
void subbrute_attack_view_enter(void* context);
void subbrute_attack_view_exit(void* context);
Expand Down

0 comments on commit 4b486c8

Please sign in to comment.