MX 2 лет назад
Родитель
Сommit
79980cb8c3
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      nrf24channelscanner.c

+ 1 - 0
nrf24channelscanner.c

@@ -168,6 +168,7 @@ int32_t nrf24channelscanner_main(void* p) {
     Event event;
     Event event;
     FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(Event));
     FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(Event));
 
 
+    uint8_t attempts = 0;
     bool otg_was_enabled = furi_hal_power_is_otg_enabled();
     bool otg_was_enabled = furi_hal_power_is_otg_enabled();
     while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
     while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
         furi_hal_power_enable_otg();
         furi_hal_power_enable_otg();