Skip to content

Commit

Permalink
Merge pull request #135 from mcrossley/master
Browse files Browse the repository at this point in the history
v3.15.0
  • Loading branch information
mcrossley authored Jan 31, 2022
2 parents 57c3902 + f2888f3 commit 86ade49
Show file tree
Hide file tree
Showing 11 changed files with 1,882 additions and 206 deletions.
24 changes: 24 additions & 0 deletions CumulusMX/Cumulus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2720,6 +2720,13 @@ internal void RealtimeTimerTick(object sender, ElapsedEventArgs elapsedEventArgs
return;
}

if ((!station.PressReadyToPlot || !station.TempReadyToPlot || !station.WindReadyToPlot) && !StationOptions.NoSensorCheck)
{
// not all the data is ready and NoSensorCheck is not enabled
LogMessage($"Realtime[{cycle}]: Not all data is ready, aborting process");
return;
}

LogDebugMessage($"Realtime[{cycle}]: Start cycle");
try
{
Expand Down Expand Up @@ -4202,6 +4209,14 @@ private void ReadIniFile()
EcowittExtraUseCo2= ini.GetValue("GW1000", "ExtraSensorUseCo2", true);
EcowittExtraUseLightning = ini.GetValue("GW1000", "ExtraSensorUseLightning", true);
EcowittExtraUseLeak= ini.GetValue("GW1000", "ExtraSensorUseLeak", true);
// api
EcowittApplicationKey = ini.GetValue("GW1000", "EcowittAppKey", "");
EcowittUserApiKey = ini.GetValue("GW1000", "EcowittUserKey", "");
EcowittMacAddress = ini.GetValue("GW1000", "EcowittMacAddress", "");
if (string.IsNullOrEmpty(EcowittMacAddress) && !string.IsNullOrEmpty(Gw1000MacAddress))
{
EcowittMacAddress = Gw1000MacAddress;
}

// Ambient settings
AmbientExtraEnabled = ini.GetValue("Ambient", "ExtraSensorDataEnabled", false);
Expand Down Expand Up @@ -5321,6 +5336,10 @@ internal void WriteIniFile()
ini.SetValue("GW1000", "ExtraSensorUseLightning", EcowittExtraUseLightning);
ini.SetValue("GW1000", "ExtraSensorUseLeak", EcowittExtraUseLeak);

ini.SetValue("GW1000", "EcowittAppKey", EcowittApplicationKey);
ini.SetValue("GW1000", "EcowittUserKey", EcowittUserApiKey);
ini.SetValue("GW1000", "EcowittMacAddress", EcowittMacAddress);

// Ambient settings
ini.SetValue("Ambient", "ExtraSensorDataEnabled", AmbientExtraEnabled);
ini.SetValue("Ambient", "ExtraSensorUseSolar", AmbientExtraUseSolar);
Expand Down Expand Up @@ -6260,9 +6279,11 @@ private void ReadStringsFile()

//public int VPClosedownTime { get; set; }
public string AirLinkInIPAddr { get; set; }

public string AirLinkOutIPAddr { get; set; }

public bool AirLinkInEnabled { get; set; }

public bool AirLinkOutEnabled { get; set; }

public bool EcowittExtraEnabled { get; set; }
Expand All @@ -6277,6 +6298,9 @@ private void ReadStringsFile()
public bool EcowittExtraUseCo2 { get; set; }
public bool EcowittExtraUseLightning { get; set; }
public bool EcowittExtraUseLeak { get; set; }
public string EcowittApplicationKey { get; set; }
public string EcowittUserApiKey { get; set; }
public string EcowittMacAddress { get; set; }

public bool AmbientExtraEnabled { get; set; }
public bool AmbientExtraUseSolar { get; set; }
Expand Down
1 change: 1 addition & 0 deletions CumulusMX/CumulusMX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
<Compile Include="DavisAirLink.cs" />
<Compile Include="DavisWllStation.cs" />
<Compile Include="EasyWeather.cs" />
<Compile Include="EcowittApi.cs" />
<Compile Include="EmailSender.cs" />
<Compile Include="ExtraSensorSettings.cs" />
<Compile Include="FOStation.cs" />
Expand Down
9 changes: 7 additions & 2 deletions CumulusMX/DavisWllStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ public override void Start()
tmrRealtime.AutoReset = true;
tmrRealtime.Start();

// Create a current conditions thread to poll readings every 30 seconds
// Create a current conditions thread to poll readings every 10 seconds as temperature updates every 10 seconds
GetWllCurrent(null, null);
tmrCurrent.Elapsed += GetWllCurrent;
tmrCurrent.Interval = 30 * 1000; // Every 30 seconds
tmrCurrent.Interval = 10 * 1000; // Every 10 seconds
tmrCurrent.AutoReset = true;
tmrCurrent.Start();

Expand Down Expand Up @@ -708,6 +708,11 @@ private void DecodeCurrent(string currentJson)
DoWindChill(ConvertTempFToUser(data1.wind_chill.Value), dateTime);
}

if (data1.thsw_index.HasValue)
{
THSWIndex = ConvertTempFToUser(data1.thsw_index.Value);
}

//TODO: Wet Bulb? rec["wet_bulb"] - No, we already have humidity
//TODO: Heat Index? rec["heat_index"] - No, Cumulus always calculates HI
}
Expand Down
Loading

0 comments on commit 86ade49

Please sign in to comment.