align structs, idk if it does anything
This commit is contained in:
15
src/cpu.cpp
15
src/cpu.cpp
@@ -18,8 +18,9 @@ void detectHwmon(cpuSensors* target, const std::string& pci) {
|
||||
return;
|
||||
}
|
||||
|
||||
target->zenpower = utils::fileExists(target->hwmon+ "/in1_input"); // idk if this is reliable, we're trying to avoid just reading the name
|
||||
applog(LOG::INF, "Detected module \"{}\" in path \"{}\"", target->zenpower ? "zenpower" : "k10temp", target->hwmon);
|
||||
if (utils::fileExists(target->hwmon+ "/in1_input")) // idk if this is reliable, we're trying to avoid just reading the name
|
||||
target->module = k10temp;
|
||||
applog(LOG::INF, "Detected module \"{}\" in path \"{}\"", target->module ? "zenpower" : "k10temp", target->hwmon);
|
||||
}
|
||||
|
||||
void update(cpuSensors* c) {
|
||||
@@ -51,13 +52,15 @@ void update(cpuSensors* c) {
|
||||
if (c->hwmon.empty()) return; // break if no module
|
||||
|
||||
// commented out unused values so its faster
|
||||
if (c->zenpower) {
|
||||
if (c->module == zenpower) {
|
||||
utils::fastReadNum<1000>(c->hwmon + "/temp1_input", buf, c->tdie);
|
||||
utils::fastReadNum<1000>(c->hwmon + "/temp2_input", buf, c->tctl);
|
||||
utils::fastReadNum<1000>(c->hwmon + "/temp3_input", buf, c->tccd1);
|
||||
utils::fastReadNum<1000>(c->hwmon + "/in1_input", buf, c->vcore);
|
||||
utils::fastReadNum<1000>(c->hwmon + "/in2_input", buf, c->vsoc);
|
||||
} else {
|
||||
// utils::fastReadNum<1000>(c->hwmon + "/in1_input", buf, c->vcore);
|
||||
// utils::fastReadNum<1000>(c->hwmon + "/in2_input", buf, c->vsoc);
|
||||
}
|
||||
|
||||
if (c->module == k10temp) {
|
||||
utils::fastReadNum<1000>(c->hwmon + "/temp1_input", buf, c->tctl);
|
||||
utils::fastReadNum<1000>(c->hwmon + "/temp3_input", buf, c->tccd1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user