Make the run switch a switch, and split the tuning tolerance by mode

Three things you could not see or could not set.

Run and S&P were a label saying which one you were in. They are two buttons
now, the one you are in marked, either one clickable, which is what N1MM has.
Ctrl+? and F1 still work.

The tuning tolerance is one number per mode, as N1MM keeps it: CW, phone and
digital, 300 Hz each, which are its defaults. A phone signal is wide and a CW
one is not, so one number for both was wrong.

The bearing line went blank whenever it could not be worked out, which looks
exactly like a missing feature. It now says which end could not be placed and
what to do — no country file, no position for your own station, or a callsign
the country file does not place. It also gives miles beside the kilometres, as
N1MM does.

While clicking it: a marked button lost its mark under the pointer, because the
theme paints its own background there. The band buttons had the same fault.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 10:39:32 +00:00
parent 7e7ce41477
commit 682932c35d
5 changed files with 90 additions and 17 deletions

View File

@@ -67,9 +67,19 @@ public sealed record Settings
public bool EsmSendsCorrectedCall { get; init; } = true;
/// How close to a spot the radio has to be for the entry window to say the
/// station is there. N1MM asks for the same number, one per mode; this is
/// one number for all of them.
public int TuningToleranceHertz { get; init; } = 300;
/// station is there. N1MM keeps one per mode and defaults each to 300 Hz.
public int CwTuningToleranceHertz { get; init; } = 300;
public int PhoneTuningToleranceHertz { get; init; } = 300;
public int DigitalTuningToleranceHertz { get; init; } = 300;
public int TuningToleranceFor(ModeCategory mode) => mode switch
{
ModeCategory.Phone => PhoneTuningToleranceHertz,
ModeCategory.Digital => DigitalTuningToleranceHertz,
_ => CwTuningToleranceHertz,
};
/// How far `{FREQUP}` and `{FREQDN}` move the radio. N1MM asks for the same
/// number in its Configurer.