Count from the log again on Reset Serial Numbers
The button started the numbers again at one. N1MM's manual says it "sets serial numbers on all computers to the highest value in any of the logs, plus 1", and its own handler re-reads the highest number per band out of the log, so a mixed network came apart at exactly the point the button is meant to repair: the N1MM stations counted on from the highest number and this one started at one, sending numbers that had already gone out. ContestSession.RestartNumbers fills the pool from the log, which is where the reset now lands. SerialNumbersFrom is gone with it, and so is the pool this station sent afterwards: N1MM sends none, because each station works the same number out of its own copy of the log. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
@@ -68,19 +68,15 @@ public sealed class ContestSession
|
||||
|
||||
public int StationNumber { get; set; } = 1;
|
||||
|
||||
/// Contacts logged before this are not counted when the next serial number
|
||||
/// is worked out, so Reset Serial Numbers starts them again at one. The
|
||||
/// contacts already logged keep the numbers they were sent with. It lasts
|
||||
/// as long as the program is open, the way N1MM's does.
|
||||
public DateTime SerialNumbersFrom
|
||||
/// Starts the serial numbers again: the pool is filled from the log, so the
|
||||
/// next number is the highest number in it plus one. That is what N1MM's
|
||||
/// Reset Serial Numbers at all Stations does, at every station of the
|
||||
/// entry, and it leaves the contacts already logged with the numbers they
|
||||
/// were sent with.
|
||||
public void RestartNumbers()
|
||||
{
|
||||
get;
|
||||
set
|
||||
{
|
||||
field = value;
|
||||
SeedNumbers();
|
||||
NumbersRestarted?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
SeedNumbers();
|
||||
NumbersRestarted?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
/// The numbers have been started again, so a position holding one it took
|
||||
@@ -278,6 +274,6 @@ public sealed class ContestSession
|
||||
? Log.Qsos.Where(q =>
|
||||
Contest.SessionOf(q.TimestampUtc) == Contest.SessionOf(DateTime.UtcNow))
|
||||
: Log.Qsos;
|
||||
Numbers.SeedFrom(counted.Where(q => q.TimestampUtc >= SerialNumbersFrom));
|
||||
Numbers.SeedFrom(counted);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user