Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autoconfigure for weird PWMs #213

Merged
merged 3 commits into from
Mar 23, 2023
Merged

Conversation

jfroy
Copy link
Contributor

@jfroy jfroy commented Mar 15, 2023

This patch fixes fan autoconfiguration for weird PWMs that have non-1:1 value maps. In particular, it fixes the construction of the RPM curve data to properly use the PWM value map computed just before.

This patch also extends a few sleeps to give slow PWMs/fans more time to react to requested changes.

internal/controller/controller.go Outdated Show resolved Hide resolved
internal/controller/controller.go Outdated Show resolved Hide resolved
internal/controller/controller.go Outdated Show resolved Hide resolved
@jfroy jfroy force-pushed the autoconfig branch 2 times, most recently from 13b0bd8 to bd5430a Compare March 16, 2023 22:59
cmd/root.go Outdated Show resolved Hide resolved
This patch fixes fan autoconfiguration for weird PWMs that have non-1:1 value maps.
In particular, it fixes the construction of the RPM curve data to properly use the
PWM value map computed just before.

This patch also adds a config option and flag to set the delay between setting
a PWM value and observing the fan RPM sensor to support a wide range of
controllers and fans. A long delay can lead to system overheating. The default
is 2 seconds.

This patch also changes a few other delays in the initialization code, namely
the delay between setting a PWM value and observing the PWM value (to detect
controllers that alter/quantize/adjust PWM values). It is hardcoded to 5
milliseconds.
@markusressel
Copy link
Owner

Looks good, thx! 🚀 ❤️ 🤓

@jfroy
Copy link
Contributor Author

jfroy commented Mar 23, 2023

Thanks for fixing the config file, I somehow forgot about that!

@markusressel markusressel merged commit 5389f2d into markusressel:master Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants