Commit Graph
9 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
Sefinek 00d445a269 fix: fix typos in source code comments 2026-05-28 15:44:56 +02: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 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 537449e6af Refactor ESPNowBridge packet handling to use 2-byte magic header and improve packet size validation 2025-09-08 01:20:54 +01:00
João Brázio 5b9d11ac8f Support ESPNow and improve documentation 2025-09-07 21:39:54 +01:00