forked from Copper280z/CircuitPython_simple-pid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPID.pyi
49 lines (45 loc) · 1.56 KB
/
PID.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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):
Kp: float
Ki: float
Kd: float
setpoint: float
sample_time: Optional[float]
output_limits: _Limits
proportional_on_measurement: bool
error_map: Optional[Callable[[float], float]]
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 = ...,
error_map: Optional[Callable[[float], float]] = ...,
) -> None: ...
def __call__(self, input_: float, dt: Optional[float] = ...) -> Optional[float]: ...
def __repr__(self) -> str: ...
@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: ...