Commit 6b159124 authored by David Redondo's avatar David Redondo 🏎
Browse files

Conversion for new uptime sensors

parent a4a7ff98
......@@ -188,6 +188,16 @@ private Q_SLOTS:
QStringLiteral("gpu/gpu6/usage"),
QStringLiteral("gpu/gpu7/usage"),
};
QTest::addRow("uptime")
<< QJsonArray {
QStringLiteral("uptime"),
QStringLiteral("system/uptime/uptime"),
}
<< QJsonArray {
QStringLiteral("os/system/uptime"),
QStringLiteral("os/system/uptime"),
};
}
void testSensorIdConversion()
......
......@@ -178,6 +178,7 @@ SensorFaceControllerPrivate::SensorFaceControllerPrivate()
{ QRegularExpression(QStringLiteral("nvidia/(.*)/processorClock$")), QStringLiteral("gpu/\\1/coreFrequency")},
{ QRegularExpression(QStringLiteral("nvidia/(.*)/(memory|sharedMemory)$")), QStringLiteral("gpu/\\1/usedVram")},
{ QRegularExpression(QStringLiteral("nvidia/(.*)/(encoderUsage|decoderUsage)$")), QStringLiteral("gpu/\\1/usage")},
{ QRegularExpression(QStringLiteral("(uptime|system/uptime/uptime)$")), QStringLiteral("os/system/uptime")},
};
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment