浏览代码

Auto switch to internal radio if external radio is not available

MX 3 年之前
父节点
当前提交
19153c7239
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      subbrute.c

+ 4 - 0
subbrute.c

@@ -180,6 +180,10 @@ int32_t subbrute_app(void* p) {
 
     // Enable power for External CC1101 if it is connected
     furi_hal_subghz_enable_ext_power();
+    // Auto switch to internal radio if external radio is not available
+    if(!furi_hal_subghz_check_radio()) {
+        furi_hal_subghz_set_radio_type(SubGhzRadioInternal);
+    }
 
     furi_hal_power_suppress_charge_enter();