Expand SensorWrapper

This commit is contained in:
2022-08-05 00:17:13 +02:00
parent 625256dff1
commit 39310ad4d2
4 changed files with 51 additions and 5 deletions

View File

@@ -4,6 +4,7 @@
#include <Nvidia.h>
#include <Pwm.h>
#include <SensorsWrapper.h>
int main() {
auto config = std::fopen("/etc/conf.d/sensors", "r");
@@ -56,5 +57,15 @@ int main() {
std::cout << pwm.readValue(controls[0], PWM_CONTROL_PROPERTY::ENABLE)
<< std::endl;
SensorsWrapper sens;
auto sensors = sens.getTemperatureSensors();
std::cout << "\n";
for (auto sensor : sensors) {
std::cout << sens.getLabel(sensor) << ": " << sens.getValue(sensor)
<< std::endl;
}
return 0;
}