mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
format, add chamberlain 9bit 300mhz
This commit is contained in:
@@ -21,7 +21,7 @@ bool subbrute_scene_save_success_on_event(void* context, SceneManagerEvent event
|
||||
|
||||
SubBruteState* instance = (SubBruteState*)context;
|
||||
//SubBruteMainView* view = instance->view_main;
|
||||
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubBruteCustomEventTypePopupClosed) {
|
||||
if(!scene_manager_search_and_switch_to_previous_scene(
|
||||
|
||||
@@ -24,6 +24,7 @@ static const char* subbrute_menu_names[] = {
|
||||
[SubBruteAttackCAME12bit307] = "CAME 12bit 307mhz",
|
||||
[SubBruteAttackCAME12bit433] = "CAME 12bit 433mhz",
|
||||
[SubBruteAttackCAME12bit868] = "CAME 12bit 868mhz",
|
||||
[SubBruteAttackChamberlain9bit300] = "Chamberlain 9bit 300mhz",
|
||||
[SubBruteAttackChamberlain9bit315] = "Chamberlain 9bit 315mhz",
|
||||
[SubBruteAttackChamberlain9bit390] = "Chamberlain 9bit 390mhz",
|
||||
[SubBruteAttackLinear10bit300] = "Linear 10bit 300mhz",
|
||||
@@ -38,6 +39,7 @@ static const char* subbrute_menu_names_small[] = {
|
||||
[SubBruteAttackCAME12bit307] = "CAME 307mhz",
|
||||
[SubBruteAttackCAME12bit433] = "CAME 433mhz",
|
||||
[SubBruteAttackCAME12bit868] = "CAME 868mhz",
|
||||
[SubBruteAttackChamberlain9bit300] = "Cham 300mhz",
|
||||
[SubBruteAttackChamberlain9bit315] = "Cham 315mhz",
|
||||
[SubBruteAttackChamberlain9bit390] = "Cham 390mhz",
|
||||
[SubBruteAttackLinear10bit300] = "Linear 300mhz",
|
||||
|
||||
@@ -306,6 +306,12 @@ SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* instance, SubBrute
|
||||
string_set_str(instance->protocol_name, protocol_came);
|
||||
string_set_str(instance->preset_name, preset_ook650_async);
|
||||
break;
|
||||
case SubBruteAttackChamberlain9bit300:
|
||||
instance->frequency = 300000000;
|
||||
instance->bit = 9;
|
||||
string_set_str(instance->protocol_name, protocol_cham_code);
|
||||
string_set_str(instance->preset_name, preset_ook650_async);
|
||||
break;
|
||||
case SubBruteAttackChamberlain9bit315:
|
||||
instance->frequency = 315000000;
|
||||
instance->bit = 9;
|
||||
|
||||
@@ -20,6 +20,7 @@ typedef enum {
|
||||
SubBruteAttackCAME12bit307,
|
||||
SubBruteAttackCAME12bit433,
|
||||
SubBruteAttackCAME12bit868,
|
||||
SubBruteAttackChamberlain9bit300,
|
||||
SubBruteAttackChamberlain9bit315,
|
||||
SubBruteAttackChamberlain9bit390,
|
||||
SubBruteAttackLinear10bit300,
|
||||
@@ -96,4 +97,6 @@ bool subbrute_device_create_packet_parsed(SubBruteDevice* context, uint64_t step
|
||||
SubBruteFileResult subbrute_device_attack_set(SubBruteDevice* context, SubBruteAttacks type);
|
||||
uint8_t subbrute_device_load_from_file(SubBruteDevice* context, string_t file_path);
|
||||
FuriHalSubGhzPreset subbrute_device_convert_preset(const char* preset);
|
||||
void subbrute_device_attack_set_default_values(SubBruteDevice* context, SubBruteAttacks default_attack);
|
||||
void subbrute_device_attack_set_default_values(
|
||||
SubBruteDevice* context,
|
||||
SubBruteAttacks default_attack);
|
||||
@@ -82,7 +82,7 @@ bool subbrute_attack_view_input(InputEvent* event, void* context) {
|
||||
return true;
|
||||
});
|
||||
instance->callback(SubBruteCustomEventTypeTransmitStarted, instance->context);
|
||||
/*if(event->type == InputTypeRepeat && event->key == InputKeyOk) {
|
||||
/*if(event->type == InputTypeRepeat && event->key == InputKeyOk) {
|
||||
#ifdef FURI_DEBUG
|
||||
FURI_LOG_D(TAG, "InputKey: %d OK. SubBruteCustomEventTypeTransmitContinuousStarted", event->key);
|
||||
#endif
|
||||
@@ -374,7 +374,7 @@ void subbrute_attack_view_draw(Canvas* canvas, void* context) {
|
||||
elements_button_top_left(canvas, "Save");
|
||||
elements_button_top_right(canvas, "Resend");
|
||||
} else {
|
||||
if (model->is_continuous_worker) {
|
||||
if(model->is_continuous_worker) {
|
||||
canvas_invert_color(canvas);
|
||||
}
|
||||
// canvas_draw_icon_animation
|
||||
@@ -391,7 +391,7 @@ void subbrute_attack_view_draw(Canvas* canvas, void* context) {
|
||||
elements_progress_bar(canvas, 8, 37, 110, progress_value > 1 ? 1 : progress_value);
|
||||
|
||||
elements_button_center(canvas, "Stop");
|
||||
if (model->is_continuous_worker) {
|
||||
if(model->is_continuous_worker) {
|
||||
canvas_invert_color(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user