diff --git a/FEATURES.md b/FEATURES.md index 1f4d86c0..300128d7 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -441,7 +441,7 @@ Sequencing: hardware duty-cycle RX and APC are both done and in field test on `feat/power-saving`; see the status block at the top of this entry for what's left (PPK2 current measurement, multi-hop APC gating). -### ✅ Companion repeater + politeness knobs + diagnostics +### ✅ Companion repeater + forwarding filters + diagnostics On-device repeater for the Solo companion, scoped to the SX1262 boards (Wio Tracker L1 OLED/e-ink, GAT562 30S). All on `feature/companion-repeater-presets`. @@ -478,7 +478,7 @@ Tracker L1 OLED/e-ink, GAT562 30S). All on `feature/companion-repeater-presets`. outside what's legal for wherever the companion's own network already is. `LORA_FREQ/BW/SF/CR` fallback `#define`s moved from `MyMesh.h` to `NodePrefs.h` so `DataStore.cpp`'s migration code can see them too. -- **Politeness knobs** (all opt-in, default off, flood-only — a direct route's +- **Forwarding filters** (all opt-in, default off, flood-only — a direct route's named next hop is never dropped). Shown only while the repeater is on: - **Skip advert** — don't re-flood adverts (highest-volume flood). - **Max hops** — drop a flood past N hops. diff --git a/docs/solo_features/tools_screen/tools_screen.md b/docs/solo_features/tools_screen/tools_screen.md index 1642c52d..28aa3683 100644 --- a/docs/solo_features/tools_screen/tools_screen.md +++ b/docs/solo_features/tools_screen/tools_screen.md @@ -342,6 +342,4 @@ The five flood filters are **opt-in** (default OFF, so a plain repeater is unaff While the repeater is on, a **»** indicator appears in the status bar (same blink convention as the auto-advert and trail markers) so you can tell it's relaying at a glance. Two radio settings are also overridden while relaying and restored afterwards: **Settings › Radio › Pwr save** is forced off (a repeater must listen continuously) and **Auto pwr** is forced off (a repeater holds full TX power for consistent relay reach). Both show `--` in Settings while the repeater is on. -Live forwarding stats — **Forwarded**, **Pool free**, **Queue** — are shown on **Tools › Diagnostics**. - -While the repeater is ON, the bottom of the screen shows live stats: **Forwarded** (packets actually re-transmitted — reflects Suppress dup), **Pool free**, and **Queue**. The same numbers appear, alongside the full device picture, in **Tools › Diagnostics**. +Live forwarding stats — **Forwarded**, **Pool free**, **Queue** — are shown on **Tools › Diagnostics** (this screen is config-only). diff --git a/examples/companion_radio/DataStore.cpp b/examples/companion_radio/DataStore.cpp index 97d11075..46a66623 100644 --- a/examples/companion_radio/DataStore.cpp +++ b/examples/companion_radio/DataStore.cpp @@ -336,7 +336,7 @@ void DataStore::loadPrefsInt(const char *filename, NodePrefs& _prefs, double& no rd(&_prefs.bot_quiet_end, sizeof(_prefs.bot_quiet_end)); rd(_prefs.bot_trigger_ch, sizeof(_prefs.bot_trigger_ch)); rd(_prefs.user_radio_presets, sizeof(_prefs.user_radio_presets)); - // → 0xC0DE000E: repeater politeness knobs. On a pre-E file the bytes here are + // → 0xC0DE000E: repeater forwarding-filter knobs. On a pre-E file the bytes here are // that file's own sentinel tail, so clamp every out-of-range value back to its // "off" default (same stray-byte handling as the fields below). rd(&_prefs.repeat_skip_adverts, sizeof(_prefs.repeat_skip_adverts)); diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index a59a1095..91259d3d 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -283,7 +283,7 @@ int MyMesh::calcRxDelay(float score, uint32_t air_time) const { uint32_t MyMesh::getRetransmitDelay(const mesh::Packet *packet) { uint32_t t = (_radio->getEstAirtimeFor(packet->getPathByteLen() + packet->payload_len + 2) * 0.5f); uint32_t d = getRNG()->nextInt(0, 5*t + 1); - // Politeness yield (Settings > Radio): scale the flood retransmit delay so a + // Yield filter (Tools > Repeater): scale the flood retransmit delay so a // mobile companion waits longer and lets better-sited fixed repeaters win the // flood first. Only forwarded floods reach here — own sends pass their own // delay to sendFlood() — so this never slows the companion's own traffic. @@ -556,7 +556,7 @@ bool MyMesh::isRepeatLooped(const mesh::Packet* packet) const { bool MyMesh::allowPacketForward(const mesh::Packet* packet) { if (_prefs.client_repeat == 0) return false; - // "Politeness" filters (Settings > Radio) — all default off, so a plain repeater + // Forwarding filters (Tools > Repeater) — all default off, so a plain repeater // is unaffected. Flood-only by design: on a direct route this node is the named // next hop, so dropping there would kill delivery with no alternate path, while // dropping a flood copy just trims redundancy other nodes still carry. @@ -1848,7 +1848,7 @@ void MyMesh::handleCmdFrame(size_t len) { } // Dedicated-band requirement for app-driven repeat disabled, to match the - // on-device Repeater toggle (Settings > Radio), which repeats on whatever + // on-device Repeater toggle (Tools > Repeater), which repeats on whatever // frequency is already set with no band restriction. Uncomment to restore // the old behaviour (repeat=1 only accepted on repeat_freq_ranges, i.e. // 433.000/869.495/918.000 MHz exactly, by default). diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index de6849eb..82b745b6 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -143,7 +143,7 @@ protected: bool allowPacketForward(const mesh::Packet* packet) override; bool isRepeatLooped(const mesh::Packet* packet) const; // Overhear suppression only makes sense while repeating; gated behind its own - // opt-in pref (Settings > Radio > Suppress dup). + // opt-in pref (Tools > Repeater > Suppress dup). bool wantsOverhearSuppress() const override { return _prefs.client_repeat && _prefs.repeat_suppress_dup; } void sendFloodScoped(const TransportKey& scope, mesh::Packet* pkt, uint32_t delay_millis); diff --git a/examples/companion_radio/NodePrefs.h b/examples/companion_radio/NodePrefs.h index 3007d8af..0683c9e3 100644 --- a/examples/companion_radio/NodePrefs.h +++ b/examples/companion_radio/NodePrefs.h @@ -171,8 +171,9 @@ struct NodePrefs { // persisted to file // shows ✗. 0 = no auto-resend (single attempt). Default 2. uint8_t dm_resend_count; - // User-saved radio presets (Settings > Radio > Preset > "Save current..."). - // name[0] == '\0' marks an empty slot. + // User-saved radio presets, written by the "Save current..." entry in the + // shared preset picker (Settings > Radio and Tools > Repeater both populate + // these same slots). name[0] == '\0' marks an empty slot. struct UserRadioPreset { char name[16]; float freq; @@ -183,9 +184,9 @@ struct NodePrefs { // persisted to file static const uint8_t USER_RADIO_PRESET_MAX = 4; UserRadioPreset user_radio_presets[USER_RADIO_PRESET_MAX]; - // Repeater "politeness" — only consulted when client_repeat is on, via + // Repeater forwarding filters — only consulted when client_repeat is on, via // MyMesh::allowPacketForward(). Both default to off (0) so behaviour is - // unchanged until the user opts in (Settings > Radio). + // unchanged until the user opts in (Tools > Repeater). // repeat_skip_adverts: 1 = don't re-flood ADVERT packets (the highest-volume // flood traffic); messages/acks still relay. // repeat_max_hops: drop a flood packet once it has already travelled this diff --git a/examples/companion_radio/ui-new/DiagnosticsScreen.h b/examples/companion_radio/ui-new/DiagnosticsScreen.h index b1cdb8a4..36a73bed 100644 --- a/examples/companion_radio/ui-new/DiagnosticsScreen.h +++ b/examples/companion_radio/ui-new/DiagnosticsScreen.h @@ -9,13 +9,14 @@ extern MyMesh the_mesh; -// Single-screen device diagnostics: packet counts by category (RX/TX), radio -// totals, uptime, heap and stack headroom. Built from Dispatcher's per-type -// counters (Mesh.h/Dispatcher.cpp) — grouped into a handful of categories -// rather than all 16 raw PAYLOAD_TYPE_* values, so it stays readable on a -// 128x64 OLED without needing the full type list. Falls back to scrolling -// (same drawList-style indicator as every other screen) on screens too small -// to show every row at once. +// Single-screen device diagnostics: uptime, packet counts by category (RX/TX), +// forwarded-packet count, heap and stack headroom, radio signal (noise floor, +// RSSI/SNR), packet-pool/outbound-queue depth, and radio error flags. The packet +// counts are built from Dispatcher's per-type counters (Mesh.h/Dispatcher.cpp) — +// grouped into a handful of categories rather than all 16 raw PAYLOAD_TYPE_* +// values, so they stay readable on a 128x64 OLED without the full type list. +// Falls back to scrolling (same drawList-style indicator as every other screen) +// on screens too small to show every row at once. Hold Enter resets the counters. class DiagnosticsScreen : public UIScreen { UITask* _task; int _scroll = 0;