diff --git a/CumulusMX/Cumulus.cs b/CumulusMX/Cumulus.cs index 0bad494a..1357c0d8 100644 --- a/CumulusMX/Cumulus.cs +++ b/CumulusMX/Cumulus.cs @@ -30,7 +30,7 @@ public class Cumulus { ///////////////////////////////// public string Version = "3.0.0"; - public string Build = "3046test"; + public string Build = "3046"; ///////////////////////////////// private static string appGuid = "57190d2e-7e45-4efb-8c09-06a176cef3f3"; @@ -379,10 +379,10 @@ public struct TExtraFiles public string Platform; - public string dbfile = "cumulusmx.db"; + public string dbfile; public SQLiteConnection LogDB; - public string diaryfile = "diary.db"; + public string diaryfile; public SQLiteConnection DiaryDB; public string Datapath; @@ -779,8 +779,8 @@ public struct TExtraFiles /* - CryptoLicense lic = new CryptoLicense(); - + CryptoLicense lic = new CryptoLicense(); + //create code for applicationsecret byte[] applicationSecret = Convert.FromBase64String("QpJGpsqWfkKu+yM8Ljp6+A=="); @@ -877,7 +877,7 @@ private void DoLicenseCheck() } Console.WriteLine("Licence is valid"); - + } } */ @@ -888,13 +888,13 @@ public Cumulus(int HTTPport, int WSport) /*lic.ValidationKey = "AMAAMACrfxYrYEOGd+D5ypZ32bnLCvviBrTlejReXNRdvgWzSgyvdfkLvNDvDX1WuMh2JIEDAAEAAQ=="; - // Load license from the file - lic.StorageMode = LicenseStorageMode.ToFile; - if (lic.Load("licence.lic") == false) + // Load license from the file + lic.StorageMode = LicenseStorageMode.ToFile; + if (lic.Load("licence.lic") == false) throw new Exception("License could not be loaded"); - // Validate the license using .Status property - if (lic.Status != LicenseStatus.Valid) + // Validate the license using .Status property + if (lic.Status != LicenseStatus.Valid) throw new Exception("license validation failed"); */ @@ -1038,6 +1038,9 @@ public Cumulus(int HTTPport, int WSport) backuppath = "backup" + DirectorySeparator; ReportPath = "Reports" + DirectorySeparator; + dbfile = Datapath + "cumulusmx.db"; + diaryfile = Datapath + "diary.db"; + AlltimeFile = Datapath + "alltime.rec"; AlltimeIniFile = Datapath + "alltime.ini"; Alltimelogfile = Datapath + "alltimelog.txt"; @@ -1105,12 +1108,12 @@ public Cumulus(int HTTPport, int WSport) // Open database (create file if it doesn't exist) SQLiteOpenFlags flags = SQLiteOpenFlags.Create | SQLiteOpenFlags.ReadWrite; - LogDB = new SQLiteConnection(Datapath + dbfile, flags); + LogDB = new SQLiteConnection(dbfile, flags); LogDB.CreateTable(); // Open diary database (create file if it doesn't exist) - DiaryDB = new SQLiteConnection(Datapath + diaryfile, flags); + DiaryDB = new SQLiteConnection(diaryfile, flags); DiaryDB.CreateTable(); @@ -1713,9 +1716,9 @@ private void APRSTimerTick(object sender, ElapsedEventArgs e) private void WebTimerTick(object sender, ElapsedEventArgs e) { - if (!WebUpdating) + if (!WebUpdating) { - WebUpdating = true; + WebUpdating = true; ftpThread = new Thread(DoHTMLFiles); ftpThread.IsBackground = true; ftpThread.Start(); @@ -4376,7 +4379,7 @@ private void ReadStringsFile() public bool DavisStation { get; set; } public string TempTrendFormat { get; set; } public string AppDir { get; set; } - + public int Manufacturer { get; set; } public int ImetLoggerInterval { get; set; } public TimeSpan DayLength { get; set; } @@ -5318,7 +5321,7 @@ public void Stop() WriteIniFile(); //httpServer.Stop(); - + //if (httpServer != null) httpServer.Dispose(); if (station != null) @@ -5344,7 +5347,7 @@ public void ExecuteProgram(string externalProgram, string externalParams) start.FileName = externalProgram; // Dont show a console window start.CreateNoWindow = true; - // Run the external process + // Run the external process Process.Start(start); } @@ -5478,7 +5481,7 @@ private void DoFTPLogin() conn.DataConnectionEncryption = true; conn.ValidateCertificate += Client_ValidateCertificate; // b3045 - switch from System.Net.Ftp.Client to FluentFTP allows us to specifiy protocols - RealtimeFTP.SslProtocols = SslProtocols.Default | SslProtocols.Tls11 | SslProtocols.Tls12; + conn.SslProtocols = SslProtocols.Default | SslProtocols.Tls11 | SslProtocols.Tls12; } if (ActiveFTPMode) diff --git a/CumulusMX/Properties/AssemblyInfo.cs b/CumulusMX/Properties/AssemblyInfo.cs index d1c32aa0..6df605db 100644 --- a/CumulusMX/Properties/AssemblyInfo.cs +++ b/CumulusMX/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("CumulusMX - test")] +[assembly: AssemblyTitle("CumulusMX")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CumulusMX - test")] +[assembly: AssemblyProduct("CumulusMX")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/CumulusMX/WeatherStation.cs b/CumulusMX/WeatherStation.cs index de0dd084..7929bded 100644 --- a/CumulusMX/WeatherStation.cs +++ b/CumulusMX/WeatherStation.cs @@ -6281,17 +6281,22 @@ public void DoET(double value, DateTime timestamp) noET = false; } - if ((value == 0) && (StartofdayET > 0)) + //if ((value == 0) && (StartofdayET > 0)) + if (value < StartofdayET) // change b3046 { // ET reset - cumulus.LogMessage("*** ET Reset"); + cumulus.LogMessage("*** ET Reset *** AnnualET: " + AnnualETTotal.ToString("#.##") + " StartofdayET: " + StartofdayET.ToString("#.##") + " StationET: " + value.ToString("#.##") + " CurrentET: " + ET.ToString("#.##")); + AnnualETTotal = value; // add b3046 // set the start of day figure so it reflects the ET // so far today StartofdayET = AnnualETTotal - ET; WriteTodayFile(timestamp, false); + cumulus.LogMessage("New ET values. AnnualET: " + AnnualETTotal.ToString("#.##") + " StartofdayET: " + StartofdayET.ToString("#.##") + " StationET: " + value.ToString("#.##") + " CurrentET: " + ET.ToString("#.##")); + } + else + { + AnnualETTotal = value; } - - AnnualETTotal = value; ET = AnnualETTotal - StartofdayET; diff --git a/Updates.txt b/Updates.txt index fc502ea3..2a965744 100644 --- a/Updates.txt +++ b/Updates.txt @@ -73,12 +73,17 @@ - Fix for Slovenian locale (and any other with a two character date separator) -3046test -======== + +3046 +==== - Weather Diary - Added Weather Diary page to manegement interface - Added diary.db file to daily backup files - Removed diary.db from distribution (it is created on first use to avoid overwriting the file on CMX distro updates) - Web Tags - - Added <#snowdepth> tag \ No newline at end of file + - Added <#snowdepth> tag processing + +- ET annual rollover fix + +- Fix to TLS 1.2 FTPS of the 'periodic' files