Set the bandmap spot timeout separately for CW/digital and phone

CW and digital spots time out after 10 minutes and phone spots after 30
by default, both settings on the telnet Filters tab. The mode comes from
the band plan; a frequency it has no boundaries for counts as phone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 12:27:55 +00:00
co-authored by Claude Sonnet 5.5
parent 7c25816b74
commit 9d0de3b129
6 changed files with 41 additions and 9 deletions
@@ -18,6 +18,21 @@ public class BandmapTests
Assert.Equal(["JA1XYZ", "DL1ABC"], map.On(Bands.Band20M).Select(s => s.Call.Text));
}
[Fact]
public void EachSpotLivesAsLongAsItsOwnLifetime()
{
Bandmap map = new(clock: () => Now)
{
LifetimeFor = spot => TimeSpan.FromMinutes(spot.Frequency.Kilohertz < 14_100 ? 10 : 30),
};
map.Add(At("DL1ABC", 14_025));
map.Add(At("JA1XYZ", 14_200));
map.DropOlderThan(Now.AddMinutes(15));
Assert.Equal(["JA1XYZ"], map.All().Select(s => s.Call.Text));
}
[Fact]
public void AStationThatMovesKeepsOneEntryOnItsBand()
{