diff --git a/doc/en/web_apps.rst b/doc/en/web_apps.rst index 463e8516bb..7b4c18233a 100644 --- a/doc/en/web_apps.rst +++ b/doc/en/web_apps.rst @@ -3,29 +3,74 @@ Web Apps espp ships a growing set of **self-contained browser tools** that talk directly to your hardware using the Web Serial / WebUSB / WebHID APIs (Chromium-based -browsers) — nothing to install. They are hosted alongside this documentation: +browsers) — nothing to install, no CDN, no network access. They are hosted +alongside this documentation: **→** `esp-cpp.github.io/espp/apps `_ -Highlights: - -- **Board Console & ESP Flasher** — a general-purpose Web Serial monitor with - reset / bootloader controls and an `esptool-js`-based firmware flasher. -- **ODrive ASCII Web Serial console** and **WebUSB console** — interactive - terminals with quick motor controls and live plotting for the - :doc:`odrive_ascii ` protocol server. -- **ODrive Native WebUSB control panel** — endpoint-tree browser, live - multi-signal plots, and typed read/write for the ODrive native (Fibre) - binary protocol. -- **WebHID input visualizer** — decoded buttons / sticks / raw reports for any - HID device, driven entirely by its report descriptor. -- **Core Dump Console** — crash summary, ``core.elf`` download, client-side - nearest-symbol backtrace resolution and erase for the - :doc:`coredump ` component's stream service, over WebUSB - or Web Serial (where it doubles as a serial monitor). +Each app is a single HTML file; it also runs offline straight from its +``components//web/`` directory via a ``file://`` URL. + +Device hub & dispatcher-module consoles +======================================= + +Devices built on the :doc:`dispatcher ` / ``stream_frame`` +protocol expose one or more *modules* over a single USB vendor (WebUSB) +interface. Start from the hub, which discovers what a device runs and links to +the matching console; each console also confirms its module is present when it +connects. + +- **Device Hub** (``dispatcher_hub.html``) — connect over WebUSB / Web Serial, + query the device's advertised modules, and open each module's console. +- **OTA Console** (``ota_console.html``) — stream a firmware ``.bin`` to the + :doc:`ota ` component with live progress and a rollback-aware finish. +- **Core Dump Console** (``coredump_console.html``) — crash summary, ``core.elf`` + download, client-side nearest-symbol backtrace resolution, and erase for the + :doc:`coredump ` service (over WebUSB or Web Serial, where + it doubles as a serial monitor). +- **BLDC Haptics Console** (``haptics_console.html``) — live dial, detent + presets, and control commands for the :doc:`bldc_haptics + ` example. +- **CAN Bridge Console** (``can_bridge_console.html``) — configure the bus, send + CAN frames, and watch a live monitor of received traffic for a USB↔CAN bridge. +- **DS402 Drive Panel** (``ds402_panel.html``) — in-browser CANopen SDO client + plus a DS402 state machine / control panel for a :doc:`canopen + ` drive. +- **MCP266 Console** (``mcp266_console.html``) — status, motor, and configuration + controls for the :doc:`mcp266 ` motor controller. + +Motor control +============= + +- **ODrive ASCII console** — interactive terminals with quick motor controls and + live position / velocity plotting for the :doc:`odrive_ascii + ` protocol, over Web Serial + (``odrive_console.html``) or WebUSB (``odrive_webusb_console.html``). +- **ODrive Native Control Panel** (``odrive_control_panel.html``) — endpoint-tree + browser, live multi-signal plots, and typed read/write for the ODrive native + (Fibre-endpoint) binary protocol. +- **WebHID Input Visualizer** (``hid_visualizer.html``) — decoded buttons / + sticks / raw reports for any HID device, driven entirely by its report + descriptor. + +CAN & serial adapters +===================== + +- **Basicmicro MCP Console** (``mcp_console.html``) — Web Serial console for the + :doc:`Basicmicro ` MCP packet-serial motor + controllers. +- **CAN Bus Console** (``can_console.html``) — LAWICEL slcan serial monitor for a + USB-CAN adapter (see :doc:`twai `). + +General +======= + +- **Board Console & ESP Flasher** (``board_console.html``) — general-purpose Web + Serial monitor with reset / bootloader controls and an ``esptool-js``-based + firmware flasher. Adding a new app ----------------- +================ Any single-file app placed in a component's ``web/`` directory (``components//web/*.html``, plus optional same-origin ``.js`` assets) is diff --git a/doc/generate_apps_index.py b/doc/generate_apps_index.py index 6938734c34..ccac81653c 100644 --- a/doc/generate_apps_index.py +++ b/doc/generate_apps_index.py @@ -28,20 +28,24 @@ def extract(path: Path): def main() -> int: apps_dir = Path(sys.argv[1]) - apps = sorted(p for p in apps_dir.glob("*.html") if p.name != "index.html") + apps = [p for p in apps_dir.glob("*.html") if p.name != "index.html"] if not apps: print(f"no apps found in {apps_dir}", file=sys.stderr) return 1 + # Sort by display title (case-insensitive) so the grid reads alphabetically + # regardless of file name. + entries = sorted(((extract(p), p.name) for p in apps), + key=lambda e: e[0][0].casefold()) cards = [] - for app in apps: - title, desc = extract(app) + for (title, desc), name in entries: cards.append( - f' \n' + f' \n' f"

{html.escape(title)}

\n" f"

{html.escape(desc) if desc else ' '}

\n" f"
") - print(f" indexed: {app.name} -> {title}") + print(f" indexed: {name} -> {title}") + count = len(entries) page = f""" @@ -81,9 +85,10 @@ def main() -> int:

espp Web Apps

-

Self-contained browser tools hosted with the espp documentation. - They use the Web Serial / WebUSB / WebHID APIs (Chromium-based browsers) - and talk directly to your hardware — nothing to install.

+

{count} self-contained browser tools hosted with the espp + documentation. They use the Web Serial / WebUSB / WebHID APIs + (Chromium-based browsers) and talk directly to your hardware — nothing + to install.

{chr(10).join(cards)}