Initialize mesh retry state in the trace test fixture

Mirror firmware startup before direct receive helpers run so sanitizer builds do not read uninitialized retry-slot flags.
This commit is contained in:
mikecarper committed 2026-10-15 21:05:39 -07:00
1 parent 690ffe5601
commit 03b660e06f
1 file changed
+6 -1
+6 -1
View File
@@ -84,7 +84,12 @@ public:
TraceTestMesh(mesh::Radio& radio, mesh::MillisecondClock& ms, mesh::RNG& rng,
mesh::RTCClock& rtc, mesh::PacketManager& mgr, mesh::MeshTables& tables)
: mesh::Mesh(radio, ms, rng, rtc, mgr, tables) { }
: mesh::Mesh(radio, ms, rng, rtc, mgr, tables) {
// Every firmware role begins the mesh before RX/TX. Helpers which invoke
// receivePacket() directly need that same retry/timer initialization;
// otherwise stack-allocated fixtures read indeterminate retry-slot flags.
mesh::Mesh::begin();
}
uint8_t airtimeFactor(const mesh::Packet* packet) const {
return getDirectRetryPacketAirtimeFactor(packet);