Skip to content

Commit

Permalink
Revert FluentFTP library
Browse files Browse the repository at this point in the history
Accessibility additions
  • Loading branch information
mcrossley committed May 8, 2021
1 parent 847d08e commit 984b576
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CumulusMX/CalibrationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public string GetAlpacaFormData()

var data = new JsonCalibrationSettingsData()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
offsets = offsets,
multipliers = multipliers,
spikeremoval = spikeremoval,
Expand Down Expand Up @@ -198,6 +199,7 @@ public string GetAlpacaFormSchema()

public class JsonCalibrationSettingsData
{
public bool accessible { get; set; }
public JsonCalibrationSettingsOffsets offsets { get; set; }
public JsonCalibrationSettingsMultipliers multipliers { get; set; }
public JsonCalibrationSettingsSpikeRemoval spikeremoval { get; set; }
Expand Down
5 changes: 5 additions & 0 deletions CumulusMX/Cumulus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
using Timer = System.Timers.Timer;
using SQLite;
using Renci.SshNet;
using FluentFTP.Helpers;

namespace CumulusMX
{
Expand Down Expand Up @@ -3498,6 +3499,7 @@ private void ReadIniFile()
}
}

ProgramOptions.EnableAccessibility = ini.GetValue("Program", "EnableAccessibility", false);
ProgramOptions.StartupPingHost = ini.GetValue("Program", "StartupPingHost", "");
ProgramOptions.StartupPingEscapeTime = ini.GetValue("Program", "StartupPingEscapeTime", 999);
ProgramOptions.StartupDelaySecs = ini.GetValue("Program", "StartupDelaySecs", 0);
Expand Down Expand Up @@ -4550,6 +4552,8 @@ internal void WriteIniFile()

IniFile ini = new IniFile("Cumulus.ini");

ini.SetValue("Program", "EnableAccessibility", ProgramOptions.EnableAccessibility);

ini.SetValue("Program", "StartupPingHost", ProgramOptions.StartupPingHost);
ini.SetValue("Program", "StartupPingEscapeTime", ProgramOptions.StartupPingEscapeTime);

Expand Down Expand Up @@ -9401,6 +9405,7 @@ public class DiaryData

