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:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user