Full OTA refactor and other stability improvement

This commit is contained in:
Sebastien
2019-09-29 21:12:02 -04:00
parent 828aaf4760
commit 0ab1cd438b
14 changed files with 305 additions and 352 deletions

View File

@@ -7,7 +7,7 @@
CONDITIONS OF ANY KIND, either express or implied.
*/
#include "../squeezelite-ota/cmd_ota.h"
#include "cmd_ota.h"
#include <stdio.h>
#include <string.h>
@@ -27,7 +27,7 @@
#include "sdkconfig.h"
static const char * TAG = "platform_esp32";
extern void start_ota(const char * bin_url);
extern esp_err_t start_ota(const char * bin_url, bool bFromAppMain);
static struct {
struct arg_str *url;
struct arg_end *end;
@@ -45,9 +45,7 @@ static int perform_ota_update(int argc, char **argv)
esp_err_t err=ESP_OK;
ESP_LOGI(TAG, "Starting ota: %s", url);
start_ota(url);
start_ota(url,false);
if (err != ESP_OK) {
ESP_LOGE(TAG, "%s", esp_err_to_name(err));