Skip to content

Commit

Permalink
Added more revision codes to determine Raspberry Pi 3B vs. Raspberry …
Browse files Browse the repository at this point in the history
…Pi 3B+
  • Loading branch information
erinharrington-12 committed Nov 11, 2024
1 parent a91d6d8 commit 3405902
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/NetworkSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void NetworkSettingsWidget::eventModeDisabledState()
getWombatName(); // Get Wombat name

INITIAL_CONNECTION_CONFIG = getConnectionConfig(); // Get initial connection config
RASPBERRYPI_TYPE_SETTINGS = "3B+";
RASPBERRYPI_TYPE_SETTINGS = getRaspberryPiType();

if (RASPBERRYPI_TYPE_SETTINGS == "3B+") // if RaspberryPi is 3B+
{
Expand Down Expand Up @@ -156,14 +156,17 @@ QString NetworkSettingsWidget::getRaspberryPiType()
QByteArray output = myProcess->readAllStandardOutput();

qDebug() << "Revision code output: " << output;

if (output.contains("a020d3"))
if (output.trimmed() == "a020d3" || output.trimmed() == "a020d4")
{
piType = "3B+";
}
else if (output.trimmed() == "a02082" || output.trimmed() == "a22082" || output.trimmed() == "a32082" || output.trimmed() == "a52082" || output.trimmed() == "a22083")
{
RASPBERRYPI_TYPE_SETTINGS = "3B+";
piType = "3B";
}
else if (output.contains("a02082") || output.contains("a22082"))
else
{
RASPBERRYPI_TYPE_SETTINGS = "3B";
piType = "Unknown";
}

qDebug() << "RASPBERRYPI_TYPE_SETTINGS: " << RASPBERRYPI_TYPE_SETTINGS;
Expand Down

0 comments on commit 3405902

Please sign in to comment.