Work QTC traffic on RTTY the way N1MM does

The QTC window put nothing on the air on RTTY except the lines themselves,
so the operator typed the rest into the digital window's transmit pane and
copied the lines by hand. N1MM sends a message for each step and fills the
lines in from a click. Both are here now, with N1MM's messages, N1MM's
defaults and N1MM's settings behind them.

The messages, all of them settings in the QTC window's setup area:

- RX Ready, `WAERXReadyText`, `{ENTERLF}I AM QRV BK`
- All Agn, `WAEAllAgnText`, `{ENTERLF}ALL AGN ALL AGN BK`
- Agn n, `WAEAGNText`, `{ENTERLF}AGN QTC: $ $ $ `, where `$` is the line
- Save, `WAESaveQTCText`, `{ENTERLF}R R R ALL OK BK`
- R U QRV, `WAERUQRVText`, `{ENTERLF}R U QRV BK`
- Save, reading traffic out, `WAESSaveQTCText`, `{ENTERLF}GL DE {MYCALL}`

Each keys the transmitter, sends the text and drops it again, and an empty
one sends nothing. The line spacing default is N1MM's `{ENTERLF}` rather
than `{ENTER}`, which was wrong.

The buttons: R U QRV and Snd Hdr were hidden while reading traffic out on
RTTY, though that is where N1MM starts — R U QRV is the first button
pressed. All Agn is new, and so is the S button on each line, which strikes
a line through a QTC that arrived too broken to read so the rows after it
keep their places; Agn n clears the strike and asks for that line again.

Clicking a line in the digital window fills the next row, which is how the
series is copied on RTTY: the other station sends the header and all ten
lines in one transmission. A click anywhere in a line hands the whole line
to the QTC window, which reads the time, the callsign and the serial number
out of it by shape and flashes the line to show it was taken. A line that is
not a QTC is left to mean what a click always means there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
This commit is contained in:
2026-09-10 20:03:18 +00:00
co-authored by Claude Opus 5
parent e0f307968e
commit f24cab0ae5
11 changed files with 418 additions and 27 deletions
+54
View File
@@ -235,6 +235,60 @@ public sealed class QtcTraffic
: null;
}
/// A line of received text read as the three fields of a QTC. On RTTY the
/// other station sends the whole series in one transmission and the
/// operator clicks the line rather than typing it, so what arrives here is
/// a printed line with whatever the receiver made of the noise around it:
/// `1435-DL1AAA-042`, or the same with spaces or slashes between.
///
/// The fields are taken by shape, in the order they are sent: the first
/// group of digits is the time, the first thing shaped like a callsign is
/// the callsign, and the last group of digits is the serial number. Null
/// when the line does not hold all three.
public static (string Time, string Call, string Number)? SplitLine(string text)
{
string[] parts = text.ToUpperInvariant()
.Split(['-', '/', ' ', '\t', ',', '\\'], StringSplitOptions.RemoveEmptyEntries);
string time = "";
string call = "";
string number = "";
foreach (string part in parts)
{
string token = part.Trim();
if (token.Length == 0)
{
continue;
}
if (token.All(char.IsAsciiDigit))
{
if (time.Length == 0 && token.Length is 3 or 4)
{
time = token;
}
else if (call.Length > 0)
{
number = token;
}
continue;
}
if (call.Length == 0 && time.Length > 0 && LooksLikeCall(token))
{
call = token;
}
}
return time.Length > 0 && call.Length > 0 && number.Length > 0
? (time, call, number)
: null;
}
/// Enough of a callsign to take off the air: letters and digits, at least
/// one of each, three characters or more.
private static bool LooksLikeCall(string token) =>
token.Length is >= 3 and <= 12
&& token.All(c => char.IsAsciiLetterOrDigit(c) || c == '/')
&& token.Any(char.IsAsciiDigit)
&& token.Any(char.IsAsciiLetter);
/// A time typed short is filled in from the line above, which is what N1MM
/// does when the cursor leaves the box: `52` under `1148` reads as `1152`.
/// As many characters are taken off the front of the line above as the