Send the messages N1MM actually reads
Three of the messages this program sends were its own invention or in the wrong units, so an N1MM beside it read them wrongly or not at all. | Message | N1MM | What was sent | |---|---|---| | `XMIT` | transmitting, the function key's caption, Run2, F1 pressed, stop sending | transmitting, the radio number | | `PASSFREQ` | the frequency in hundredths of a kilohertz, and nothing else | the frequency in kilohertz, and a callsign | | `FREQ` | the frequency in hundredths of a kilohertz | `BANDMAP`, which N1MM has no such message for | So N1MM showed a radio number where the other operators read what a station is sending, read a pass on 14205.5 as 140.25, and never saw this station move at all. `BANDMAP` is gone: the frequency goes out in `FREQ` when the radio moves and the mode, run and the rest ride in the `STATUS` that follows it, which is where N1MM carries them. The `Msg` column now shows what a station is sending, which is what the caption is for. `PassCall` and `RadioNumber` are gone from the station: neither is on the wire, so neither was ever anything but this program talking to itself. **A station that reconnects resynchronises by itself.** N1MM sends `LASTQAT` — when I last worked anybody — as soon as a connection opens, and a station holding nothing that late asks for the hours in between. An empty log asks for nothing: a program that has just been started has no business pulling the whole contest across, and N1MM suppresses it the same way. The answer goes over the connection this station opens, which is not always up when the message arrives, so a resync that has nothing to ask over waits for it rather than being lost — and one that still cannot send stops and says so instead of leaving the row resynchronising for the rest of the contest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PdAYHcdRktqKry7nk414TU
This commit is contained in:
@@ -344,7 +344,9 @@ public sealed class AppSession : IDisposable
|
||||
Changed?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
/// Tells the other stations where this one is, if it has moved. In a
|
||||
/// Tells the other stations where this one is, if it has moved. The
|
||||
/// frequency goes out on its own — N1MM's `FREQ` — and everything else
|
||||
/// about the position rides in the `STATUS` that follows it. In a
|
||||
/// multi-single entry this is what the other operators watch: two stations
|
||||
/// on one band is a contact nobody can make.
|
||||
private void AnnounceWhereIAm()
|
||||
@@ -359,8 +361,15 @@ public sealed class AppSession : IDisposable
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool moved = announced.Where != position.Frequency;
|
||||
announced = now;
|
||||
_ = link.SendBandAsync(position.Frequency, position.Mode, position.IsRunning, position.RadioNumber);
|
||||
if (moved)
|
||||
{
|
||||
_ = link.SendFrequencyAsync(position.Frequency);
|
||||
}
|
||||
// the mode, run and the rest of it ride in `STATUS`, which is sent
|
||||
// again now rather than waiting out the rest of its interval
|
||||
statusSent = default;
|
||||
}
|
||||
|
||||
/// Scores the log again and writes the points and multiplier flags from
|
||||
|
||||
@@ -33,6 +33,20 @@ internal sealed class SessionContactLog : ContactLog
|
||||
.ThenBy(q => q.Call.Text, StringComparer.Ordinal)
|
||||
.ToList());
|
||||
|
||||
public DateTime LastContactUtc(string computerName) =>
|
||||
Ask(() => session.Logging is not { } logging
|
||||
? default
|
||||
: logging.Log.Qsos
|
||||
.Where(q => string.Equals(q.StationName, computerName, StringComparison.OrdinalIgnoreCase))
|
||||
.Select(q => q.TimestampUtc)
|
||||
.DefaultIfEmpty(default)
|
||||
.Max());
|
||||
|
||||
public DateTime FirstContactUtc =>
|
||||
Ask(() => session.Logging is not { } logging
|
||||
? default
|
||||
: logging.Log.Qsos.Select(q => q.TimestampUtc).DefaultIfEmpty(default).Min());
|
||||
|
||||
private static T Ask<T>(Func<T> question) =>
|
||||
Dispatcher.UIThread.CheckAccess() ? question() : Dispatcher.UIThread.Invoke(question);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ public sealed partial class NetworkStatusWindow : RefreshableWindow
|
||||
{
|
||||
return;
|
||||
}
|
||||
await link.SendPassAsync(position.Frequency, position.Entry.Call);
|
||||
await link.SendPassAsync(position.Frequency);
|
||||
Say($"passing on {position.Frequency.Kilohertz:0.0}");
|
||||
}
|
||||
|
||||
@@ -349,8 +349,8 @@ public sealed partial class NetworkStatusWindow : RefreshableWindow
|
||||
{
|
||||
return;
|
||||
}
|
||||
await link.SendPassAsync(position.Frequency, position.Entry.Call, station);
|
||||
Say($"passed {position.Entry.Call} on {position.Frequency.Kilohertz:0.0} to {station.ComputerName}");
|
||||
await link.SendPassAsync(position.Frequency, station);
|
||||
Say($"passed {position.Frequency.Kilohertz:0.0} to {station.ComputerName}");
|
||||
}
|
||||
|
||||
private void OnCloseConnection(object? sender, RoutedEventArgs e)
|
||||
|
||||
@@ -27,9 +27,9 @@ public sealed class StationRow
|
||||
? $"{station.Address}:{station.Port}"
|
||||
: station.Address;
|
||||
|
||||
/// The frequency this station is passing contacts on, and who is on it.
|
||||
/// The frequency this station is passing contacts on.
|
||||
public string Pass => station.PassFrequency.Hertz > 0
|
||||
? $"{station.PassFrequency.Kilohertz:0.0} {station.PassCall}".TrimEnd()
|
||||
? $"{station.PassFrequency.Kilohertz:0.0}"
|
||||
: "";
|
||||
|
||||
/// Run or search and pounce, which is N1MM's Run column.
|
||||
@@ -43,10 +43,12 @@ public sealed class StationRow
|
||||
|
||||
public string Op => station.Operator;
|
||||
|
||||
/// The last message this station sent, and TX while it is transmitting.
|
||||
/// Two stations keying at once is what an operator watches this column for.
|
||||
/// What the station is sending, which is what N1MM shows here. A station
|
||||
/// that is not transmitting has nothing to say, so the last message type it
|
||||
/// sent stands in: two stations keying at once is what an operator watches
|
||||
/// this column for, and an empty column says nothing about that.
|
||||
public string Msg => station.IsTransmitting
|
||||
? $"TX {station.LastMessage}".TrimEnd()
|
||||
? $"TX {station.Message}".TrimEnd()
|
||||
: station.LastMessage;
|
||||
|
||||
/// Whether this program can write to the station. N1MM prints OK and so
|
||||
|
||||
Reference in New Issue
Block a user