make the chip configrabe

This commit is contained in:
Drath
2025-10-07 18:30:18 +02:00
parent 9ec37e2f14
commit 729b980f4e
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

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