Skip to content

Commit

Permalink
Merge pull request #10 from mcrossley/main
Browse files Browse the repository at this point in the history
Updated for Cumulus MX v 3.20.0+, now has 24 hour rainfall values
  • Loading branch information
mcrossley authored Aug 18, 2022
2 parents fd68aa9 + 6fd39e3 commit 8f7635b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ExportToMySQL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="MySqlConnector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92, processorArchitecture=MSIL">
<HintPath>packages\MySqlConnector.2.1.10\lib\net471\MySqlConnector.dll</HintPath>
<HintPath>packages\MySqlConnector.2.1.11\lib\net471\MySqlConnector.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
Expand Down
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private static void DoDayfileExport()
if (File.Exists(filename))
{
Console.WriteLine("Dayfile exists, beginning export");
string StartOfDayfileInsertSQL = "INSERT IGNORE INTO " + MySqlDayfileTable + " (LogDate,HighWindGust,HWindGBear,THWindG,MinTemp,TMinTemp,MaxTemp,TMaxTemp,MinPress,TMinPress,MaxPress,TMaxPress,MaxRainRate,TMaxRR,TotRainFall,AvgTemp,TotWindRun,HighAvgWSpeed,THAvgWSpeed,LowHum,TLowHum,HighHum,THighHum,TotalEvap,HoursSun,HighHeatInd,THighHeatInd,HighAppTemp,THighAppTemp,LowAppTemp,TLowAppTemp,HighHourRain,THighHourRain,LowWindChill,TLowWindChill,HighDewPoint,THighDewPoint,LowDewPoint,TLowDewPoint,DomWindDir,HeatDegDays,CoolDegDays,HighSolarRad,THighSolarRad,HighUV,THighUV,MaxFeelsLike,TMaxFeelsLike,MinFeelsLike,TMinFeelsLike,MaxHumidex,TMaxHumidex,HWindGBearSym,DomWindDirSym)";
string StartOfDayfileInsertSQL = "INSERT IGNORE INTO " + MySqlDayfileTable + " (LogDate,HighWindGust,HWindGBear,THWindG,MinTemp,TMinTemp,MaxTemp,TMaxTemp,MinPress,TMinPress,MaxPress,TMaxPress,MaxRainRate,TMaxRR,TotRainFall,AvgTemp,TotWindRun,HighAvgWSpeed,THAvgWSpeed,LowHum,TLowHum,HighHum,THighHum,TotalEvap,HoursSun,HighHeatInd,THighHeatInd,HighAppTemp,THighAppTemp,LowAppTemp,TLowAppTemp,HighHourRain,THighHourRain,LowWindChill,TLowWindChill,HighDewPoint,THighDewPoint,LowDewPoint,TLowDewPoint,DomWindDir,HeatDegDays,CoolDegDays,HighSolarRad,THighSolarRad,HighUV,THighUV,MaxFeelsLike,TMaxFeelsLike,MinFeelsLike,TMinFeelsLike,MaxHumidex,TMaxHumidex,ChillHours,HighRain24h,THighRain24h,HWindGBearSym,DomWindDirSym)";

int linenum = 0;

Expand All @@ -264,7 +264,7 @@ private static void DoDayfileExport()

StringBuilder sb = new StringBuilder(StartOfDayfileInsertSQL + " Values('" + sqldate + "',");

for (int i = 1; i < 52; i++)
for (int i = 1; i < 55; i++)
{
if (i < st.Count && !string.IsNullOrEmpty(st[i]))
{
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ExportToMySQL")]
[assembly: AssemblyCopyright("Copyright © 2015-2021")]
[assembly: AssemblyCopyright("Copyright © 2015-2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

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("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
8 changes: 8 additions & 0 deletions Updates.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
ver 1.6.0
—————————
- Updated for Cumulus MX v 3.20.0+, now has 24 hour rainfall values

ver 1.5.0
—————————
- Updated libraries to match Cumulus MX v3.18.0+

ver 1.4.0
—————————
- Updated to .Net Framework 4.8 to match Cumulus MX v3.14.0+
Expand Down
2 changes: 1 addition & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MySqlConnector" version="2.1.10" targetFramework="net48" />
<package id="MySqlConnector" version="2.1.11" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="6.0.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
Expand Down

0 comments on commit 8f7635b

Please sign in to comment.