feat(temperature): add hover panel with history sparkline and gauge

This commit is contained in:
Damocles 2026-04-17 09:22:15 +02:00
parent 36807f0ad0
commit 13372e8055
2 changed files with 244 additions and 3 deletions

View file

@ -32,6 +32,7 @@ QtObject {
// Temperature
property int tempCelsius: 0
property var tempHistory: [] // 150 samples @ 4s each 10 min
// Memory
property int memPercent: 0
@ -83,6 +84,8 @@ QtObject {
}
} else if (ev.type === "temp") {
root.tempCelsius = ev.celsius;
const th = root.tempHistory.concat([ev.celsius]);
root.tempHistory = th.length > 150 ? th.slice(th.length - 150) : th;
} else if (ev.type === "mem") {
root.memPercent = ev.percent;
root.memUsedGb = ev.used_gb;