fix(gui): "CPU-Temperatur" statt Zonenname in Klammern

Die Zeile zeigt nur noch den Wert in Grad. Damit die neue Beschriftung
stimmt, filtert sysstat.js die Zonen enger: nur soc-thermal, bigcore0/1
und littlecore. GPU-, NPU- und Center-Zone konnten vorher den Hoechstwert
stellen, obwohl "CPU" daran steht.

Doku: Kapitel 07 + Changelog.
This commit is contained in:
Claude
2026-08-17 22:29:02 +02:00
parent 6973b46d75
commit c562586216
4 changed files with 20 additions and 8 deletions
+5 -3
View File
@@ -34,8 +34,10 @@ sampleCpu();
setInterval(sampleCpu, 2000).unref();
// ---- Temperatur ---------------------------------------------------------
// Interessant sind die SoC-/Kern-Zonen; WLAN-Karte & Co. bleiben draußen, sonst
// zeigt die Anzeige eine Temperatur, die nichts mit der Rechenlast zu tun hat.
// Gemeldet wird die CPU-Temperatur: wärmste der Kern-Zonen (bigcore0/1,
// littlecore) plus soc-thermal. GPU, NPU und die WLAN-Karte bleiben draußen —
// die GUI beschriftet den Wert als „CPU-Temperatur“, also darf auch nur CPU
// drinstecken.
const TEMP_ZONES = (() => {
try {
return fs.readdirSync('/sys/class/thermal')
@@ -46,7 +48,7 @@ const TEMP_ZONES = (() => {
try { type = fs.readFileSync(`${dir}/type`, 'utf8').trim(); } catch { }
return { type, file: `${dir}/temp` };
})
.filter(z => /soc|core|center|npu|gpu/i.test(z.type));
.filter(z => /^(soc|bigcore\d*|littlecore)-thermal$/i.test(z.type));
} catch { return []; }
})();