From bf2bfa28be4e79e2a59965285e5a4fd430fff96f Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 16 Jan 2019 00:39:15 -0500 Subject: [PATCH] HB should only move freq if necessary --- mainwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 7fab325..2f3415d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -6834,7 +6834,14 @@ void MainWindow::sendHeartbeat(){ QString message = parts.join(" ").trimmed(); - auto f = m_config.heartbeat_anywhere() ? -1 : findFreeFreqOffset(500, 1000, 50); + auto f = findFreeFreqOffset(500, 1000, 50); + + if(currentFreqOffset() <= 1000){ + f = currentFreqOffset(); + } + else if(m_config.heartbeat_anywhere()){ + f = -1; + } enqueueMessage(PriorityLow, message, f, [this](){ /* */ }); }