Commit Graph
11 Commits
Author SHA1 Message Date
Christoph Koehler 4f701b7aec refactor: split MeshTables::hasSeen into pure query + markSeen
hasSeen() was simultaneously a predicate and a mutator — it inserted the
packet hash on every miss, making five call sites that only wanted to mark
a packet as sent call it with the return value discarded.

Split into:
- wasSeen()   — pure predicate, no side effects
- markSeen()  — explicit insert

All query sites now call markSeen() immediately after wasSeen() returns
false, preserving identical runtime behaviour. The five mark-only send
sites (sendFlood, sendDirect, sendZeroHop x2) now call markSeen directly.

Also fixes three bridge sites (BridgeBase, ESPNowBridge, RS232Bridge)
that had the same query+implicit-insert pattern.

Tests: add test/test_mesh_tables/ covering wasSeen purity, markSeen,
dup stats, and clear. Update SHA256 mock to produce deterministic output
(previously finalize() was a no-op). Add Packet.cpp to native build filter.
2026-07-01 21:51:38 -06:00
João Brázio 69a9a0bce9 Bridge: Add t114 rs232 targets 2025-12-02 10:31:24 +00:00
João Brázio eafbd85d17 Add RAK4631 support for rs232 bridge 2025-11-25 11:53:21 +00:00
João Brázio fb46e5cc8a Refactor debug logging across bridge implementations 2025-10-06 12:57:04 +01:00
João Brázio 8edcb46a28 Bridge: enhance CLI configuration options 2025-10-03 00:20:09 +01:00
João Brázio 1d45c7ec66 Add bridge management CLI 2025-09-24 16:30:00 +01:00
João Brázio a55fa8d8ec Add BRIDGE_DELAY as a buffer to prevent immediate processing conflicts in the mesh network 2025-09-08 20:21:33 +01:00
João Brázio 1d25c87c57 Refactor bridge packet handling to use common magic number and size constants 2025-09-08 18:16:50 +01:00
João Brázio 0051ccef26 Refactor bridge implementations to inherit from BridgeBase 2025-09-08 02:03:08 +01:00
João Brázio 5b9d11ac8f Support ESPNow and improve documentation 2025-09-07 21:39:54 +01:00
João Brázio 5843a12c71 Rename SerialBridge to RS232Bridge 2025-09-05 11:28:40 +01:00