Per review feedback from @liamcottle and @entr0p1, EXTERNAL_FLASH_DEVICES
is not used by MeshCore firmware — CustomLFS determines the flash chip
via JEDEC ID at runtime instead. Removing the definition entirely rather
than keeping the (now-confirmed-unnecessary) correct value.
Also removes EXTERNAL_FLASH_USE_QSPI, which was paired with the same
define.
variant.h defines EXTERNAL_FLASH_DEVICES twice:
- First (correct): ZD25WQ32CEIGR (32Mbit = 4MB, matches actual hardware)
- Second (incorrect): MX25R1635F (16Mbit = 2MB, T-Echo non-Lite chip)
Due to C preprocessor behavior, the second definition silently overrides
the first, causing firmware to initialize the wrong flash chip. This can
result in LittleFS operating incorrectly on T-Echo Lite hardware.
Remove the erroneous second definition.
Also fix missing newline at end of file.
The `recv_pkt_region` is set when processing a flood packet in `filterRecvFloodPacket`
but direct/non-flood packets would never pass through that function, so the pointer was
not cleared for them.
`sendFloodReply` would then later use it blindly, which meant that the response would
either inherit the region from the last flood packet, or refer to a non-initialised pointer
if no region floods had been received yet.
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.