Let Enter send the message the contact has got to

ESM is how most people run N1MM, and it was not here at all — not in the code,
not even in the list of what is missing. Config ▸ ESM turns it on and it stays
on between runs.

The decision is a table in N1MM's function-key documentation, and it is written
here as one: the state of the callsign and exchange boxes, whether the station
is running or searching, and whether the call and the exchange have gone out
already, give the function keys Enter sends and whether the contact is logged
after them. Esm.Decide is that table and nothing else, so it is tested against
every row rather than by clicking.

Searching: type a call, Enter sends your call, space moves to the exchange, and
once the exchange is filled in Enter sends yours and logs. Running: Enter calls
CQ, a call in the box makes Enter send his call and the exchange, and the next
Enter ends the contact and logs it. A dupe gets QSO B4 while running and nothing
while searching, unless dupes are worked, which is what N1MM recommends and what
this does out of the box. F1 puts a searching station into run mode.

The entry window highlights the keys Enter would send next, so what is about to
happen is on the screen rather than in the operator's head. `=` sends whatever
Enter last sent. Escape and F12 put ESM back to the start of a contact.

Send Corrected Call is in as well: copy SM3AB, send it, fix it to SM3ABC, and
the message that ends the contact goes out as "SM3ABC TU DL1ABC". That is why
N1MM's documentation says to put ! in F5 rather than {CALL}, so the default F5
message is now ! . F6 is QSO B4, which is the message ESM sends a dupe; it used
to repeat the exchange, which no part of the table asks for.

{EXCHSENT} means something again, now that there is an ESM state for it to set.

Worked end to end against a fake cwdaemon: a search-and-pounce contact logged in
four keystrokes, a run contact in three, both with the right text on the keyer
in the right order, and the corrected call in front of the last message.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 07:59:11 +00:00
parent 333d3b97c2
commit 0c440ed865
13 changed files with 458 additions and 13 deletions

View File

@@ -50,6 +50,22 @@ public sealed record Settings
/// to find the station by ear. N1MM calls it randomising.
public bool RandomizeSpots { get; init; }
/// Enter sends the message the contact has got to, rather than only logging
/// it. N1MM calls it ESM and most operators run with it on.
public bool EsmEnabled { get; init; }
/// N1MM's "big gun" switch: while searching, send the call once and be
/// ready to copy the exchange rather than calling again.
public bool EsmSendsCallOnce { get; init; }
/// Work a station that calls in again while running, which is what N1MM
/// recommends.
public bool EsmWorksDupes { get; init; } = true;
/// Send the call again in front of the message that ends the contact when
/// it has changed since it went out.
public bool EsmSendsCorrectedCall { get; init; } = true;
/// How far `{FREQUP}` and `{FREQDN}` move the radio. N1MM asks for the same
/// number in its Configurer.
public int FrequencyStepHertz { get; init; } = 100;