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) {