feat: OTA über HTTP mit Trailer-Prüfung
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "net/nl_wifi.h"
|
||||
#include "sys/nl_app.h"
|
||||
#include "sys/nl_app_api.h"
|
||||
#include "sys/nl_ota.h"
|
||||
|
||||
#include "nl_version.h"
|
||||
|
||||
@@ -88,7 +89,7 @@ static void get_info(nl_sys_info_t *out)
|
||||
out->wifi_error = w.error;
|
||||
out->uptime_s = nl_app_now_ms() / 1000u;
|
||||
out->free_heap = tls_mem_get_avail_heapsize();
|
||||
out->last_ota_error = NULL;
|
||||
out->last_ota_error = nl_ota_last_error();
|
||||
}
|
||||
|
||||
static void factory_reset(void) { nl_app_request_factory_reset(); }
|
||||
@@ -100,11 +101,7 @@ static void ping(void)
|
||||
nl_app_unlock();
|
||||
}
|
||||
|
||||
static int fw_update(const char *url)
|
||||
{
|
||||
(void)url;
|
||||
return -1; /* OTA arrives in plan 3 */
|
||||
}
|
||||
static int fw_update(const char *url) { return nl_ota_start(url); }
|
||||
|
||||
const nl_api_ctx_t *nl_app_api_ctx(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user