Jelajahi Sumber

fixed switch statement

rdefeo 1 tahun lalu
induk
melakukan
09f7507e5b
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      actions/action_subghz.c

+ 2 - 1
actions/action_subghz.c

@@ -36,7 +36,7 @@ static FuriHalSubGhzPreset action_subghz_get_preset_name(const char* preset_name
 static const SubGhzDevice* action_subghz_get_device(uint32_t* device_ind) {
 static const SubGhzDevice* action_subghz_get_device(uint32_t* device_ind) {
     const SubGhzDevice* device = NULL;
     const SubGhzDevice* device = NULL;
     switch(*device_ind) {
     switch(*device_ind) {
-    case 1:
+    case 1: {
         // Power on the external antenna
         // Power on the external antenna
         uint8_t attempts = 5;
         uint8_t attempts = 5;
         while(--attempts > 0) {
         while(--attempts > 0) {
@@ -52,6 +52,7 @@ static const SubGhzDevice* action_subghz_get_device(uint32_t* device_ind) {
         }
         }
         device = subghz_devices_get_by_name(SUBGHZ_DEVICE_CC1101_EXT_NAME);
         device = subghz_devices_get_by_name(SUBGHZ_DEVICE_CC1101_EXT_NAME);
         break;
         break;
+    }
     default:
     default:
         device = subghz_devices_get_by_name(SUBGHZ_DEVICE_CC1101_INT_NAME);
         device = subghz_devices_get_by_name(SUBGHZ_DEVICE_CC1101_INT_NAME);
         break;
         break;