From 0051590834c352c014e4ae4d5eff1135b68ee156 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 18 May 2022 21:42:05 +0100 Subject: [PATCH] Minor tweaks, version bump --- OSRTT Launcher/OSRTT Launcher/Main.cs | 47 ++++++++++--------- .../OSRTT Launcher/Properties/AssemblyInfo.cs | 4 +- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/OSRTT Launcher/OSRTT Launcher/Main.cs b/OSRTT Launcher/OSRTT Launcher/Main.cs index 98923f2..6dabd18 100644 --- a/OSRTT Launcher/OSRTT Launcher/Main.cs +++ b/OSRTT Launcher/OSRTT Launcher/Main.cs @@ -24,17 +24,9 @@ public partial class Main : Form // CHANGE THESE VALUES WHEN ISSUING A NEW RELEASE private double boardVersion = 2.4; private double downloadedFirmwareVersion = 2.4; - private string softwareVersion = "2.7"; + private string softwareVersion = "2.8"; // TODO // - // Denoising backlight strobing (gather data from gamma test) - // - // CANCEL TEST IF GAME CLOSED!!! (serial buffer still full of multiple results?? use checkfocusedwindow to also check if program is open? Although launchgame func should handle that and close..) - // - // Add check if keyboard folder exists/when update happens catch error say thats Keyboard isn't installed, offer user an option to retry and install keyboard then (separately) run update again... - // or download the zip file I'll upload to the github and extract to documents folder. - // - // Add better error messages to say results weren't processed // // // Current known issues // @@ -517,6 +509,7 @@ private void checkFolderPermissions() private void findAndConnectToBoard() { Thread.Sleep(1000); + bool checkedRunning = false; while (true) { if (!portConnected) @@ -542,7 +535,11 @@ private void findAndConnectToBoard() testRunning = false; if (!Properties.Settings.Default.updateInProgress) { - appRunning(); + if (!checkedRunning) + { + appRunning(); + checkedRunning = true; + } } else { @@ -722,16 +719,6 @@ private void compareFirmware() boardUpdate = true; } } - else - { - DialogResult dialogResult = MessageBox.Show("There isn't a newer version of the firmware available right now. Would you like to force it to re-flash anyway? (Not recommended)", "No New Updates Available", MessageBoxButtons.YesNo, MessageBoxIcon.Question); - if (dialogResult == DialogResult.Yes) - { - //updateFirmware(); - forceUpdate = true; - boardUpdate = true; - } - } } private void setBoardSerial() @@ -2026,7 +2013,25 @@ private void refreshMonitorListBtn_Click(object sender, EventArgs e) } private void updateDeviceToolStripMenuItem_Click(object sender, EventArgs e) { - compareFirmware(); + if (boardVersion < downloadedFirmwareVersion && !Properties.Settings.Default.SuppressDiagBox) + { + DialogResult dialogResult = MessageBox.Show("A newer version of the board's firmware is available, do you want to update now? \n Current version: " + boardVersion + "\n New version: " + downloadedFirmwareVersion, "Board Firmware Update Available!", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + if (dialogResult == DialogResult.Yes) + { + //updateFirmware(); + boardUpdate = true; + } + } + else + { + DialogResult dialogResult = MessageBox.Show("There isn't a newer version of the firmware available right now. Would you like to force it to re-flash anyway? (Not recommended)", "No New Updates Available", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + if (dialogResult == DialogResult.Yes) + { + //updateFirmware(); + forceUpdate = true; + boardUpdate = true; + } + } } private void heatmapsMenuItem_Click(object sender, EventArgs e) diff --git a/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs b/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs index e1b175c..48076e1 100644 --- a/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs +++ b/OSRTT Launcher/OSRTT Launcher/Properties/AssemblyInfo.cs @@ -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("2.0.0.7")] -[assembly: AssemblyFileVersion("2.0.0.7")] +[assembly: AssemblyVersion("2.0.0.8")] +[assembly: AssemblyFileVersion("2.0.0.8")]