Show only the newest SFI, A and K in the solar weather bar
For sh/wwv, only the first record under the header is used, since the table lists the newest first. The date, time, forecast and logger are dropped, and the status bar reads "SFI 140 A 5 K 2". The line the node sent is the tool tip. Announcement lines give the same three values. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -914,7 +914,7 @@ public sealed partial class AppSession : IDisposable
|
||||
public void ConnectCluster()
|
||||
{
|
||||
cluster?.Dispose();
|
||||
SetSolar("");
|
||||
SetSolar(null);
|
||||
cluster = new ClusterClient(
|
||||
Settings.ClusterHost,
|
||||
Settings.ClusterPort,
|
||||
@@ -924,20 +924,20 @@ public sealed partial class AppSession : IDisposable
|
||||
autoLogon: Settings.ClusterAutoLogon,
|
||||
keepAliveInterval: TimeSpan.FromMinutes(Math.Max(1, Settings.ClusterKeepAliveMinutes)));
|
||||
cluster.SpotArrived += (_, spot) => TakeSpot(spot);
|
||||
cluster.SolarArrived += (_, text) => SetSolar(text);
|
||||
cluster.SolarArrived += (_, report) => SetSolar(report);
|
||||
cluster.ConnectionChanged += (_, _) => Changed?.Invoke(this, EventArgs.Empty);
|
||||
cluster.Start();
|
||||
}
|
||||
|
||||
/// The latest solar weather the cluster sent, or empty when it has sent
|
||||
/// The latest solar weather the cluster sent, or null when it has sent
|
||||
/// none on this connection.
|
||||
public string Solar { get; private set; } = "";
|
||||
public SolarReport? Solar { get; private set; }
|
||||
|
||||
public event EventHandler? SolarChanged;
|
||||
|
||||
private void SetSolar(string text)
|
||||
private void SetSolar(SolarReport? report)
|
||||
{
|
||||
Solar = text;
|
||||
Solar = report;
|
||||
SolarChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
@@ -945,7 +945,7 @@ public sealed partial class AppSession : IDisposable
|
||||
{
|
||||
cluster?.Dispose();
|
||||
cluster = null;
|
||||
SetSolar("");
|
||||
SetSolar(null);
|
||||
Changed?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user