Просмотр исходного кода

Update scsi2sd-util6 to identify the 2021 board

Michael McMaster 4 лет назад
Родитель
Сommit
1fb12535da
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      lib/SCSI2SD/src/scsi2sd-util6/SCSI2SD_HID.cc

+ 11 - 1
lib/SCSI2SD/src/scsi2sd-util6/SCSI2SD_HID.cc

@@ -359,6 +359,11 @@ HID::getHardwareVersion()
 				// Definitely the 2020c or newer hardware.
 				return "V6, 2020c or newer";
 			}
+			else if (prodStr.find(L"2021") != std::string::npos)
+			{
+				// Definitely the 2020c or newer hardware.
+				return "V6, 2021 or newer";
+			}
 			else
 			{
 				return "V6, Rev F or older";
@@ -390,7 +395,7 @@ HID::isCorrectFirmware(const std::string& path)
 {
 	if (myFirmwareVersion < 0x0630)
 	{
-		// Definitely the 2020c or newer hardware.
+		// Definitely the older hardware.
 		return path.rfind("firmware.V6.revF.dfu") != std::string::npos ||
 			path.rfind("firmware.dfu") != std::string::npos;
 	}
@@ -415,6 +420,11 @@ HID::isCorrectFirmware(const std::string& path)
 				// Definitely the 2020c or newer hardware.
 				return path.rfind("firmware.V6.2020.dfu") != std::string::npos;
 			}
+			else if (prodStr.find(L"2021") != std::string::npos)
+			{
+				// Definitely the 2020c or newer hardware.
+				return path.rfind("firmware.V6.2021.dfu") != std::string::npos;
+			}
 			else
 			{
 				return path.rfind("firmware.V6.revF.dfu") != std::string::npos ||