mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-11-04 19:07:41 +00:00
Add native narrow-band CW capture, ACK-first remote sessions, retained LoRa-readable pages, checked restoration and transport-safe progress. Add stock-compatible negotiated heartbeat/autosleep and recovery. Include host regressions and identity-bound HIL runners; keep unverified faster tuning HIL-only and document outstanding hardware validation.
23 lines
1.3 KiB
C++
23 lines
1.3 KiB
C++
int main() {
|
|
const uint8_t actor[32] = {1, 2, 3, 4};
|
|
for (unsigned successes = 0; successes < 4; ++successes) {
|
|
@ROLE@ node; TestRadio radio; radio.rx_supported = true;
|
|
mesh::Packet first, second, unrelated;
|
|
auto& handoff = node._cli.morseReply();
|
|
handoff.beginCommand(actor); assert(handoff.stage(902100, 25, 60000, now_ms));
|
|
handoff.endCommand(); handoff.prepareReply(&first);
|
|
node.onRadioProfileCopyQueued(&second, &first, 0); handoff.armReply(&first, true);
|
|
node.onSendComplete(&unrelated);
|
|
assert(handoff.pending() && handoff.contains(&first) && handoff.contains(&second));
|
|
if (successes & 1) node.onSendComplete(&first); else node.onSendFail(&first);
|
|
assert(!handoff.service(&radio, now_ms, true, true, 902100, 25));
|
|
assert(!radio.rx_starts && !handoff.ownsReply(&first) && handoff.ownsReply(&second));
|
|
if (successes & 2) node.onSendComplete(&second); else node.onSendFail(&second);
|
|
assert(handoff.service(&radio, now_ms, true, true, 902100, 25) == (successes != 0));
|
|
assert(radio.rx_starts == unsigned(successes != 0) && !handoff.pending());
|
|
node.onSendComplete(&first); node.onSendFail(&second);
|
|
assert(!handoff.service(&radio, now_ms, true, true, 902100, 25));
|
|
assert(radio.rx_starts == unsigned(successes != 0));
|
|
}
|
|
}
|