Call the dashboard's messaging panel COMMS, to match its m key

This commit is contained in:
pgdalmeida 2026-09-25 15:33:39 +02:00
parent 50273779a3
commit 9dc9b90f6d
Signed by: pedro.almeida
GPG Key ID: D4A6C394DF13F1D7
9 changed files with 17 additions and 17 deletions

View File

@ -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. small PC at the top of a mast.
![The dashboard of tower 111, live](docs/images/readme/dashboard.png) ![The dashboard of tower 111, live](docs/images/readme/dashboard.png)
<sub>The dashboard of tower 111, captured live on 2026-09-25: both axes homed <sub>The dashboard of tower 111, captured live on 2026-09-25, seven minutes
and ready, the camera mid-sweep at waypoint 2 of 15, the orientation and after a restart: both axes homed and ready, the camera mid-sweep at waypoint 6
ambient sensors reporting, messages flowing to the broker, and the last of 15, the orientation and ambient sensors reporting, and every picture
self-test green.</sub> announced to the broker.</sub>
--- ---
@ -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` | | **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 | | **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 | | **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 | | **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 | | **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 | | **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 | | `s` / `x` | start / stop the capture sweep |
| `h` | home the gimbal | | `h` | home the gimbal |
| `r` | refresh: ask the firmware for a full status dump, re-read the sensor setup | | `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 | | `?` | the built-in help: every command, with examples |
| `:` | type a command, exactly as in the [command list](#everyday-commands) | | `:` | 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) | | `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) ![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 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. **Help** (`?`) - every command, grouped, with an explanation and an example.
The same text is available anywhere as `help` or `help <topic>`. The same text is available anywhere as `help` or `help <topic>`.

View File

@ -599,7 +599,7 @@ logs on stdout.
Dashboard panels: **Gimbal** (per-axis state, heading, encoder counts, flag badges, target), 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 **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 **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 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). 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 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 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. 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 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 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. - **Sensors** (`i`) — both sensors, in headed sections so every reading is attributable.
**MTi**: every channel with units — orientation (°), acceleration (m/s²), rate-of-turn **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 (rad/s), magnetic field (a.u.), `TEMP (internal)`, sample counter, plus an **IMU CONFIG** section

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 190 KiB

View File

@ -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/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 `<RemoteDevice>` 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/CameraSettingsXml.h](../include/fgc/CameraSettingsXml.h), [src/core/CameraSettingsXml.cpp](../src/core/CameraSettingsXml.cpp) | Parses the Viewer export's `<RemoteDevice>` 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/<tower>/…` 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/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/<tower>/…` 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/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/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()` | | [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()` |

View File

@ -16,7 +16,7 @@ class ScreenInteractive;
namespace fgc { namespace fgc {
// Full-screen FTXUI dashboard: sectioned, colored panels (gimbal, sensors, // 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 // 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. // UiSnapshot it pulls and forwards keystrokes/typed commands to the sink.
// //

View File

@ -177,7 +177,7 @@ const std::vector<HelpSection>& helpCatalog() {
}}, }},
{"Display", "Terminal dashboard keys (TUI only).", { {"Display", "Terminal dashboard keys (TUI only).", {
{"? / g / i / c / m", {"? / 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,", "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", "Esc cancels a running procedure. 'm' shows broker state, per-topic traffic",
"and the recent MQTT messages, including any dropped while offline."}}, "and the recent MQTT messages, including any dropped while offline."}},

View File

@ -624,7 +624,7 @@ Element connPanel(const ConnView& v) {
: v.mqtt_connected ? (text(" connected ") | color(Color::Green) | bold) : v.mqtt_connected ? (text(" connected ") | color(Color::Green) | bold)
: (text(" disconnected ") | color(Color::Red) | bold); : (text(" disconnected ") | color(Color::Red) | bold);
std::string mode = v.control_code == 0 ? "0 auto-sweep" : "1 directed"; 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("MQTT", hbox({mqtt, filler(), text(v.broker) | dim})),
labelRow("tower", text(v.tower)), labelRow("tower", text(v.tower)),
labelRow("control", hbox({text(mode), filler(), 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. // traffic, the counters, and a scrollable history of recent messages.
// //
// The history is the point of the view. `dropped` in particular has no other // 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)); scrollableBody(vbox(std::move(rows)), st));
} }