Fix severe bug, improve logging, handle fan stops
Conversion from power percentage to PWM value didn't take into floating point arithmetic into account Make log messages more helpful, add handling for fan stopping completely
This commit is contained in:
@@ -47,10 +47,12 @@ Serializer::DeserializeFans(vector<shared_ptr<Sensor>> availableSensors) {
|
||||
auto rpmSensor = sensorMap[el.value()["LMSensor"]];
|
||||
|
||||
int minPWM = el.value()["MinPWM"];
|
||||
int startPWM = el.value()["StartPWM"];
|
||||
string label = el.value()["Label"];
|
||||
|
||||
auto fan = make_shared<HwmonFan>(pwmControl, rpmSensor);
|
||||
fan->MinPWM(minPWM);
|
||||
fan->StartPWM(startPWM);
|
||||
fan->Label(label);
|
||||
|
||||
fans.push_back(fan);
|
||||
|
||||
Reference in New Issue
Block a user