Commit 2ab26c75 authored by 李延凯's avatar 李延凯

feat: 添加为wifi启动函数调用, 优化wifi任务的ram占用

parent 82ea894f
......@@ -27,7 +27,7 @@
#include "app_Ble_User.h"
#include "app_BT_User.h"
#include "bt_app_hf.h"
#include "wifi_service.h"
// const float Inter_SW = 1.1;
......@@ -94,7 +94,7 @@ static void Sys_Run_Tasks(void *arg)
gatts_Ble_User_Task_Event_Del();
vTaskDelay(300);
gatts_App_Ble_DeInit();
// simple_ota_main();
(void)wifi_turn_on();
Wifi_OTA_Request = 2;
}
......@@ -128,11 +128,6 @@ static void Sys_Run_Tasks(void *arg)
}
}
if(Wifi_OTA_Request == 2)
{
// break;
}
vTaskDelay(1);
}
......
......@@ -1144,8 +1144,8 @@ CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y
# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set
CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
CONFIG_ESP32_WIFI_IRAM_OPT=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=y
# CONFIG_ESP32_WIFI_IRAM_OPT is not set
# CONFIG_ESP32_WIFI_RX_IRAM_OPT is not set
CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y
CONFIG_ESP32_WIFI_ENABLE_WPA3_OWE_STA=y
# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set
......
......@@ -91,7 +91,7 @@ static esp_err_t http_ota_app_handler(httpd_req_t *req)
while (remaining > 0)
{
/* Read the data for the request */
if ((ret = httpd_req_recv(req, http_buffer, MIN(remaining, sizeof(http_buffer)))) <= 0)
if ((ret = httpd_req_recv(req, http_buffer, MIN(remaining, MAX_CACHE_SIZE))) <= 0)
{
if (ret == HTTPD_SOCK_ERR_TIMEOUT)
{
......@@ -129,7 +129,7 @@ static esp_err_t http_ota_app_handler(httpd_req_t *req)
{
remaining -= ret;
recv_block++;
if ((recv_block % 4) == 0)
if ((recv_block % 16) == 0)
{
percent = 100.0 - (double)(remaining * 100) / (double)total;
ESP_LOGI(TAG, "---- ota process: %.2f%%", percent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment