Skip to content

Commit

Permalink
Merge pull request #36 from mcrossley/master
Browse files Browse the repository at this point in the history
B3057
  • Loading branch information
mcrossley authored Nov 29, 2019
2 parents 6f9a51c + 05a54fa commit 698eaae
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 21 deletions.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
6 changes: 6 additions & 0 deletions CumulusMX/CalibrationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public string UpdateCalibrationConfig(IHttpContext context)
cumulus.InTempoffset = Convert.ToDouble(settings.offsets.indoortemp, InvC);
cumulus.HumOffset = settings.offsets.humidity;
cumulus.WindDirOffset = settings.offsets.winddir;
cumulus.SolarOffset = Convert.ToDouble(settings.offsets.solar);
cumulus.UVOffset = Convert.ToDouble(settings.offsets.uv, InvC);
cumulus.WetBulbOffset = Convert.ToDouble(settings.offsets.wetbulb, InvC);

Expand All @@ -55,6 +56,7 @@ public string UpdateCalibrationConfig(IHttpContext context)
cumulus.TempMult = Convert.ToDouble(settings.multipliers.outdoortemp, InvC);
cumulus.HumMult = Convert.ToDouble(settings.multipliers.humidity, InvC);
cumulus.RainMult = Convert.ToDouble(settings.multipliers.rainfall, InvC);
cumulus.SolarMult = Convert.ToDouble(settings.multipliers.solar, InvC);
cumulus.UVMult = Convert.ToDouble(settings.multipliers.uv, InvC);
cumulus.WetBulbMult = Convert.ToDouble(settings.multipliers.wetbulb, InvC);

Expand Down Expand Up @@ -92,6 +94,7 @@ public string GetCalibrationAlpacaFormData()
indoortemp = cumulus.InTempoffset,
humidity = cumulus.HumOffset,
winddir = cumulus.WindDirOffset,
solar = cumulus.SolarOffset,
uv = cumulus.UVOffset,
wetbulb = cumulus.WetBulbOffset
};
Expand All @@ -103,6 +106,7 @@ public string GetCalibrationAlpacaFormData()
humidity = cumulus.HumMult,
outdoortemp = cumulus.TempMult,
rainfall = cumulus.RainMult,
solar = cumulus.SolarMult,
uv = cumulus.UVMult,
wetbulb = cumulus.WetBulbMult
};
Expand Down Expand Up @@ -162,6 +166,7 @@ public class JsonCalibrationSettingsOffsets
public double indoortemp { get; set; }
public int humidity { get; set; }
public int winddir { get; set; }
public double solar { get; set; }
public double uv { get; set; }
public double wetbulb { get; set; }
}
Expand All @@ -174,6 +179,7 @@ public class JsonCalibrationSettingsMultipliers
public double outdoortemp { get; set; }
public double humidity { get; set; }
public double rainfall { get; set; }
public double solar { get; set; }
public double uv { get; set; }
public double wetbulb { get; set; }
}
Expand Down
14 changes: 10 additions & 4 deletions CumulusMX/Cumulus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace CumulusMX
public class Cumulus
{
/////////////////////////////////
public string Version = "3.2.0";
public string Build = "3056";
public string Version = "3.2.1";
public string Build = "3057";
/////////////////////////////////

private static string appGuid = "57190d2e-7e45-4efb-8c09-06a176cef3f3";
Expand Down Expand Up @@ -505,6 +505,7 @@ public struct TExtraFiles
public int HumOffset = 0;
public int WindDirOffset = 0;
public double InTempoffset = 0.0;
public double SolarOffset = 0.0;
public double UVOffset = 0.0;
public double WetBulbOffset = 0.0;

Expand All @@ -516,6 +517,7 @@ public struct TExtraFiles
public double HumMult = 1.0;
public double HumMult2 = 0.0;
public double RainMult = 1.0;
public double SolarMult = 1.0;
public double UVMult = 1.0;
public double WetBulbMult = 1.0;

Expand Down Expand Up @@ -1289,9 +1291,9 @@ public Cumulus(int HTTPport, int WSport)
LogMessage("RainDayThreshold=" + RainDayThreshold.ToString("F3"));
LogMessage("Offsets and Multipliers:");
LogMessage("PO=" + PressOffset.ToString("F3") + " TO=" + TempOffset.ToString("F3") + " HO=" + HumOffset + " WDO=" + WindDirOffset + " ITO=" +
InTempoffset.ToString("F3") + " UVO=" + UVOffset.ToString("F3"));
InTempoffset.ToString("F3") + "SO=" + SolarOffset.ToString("F3") + " UVO=" + UVOffset.ToString("F3"));
LogMessage("PM=" + PressMult.ToString("F3") + " WSM=" + WindSpeedMult.ToString("F3") + " WGM=" + WindGustMult.ToString("F3") + " TM=" + TempMult.ToString("F3") + " TM2=" + TempMult2.ToString("F3") +
" HM=" + HumMult.ToString("F3") + " HM2=" + HumMult2.ToString("F3") + " RM=" + RainMult.ToString("F3") + " UVM=" + UVMult.ToString("F3"));
" HM=" + HumMult.ToString("F3") + " HM2=" + HumMult2.ToString("F3") + " RM=" + RainMult.ToString("F3") + "SM=" + SolarMult.ToString("F3") + " UVM=" + UVMult.ToString("F3"));
LogMessage("Spike removal:");
LogMessage("TD=" + EWtempdiff.ToString("F3") + " GD=" + EWgustdiff.ToString("F3") + " WD=" + EWwinddiff.ToString("F3") + " HD=" + EWhumiditydiff.ToString("F3") + " PD=" +
EWpressurediff.ToString("F3"));
Expand Down Expand Up @@ -3382,6 +3384,7 @@ private void ReadIniFile()
HumOffset = ini.GetValue("Offsets", "HumOffset", 0);
WindDirOffset = ini.GetValue("Offsets", "WindDirOffset", 0);
InTempoffset = ini.GetValue("Offsets", "InTempOffset", 0.0);
SolarOffset = ini.GetValue("Offsers", "SolarOffset", 0.0);
UVOffset = ini.GetValue("Offsets", "UVOffset", 0.0);
WetBulbOffset = ini.GetValue("Offsets", "WetBulbOffset", 0.0);

Expand All @@ -3393,6 +3396,7 @@ private void ReadIniFile()
HumMult = ini.GetValue("Offsets", "HumMult", 1.0);
HumMult2 = ini.GetValue("Offsets", "HumMult2", 0.0);
RainMult = ini.GetValue("Offsets", "RainMult", 1.0);
SolarMult = ini.GetValue("Offsets", "SolarMult", 1.0);
UVMult = ini.GetValue("Offsets", "UVMult", 1.0);
WetBulbMult = ini.GetValue("Offsets", "WetBulbMult", 1.0);

Expand Down Expand Up @@ -3911,6 +3915,7 @@ internal void WriteIniFile()
ini.SetValue("Offsets", "WindDirOffset", WindDirOffset);
ini.SetValue("Offsets", "InTempOffset", InTempoffset);
ini.SetValue("Offsets", "UVOffset", UVOffset);
ini.SetValue("Offsets", "SolarOffset", SolarOffset);
ini.SetValue("Offsets", "WetBulbOffset", WetBulbOffset);
//ini.SetValue("Offsets", "DavisCalcAltPressOffset", DavisCalcAltPressOffset);

Expand All @@ -3921,6 +3926,7 @@ internal void WriteIniFile()
ini.SetValue("Offsets", "TempMult", TempMult);
ini.SetValue("Offsets", "HumMult", HumMult);
ini.SetValue("Offsets", "RainMult", RainMult);
ini.SetValue("Offsets", "SolarMult", SolarMult);
ini.SetValue("Offsets", "UVMult", UVMult);
ini.SetValue("Offsets", "WetBulbMult", WetBulbMult);

Expand Down
8 changes: 4 additions & 4 deletions CumulusMX/CumulusMX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>3056</ApplicationRevision>
<ApplicationVersion>3.2.0.3056</ApplicationVersion>
<ApplicationRevision>3057</ApplicationRevision>
<ApplicationVersion>3.2.1.3057</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down Expand Up @@ -90,8 +90,8 @@
<Reference Include="FluentFTP, Version=21.0.0.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">
<HintPath>..\packages\FluentFTP.21.0.0\lib\net45\FluentFTP.dll</HintPath>
</Reference>
<Reference Include="HidSharp, Version=2.0.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HidSharp.2.0.8\lib\net35\HidSharp.dll</HintPath>
<Reference Include="HidSharp, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HidSharp.2.1.0\lib\net35\HidSharp.dll</HintPath>
</Reference>
<Reference Include="LinqToTwitter.AspNet, Version=3.1.1.15391, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
8 changes: 3 additions & 5 deletions CumulusMX/DavisStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,8 @@ private bool SendLoopCommand(TcpClient tcpPort, string commandString)
}
catch (Exception ex)
{
cumulus.LogDataMessage("Error sending LOOP command: " + ex.Message);
cumulus.LogMessage("Error sending LOOP command [" + commandString.Replace("\n", "") + "]: " + ex.Message);
WakeVP(tcpPort);
}

// return result to indicate success or otherwise
Expand Down Expand Up @@ -2476,10 +2477,7 @@ private bool WakeVP(TcpClient thePort)
int passCount = 1, maxPasses = 4;
NetworkStream theStream;

if (cumulus.DataLogging)
{
cumulus.LogMessage("Wake VP");
}
cumulus.LogDataMessage("Wake VP");

try
{
Expand Down
6 changes: 3 additions & 3 deletions CumulusMX/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CumulusMX")]
[assembly: AssemblyDescription("Build 3056")]
[assembly: AssemblyDescription("Build 3057")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CumulusMX")]
Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.2.0.3056")]
[assembly: AssemblyFileVersion("3.2.0.3056")]
[assembly: AssemblyVersion("3.2.1.3057")]
[assembly: AssemblyFileVersion("3.2.1.3057")]
4 changes: 2 additions & 2 deletions CumulusMX/WMR200Station.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,15 +1628,15 @@ private void ProcessHistoryDataPacket()
// just to calculate theoretical max for consistency
DoSolarRad(0, timestamp);

DoApparentTemp(timestamp);

cumulus.DoLogFile(timestamp,false);

if (cumulus.LogExtraSensors)
{
cumulus.DoExtraLogFile(timestamp);
}

DoApparentTemp(timestamp);

AddLastHourDataEntry(timestamp, Raincounter, OutdoorTemperature);
AddLast3HourDataEntry(timestamp, Pressure, OutdoorTemperature);
RemoveOldLHData(timestamp);
Expand Down
2 changes: 1 addition & 1 deletion CumulusMX/WeatherStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3727,7 +3727,7 @@ public void DoUV(double value, DateTime timestamp)

protected void DoSolarRad(int value, DateTime timestamp)
{
SolarRad = value;
SolarRad = (value * cumulus.SolarMult) + cumulus.SolarOffset;
// Update display

if (SolarRad > HighSolarToday)
Expand Down
2 changes: 1 addition & 1 deletion CumulusMX/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="EmbedIO" version="2.1.1" targetFramework="net452" />
<package id="FluentFTP" version="21.0.0" targetFramework="net452" />
<package id="HidSharp" version="2.0.8" targetFramework="net452" />
<package id="HidSharp" version="2.1.0" targetFramework="net452" />
<package id="linqtotwitter" version="3.1.1" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net452" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
Expand Down
20 changes: 19 additions & 1 deletion Updates.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
3.2.1 - b3057
=============
- Fix for WMR200 stations writing a zero value Apparent Temperature to the log files when retrieving logger data
- Fix the dashboard for Internet Explorer
- Fix default website index page header not wrapping on small screens
- Fix for Davis stations connected via TCP/IP to detect failures and reopen the connection more quickly during loop data processing
- Adds Solar calibration settings offset and multiplier
- Updates the SampleStrings.ini file with the extra captions added in b3056

- Updated files
\CumulusMX.exe
\SampleStrings.ini
\HidSharp.dll
\interface\js\dashboard.js
\interface\json\CalibrationSchema.json
\web\indexT.htm


3.2.0 - b3056
=============
- Adds support for Ecowitt GW1000 WiFi gateway
Expand Down Expand Up @@ -37,7 +55,7 @@
- Changes All Time Records editor to only load data from the Day File by default. Monthly log file
processing is now optional as it can take a very long time on a slow machine e.g. Raspberry Pi
- Fix to catch badly formed Davis WLL broadcast messages
- Fix for Davis WLL edge cases producing an intial zero value wind chill on startup
- Fix for Davis WLL edge cases producing an initial zero value wind chill on startup

- Updated files
\CumulusMX.exe
Expand Down

0 comments on commit 698eaae

Please sign in to comment.