mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
Merge branch 'Over_The_Air_Update' of
https://github.com/sle118/squeezelite-esp32.git into Over_The_Air_Update Conflicts: components/wifi-manager/wifi_manager.c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
idf_component_register(SRCS "bt_app_core.c" "bt_app_sink.c" "bt_app_source.c"
|
||||
INCLUDE_DIRS . ../tools/
|
||||
INCLUDE_DIRS "." "../tools/"
|
||||
REQUIRES esp_common
|
||||
PRIV_REQUIRES freertos bt io nvs_flash esp32 spi_flash newlib log console pthread
|
||||
)
|
||||
|
||||
@@ -794,4 +794,4 @@ static void bt_app_av_state_disconnecting(uint16_t event, void *param)
|
||||
ESP_LOGE(TAG,"%s unhandled evt %d", __func__, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@
|
||||
#
|
||||
|
||||
CFLAGS += -I$(COMPONENT_PATH)/../tools
|
||||
|
||||
#CFLAGS += -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(COMPONENT_PATH)/../tools
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#include "tcpip_adapter.h"
|
||||
|
||||
|
||||
static const char *TAG = "simple_ota_example";
|
||||
extern const uint8_t server_cert_pem_start[] asm("_binary_ca_cert_pem_start");
|
||||
extern const uint8_t server_cert_pem_end[] asm("_binary_ca_cert_pem_end");
|
||||
static const char *TAG = "squeezelite-ota";
|
||||
//extern const uint8_t server_cert_pem_start[] asm("_binary_ca_cert_pem_start");
|
||||
//extern const uint8_t server_cert_pem_end[] asm("_binary_ca_cert_pem_end");
|
||||
|
||||
#define OTA_URL_SIZE 256
|
||||
static char ota_status[31]={0};
|
||||
@@ -74,7 +74,7 @@ void ota_task(void *pvParameter, const char * bin_url)
|
||||
|
||||
esp_http_client_config_t config = {
|
||||
.url = bin_url,
|
||||
.cert_pem = (char *)server_cert_pem_start,
|
||||
//.cert_pem = (char *)server_cert_pem_start,
|
||||
.event_handler = _http_event_handler,
|
||||
};
|
||||
|
||||
|
||||
@@ -7,5 +7,7 @@
|
||||
# please read the SDK documents if you need to do this.
|
||||
#
|
||||
COMPONENT_EMBED_FILES := style.css code.js index.html bootstrap.min.css.gz jquery.min.js.gz popper.min.js.gz bootstrap.min.js.gz
|
||||
CFLAGS += -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG
|
||||
CFLAGS += -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG \
|
||||
-I$(COMPONENT_PATH)/../tools
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS += $(COMPONENT_PATH)/../tools
|
||||
|
||||
@@ -58,7 +58,6 @@ Contains the freeRTOS task and all necessary support
|
||||
#include "esp_app_format.h"
|
||||
|
||||
|
||||
|
||||
#ifndef SQUEEZELITE_ESP32_RELEASE_URL
|
||||
#define SQUEEZELITE_ESP32_RELEASE_URL "https://github.com/sle118/squeezelite-esp32/releases"
|
||||
#endif
|
||||
@@ -408,20 +407,11 @@ void wifi_manager_clear_ip_info_json(){
|
||||
void wifi_manager_generate_ip_info_json(update_reason_code_t update_reason_code){
|
||||
wifi_config_t *config = wifi_manager_get_wifi_sta_config();
|
||||
if(config){
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const char ip_info_json_format[] = ",\"ip\":\"%s\",\"netmask\":\"%s\",\"gw\":\"%s\",\"urc\":%d,\"project_name\":\"%s\",\"version\":\"%s\"";
|
||||
>>>>>>> branch 'Over_The_Air_Update' of https://github.com/sle118/squeezelite-esp32.git
|
||||
#if RECOVERY_APPLICATION
|
||||
<<<<<<< HEAD
|
||||
const char ip_info_json_format[] = ",\"ip\":\"%s\",\"netmask\":\"%s\",\"gw\":\"%s\",\"urc\":%d,\"project_name\":\"%s\",\"version\":\"%s\", \"ota_dsc\":\"%s\", \"ota_pct\":%d}\n";
|
||||
#else
|
||||
const char ip_info_json_format[] = ",\"ip\":\"%s\",\"netmask\":\"%s\",\"gw\":\"%s\",\"urc\":%d,\"project_name\":\"%s\",\"version\":\"%s\"}\n";
|
||||
#endif
|
||||
=======
|
||||
"\"ota_dsc\":\"%s\", \"ota_pct\":%d";
|
||||
"}\n";
|
||||
>>>>>>> branch 'Over_The_Air_Update' of https://github.com/sle118/squeezelite-esp32.git
|
||||
memset(ip_info_json, 0x00, JSON_IP_INFO_SIZE);
|
||||
const esp_app_desc_t* desc = esp_ota_get_app_description();
|
||||
/* to avoid declaring a new buffer we copy the data directly into the buffer at its correct address */
|
||||
|
||||
@@ -41,10 +41,15 @@ extern "C" {
|
||||
#include "esp_wifi_types.h"
|
||||
|
||||
#ifndef RECOVERY_APPLICATION
|
||||
#define RECOVERY_APPLICATION 0
|
||||
#error "RECOVERY_APPLICATION not defined. Defaulting to squeezelite"
|
||||
#endif
|
||||
|
||||
#if RECOVERY_APPLICATION==1
|
||||
#warning "compiling for recovery."
|
||||
#elif RECOVERY_APPLICATION==0
|
||||
#warning "compiling for squeezelite."
|
||||
#else
|
||||
#undef RECOVERY_APPLICATION
|
||||
#define RECOVERY_APPLICATION 1
|
||||
#error "unknown configuration"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user