Skip to content

Commit 2f4f1be

Browse files
committed
Some progress
1 parent e52470f commit 2f4f1be

File tree

6 files changed

+61
-24
lines changed

6 files changed

+61
-24
lines changed

docs/make.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ makedocs(;
1515
),
1616
pages=[
1717
"Home" => "index.md",
18-
"Components" => "components.md",
19-
"Types" => "types.md",
18+
"Generic Components" => "components.md",
19+
"Winchcontroller" => "winchcontroller.md",
2020
"Functions" => "functions.md"
2121
],
2222
)

docs/src/components.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ calc_output(rl::RateLimiter, input)
2727
on_timer(rl::RateLimiter)
2828
```
2929

30-
## CalcVSetIn
30+
## Mixer_2CH
3131
```@docs
32-
set_vset_pc(cvi::CalcVSetIn, v_set_pc, force)
33-
calc_output(cvi::CalcVSetIn)
32+
Mixer_2CH
33+
```
34+
35+
## Mixer_3CH
36+
```@docs
37+
Mixer_3CH
3438
```

docs/src/types.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/src/winchcontroller.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```@meta
2+
CurrentModule = WinchControllers
3+
```
4+
5+
## Control components
6+
### CalcVSetIn
7+
```@docs
8+
CalcVSetIn
9+
CalcVSetIn(wcs::WCSettings)
10+
set_vset_pc(cvi::CalcVSetIn, v_set_pc, force)
11+
calc_output(cvi::CalcVSetIn)
12+
on_timer(cvi::CalcVSetIn)
13+
```
14+
15+
## Controller and settings
16+
```@docs
17+
WinchController
18+
WCSettings
19+
```

src/components.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ end
3232
Constructor for discrete integrator with external reset.
3333
3434
# Parameters
35-
- dt: timestep [s]
35+
- dt: time-step [s]
3636
- i: integration constant
3737
- x0: initial and last output
3838

src/wc_components.jl

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,33 @@ Components:
1212
Implemented as described in the PhD thesis of Uwe Fechner.
1313
"""
1414

15-
# Component for calculation v_set_in, using soft switching.
15+
"""
16+
mutable struct CalcVSetIn
17+
18+
Component for calculation v_set_in, using soft switching.
19+
20+
# Fields
21+
22+
$(TYPEDFIELDS)
23+
"""
1624
@with_kw mutable struct CalcVSetIn @deftype Float64
1725
wcs::WCSettings
1826
mixer2::Mixer_2CH = Mixer_2CH(wcs.dt, wcs.t_blend)
1927
input_a = 0
2028
input_b = 0
2129
end
2230

31+
"""
32+
function CalcVSetIn(wcs::WCSettings)
33+
34+
Constructor for component for calculation `v_set_in`, using soft switching.
35+
36+
# Parameters
37+
- wcs:: WCSettings: settings struct with the winch controller settings
38+
39+
# Returns
40+
- a new struct of type `CalcVSetIn`
41+
"""
2342
function CalcVSetIn(wcs::WCSettings)
2443
CalcVSetIn(wcs=wcs)
2544
end
@@ -83,8 +102,20 @@ function calc_output(cvi::CalcVSetIn)
83102
calc_output(cvi.mixer2, cvi.input_a, cvi.input_b)
84103
end
85104

105+
"""
106+
on_timer(cvi::CalcVSetIn)
107+
108+
Update the mixer. Must be called once per time-step.
109+
110+
# Parameters
111+
- cvi::CalcVSetIn: Reference to the CalcVSetIn component
112+
113+
# Returns
114+
- nothing
115+
"""
86116
function on_timer(cvi::CalcVSetIn)
87117
on_timer(cvi.mixer2)
118+
nothing
88119
end
89120

90121
# Class, that calculates the acceleration of the tether based on the tether force

0 commit comments

Comments
 (0)