فهرست منبع

Add CAME 315, set default index to CAME 433

MX 3 سال پیش
والد
کامیت
6113cb4623
3فایلهای تغییر یافته به همراه15 افزوده شده و 2 حذف شده
  1. 1 2
      scenes/subbrute_scene_start.c
  2. 13 0
      subbrute_protocols.c
  3. 1 0
      subbrute_protocols.h

+ 1 - 2
scenes/subbrute_scene_start.c

@@ -23,8 +23,7 @@ void subbrute_scene_start_on_enter(void* context) {
 
     instance->current_view = SubBruteViewMain;
     subbrute_main_view_set_callback(view, subbrute_scene_start_callback, instance);
-    subbrute_main_view_set_index(
-        view, instance->device->attack, false, instance->device->two_bytes, 0);
+    subbrute_main_view_set_index(view, 3, false, instance->device->two_bytes, 0);
 
     view_dispatcher_switch_to_view(instance->view_dispatcher, instance->current_view);
 

+ 13 - 0
subbrute_protocols.c

@@ -25,6 +25,17 @@ const SubBruteProtocol subbrute_protocol_came_12bit_307 = {
     .preset = FuriHalSubGhzPresetOok650Async,
     .file = CAMEFileProtocol};
 
+/**
+ * CAME 12bit 315MHz
+ */
+const SubBruteProtocol subbrute_protocol_came_12bit_315 = {
+    .frequency = 315000000,
+    .bits = 12,
+    .te = 0,
+    .repeat = 3,
+    .preset = FuriHalSubGhzPresetOok650Async,
+    .file = CAMEFileProtocol};
+
 /**
  * CAME 12bit 433MHz
  */
@@ -243,6 +254,7 @@ const SubBruteProtocol subbrute_protocol_load_file =
 static const char* subbrute_protocol_names[] = {
     [SubBruteAttackCAME12bit303] = "CAME 12bit 303MHz",
     [SubBruteAttackCAME12bit307] = "CAME 12bit 307MHz",
+    [SubBruteAttackCAME12bit315] = "CAME 12bit 315MHz",
     [SubBruteAttackCAME12bit433] = "CAME 12bit 433MHz",
     [SubBruteAttackCAME12bit868] = "CAME 12bit 868MHz",
     [SubBruteAttackNICE12bit433] = "NICE 12bit 433MHz",
@@ -279,6 +291,7 @@ static const char* subbrute_protocol_presets[] = {
 const SubBruteProtocol* subbrute_protocol_registry[] = {
     [SubBruteAttackCAME12bit303] = &subbrute_protocol_came_12bit_303,
     [SubBruteAttackCAME12bit307] = &subbrute_protocol_came_12bit_307,
+    [SubBruteAttackCAME12bit315] = &subbrute_protocol_came_12bit_315,
     [SubBruteAttackCAME12bit433] = &subbrute_protocol_came_12bit_433,
     [SubBruteAttackCAME12bit868] = &subbrute_protocol_came_12bit_868,
     [SubBruteAttackNICE12bit433] = &subbrute_protocol_nice_12bit_433,

+ 1 - 0
subbrute_protocols.h

@@ -26,6 +26,7 @@ typedef enum {
 typedef enum {
     SubBruteAttackCAME12bit303,
     SubBruteAttackCAME12bit307,
+    SubBruteAttackCAME12bit315,
     SubBruteAttackCAME12bit433,
     SubBruteAttackCAME12bit868,
     SubBruteAttackNICE12bit433,