Send WAE QTC traffic on CW

The QTC window took traffic down and read it out of the log, but nothing left
the window: on CW the operator had to send the lines by hand. It now puts them
on the air through the entry window's keyer, the way N1MM's QTC window sends
through its own entry window, so the same macros are expanded and the same
transmitter is pointed at first.

Sending a series: Send Hdr keys the header, Send1 to Send10 key one line each —
the time, the callsign and the serial number — and Close keys the TU message
when one is set. Taking one down: Hdr Agn asks for the header again, and shift
with Enter in a box asks for that one field again and clears it.

The messages and their defaults are N1MM's: AGN TIME, AGN CALL, AGN SERIAL, the
hard-coded HDR AGN with its two spaces, and a TU that sends nothing until the
operator writes one. So is the field spacing, written N1MM's way with S for a
space. All five are in Setup, where the note about the missing settings used to
be.

Nothing is sent on SSB or RTTY. N1MM plays four recordings on SSB and sends
RTTY from its digital window, and there is neither here, so on those modes the
buttons move the cursor as before. RX Ready sends nothing on any mode, because
a recording is all N1MM ever sends from it. Serial numbers go out as digits:
N1MM can send cut numbers and nothing here does, in any message.

Driven under Xvfb against a fake cwdaemon, in a WAE CW contest with four
contacts logged. Sending, it keyed QTC 1/2, 2257 DL1AAA 01, 2257 DL2BBB 01,
then QTC 2/2 with its two lines and TU DE W1ABC on close. Receiving, HDR  AGN,
AGN TIME, AGN CALL and AGN SERIAL.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-08-30 23:03:17 +00:00
parent ff46cb00ed
commit dc1c593b4d
11 changed files with 263 additions and 26 deletions

View File

@@ -0,0 +1,34 @@
namespace Nonemm.Session.Tests;
public class QtcMessagesTests
{
[Fact]
public void ALineIsTheTimeTheCallAndTheSerialNumber()
{
Assert.Equal(
"1234 DL1ABC 123",
QtcMessages.Line("1234", "DL1ABC", "123", QtcMessages.DefaultFieldSpacing));
}
/// N1MM writes the spacing with `S` for a space, so an operator who wants
/// two writes `SS`.
[Fact]
public void TheSpacingIsWrittenWithSForASpace()
{
Assert.Equal("1234 DL1ABC 123", QtcMessages.Line("1234", "DL1ABC", "123", "SS"));
}
[Fact]
public void AnythingElseInTheSpacingGoesOutAsItIs()
{
Assert.Equal("1234/DL1ABC/123", QtcMessages.Line("1234", "DL1ABC", "123", "/"));
}
[Fact]
public void WhatIsInTheBoxesIsTrimmed()
{
Assert.Equal(
"1234 DL1ABC 123",
QtcMessages.Line(" 1234 ", " DL1ABC ", " 123 ", QtcMessages.DefaultFieldSpacing));
}
}