From 0b5325cf40bd182d0d559de6a7287b9436b7da61 Mon Sep 17 00:00:00 2001 From: Spiros Date: Mon, 3 Jun 2024 19:20:37 +0300 Subject: [PATCH] Add support for Media_Wearout_Indicator SATA SSDs --- mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 648f121..21dc15b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -334,6 +334,9 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal unsigned long long totalGbWritten = (lbaWritten * logicalBlockSize) / oneGB; totalWrites = QString::number(static_cast(totalGbWritten)) + " GB"; } + } else if (attrObj["name"] == "Media_Wearout_Indicator") { + int percentageUsed = attrObj["value"].toInt(); + percentage = QString::number(percentageUsed) + " %"; } } } else { @@ -522,7 +525,7 @@ void MainWindow::addSmartAttributesTable(const QJsonArray &attributes) } if (raw.startsWith("0x") && raw.length() == 14) { - raw = raw.mid(2); + raw = raw.mid(2).toUpper(); } else { raw = QString("%1").arg(raw.toUInt(nullptr), 12, 16, QChar('0')).toUpper(); }