public class ProgramOptionsClass
{
public bool EnableAccessibility { get; set; }
public string StartupPingHost { get; set; }
public int StartupPingEscapeTime { get; set; }
public int StartupDelaySecs { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions CumulusMX/CumulusMX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
<Reference Include="BouncyCastle.Crypto, Version=1.8.10.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.10\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="FluentFTP, Version=33.1.5.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">
<HintPath>..\packages\FluentFTP.33.1.5\lib\net45\FluentFTP.dll</HintPath>
<Reference Include="FluentFTP, Version=32.3.1.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">
<HintPath>..\packages\FluentFTP.32.3.1\lib\net45\FluentFTP.dll</HintPath>
</Reference>
<Reference Include="HidSharp, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\HidSharp.2.1.0\lib\net35\HidSharp.dll</HintPath>
Expand Down
2 changes: 2 additions & 0 deletions CumulusMX/ExtraSensorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public string GetAlpacaFormData()

var data = new JsonExtraSensorSettings()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
airquality = aq,
airLink = airlink,
blakeLarsen = bl,
Expand Down Expand Up @@ -257,6 +258,7 @@ public string GetAlpacaFormSchema()

public class JsonExtraSensorSettings
{
public bool accessible { get; set; }
public JsonExtraSensorAirQuality airquality { get; set; }
public JsonExtraSensorAirLinkSettings airLink { get; set; }
public JsonExtraSensorBlakeLarsen blakeLarsen { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions CumulusMX/InternetSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ public string GetAlpacaFormData()

var data = new JsonInternetSettingsData()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
website = websitesettings,
websettings = websettings,
externalprograms = externalprograms,
Expand Down Expand Up @@ -618,6 +619,7 @@ public string UpdateExtraWebFiles(IHttpContext context)

public class JsonInternetSettingsData
{
public bool accessible { get; set; }
public JsonInternetSettingsWebsite website { get; set; }
public JsonInternetSettingsWebSettings websettings { get; set; }
public JsonInternetSettingsExternalPrograms externalprograms { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion CumulusMX/MysqlSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public string GetAlpacaFormData()

var data = new JsonMysqlSettings()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
server = server,
monthenabled = cumulus.MonthlyMySqlEnabled,
monthly = monthly,
Expand Down Expand Up @@ -241,7 +242,7 @@ private string CreateMySQLTable(string createSQL)
using (MySqlCommand cmd = new MySqlCommand(createSQL, mySqlConn))
{
cumulus.LogMessage($"MySQL Create Table: {createSQL}");

try
{
mySqlConn.Open();
Expand Down Expand Up @@ -295,6 +296,7 @@ public string CreateRealtimeSQL(IHttpContext context)

public class JsonMysqlSettings
{
public bool accessible {get; set;}
public JsonMysqlSettingsServer server { get; set; }
public bool monthenabled { get; set; }
public JsonMysqlSettingsMonthly monthly { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions CumulusMX/NOAASettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public string GetAlpacaFormData()

var data = new JsonNOAASettingsData()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
autosave = cumulus.NOAAAutoSave,

sitedetails = site,
Expand Down Expand Up @@ -234,6 +235,7 @@ public string UpdateConfig(IHttpContext context)

public class JsonNOAASettingsData
{
public bool accessible { get; set; }
public bool autosave {get; set; }
public JsonNOAASettingsSite sitedetails { get; set; }
public JsonNOAASettingsOutput outputfiles { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions CumulusMX/ProgramSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public string GetAlpacaFormData()

var settings = new JsonProgramSettings()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
startup = startup,
options = options
};
Expand Down Expand Up @@ -101,6 +102,7 @@ public string UpdateConfig(IHttpContext context)
// process the settings
try
{
cumulus.ProgramOptions.EnableAccessibility = settings.accessible;
cumulus.ProgramOptions.StartupPingHost = settings.startup.startuphostping;
cumulus.ProgramOptions.StartupPingEscapeTime = settings.startup.startuppingescape;
cumulus.ProgramOptions.StartupDelaySecs = settings.startup.startupdelay;
Expand Down Expand Up @@ -134,6 +136,7 @@ public string UpdateConfig(IHttpContext context)

public class JsonProgramSettings
{
public bool accessible { get; set; }
public JsonProgramSettingsStartupOptions startup { get; set; }
public JsonProgramSettingsGeneralOptions options { get; set; }
}
Expand Down
4 changes: 2 additions & 2 deletions CumulusMX/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.11.0.3130")]
[assembly: AssemblyFileVersion("3.11.0.3130")]
[assembly: AssemblyVersion("3.11.1.3130")]
[assembly: AssemblyFileVersion("3.11.1.3130")]
16 changes: 16 additions & 0 deletions CumulusMX/StationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ internal string GetAlpacaFormData()

var data = new JsonStationSettingsData()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
stationid = cumulus.StationType,
general = general,
davisvp2 = davisvp2,
Expand Down Expand Up @@ -1030,6 +1031,20 @@ internal string UpdateConfig(IHttpContext context)
context.Response.StatusCode = 500;
}

// Accessible
try
{
cumulus.ProgramOptions.EnableAccessibility = settings.accessible;
}
catch (Exception ex)
{
var msg = "Error processing Accessibility setting: " + ex.Message;
cumulus.LogMessage(msg);
errorMsg += msg + "\n\n";
context.Response.StatusCode = 500;
}


// Save the settings
cumulus.WriteIniFile();

Expand Down Expand Up @@ -1176,6 +1191,7 @@ internal string GetVersion()

internal class JsonStationSettingsData
{
public bool accessible { get; set; }
public int stationid { get; set; }
public JsonStationGeneral general { get; set; }
public JsonStationSettingsDavisVp2 davisvp2 { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions CumulusMX/ThirdPartySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ public string GetAlpacaFormData()

var data = new JsonThirdPartySettings()
{
accessible = cumulus.ProgramOptions.EnableAccessibility,
twitter = twittersettings,
wunderground = wusettings,
windy = windysettings,
Expand Down Expand Up @@ -526,6 +527,7 @@ public string GetAlpacaFormSchema()

public class JsonThirdPartySettings
{
public bool accessible { get; set; }
public JsonThirdPartySettingsTwitterSettings twitter { get; set; }
public JsonThirdPartySettingsWunderground wunderground { get; set; }
public JsonThirdPartySettingsWindy windy { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion CumulusMX/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EmbedIO" version="2.1.1" targetFramework="net452" />
<package id="FluentFTP" version="33.1.5" targetFramework="net452" />
<package id="FluentFTP" version="32.3.1" targetFramework="net452" />
<package id="HidSharp" version="2.1.0" targetFramework="net452" />
<package id="linqtotwitter" version="3.1.1" targetFramework="net45" />
<package id="MailKit" version="2.11.1" targetFramework="net452" />
Expand Down
15 changes: 14 additions & 1 deletion Updates.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
3.11.1 - b3130
——————————————
- Fix: Change Test email logging success on failure
- Fix: Fix Test email logging "success" on failure
- Fix: Rollback FluentFTP package to previous 32.3.1 version due to crashes in Mono with newer versions

- New: Pressure change in last 3 hours web tag - <#PressChangeLast3Hours>
- New: Enable additional Accessibility feature - configured via either Station Settings or Program Settings
The following pages now have some enhanced accessibility features:
- Program Settings
- Station Settings
- Internet Settings
- Third Party Settings
- Extra Sensor Settings
- Calibration Settings
- NOAA Settings
- MySQL Settings
Adds a new entry in Cumulus.ini



3.11.0 - b3129
Expand Down

0 comments on commit 984b576

Please sign in to comment.