added ability to upload new firmware from the browser.

This commit is contained in:
Sebastien
2020-02-14 13:33:50 -05:00
parent 69120bb4de
commit 8c3a52d40c
16 changed files with 432 additions and 351 deletions

View File

@@ -17,6 +17,7 @@
#include "esp_system.h"
#include "esp_sleep.h"
#include "esp_spi_flash.h"
#include "squeezelite-ota.h"
#include "driver/rtc_io.h"
#include "driver/uart.h"
#include "argtable3/argtable3.h"
@@ -27,7 +28,7 @@
#include "sdkconfig.h"
static const char * TAG = "ota";
extern esp_err_t start_ota(const char * bin_url);
static struct {
struct arg_str *url;
struct arg_end *end;
@@ -45,7 +46,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, NULL, 0);
if (err != ESP_OK) {
ESP_LOGE(TAG, "%s", esp_err_to_name(err));