Skip to content

Commit 9df8484

Browse files
committed
More doc strings
1 parent 799dfb0 commit 9df8484

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

docs/src/functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CurrentModule = WinchControllers
44
## Input functions
55
```@docs
66
set_vset_pc
7+
reset
78
```
89

910
## Output functions

docs/src/types.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CurrentModule = WinchControllers
77
## Control components
88
```@docs
99
Integrator
10+
Integrator(dt, i=1.0, x0=0.0)
1011
UnitDelay
1112
RateLimiter
1213
Mixer_2CH

src/components.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,31 @@ $(TYPEDFIELDS)
2626
last_output = 0.0
2727
end
2828

29+
"""
30+
Integrator(dt, i=1.0, x0=0.0)
31+
32+
Constructor for discrete integrator with external reset.
33+
34+
# Parameters
35+
36+
- dt: timestep [s]
37+
- i: integration constant
38+
- x0: initial and last output
39+
"""
2940
function Integrator(dt, i=1.0, x0=0.0)
3041
Integrator(dt, i, x0, x0)
3142
end
3243

44+
"""
45+
reset(int::Integrator, x0=0.0)
46+
47+
Reset the integrator `int` to the value `x0`.
48+
49+
# Parameters
50+
51+
- int::Integrator: An integrator struct
52+
- x0: default value =0.0; initial and last output
53+
"""
3354
function reset(int::Integrator, x0=0.0)
3455
int.output = x0
3556
int.last_output = x0

0 commit comments

Comments
 (0)