diff --git a/README.md b/README.md index 30c7cf6..ea5fe56 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ saves it, and tells the ground station about it - all day, unattended, on a small PC at the top of a mast. ![The dashboard of tower 111, live](docs/images/readme/dashboard.png) -The dashboard of tower 111, captured live on 2026-09-25: both axes homed -and ready, the camera mid-sweep at waypoint 2 of 15, the orientation and -ambient sensors reporting, messages flowing to the broker, and the last -self-test green. +The dashboard of tower 111, captured live on 2026-09-25, seven minutes +after a restart: both axes homed and ready, the camera mid-sweep at waypoint 6 +of 15, the orientation and ambient sensors reporting, and every picture +announced to the broker. --- @@ -209,7 +209,7 @@ press a key that acts. | **GIMBAL** `g` | each axis: its state (`READY`, `HOMING`, `ERROR`...), the angle it is at and the one it is heading for, the motor and encoder counts, and flags - `STILL`/`MOVE`, `STALL`, over-temperature `OT`, endstops `L`/`R` | | **SENSORS** `i` | the orientation sensor (roll, pitch, yaw) and the ambient temperature and humidity, each marked `live` or not | | **CAMERA** `c` | whether it is capturing and how fast, the active profile, and the last picture: which camera, where it pointed, how long ago | -| **CONNECTIVITY** `m` | the broker connection, the tower name the messages carry, the control mode | +| **COMMS** `m` | the broker connection, the tower name the messages carry, the control mode | | **LOG** | the latest log lines; warnings in yellow, errors in red. `PgUp` scrolls back, `End` follows again | | **ACTIVITY** | what is running right now (a sweep, a homing, a test) and the result of the last one | | **Key bar** | the keys that do something in this view | @@ -221,7 +221,7 @@ press a key that acts. | `s` / `x` | start / stop the capture sweep | | `h` | home the gimbal | | `r` | refresh: ask the firmware for a full status dump, re-read the sensor setup | -| `g` `i` `c` `m` | open the full-screen gimbal, sensors, camera or connectivity view; press it again to close | +| `g` `i` `c` `m` | open the full-screen gimbal, sensors, camera or comms view; press it again to close | | `?` | the built-in help: every command, with examples | | `:` | type a command, exactly as in the [command list](#everyday-commands) | | `p` | pause the display, so you can select and copy text (the program keeps running) | @@ -254,10 +254,10 @@ encoding, and the whole scan grid with the current waypoint marked. ![The camera view](docs/images/readme/camera.png) -**Connectivity** (`m`) - the broker connection, message counters, the topics +**Comms** (`m`) - the broker connection, message counters, the topics the tower listens and speaks on, and the most recent messages, exactly as sent. -![The connectivity view](docs/images/readme/connectivity.png) +![The comms view](docs/images/readme/comms.png) **Help** (`?`) - every command, grouped, with an explanation and an example. The same text is available anywhere as `help` or `help `. diff --git a/docs/configuration.md b/docs/configuration.md index 04f56cc..a46743f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -599,7 +599,7 @@ logs on stdout. Dashboard panels: **Gimbal** (per-axis state, heading, encoder counts, flag badges, target), **Sensors** (the **Xsens MTi** shows live roll/pitch/yaw once `enable_imu`; the ambient **SHT41** shows live temp/humidity once `enable_env`. The SHT41's is the **only** temperature on the main window: the MTi's -device-internal temp is diagnostic detail and appears solely in the expanded view), **Camera** (count, capture state, rate, last capture), **Connectivity** (MQTT state, +device-internal temp is diagnostic detail and appears solely in the expanded view), **Camera** (count, capture state, rate, last capture), **Comms** (MQTT state, broker, tower, control mode, target heading). Adding a panel later is a struct in `UiSnapshot.h` plus one node in [src/ui/TuiUi.cpp](../src/ui/TuiUi.cpp). @@ -612,10 +612,10 @@ one node in [src/ui/TuiUi.cpp](../src/ui/TuiUi.cpp). enabled), the active **profile** and the others available, the `profile_dir` and the exact XML applied, the per-profile `settle_wait_ms`, `rotation_deg` and the JPEG XL settings, plus live per-device telemetry (dimensions, streaming, frames, drops) and the scan grid. -- **Connectivity** (`m`) — broker, tower, client id, connection state and control mode, the +- **Comms** (`m`) — broker, tower, client id, connection state and control mode, the delivery counters (sent / failed / connects / losses), and a **history of the last MQTT messages** — time, topic leaf and payload — so a publish can be confirmed without a broker-side - subscriber. The compact Connectivity panel carries the `m` badge that opens it. + subscriber. The compact Comms panel carries the `m` badge that opens it. - **Sensors** (`i`) — both sensors, in headed sections so every reading is attributable. **MTi**: every channel with units — orientation (°), acceleration (m/s²), rate-of-turn (rad/s), magnetic field (a.u.), `TEMP (internal)`, sample counter, plus an **IMU CONFIG** section diff --git a/docs/images/readme/comms.png b/docs/images/readme/comms.png new file mode 100644 index 0000000..3723385 Binary files /dev/null and b/docs/images/readme/comms.png differ diff --git a/docs/images/readme/connectivity.png b/docs/images/readme/connectivity.png deleted file mode 100644 index 5227b60..0000000 Binary files a/docs/images/readme/connectivity.png and /dev/null differ diff --git a/docs/images/readme/dashboard.png b/docs/images/readme/dashboard.png index fb2af9f..d005d5a 100644 Binary files a/docs/images/readme/dashboard.png and b/docs/images/readme/dashboard.png differ diff --git a/docs/modules-reference.md b/docs/modules-reference.md index 8b0b003..e8999e6 100644 --- a/docs/modules-reference.md +++ b/docs/modules-reference.md @@ -32,7 +32,7 @@ Per-file reference for the refactored tree, plus the shared data structures. | [include/fgc/CameraProfile.h](../include/fgc/CameraProfile.h), [src/core/CameraProfile.cpp](../src/core/CameraProfile.cpp) | `loadCameraProfile` / `loadCameraProfiles`: one VimbaX settings XML per profile. Hashes the XML, regenerates the `.txt` record when it changes, and reports which settings moved. A missing XML throws — the record is never a fallback | | [include/fgc/CameraSettingsXml.h](../include/fgc/CameraSettingsXml.h), [src/core/CameraSettingsXml.cpp](../src/core/CameraSettingsXml.cpp) | Parses the Viewer export's `` features (ordered, selector-aware), renders the human-readable `.txt` record, reads one back, and diffs two settings lists. Used for display and change detection only — never to configure a camera | | [include/fgc/ChannelTopics.h](../include/fgc/ChannelTopics.h), [src/core/ChannelTopics.cpp](../src/core/ChannelTopics.cpp) | The MQTT wire format in one place: topic builders for the `GGS/FWT//…` tree and the `CamEvent`/status payload builders. Pure, so the documented format is unit-tested rather than assembled inline at each publish site | -| [include/fgc/ChannelHistory.h](../include/fgc/ChannelHistory.h), [src/core/ChannelHistory.cpp](../src/core/ChannelHistory.cpp) | Ring buffer of recently published messages (time, topic, payload, outcome) plus the delivery counters — sent, failed, connects, losses, last status. Feeds the expanded Connectivity view so a publish can be confirmed without a broker-side subscriber | +| [include/fgc/ChannelHistory.h](../include/fgc/ChannelHistory.h), [src/core/ChannelHistory.cpp](../src/core/ChannelHistory.cpp) | Ring buffer of recently published messages (time, topic, payload, outcome) plus the delivery counters — sent, failed, connects, losses, last status. Feeds the expanded Comms view so a publish can be confirmed without a broker-side subscriber | | [include/fgc/Hash.h](../include/fgc/Hash.h), [src/core/Hash.cpp](../src/core/Hash.cpp) | FNV-1a 64 over a string or a file, with an algorithm-prefixed label. Change detection for the profile records, deliberately not a crypto hash | | [include/fgc/CaptureScheduler.h](../include/fgc/CaptureScheduler.h), [src/core/CaptureScheduler.cpp](../src/core/CaptureScheduler.cpp) | Capture state machine over the interfaces; injectable clock; `setGeometry` adopts a recalibration | | [include/fgc/Application.h](../include/fgc/Application.h), [src/core/Application.cpp](../src/core/Application.cpp) | Factory (real vs mock, headless vs TUI), wiring, control loop, `gimbal …` commands, background-result polling, `buildSnapshot()` | diff --git a/include/fgc/ui/TuiUi.h b/include/fgc/ui/TuiUi.h index aa64519..90e5fe4 100644 --- a/include/fgc/ui/TuiUi.h +++ b/include/fgc/ui/TuiUi.h @@ -16,7 +16,7 @@ class ScreenInteractive; namespace fgc { // Full-screen FTXUI dashboard: sectioned, colored panels (gimbal, sensors, -// camera, connectivity) updated in place, a scrolling log pane fed from a Logger +// camera, comms) updated in place, a scrolling log pane fed from a Logger // sink, and a nano-style key bar. Pure observer + command source: it renders the // UiSnapshot it pulls and forwards keystrokes/typed commands to the sink. // diff --git a/src/core/HelpText.cpp b/src/core/HelpText.cpp index 6827edd..bcf4267 100644 --- a/src/core/HelpText.cpp +++ b/src/core/HelpText.cpp @@ -177,7 +177,7 @@ const std::vector& helpCatalog() { }}, {"Display", "Terminal dashboard keys (TUI only).", { {"? / g / i / c / m", - "Toggle the Help, Gimbal, Sensors, Camera and Connectivity overlays.", { + "Toggle the Help, Gimbal, Sensors, Camera and Comms overlays.", { "An overlay takes the full terminal height. Esc closes it; with none open,", "Esc cancels a running procedure. 'm' shows broker state, per-topic traffic", "and the recent MQTT messages, including any dropped while offline."}}, diff --git a/src/ui/TuiUi.cpp b/src/ui/TuiUi.cpp index 2f0dae9..e06563f 100644 --- a/src/ui/TuiUi.cpp +++ b/src/ui/TuiUi.cpp @@ -624,7 +624,7 @@ Element connPanel(const ConnView& v) { : v.mqtt_connected ? (text(" connected ") | color(Color::Green) | bold) : (text(" disconnected ") | color(Color::Red) | bold); std::string mode = v.control_code == 0 ? "0 auto-sweep" : "1 directed"; - return panel("[m] CONNECTIVITY", Color::Green, vbox({ + return panel("[m] COMMS", Color::Green, vbox({ labelRow("MQTT", hbox({mqtt, filler(), text(v.broker) | dim})), labelRow("tower", text(v.tower)), labelRow("control", hbox({text(mode), filler(), @@ -633,7 +633,7 @@ Element connPanel(const ConnView& v) { })); } -// Expanded connectivity view ('m'): broker state, the five topics with their last +// Expanded comms view ('m'): broker state, the five topics with their last // traffic, the counters, and a scrollable history of recent messages. // // The history is the point of the view. `dropped` in particular has no other @@ -724,7 +724,7 @@ Element connDetailPanel(const ConnView& v, ScrollState& st) { } } - return window(overlayTitle("CONNECTIVITY", "m/Esc:close", st, Color::Green), + return window(overlayTitle("COMMS", "m/Esc:close", st, Color::Green), scrollableBody(vbox(std::move(rows)), st)); }