Initial commit

This commit is contained in:
2022-07-28 22:16:03 +02:00
commit cdac555c3c
13 changed files with 187 additions and 0 deletions

11
app/include/nvidia.h Normal file
View File

@@ -0,0 +1,11 @@
#ifndef NVIDIA_H_
#define NVIDIA_H_
class Nvidia {
public:
Nvidia();
~Nvidia();
double get_gpu_temperature();
};
#endif // NVIDIA_H_

30
app/include/pwm.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef PWM_H_
#define PWM_H_
#include <string>
#include <unordered_map>
typedef struct {
std::string control;
std::string enable;
std::string mode;
} PWM_CONTROL;
typedef enum { FULL_SPEED = 0, MANUAL_CONTROL, AUTOMATIC } PWM_ENABLE;
typedef enum { DC = 0, PWM } PWM_MODE;
class PWM {
public:
PWM();
void dumpValues();
void setEnable(PWM_CONTROL control, PWM_ENABLE value);
void setMode(PWM_CONTROL control, PWM_MODE mode);
void setValuePwm(PWM_CONTROL control, int pwm);
void setValuePercent(PWM_CONTROL control, int percentage);
private:
std::unordered_map<std::string, PWM_CONTROL> mPwmControls;
};
#endif // PWM_H_