Gradual speed change and auto reconnect to websockets#21
Merged
s-h-a-d-o-w merged 22 commits intos-h-a-d-o-w:masterfrom Feb 5, 2025
Merged
Gradual speed change and auto reconnect to websockets#21s-h-a-d-o-w merged 22 commits intos-h-a-d-o-w:masterfrom
s-h-a-d-o-w merged 22 commits intos-h-a-d-o-w:masterfrom
Conversation
Owner
|
Nice! |
Owner
|
Alright, here are some minor changes that I would like to see before merging:
|
…st (for example, after wake up of laptop from sleep). Added gradual change of fan speed towards the target speed.
Owner
|
Since I haven't heard from you, I have decided to tackle this myself. UPDATE: Oh, interesting. I don't believe I changed anything about the logic but tests that I added aren't passing. But don't worry about it, I'll handle finishing this. |
Contributor
Author
|
I'm sorry for not replaying. I don't have anough time now to complete the tasks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the cooling system has a certain inertia, even with a sharp increase in CPU/GPU temperature, there is no need to change the fan speed urgently. A gradual change in speed adds acoustic comfort when using a laptop.
This is especially noticeable during short-term increases in system load (3-6 seconds), when fans often change rotation speed from minimum to maximum and back.
Since the controller does not support a smooth change of fans speed, a step-by-step algorithm was implemented. The fan speed is being changed step by step until it reaches the target speed.
The logic for calculating the steps is as follows:
In web interface added a function to auto reconnect to websockets when connection was lost (for example, after wake up of laptop from sleep).
Also added autoclosing of toas messages about websocket connection changes.