mirror of
https://github.com/compute-blade-community/compute-blade-agent.git
synced 2026-04-16 15:35:42 +02:00
* fix(fancontroller): support more than 2 steps in fan curve The GetFanSpeedPercent function only used the first 2 steps from the config, ignoring all subsequent steps. This caused the fan to cap at step[1]'s percent value regardless of actual temperature. For example, with a typical 5-step curve: - 40°C → 30% - 50°C → 50% - 60°C → 70% - 70°C → 90% - 75°C → 100% Any temperature ≥50°C would return 50% instead of the correct value. At 77°C the fan should be at 100%, but was stuck at 50%. The fix properly iterates through all configured steps to find the correct temperature bracket and interpolates within it. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Apply suggestions from code review --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Cedric Specht <cedric@specht-labs.de>