make the chip configrabe
This commit is contained in:
@@ -33,7 +33,7 @@ struct TimeDate {
|
|||||||
void getTimeDate(TimeDate* td);
|
void getTimeDate(TimeDate* td);
|
||||||
void getDisk(Memory* disk, std::string mount);
|
void getDisk(Memory* disk, std::string mount);
|
||||||
void getRam(Memory* mem);
|
void getRam(Memory* mem);
|
||||||
void detectHwmon(sysSensors* s);
|
void detectHwmon(sysSensors* s, std::string platform);
|
||||||
void updateSensors(sysSensors* s);
|
void updateSensors(sysSensors* s);
|
||||||
|
|
||||||
} // namespace sys
|
} // namespace sys
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ void sys::getDisk(Memory* disk, std::string mount) {
|
|||||||
disk->total = diskData.f_blocks * diskData.f_frsize;
|
disk->total = diskData.f_blocks * diskData.f_frsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sys::detectHwmon(sysSensors* s) {
|
void sys::detectHwmon(sysSensors* s, std::string platform) {
|
||||||
s->hwmon = getFirstDir("/sys/devices/platform/nct6775.656/hwmon"); // we hardcode the chip path, should be sane
|
s->hwmon = getFirstDir("/sys/devices/platform/" + platform + "/hwmon"); // we hardcode the chip path, should be sane
|
||||||
}
|
}
|
||||||
|
|
||||||
void sys::updateSensors(sysSensors* s) {
|
void sys::updateSensors(sysSensors* s) {
|
||||||
|
|||||||
Reference in New Issue
Block a user