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:
Sebastien
2019-09-23 00:21:37 -04:00
13 changed files with 282 additions and 61 deletions

View File

@@ -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

View File

@@ -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 */

View File

@@ -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