From 940cd0a5131253b0595b233f9da350101211d3cb Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Sun, 24 Oct 2021 21:12:16 +0200 Subject: [PATCH] limit cpu temp to 20 --- src/osx/btop_collect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp index 3ee4d62..f5c43d7 100644 --- a/src/osx/btop_collect.cpp +++ b/src/osx/btop_collect.cpp @@ -261,6 +261,8 @@ namespace Cpu { auto sensor = sensors.getSensors(); if (sensor.size() > 0) { current_cpu.temp.at(0).push_back((long long)sensor[0]); + if (current_cpu.temp.at(0).size() > 20) + current_cpu.temp.at(0).pop_front(); if (Config::getB("show_coretemp") and not cpu_temp_only) { for (int core = 1; core <= Shared::coreCount; core++) {