From: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Date: Sun, 31 Dec 2023 12:08:04 +0000 (+0530)
Subject: bug fix for ctun scroll
X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/%22doc.html/%22file:/-?a=commitdiff_plain;h=542dabd9f84abab1ec0e33e9b9e992069fd770c5;p=pihpsdr.git

bug fix for ctun scroll

TODO: define some offset from edge and scroll within those edge bands
---

diff --git a/vfo.c b/vfo.c
index 4600740..5174e03 100644
--- a/vfo.c
+++ b/vfo.c
@@ -751,7 +751,7 @@ void vfo_id_move(int id, long long hz, int round) {
             } else if (rx_high >= max_freq) {
 		// XXX: move the background
 		long long delta_move = rx_high - max_freq;
-		vfo[id].frequency = vfo[id].frequency + hz - delta_move;
+		vfo[id].frequency = vfo[id].frequency + hz + delta_move;
 		vfo[id].ctun_frequency = vfo[id].ctun_frequency + hz;
 		receiver_frequency_changed(receiver[id]);
 		g_idle_add(ext_vfo_update, NULL);