-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
020acd3
commit c59c80e
Showing
4 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package control_loop | ||
|
||
// ControlLoop defines how a FanController approaches the target value of its curve. | ||
type ControlLoop interface { | ||
// Loop advances the control loop | ||
Loop(target float64, measured float64) float64 | ||
// Cycle advances the control loop to the next step and returns the new pwm value. | ||
// Note: multiple calls to Loop may not result in the same output, as | ||
// the control loop may take time into account or have other stateful properties. | ||
Cycle(target int, lastSetPwm int) int | ||
} |
This file contains 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
This file contains 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
This file contains 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