simple_repeater: radio silence watchdog -- re-arm RX, then reboot a deaf receiver (#6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-03 20:03:01 +01:00
1 parent 10f0349207
commit 278c1b8c8a
8 files changed
+440

No files matched your search

@@ -89,6 +89,12 @@ void RadioLibWrapper::doResetAGC() {
_radio->sleep(); // warm sleep to reset analog frontend
}
void RadioLibWrapper::kickRx() {
if (state == STATE_TX_WAIT) return; // mid-transmit: next check will try again
_radio->clearIrqFlags(0xFFFFFFFF); // a latched IRQ keeps DIO1 high: no new edge
idle(); // standby; Dispatcher re-arms RX on its next loop
}
void RadioLibWrapper::resetAGC() {
// make sure we're not mid-receive of packet!
if ((state & STATE_INT_READY) != 0 || isReceivingPacket()) return;
+3
View File
@@ -84,6 +84,9 @@ public:
void loop() override;
uint32_t getPacketsRecv() const { return n_recv; }
// CUSTOM (TeTeHacko): first recovery step of the radio silence watchdog --
// drop latched IRQs and re-arm RX. Leaves a transmit in progress alone.
void kickRx();
uint32_t getPacketsRecvErrors() const { return n_recv_errors; }
uint32_t getPacketsSent() const { return n_sent; }
void resetStats() { n_recv = n_sent = n_recv_errors = 0; }