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 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 11:56:01 +00:00
co-authored by Claude Sonnet 5.5
parent 845a629e37
commit b2086d5c95
4 changed files with 13 additions and 4 deletions
+10 -1
View File
@@ -28,6 +28,16 @@ public sealed partial class AppSession
Dispatcher.UIThread.Post(() => SpotOnQsy(position, before)); 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. /// 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 /// A radio reports every few hundred hertz as the knob turns, so the move
/// is measured from here and not from the previous report. /// is measured from here and not from the previous report.
@@ -59,7 +69,6 @@ public sealed partial class AppSession
|| call.All(char.IsAsciiDigit) || call.All(char.IsAsciiDigit)
|| position.IsRunning || position.IsRunning
|| position.Editing is not null || position.Editing is not null
|| position.IsEntryComplete
|| band is null || band is null
|| band != Bands.ForFrequency(now) || band != Bands.ForFrequency(now)
|| Math.Abs(now.Hertz - before.Hertz) <= Settings.QsySpotHertz || Math.Abs(now.Hertz - before.Hertz) <= Settings.QsySpotHertz
+1 -1
View File
@@ -130,7 +130,7 @@ public sealed partial class EntryWindow
ModeCategory.Digital => Modes.Rtty, ModeCategory.Digital => Modes.Rtty,
_ => Modes.Cw, _ => Modes.Cw,
}; };
Logging.Tune(where, wanted); session.TuneHere(Logging, where, wanted);
_ = session.Radio?.TuneAsync(where); _ = session.Radio?.TuneAsync(where);
boxes[0].Focus(); boxes[0].Focus();
Refresh(); Refresh();
+1 -1
View File
@@ -476,7 +476,7 @@ public sealed partial class EntryWindow
return; return;
} }
Frequency moved = Frequency.FromHertz(Logging.Frequency.Hertz + hertz); Frequency moved = Frequency.FromHertz(Logging.Frequency.Hertz + hertz);
Logging.Tune(moved); session.TuneHere(Logging, moved);
_ = session.Radio?.TuneAsync(moved); _ = session.Radio?.TuneAsync(moved);
Refresh(); Refresh();
} }
+1 -1
View File
@@ -714,7 +714,7 @@ public sealed partial class EntryWindow
{ {
return; return;
} }
Logging.Tune(frequency); session.TuneHere(Logging, frequency);
_ = session.Radio?.TuneAsync(frequency); _ = session.Radio?.TuneAsync(frequency);
Logging.Entry.Call = call; Logging.Entry.Call = call;
SyncBoxes(); SyncBoxes();