Add logic to adjust minPWM on fan stop

This commit is contained in:
2022-10-04 09:41:04 +02:00
parent d65934a278
commit e567ede3ef
4 changed files with 18 additions and 10 deletions

View File

@@ -47,9 +47,7 @@ void HwmonFan::FindPWMLimits() {
PWM(curPWM);
this_thread::sleep_for(chrono::seconds(TIMEOUT));
int curRPM = RPM();
if (curRPM <= 0) {
if (RPM() <= 0) {
minPWM = curPWM + 5;
break;
}
@@ -68,9 +66,7 @@ void HwmonFan::FindPWMLimits() {
PWM(curPWM);
this_thread::sleep_for(chrono::seconds(TIMEOUT));
int curRPM = RPM();
if (curRPM > 0) {
if (RPM() > 0) {
cout << "Setting start PWM: " << startPWM << endl;
startPWM = curPWM;
break;