Add average and max aggregator functions
This commit is contained in:
@@ -4,19 +4,23 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <fan/Aggregators.h>
|
||||
#include <fan/HwmonFan.h>
|
||||
#include <sensor/Sensor.h>
|
||||
|
||||
struct FanStep {
|
||||
struct FanStep
|
||||
{
|
||||
int Temp;
|
||||
int Percent;
|
||||
};
|
||||
|
||||
class FanCurve {
|
||||
class FanCurve
|
||||
{
|
||||
public:
|
||||
FanCurve(std::vector<FanStep> steps,
|
||||
std::vector<std::shared_ptr<Sensor>> sensors,
|
||||
std::vector<std::shared_ptr<Fan>> fans);
|
||||
std::vector<std::shared_ptr<Fan>> fans,
|
||||
std::unique_ptr<Aggregator> aggregator);
|
||||
|
||||
void DoFanControl();
|
||||
|
||||
@@ -27,6 +31,7 @@ private:
|
||||
std::vector<FanStep> mSteps;
|
||||
std::vector<std::shared_ptr<Sensor>> mTempSensors;
|
||||
std::vector<std::shared_ptr<Fan>> mFans;
|
||||
std::unique_ptr<Aggregator> mAggregator;
|
||||
};
|
||||
|
||||
#endif // FANCURVE_H_
|
||||
|
||||
Reference in New Issue
Block a user