Skip to content

Commit

Permalink
Minor tweaks, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
andymanic committed May 18, 2022
1 parent c496d49 commit 0051590
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
47 changes: 26 additions & 21 deletions OSRTT Launcher/OSRTT Launcher/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 //
Expand Down Expand Up @@ -517,6 +509,7 @@ private void checkFolderPermissions()
private void findAndConnectToBoard()
{
Thread.Sleep(1000);
bool checkedRunning = false;
while (true)
{
if (!portConnected)
Expand All @@ -542,7 +535,11 @@ private void findAndConnectToBoard()
testRunning = false;
if (!Properties.Settings.Default.updateInProgress)
{
appRunning();
if (!checkedRunning)
{
appRunning();
checkedRunning = true;
}
}
else
{
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions OSRTT Launcher/OSRTT Launcher/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("2.0.0.7")]
[assembly: AssemblyFileVersion("2.0.0.7")]
[assembly: AssemblyVersion("2.0.0.8")]
[assembly: AssemblyFileVersion("2.0.0.8")]

0 comments on commit 0051590

Please sign in to comment.