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

WIP: Fix/linear pwm adjustment #267

Merged
merged 34 commits into from
Sep 28, 2024

Conversation

jwefers
Copy link
Contributor

@jwefers jwefers commented Nov 27, 2023

Addressing #266

This throws out the PID approach, instead linearly approaches the desired fan speed, capped to x amount of change per second. On my system, it feelds solid and not unpleasant.

Work is needed in understanding why the scaling into a window of possible (still-rotating) fan speeds is needed, as this is not really hidden from the user when they are supposed to give a step function themselves.

I understand the idea of staying within supported min and max, but i think it defies expectations when still having to give 0-255 for desired values. Maybe percent is better then. Let the user give fan speed percentage values with internally map in between min and max supported. Maybe even raise the min boundary to lowest-still-spinning when neverStop is set. But it should be made transparent to the user what happens with their values internally.

@jwefers
Copy link
Contributor Author

jwefers commented Nov 28, 2023

Once i find time, i would like to change this PR to:

  • offering the user a configurable choice between the PID algorithm and the simple linear approach, i.e. have curves have a setting controlAlgorithm: pid|linear with pid being the existing default so that its backwards compatible.

fan2go.yaml Outdated Show resolved Hide resolved
internal/util/pid.go Outdated Show resolved Hide resolved
@markusressel
Copy link
Owner

Hey @jwefers !

As you might have noticed, I have invested some time into finishing this up.
I am quite happy with the current result, but some third party testing would be appreciated before I merge this into main and break everyones config 🤣

Would you be able to test the PR in its current form?

@jwefers
Copy link
Contributor Author

jwefers commented Sep 23, 2024

wow, i lost track of this...i became a parent :D

i'll let you know once i find some evening time to game and test it out :)

thanks

@markusressel
Copy link
Owner

Haha, congrats! 😄 👶
Let me know if its too much, no worries :)

@markusressel
Copy link
Owner

I have been running and testing this branch extensively for the last days, so I think I feel quite comfortable merging this now.
Thx again for the efforts, until the next time! 😄

@markusressel markusressel merged commit 661543e into markusressel:master Sep 28, 2024
1 check passed
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