Complete configuration Web UI with tabbed SPA (fw 0.8.2).
Add now-playing view with metadata polling, six-band EQ controls, full REST coverage, companion-chip badges, and gzip-www helper for the embedded setup page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-3
@@ -2,8 +2,8 @@
|
||||
|
||||
Open-source Hi-Fi DAB+/FM receiver firmware for the ESP32-S3.
|
||||
|
||||
**Status:** fw **0.8.1** — `IntegrationService` (boot preset recall, tune +
|
||||
audio profile); RDS/DLS now-playing metadata; **13** host tests; CI on `main`.
|
||||
**Status:** fw **0.8.2** — tabbed Web UI (now-playing, 6-band EQ, all APIs);
|
||||
`IntegrationService`; **13** host tests; CI on `main`.
|
||||
See [`docs/TODO.md`](docs/TODO.md) for the agent task list.
|
||||
|
||||
## Quick start
|
||||
@@ -31,6 +31,7 @@ Documentation gates (must exit 0 before merging; also enforced in CI):
|
||||
```bash
|
||||
doxygen Doxyfile
|
||||
python3 tools/check-manual-sync.py
|
||||
python3 tools/gzip-www.sh # after editing components/net/www/index.html
|
||||
```
|
||||
|
||||
Manual PDF (design + HTTP API + class reference):
|
||||
@@ -39,7 +40,7 @@ Manual PDF (design + HTTP API + class reference):
|
||||
cd docs/manual && latexmk -lualatex manual.tex
|
||||
```
|
||||
|
||||
## HTTP API (fw 0.8.1)
|
||||
## HTTP API (fw 0.8.2)
|
||||
|
||||
| Method | Path | Purpose |
|
||||
|--------|------|---------|
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace net {
|
||||
|
||||
namespace {
|
||||
constexpr char kTag[] = "SetupWebServer";
|
||||
constexpr char kFirmwareVersion[] = "0.8.1";
|
||||
constexpr char kFirmwareVersion[] = "0.8.2";
|
||||
constexpr unsigned kRebootDelaySec = 3;
|
||||
|
||||
extern const uint8_t www_index_html_gz_start[] asm(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+7
-14
@@ -12,8 +12,8 @@ errors, no plaintext secrets.
|
||||
|
||||
Working directory for all commands is `Software/`.
|
||||
|
||||
**Current firmware:** `0.8.1` — integration service (preset recall +
|
||||
audio profile), RDS/DLS metadata, CI gate.
|
||||
**Current firmware:** `0.8.2` — tabbed configuration Web UI (full API
|
||||
coverage), integration service, RDS/DLS metadata, CI gate.
|
||||
|
||||
---
|
||||
|
||||
@@ -59,18 +59,11 @@ audio profile re-apply, and last-preset NVS. Stub removed; `app_main` and
|
||||
|
||||
## P2 — User interface
|
||||
|
||||
### T6. Complete the configuration Web UI
|
||||
**Why:** `components/net/www/index.html` is functional but the
|
||||
requirement is an *elegant, essential* SPA. It should cover:
|
||||
Wi-Fi provisioning, station list management, tuner control (FM/DAB,
|
||||
seek, play), live EQ/volume/enhancement control, Bluetooth pairing, and
|
||||
now-playing metadata.
|
||||
**What:** a minimal single-page app served gzipped from flash, design
|
||||
tokens defined once (spacing, type scale, one accent), thin client over
|
||||
the existing typed JSON API. No heavy frameworks. No business logic in
|
||||
the UI.
|
||||
**Done when:** every API capability has a UI control; the page is served
|
||||
gzipped; no debug endpoint is exposed in a shipping build.
|
||||
### T6. Complete the configuration Web UI — **DONE (fw 0.8.2)**
|
||||
Tabbed SPA (`Now` / `Radio` / `Presets` / `Audio` / `BT` / `Wi‑Fi`):
|
||||
now-playing hero with 5 s metadata poll, six-band EQ sliders, all REST
|
||||
endpoints wired, companion-chip badges, `tools/gzip-www.sh` for the
|
||||
embedded gzip blob. No debug routes in `SetupWebServer`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -369,10 +369,13 @@ delegate to \texttt{AudioService}:
|
||||
\item \texttt{POST /api/audio/bass-enhance} --- same schema.
|
||||
\end{itemize}
|
||||
|
||||
The gzipped setup page (\texttt{components/net/www/index.html}) exposes master
|
||||
volume, Si4684/ESP32 path levels, and enhancement sliders; saving sends
|
||||
\texttt{PUT /api/audio/profile}, while slider release on enhancements sends
|
||||
the dedicated POST routes for immediate safeload + persist.
|
||||
The gzipped setup page (\texttt{components/net/www/index.html}) is a tabbed
|
||||
SPA: a \emph{Now playing} view (RDS/DLS metadata), tuner and preset panels,
|
||||
master/path levels, six PEQ band gain sliders, enhancement overlays, Bluetooth
|
||||
controls, and Wi-Fi provisioning. Saving sends \texttt{PUT /api/audio/profile};
|
||||
enhancement sliders call the dedicated POST routes for immediate safeload +
|
||||
persist. Regenerate \texttt{index.html.gz} with \texttt{tools/gzip-www.sh}
|
||||
after editing the HTML source.
|
||||
|
||||
\section{Typical usage patterns}
|
||||
\label{sec:adau1701-patterns}
|
||||
|
||||
@@ -36,7 +36,7 @@ Returns a health-check DTO serialised by
|
||||
|
||||
\begin{drnote}[Response schema]
|
||||
\begin{drcode}[JSON]
|
||||
{"status":"ok","fw":"0.8.1",
|
||||
{"status":"ok","fw":"0.8.2",
|
||||
"chips":{"si4684":true,"adau1701":true,"bt1035":true}}
|
||||
\end{drcode}
|
||||
\begin{itemize}
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerate the gzipped setup UI embedded by components/net/CMakeLists.txt.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SRC="${ROOT}/components/net/www/index.html"
|
||||
OUT="${ROOT}/components/net/www/index.html.gz"
|
||||
gzip -c -9 "$SRC" > "$OUT"
|
||||
echo "Wrote $(wc -c < "$OUT" | tr -d ' ') bytes -> ${OUT#"$ROOT"/}"
|
||||
Reference in New Issue
Block a user