MX преди 2 години
родител
ревизия
12ffa2a5be
променени са 3 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 1 0
      base_pack/mousejacker/mousejacker.c
  2. 1 0
      base_pack/nrfsniff/nrfsniff.c
  3. 1 0
      non_catalog_apps/nrf24channelscanner/nrf24channelscanner.c

+ 1 - 0
base_pack/mousejacker/mousejacker.c

@@ -319,6 +319,7 @@ int32_t mousejacker_app(void* p) {
     }
     stream_free(plugin_state->file_stream);
 
+    uint8_t attempts = 0;
     bool otg_was_enabled = furi_hal_power_is_otg_enabled();
     while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
         furi_hal_power_enable_otg();

+ 1 - 0
base_pack/nrfsniff/nrfsniff.c

@@ -327,6 +327,7 @@ int32_t nrfsniff_app(void* p) {
         return 255;
     }
 
+    uint8_t attempts = 0;
     bool otg_was_enabled = furi_hal_power_is_otg_enabled();
     while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
         furi_hal_power_enable_otg();

+ 1 - 0
non_catalog_apps/nrf24channelscanner/nrf24channelscanner.c

@@ -168,6 +168,7 @@ int32_t nrf24channelscanner_main(void* p) {
     Event 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();
     while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
         furi_hal_power_enable_otg();