From 729b980f4e2042cf57e20375d7b3e8b040457b71 Mon Sep 17 00:00:00 2001 From: Drath Date: Tue, 7 Oct 2025 18:30:18 +0200 Subject: [PATCH] make the chip configrabe --- include/sys.hpp | 2 +- src/sys.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sys.hpp b/include/sys.hpp index 6b1d536..d32f579 100644 --- a/include/sys.hpp +++ b/include/sys.hpp @@ -33,7 +33,7 @@ struct TimeDate { void getTimeDate(TimeDate* td); void getDisk(Memory* disk, std::string mount); void getRam(Memory* mem); -void detectHwmon(sysSensors* s); +void detectHwmon(sysSensors* s, std::string platform); void updateSensors(sysSensors* s); } // namespace sys diff --git a/src/sys.cpp b/src/sys.cpp index 797969d..4b110fe 100644 --- a/src/sys.cpp +++ b/src/sys.cpp @@ -22,8 +22,8 @@ void sys::getDisk(Memory* disk, std::string mount) { disk->total = diskData.f_blocks * diskData.f_frsize; } -void sys::detectHwmon(sysSensors* s) { - s->hwmon = getFirstDir("/sys/devices/platform/nct6775.656/hwmon"); // we hardcode the chip path, should be sane +void sys::detectHwmon(sysSensors* s, std::string platform) { + s->hwmon = getFirstDir("/sys/devices/platform/" + platform + "/hwmon"); // we hardcode the chip path, should be sane } void sys::updateSensors(sysSensors* s) {