-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a typing stub file so that users can use type checking with the…
… library
- Loading branch information
1 parent
945f4da
commit 1b622b1
Showing
4 changed files
with
51 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from typing import Callable, Optional, Tuple | ||
|
||
_Limits = Tuple[Optional[float], Optional[float]] | ||
_Components = Tuple[float, float, float] | ||
_Tunings = Tuple[float, float, float] | ||
|
||
def _clamp(value: Optional[float], limits: _Limits) -> Optional[float]: ... | ||
|
||
_current_time: Callable[[], float] | ||
|
||
class PID(object): | ||
def __init__( | ||
self, | ||
Kp: float = ..., | ||
Ki: float = ..., | ||
Kd: float = ..., | ||
setpoint: float = ..., | ||
sample_time: Optional[float] = ..., | ||
output_limits: _Limits = ..., | ||
auto_mode: bool = ..., | ||
proportional_on_measurement: bool = ..., | ||
) -> None: ... | ||
def __call__(self, input_: float, dt: Optional[float] = ...) -> Optional[float]: ... | ||
@property | ||
def components(self) -> _Components: ... | ||
@property | ||
def tunings(self) -> _Tunings: ... | ||
@tunings.setter | ||
def tunings(self, tunings: _Tunings) -> None: ... | ||
@property | ||
def auto_mode(self) -> bool: ... | ||
@auto_mode.setter | ||
def auto_mode(self, enabled: bool) -> None: ... | ||
def set_auto_mode(self, enabled: bool, last_output: Optional[float] = ...) -> None: ... | ||
@property | ||
def output_limits(self) -> _Limits: ... | ||
@output_limits.setter | ||
def output_limits(self, limits: _Limits) -> None: ... | ||
def reset(self) -> None: ... |
Empty file.