Skip to content

Commit

Permalink
Stop HTTP stations immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Crossley committed Dec 28, 2022
1 parent 0583fca commit 31d75a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CumulusMX/HttpStationAmbient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public override void Start()
public override void Stop()
{
stopping = true;
Api.stationAmbient = null;
Api.stationAmbientExtra = null;
if (station == null)
{
StopMinuteTimer();
Expand Down Expand Up @@ -278,7 +280,7 @@ public string ProcessData(IHttpContext context, bool main)
// 24hourrainin
// weeklyrainin
// monthlyrainin
// yearlyrainin - missing on some stations, they supply totalrainin
// yearlyrainin - missing on some stations, they supply totalrainin
// eventrainin
// totalrainin - only some stations

Expand Down
6 changes: 4 additions & 2 deletions CumulusMX/HttpStationEcowitt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ public override void Start()
public override void Stop()
{
stopping = true;
Api.stationEcowitt = null;
Api.stationEcowittExtra = null;
if (station == null)
{
StopMinuteTimer();
Expand Down Expand Up @@ -272,7 +274,7 @@ POST Parameters - all fields are URL escaped
}

public string ApplyData(string dataString, bool main, DateTime? ts = null)
{
{
var procName = main ? "ApplyData" : "ApplyExtraData";
var thisStation = main ? this : station;
string thisTemp = null;
Expand Down Expand Up @@ -789,7 +791,7 @@ public string ApplyData(string dataString, bool main, DateTime? ts = null)
}

if (main)
{
{
// Do derived values after the primary values

// === Dewpoint ===
Expand Down
1 change: 1 addition & 0 deletions CumulusMX/HttpStationWund.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public override void Start()
public override void Stop()
{
stopping = true;
Api.stationWund = null;
StopMinuteTimer();
}

Expand Down

0 comments on commit 31d75a2

Please sign in to comment.