Mark the CQ frequency on the bandmap and leave Run when the radio moves off it
Starting Run stores the frequency in the position. The bandmap draws a purple, bold "CQ Frequency" pseudospot there, which is not added to the shared bandmap, and a click on it tunes back and sets Run. A move of more than 3 kHz (a setting on the telnet Filters tab) while running switches to search and pounce. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,28 @@ public sealed class OperatingPosition
|
||||
|
||||
/// True while the operator is calling CQ on this radio rather than
|
||||
/// searching. Each radio runs or searches on its own.
|
||||
public bool IsRunning { get; set; }
|
||||
public bool IsRunning
|
||||
{
|
||||
get => running;
|
||||
set
|
||||
{
|
||||
if (value && !running)
|
||||
{
|
||||
CqFrequency = Frequency;
|
||||
}
|
||||
running = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool running;
|
||||
|
||||
/// Where this radio last started running or sent a CQ. It stays after the
|
||||
/// radio goes back to searching, so the operator can return to it.
|
||||
public Frequency? CqFrequency { get; set; }
|
||||
|
||||
/// How far, in hertz, the radio can move off the CQ frequency before the
|
||||
/// position goes back to searching.
|
||||
public long CqLeaveHertz { get; set; } = 3_000;
|
||||
|
||||
/// The other operator's name and a note about the contact. Neither is part
|
||||
/// of any exchange: the name is what a contact being quick edited already
|
||||
@@ -110,6 +131,10 @@ public sealed class OperatingPosition
|
||||
FillSentExchange();
|
||||
}
|
||||
TransmitFrequency = transmitFrequency ?? TransmitFrequency;
|
||||
if (running && CqFrequency is { } cq && Math.Abs(frequency.Hertz - cq.Hertz) > CqLeaveHertz)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
Session.NotifyChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user