mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-14 00:14:14 +09:00
Exclude negative temperatures from average
These are unlikely to be valid and ruin the average. I observed -263 degC for temp1 on an Intel NUC8.
This commit is contained in:
@@ -353,7 +353,7 @@ const FreonMenuButton = GObject.registerClass(class Freon_FreonMenuButton extend
|
||||
let sum = 0;
|
||||
let max = 0;
|
||||
for (let i of tempInfo){
|
||||
if(i.temp !== null){
|
||||
if(i.temp !== null && i.temp >= 0){
|
||||
total++;
|
||||
sum += i.temp;
|
||||
if (i.temp > max)
|
||||
|
||||
Reference in New Issue
Block a user