Add web dashboard OTA upload with live progress.

Share UART OTA logic between CLI and serve via POST /api/ota, WebSocket progress events, and a dashboard upload UI showing the running partition.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 00:45:54 +02:00
co-authored by Cursor
parent 59ca269407
commit 4bf43d8a5e
6 changed files with 463 additions and 198 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func runServe(portName string, baud int, args []string) error {
go runPoller(link, portName, hub, *interval, stop)
mux := http.NewServeMux()
mountServeAPI(mux, link)
mountServeAPI(mux, link, hub)
mux.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) {
conn, err := wsUpgrader.Upgrade(w, r, nil)
if err != nil {