Implement remaining stuff

Basic functionality milestone reached!!
This commit is contained in:
2022-10-01 15:55:49 +02:00
parent 2ef9d979b0
commit b74f0e87cd
12 changed files with 205 additions and 58 deletions

27
app/include/Controller.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef CONTROLLER_H_
#define CONTROLLER_H_
#include <memory>
#include <thread>
#include <vector>
#include <fan/FanCurve.h>
class Controller {
public:
Controller(std::vector<std::shared_ptr<FanCurve>> curves);
~Controller();
void StartFanControlLoop();
void StopFanControlLoop();
private:
void Loop();
std::vector<std::shared_ptr<FanCurve>> mFanCurves;
std::atomic<bool> mRun;
std::unique_ptr<std::thread> mWorker;
};
#endif // CONTROLLER_H_