From 340590250fb5d4de8f7984adbd17eb929b1f2a23 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 11 Nov 2024 15:35:25 -0600 Subject: [PATCH] Added more revision codes to determine Raspberry Pi 3B vs. Raspberry Pi 3B+ --- src/NetworkSettingsWidget.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/NetworkSettingsWidget.cpp b/src/NetworkSettingsWidget.cpp index fc87f129..02bca007 100644 --- a/src/NetworkSettingsWidget.cpp +++ b/src/NetworkSettingsWidget.cpp @@ -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+ { @@ -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;