Show the cluster's solar weather in a bandmap status bar
The reader follows N1MM's rules for WWV and WCY lines and the sh/wwv table. The bar is hidden until the cluster has sent some. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ public sealed class ClusterClient : IDisposable
|
||||
private readonly CancellationTokenSource stopping = new();
|
||||
private readonly LineAssembler lines = new();
|
||||
private readonly Queue<ClusterLine> recent = new();
|
||||
private readonly SolarReader solar = new();
|
||||
private readonly Lock guard = new();
|
||||
|
||||
private TcpClient? client;
|
||||
@@ -80,6 +81,9 @@ public sealed class ClusterClient : IDisposable
|
||||
|
||||
public event EventHandler<string>? LineArrived;
|
||||
|
||||
/// The node sent solar weather, as the text to show.
|
||||
public event EventHandler<string>? SolarArrived;
|
||||
|
||||
/// What went out to the node, so the telnet window can show the login and
|
||||
/// the commands beside the node's answers.
|
||||
public event EventHandler<string>? LineSent;
|
||||
@@ -237,6 +241,10 @@ public sealed class ClusterClient : IDisposable
|
||||
Kind = kind;
|
||||
ConnectionChanged?.Invoke(this, IsConnected);
|
||||
}
|
||||
if (solar.Read(line) is { } weather)
|
||||
{
|
||||
SolarArrived?.Invoke(this, weather);
|
||||
}
|
||||
Spot? spot = SpotLine.Parse(line, DateTime.UtcNow);
|
||||
if (spot is not null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user