Parcourir la source

Auto switch to internal radio if external radio is not available

MX il y a 3 ans
Parent
commit
19153c7239
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  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
     // Enable power for External CC1101 if it is connected
     furi_hal_subghz_enable_ext_power();
     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();
     furi_hal_power_suppress_charge_enter();