From 971543fab343d613d2348698c1c77e8f1ee0d461 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 29 Sep 2025 12:11:48 -0500 Subject: [PATCH] Add agc reset attempt --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 38c8e8ca5..c649fa0c0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -195,6 +195,8 @@ bool kb_found = false; // global bool to record that on-screen keyboard (OSK) is present bool osk_found = false; +unsigned long last_listen = 0; + // The I2C address of the RTC Module (if found) ScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE; // The I2C address of the Accelerometer (if found) @@ -1593,6 +1595,13 @@ void loop() #endif power->powerCommandsCheck(); + if (last_listen + 1000 * 60 < millis() && + !(RadioLibInterface::instance->isSending() || RadioLibInterface::instance->isActivelyReceiving())) { + RadioLibInterface::instance->startReceive(); + LOG_DEBUG("attempting AGC reset"); + last_listen = millis(); + } + #ifdef DEBUG_STACK static uint32_t lastPrint = 0; if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) {