diff --git a/src/main.cpp b/src/main.cpp index b1af784..f3f7830 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -129,7 +129,7 @@ class ElrsManager { SetThreadName("ELRS TX"); std::chrono::time_point wakeTime{std::chrono::steady_clock::now()}, pingTime{wakeTime}; - constexpr std::chrono::milliseconds WakeInterval{100}, PingInterval{5000}; + constexpr std::chrono::milliseconds WakeInterval{100}, PingInterval{250}; bool recurringException{}; while (!stopToken.stop_requested()) { @@ -137,8 +137,8 @@ class ElrsManager { stateCV.wait_until(lock, wakeTime > pingTime ? wakeTime : pingTime); try { - if (pingsSinceLastRx >= 2) { - fmt::print("No packets received after two pings, resetting device\n"); + if (pingsSinceLastRx >= 8) { + fmt::print("No packets received after {} pings, resetting device\n", pingsSinceLastRx); crsfInterface.ResetDevice(); pingsSinceLastRx = 0; earlyPing = true;