Skip to content

Commit

Permalink
Support 3A+
Browse files Browse the repository at this point in the history
  • Loading branch information
procount committed Nov 25, 2018
1 parent ee25f9e commit 78962ad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion recovery/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CONFIG_H

/* Version number displayed in the title bar */
#define VERSION_NUMBER "2.8.5.7"
#define VERSION_NUMBER "2.8.5.8"

/* Color of the background */
// #define BACKGROUND_COLOR Qt::white
Expand Down
14 changes: 12 additions & 2 deletions recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,16 @@ void MainWindow::untarFirmware()
}
}

bool MainWindow::isLegacyHardware()
{
bool legacy = true;

if ( _model.contains("Raspberry Pi 3 Model B Plus Rev", Qt::CaseInsensitive) ||
_model.contains("Raspberry Pi 3 Model A Plus Rev", Qt::CaseInsensitive) )
legacy=false;
return legacy;
}

void MainWindow::checkPinnFirmware()
{
TRACE
Expand Down Expand Up @@ -565,7 +575,7 @@ void MainWindow::checkPinnFirmware()
//precondition: already read g_nofirmware setting but not processed

//If we are not on 3B+,
if ( !_model.contains("Raspberry Pi 3 Model B Plus Rev", Qt::CaseInsensitive))
if ( isLegacyHardware())
{
// on legacy h/w

Expand Down Expand Up @@ -602,7 +612,7 @@ void MainWindow::updateFirmware_button()
else
ui->actionFirmware->setIcon(QIcon(":/icons/arrow_down.png"));

ui->actionFirmware->setEnabled( ! _model.contains("Raspberry Pi 3 Model B Plus Rev", Qt::CaseInsensitive));
ui->actionFirmware->setEnabled( isLegacyHardware() );
}

void MainWindow::on_actionFirmware_triggered()
Expand Down
1 change: 1 addition & 0 deletions recovery/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class MainWindow : public QMainWindow
QProcess * _proc;

void untarFirmware();
bool isLegacyHardware();
void checkPinnFirmware();
virtual void changeEvent(QEvent * event);
virtual bool eventFilter(QObject *obj, QEvent *event);
Expand Down

0 comments on commit 78962ad

Please sign in to comment.