diff --git a/src/main.cpp b/src/main.cpp index d6341efb..7ea6fcb6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1650,15 +1650,23 @@ static LXMF::LXMessage* test_sent_find(const RNS::Bytes& hash) { } // Track received messages so T:RX can summarize. +// test_rx_total: monotonic count of all received messages (what the +// harness reads as `count=`). test_rx_count: number of entries +// currently held in the ring (≤ TEST_RX_RING). Splitting these two +// fixes T:RX silently capping at 32 during long soak runs — the +// detailed-entry dump is still bounded by ring size, but the count +// the harness sees keeps climbing. struct TestRxEntry { RNS::Bytes source; RNS::Bytes content; bool in_use = false; }; static const size_t TEST_RX_RING = 32; static TestRxEntry test_rx_ring[TEST_RX_RING]; static size_t test_rx_count = 0; +static size_t test_rx_total = 0; // Public wrapper exposed via pyxis_test_hooks.h (global scope, no // namespace) so other TUs (eg UIManager.cpp) can record received // messages without ADL gymnastics. void pyxis_test_hook_record_rx(const ::LXMF::LXMessage& msg) { + test_rx_total++; if (test_rx_count >= TEST_RX_RING) return; test_rx_ring[test_rx_count].source = msg.source_hash(); test_rx_ring[test_rx_count].content = msg.content(); @@ -1791,8 +1799,10 @@ static void handle_test_hook_command(const String& line) { Serial.println(String("T:OK state=") + test_state_name(m->state())); } else if (cmd == "T:RX") { + // count= — keeps climbing past + // TEST_RX_RING. T:RXMSG dump is still capped to ring contents. Serial.print("T:OK count="); - Serial.println(String((unsigned)test_rx_count)); + Serial.println(String((unsigned)test_rx_total)); for (size_t i = 0; i < test_rx_count; ++i) { const auto& e = test_rx_ring[i]; std::string c((const char*)e.content.data(), e.content.size()); @@ -1804,6 +1814,7 @@ static void handle_test_hook_command(const String& line) { } else if (cmd == "T:RXCLR") { test_rx_count = 0; + test_rx_total = 0; Serial.println("T:OK cleared"); } else if (cmd == "T:SETPROP") { diff --git a/sync_file_libdeps.py b/sync_file_libdeps.py index 8e9b209a..6d6985e4 100644 --- a/sync_file_libdeps.py +++ b/sync_file_libdeps.py @@ -18,10 +18,17 @@ import os import shutil from pathlib import Path -# (source_dir, libdep_subdir_name) -FILE_DEPS = [ - ("~/repos/microReticulum", "microReticulum"), -] +# (source_dir, libdep_subdir_name) — populated from env vars so the +# script doesn't bake any contributor's local checkout path into the +# committed source. Since microReticulum is now consumed as a pinned +# git URL in platformio.ini (not a file:// dep), this script no-ops +# for everyone by default. Set PYXIS_MICRORETICULUM_DIR to opt in to +# a local-override workflow (mirrors that source tree into +# .pio/libdeps//microReticulum on each build). +FILE_DEPS = [] +_micro_reticulum_dir = os.environ.get("PYXIS_MICRORETICULUM_DIR", "").strip() +if _micro_reticulum_dir: + FILE_DEPS.append((_micro_reticulum_dir, "microReticulum")) PROJECT_DIR = Path(env.get("PROJECT_DIR", ".")) ENV_NAME = env.get("PIOENV", "tdeck")