feat(ui): driver settings and code updates over ESP-NOW

Settings gets a Driver tab (/settings/editor). It sends a driver its settings through PUT /devices/<id>, which now forwards name too, and runs the tools/driver_ota.py session from the browser. The firmware embeds the led-driver files and a manifest of their hashes, because crypto.subtle is unavailable over plain HTTP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-04 23:51:41 +13:00
1 parent 2f0c26e9b8
commit 06953028ab
11 files changed
+421 -8

No files matched your search

+3
View File
@@ -411,6 +411,9 @@ static esp_err_t settings_handler_inner(httpd_req_t *req)
if (n == 2 && strcmp(seg[1], "page") == 0 && req->method == HTTP_GET) {
return web_send_page(req, "settings.html");
}
if (n == 2 && strcmp(seg[1], "editor") == 0 && req->method == HTTP_GET) {
return web_send_page(req, "settings_editor.html");
}
if (n == 1 && req->method == HTTP_GET) {
return api_json(req, "200 OK", store_settings(), false);
}
+1 -1
View File
@@ -151,7 +151,7 @@ static esp_err_t create_device(httpd_req_t *req)
}
// Settings a driver keeps in its own settings.json and takes from a device_config message
static const char *const DEVICE_CONFIG_KEYS[] = { "max_brightness", "num_leds", "color_order", "startup_mode", "reversed" };
static const char *const DEVICE_CONFIG_KEYS[] = { "name", "max_brightness", "num_leds", "color_order", "startup_mode", "reversed" };
// The driver settings present in a device update, or NULL when it has none. Caller deletes the result.
static cJSON *device_config_from(const cJSON *body)