Skip to content

Commit

Permalink
Minor code tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrossley committed May 23, 2022
1 parent edc5b33 commit 42211f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CumulusMX/DataEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CumulusMX
internal class DataEditor
{
private WeatherStation station;
private Cumulus cumulus;
private readonly Cumulus cumulus;
private WebTags webtags;

private readonly List<LastHourRainLog> hourRainLog = new List<LastHourRainLog>();
Expand Down Expand Up @@ -1758,7 +1758,7 @@ internal string GetMonthlyRecDayFile()
var isDryNow = false;
var thisDateDry = DateTime.MinValue;
var thisDateWet = DateTime.MinValue;
var monthOffset = 0;
int monthOffset;
var firstEntry = true;

var json = new StringBuilder("{", 25500);
Expand Down
22 changes: 12 additions & 10 deletions CumulusMX/HttpStationAmbient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -692,22 +692,23 @@ private void ProcessAirQuality(NameValueCollection data, WeatherStation station)
}
}


/*
* Not yet used
private void ProcessCo2(NameValueCollection data, WeatherStation station)
{
// co2 - [int, ppm]
// co2_in - [int, ppm]
// co2_in_24h - [float, ppm]
/*
if (data["co2_in"] != null)
{
station.CO2 = Convert.ToInt32(data["co2_in"], CultureInfo.InvariantCulture);
}
if (data["co2_in_24"] != null)
{
station.CO2_24h = Convert.ToInt32(data["co2_in_24"], CultureInfo.InvariantCulture);
}
*/
//if (data["co2_in"] != null)
//{
// station.CO2 = Convert.ToInt32(data["co2_in"], CultureInfo.InvariantCulture);
//}
//if (data["co2_in_24"] != null)
//{
// station.CO2_24h = Convert.ToInt32(data["co2_in_24"], CultureInfo.InvariantCulture);
//}
// From FOSKplugin
// co2lvl
Expand Down Expand Up @@ -738,6 +739,7 @@ private void ProcessCo2(NameValueCollection data, WeatherStation station)
station.CO2_pm10_24h = Convert.ToDouble(data["pm10_AQIlvl_24h_co2"], CultureInfo.InvariantCulture);
}
}
*/

private void ProcessLightning(NameValueCollection data, WeatherStation station)
{
Expand Down

0 comments on commit 42211f0

Please sign in to comment.