-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathindex.d.ts
39 lines (31 loc) · 901 Bytes
/
index.d.ts
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
declare namespace Controller {
interface Options {
k_p?: number;
k_i?: number;
k_d?: number;
/**
* Interval of time between two updates
* If not set, it will be automatically calculated
*/
dt?: number;
/** The maximum absolute value of the integral term */
i_max?: number;
}
}
declare class Controller {
public k_p: number;
public k_i: number;
public k_d: number;
public dt: number;
public i_max: number;
public sumError: number;
public lastError: number;
public lastTime: number;
public target: number;
constructor(options: Controller.Options);
constructor(k_p?: number, k_i?: number, k_d?: number, dt?: number);
public setTarget(target: number): void;
public update(currentValue: number): number;
public reset(): number;
}
export = Controller;