Browse Source

修改存文件相关内容

wanghechen 8 months ago
parent
commit
dd23f43873

+ 1 - 1
.gitignore

@@ -25,7 +25,7 @@ README.en.md
 
 # Libraries
 *.lib
-*.a
+# *.a
 *.la
 *.lo
 

BIN
components/FONT_LIB/libGT5DL32A3W.a


+ 3 - 8
components/LORA/LORA.c

@@ -2468,18 +2468,14 @@ gpio_reset_pin(LORA_POWER_PIN);
 
 int  reson = is_wake_up_reson();  //返回唤醒的原因
 
-
-if ((reson != ESP_SLEEP_WAKEUP_ULP) && (reson != ESP_SLEEP_WAKEUP_TIMER)&& (reson != ESP_SLEEP_WAKEUP_EXT0)) 
+  printf("wake up lora cmd init , reson = %d\r\n",reson);//软件复位是2,硬件复位是0
+if ((reson != ESP_SLEEP_WAKEUP_ULP) && (reson != ESP_SLEEP_WAKEUP_TIMER)/*&& (reson != ESP_SLEEP_WAKEUP_EXT0)*/) //ota完后软件复位,重新配置lora
 {
     printf("lora cmd init start\r\n");
 
     xTaskCreate(tx_task, "uart_tx_task", 1024*2, NULL, configMAX_PRIORITIES-1, &lora_uart_tx_handle);
-
 }else
 {
-  printf("wake up lora cmd init not need init\r\n");
-
-
   lora.lora_mode = Lora_UART_Mode;   //复位直接进入透传模式
 }
 #endif
@@ -2645,11 +2641,10 @@ int get_lora_busy_pin()
 
 void lora_set_power_level(int level)
 {
-  #if 1
+  #if 0
     gpio_set_level(LORA_POWER_PIN,level);
   #else
     rtc_gpio_set_level(LORA_POWER_PIN, level);
-
   #endif
 }
 

+ 0 - 10
components/button/user_button.c

@@ -380,16 +380,6 @@ static void power_long_press_hold_cb(void *arg,void *usr_data)
 
     switch ((int)hold_cnt)
     {
-    case 1:
-    {
-         ESP_LOGE(LOG_TAG,"case 1");
-         button_info = POWER_ON_INTO_DIS_RIGHT;
-        if(xQueueSend(button_Data_queue,&button_info,0) != true)
-            {
-                ESP_LOGE(LOG_TAG,"queue send is fail");
-                return;
-            }
-    }
     case 2://设置模式,长按3s进入
         if(is_setting && is_reset_net)
         {

+ 5 - 2
main/esp_ble_ota.c

@@ -15,6 +15,7 @@
 #include "nvs_flash.h"
 #include "esp_bt.h"
 #include "ble_ota.h"
+#include "SPIFFS.h"
 
 TimerHandle_t ota_timer_handle;
 bool is_adv = false;
@@ -265,12 +266,14 @@ ota_task(void *arg)
         ESP_LOGE(TAG, "esp_ota_set_boot_partition failed!\r\n");
         goto OTA_ERROR;
     }
-    ESP_LOGE(TAG, "存数据 esp_restart");
-    #include "SPIFFS.h"
+
+
     // extern Machine_info_t   Machine_info;
     // spiffs_write(&Machine_info);
     extern void reset_default(bool is_dis);
     reset_default(false);
+    ESP_LOGE(TAG, "存数据 esp_restart");
+    vTaskDelay(500 / portTICK_PERIOD_MS);
     esp_restart();
 
 OTA_ERROR:

+ 1 - 1
main/yc_terminal.c

@@ -1789,7 +1789,7 @@ static void button_task(void* arg)
                     // // spiffs_read(&Machine_info);
 
 
-                    // vTaskDelay(300 / portTICK_PERIOD_MS);
+                    vTaskDelay(300 / portTICK_PERIOD_MS);
                     reset_default(true);
                     reset_lora();
                     vTaskDelay(300 / portTICK_PERIOD_MS);