From b2086d5c950022c55fd0ba0cc2b845fcf7ea3b83 Mon Sep 17 00:00:00 2001 From: ericek111 Date: Sun, 25 Oct 2026 11:56:01 +0000 Subject: [PATCH] Spot the typed call on every QSY, and when the exchange is filled Frequency steps, band buttons and bandmap clicks moved the position before the radio reported back, so the move was never seen. They now call AppSession.TuneHere, which spots at once. The spot was also skipped when every required exchange box had text. Contests that fill those boxes automatically made that true for a call alone, so the check is removed. Co-Authored-By: Claude Sonnet 5.5 --- src/Nonemm.App/AppSession.QsySpot.cs | 11 ++++++++++- src/Nonemm.App/Windows/EntryWindow.Bands.cs | 2 +- src/Nonemm.App/Windows/EntryWindow.Macros.cs | 2 +- src/Nonemm.App/Windows/EntryWindow.Menu.cs | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Nonemm.App/AppSession.QsySpot.cs b/src/Nonemm.App/AppSession.QsySpot.cs index 9ce940d..7884e99 100644 --- a/src/Nonemm.App/AppSession.QsySpot.cs +++ b/src/Nonemm.App/AppSession.QsySpot.cs @@ -28,6 +28,16 @@ public sealed partial class AppSession Dispatcher.UIThread.Post(() => SpotOnQsy(position, before)); } + /// A tune made in the program itself (frequency step, band button, bandmap + /// click). It spots the call at once, before the caller changes the boxes. + /// The radio then reports the same frequency back, which moves nothing. + public void TuneHere(OperatingPosition position, Frequency frequency, Mode? mode = null) + { + Frequency before = position.Frequency; + position.Tune(frequency, mode); + SpotOnQsy(position, before); + } + /// Where the radio was when the call in each entry window was first seen. /// A radio reports every few hundred hertz as the knob turns, so the move /// is measured from here and not from the previous report. @@ -59,7 +69,6 @@ public sealed partial class AppSession || call.All(char.IsAsciiDigit) || position.IsRunning || position.Editing is not null - || position.IsEntryComplete || band is null || band != Bands.ForFrequency(now) || Math.Abs(now.Hertz - before.Hertz) <= Settings.QsySpotHertz diff --git a/src/Nonemm.App/Windows/EntryWindow.Bands.cs b/src/Nonemm.App/Windows/EntryWindow.Bands.cs index a30cc52..035687a 100644 --- a/src/Nonemm.App/Windows/EntryWindow.Bands.cs +++ b/src/Nonemm.App/Windows/EntryWindow.Bands.cs @@ -130,7 +130,7 @@ public sealed partial class EntryWindow ModeCategory.Digital => Modes.Rtty, _ => Modes.Cw, }; - Logging.Tune(where, wanted); + session.TuneHere(Logging, where, wanted); _ = session.Radio?.TuneAsync(where); boxes[0].Focus(); Refresh(); diff --git a/src/Nonemm.App/Windows/EntryWindow.Macros.cs b/src/Nonemm.App/Windows/EntryWindow.Macros.cs index 292666c..dfaf8eb 100644 --- a/src/Nonemm.App/Windows/EntryWindow.Macros.cs +++ b/src/Nonemm.App/Windows/EntryWindow.Macros.cs @@ -476,7 +476,7 @@ public sealed partial class EntryWindow return; } Frequency moved = Frequency.FromHertz(Logging.Frequency.Hertz + hertz); - Logging.Tune(moved); + session.TuneHere(Logging, moved); _ = session.Radio?.TuneAsync(moved); Refresh(); } diff --git a/src/Nonemm.App/Windows/EntryWindow.Menu.cs b/src/Nonemm.App/Windows/EntryWindow.Menu.cs index 21e7d93..1ba8cc6 100644 --- a/src/Nonemm.App/Windows/EntryWindow.Menu.cs +++ b/src/Nonemm.App/Windows/EntryWindow.Menu.cs @@ -714,7 +714,7 @@ public sealed partial class EntryWindow { return; } - Logging.Tune(frequency); + session.TuneHere(Logging, frequency); _ = session.Radio?.TuneAsync(frequency); Logging.Entry.Call = call; SyncBoxes();