From 035ecb85c3513be2b6ab5c515db082cb7fee8f97 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期四, 22 五月 2025 18:11:06 +0800
Subject: [PATCH] 修改bug,io改为不拉

---
 01_SDK/nimble/samples/bluetooth/ble_central_periph_ota/src/app_ble.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/01_SDK/nimble/samples/bluetooth/ble_central_periph_ota/src/app_ble.c b/01_SDK/nimble/samples/bluetooth/ble_central_periph_ota/src/app_ble.c
index e388883..369b728 100644
--- a/01_SDK/nimble/samples/bluetooth/ble_central_periph_ota/src/app_ble.c
+++ b/01_SDK/nimble/samples/bluetooth/ble_central_periph_ota/src/app_ble.c
@@ -110,7 +110,7 @@
     for(aa=0;aa<blequeue.totalnum;aa++)
     {
     blequeue.time[aa]++;
-        if(blequeue.time[aa]>3)
+        if(blequeue.time[aa]>4)
         {
            for(bb=aa;bb<blequeue.totalnum;bb++)
             {
@@ -118,10 +118,12 @@
                 blequeue.rssi[bb]=blequeue.rssi[bb+1];
                 blequeue.time[bb]=blequeue.time[bb+1];
             }
+            blequeue.totalnum--;
         }
     }
 }
 static TaskHandle_t xTaskToNotify = NULL;
+uint16_t test;
 static void gpio_p02_input_callback(HAL_GPIO_IntMode intMode)
 {
     BaseType_t xHigherPriorityTaskWoken = pdTRUE;
@@ -146,6 +148,7 @@
 //                shengji_start();
                 #endif
                 send_flag=1;
+                test++;
                 
         }
 }
@@ -157,7 +160,7 @@
     /* Init GPIO P06 to digital input mode */
     HAL_GPIO_InitTypeDef GPIO_InitStruct = {
         .mode   = HAL_GPIO_MODE_INPUT_DIGITAL,
-        .pull   = HAL_GPIO_PULL_UP,
+        .pull   = HAL_GPIO_PULL_DISABLE,
     };
     HAL_GPIO_Init(P0_2, &GPIO_InitStruct);
 
@@ -227,6 +230,7 @@
     {
     Spi_Zubao_Send();
     send_flag=0;    
+//    HAL_GPIO_WritePin(P0_2,HAL_GPIO_LEVEL_HIGH);  
     }
 
 }

--
Gitblit v1.9.3