Added validation of the GVRET version reported by firmware so that everyone can be sure to keep their GVRET firmware up to date. Updated version # due to new functionality.

This commit is contained in:
Collin Kidder
2015-07-02 22:06:38 -04:00
parent cfc296aab8
commit e8ccb5970f
2 changed files with 19 additions and 1 deletions
+6 -1
View File
@@ -1,7 +1,12 @@
#ifndef CONFIG #ifndef CONFIG
#define CONFIG #define CONFIG
#define VERSION 117 #define VERSION 118
//try to keep this in sync.
//SavvyCAN will complain if you connect a GVRET board with a revision
//less than this number.
#define CURRENT_GVRET_VER 318
#endif // CONFIG #endif // CONFIG
+13
View File
@@ -720,6 +720,10 @@ void MainWindow::connectionSucceeded(int baud0, int baud1)
void MainWindow::connectionFailed() void MainWindow::connectionFailed()
{ {
lbStatusConnected.setText(tr("Failed to connect!")); lbStatusConnected.setText(tr("Failed to connect!"));
QMessageBox msgBox;
msgBox.setText("Connection to the GVRET firmware failed.\nYou might have an old version of GVRET\nor may have chosen the wrong serial port.");
msgBox.exec();
} }
void MainWindow::updateFileStatus() void MainWindow::updateFileStatus()
@@ -753,6 +757,15 @@ void MainWindow::gotDeviceInfo(int build, int swCAN)
QString str = tr("Connected to GVRET ") + QString::number(build); QString str = tr("Connected to GVRET ") + QString::number(build);
if (swCAN == 1) str += "(SW)"; if (swCAN == 1) str += "(SW)";
lbStatusConnected.setText(str); lbStatusConnected.setText(str);
if (build < CURRENT_GVRET_VER)
{
QMessageBox msgBox;
msgBox.setText("It appears that you are not running\nan up-to-date version of GVRET\n\nYour version: "
+ QString::number(build) +"\nCurrent Version: " + QString::number(CURRENT_GVRET_VER)
+ "\n\nPlease upgrade your firmware version.\nOtherwise, you may experience difficulties.");
msgBox.exec();
}
} }
void MainWindow::showSettingsDialog() void MainWindow::showSettingsDialog()