From ca61c3f529a2a258b5ebbdaa48336c27c1c5fe55 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Tue, 14 Sep 2021 17:58:39 +0200
Subject: [PATCH] minor polishing

---
 vfo.c       |  1 -
 waterfall.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/vfo.c b/vfo.c
index 8502ca7..15479b0 100644
--- a/vfo.c
+++ b/vfo.c
@@ -813,7 +813,6 @@ void vfo_id_step(int id, int steps) {
     } else {
       delta=vfo[id].frequency;
       vfo[id].frequency=ROUND(vfo[id].frequency,steps);
-      g_print("%s: OLD=%lld NEW=%lld\n", __FUNCTION__,delta, vfo[id].frequency);
       delta = vfo[id].frequency - delta;
     }
 
diff --git a/waterfall.c b/waterfall.c
index 00b54ac..f34c203 100644
--- a/waterfall.c
+++ b/waterfall.c
@@ -170,6 +170,16 @@ void waterfall_update(RECEIVER *rx) {
       rx->waterfall_sample_rate=rx->sample_rate;
     }
 
+    //
+    // If we have just shifted the waterfall befause the VFO frequency has changed,
+    // there are  still IQ samples in the input queue corresponding to the "old"
+    // VFO frequency, and this produces artifacts both on the panadaper and on the
+    // waterfall. However, for the panadapter these are overwritten in due course,
+    // while artifacts "stay" on the waterfall. We therefore refrain from updating
+    // the waterfall *now* and continue updating when the VFO frequency has
+    // stabilized. This will not remove the artifacts in any case but is a big
+    // improvement.
+    //
     if (rotate_pixels != 0)  return;
 
     memmove(&pixels[rowstride],pixels,(height-1)*rowstride);
-- 
2.45.2