Skip to content

Commit d63219a

Browse files
committed
Some progress
1 parent b2414a5 commit d63219a

File tree

6 files changed

+34
-17
lines changed

6 files changed

+34
-17
lines changed

docs/src/components.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ on_timer(rl::RateLimiter)
3030
## Mixer_2CH
3131
```@docs
3232
Mixer_2CH
33+
Mixer_2CH(dt, t_blend)
3334
```
3435

3536
## Mixer_3CH
3637
```@docs
3738
Mixer_3CH
39+
get_state(m3::Mixer_3CH)
3840
```

docs/src/functions.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22
CurrentModule = WinchControllers
33
```
44

5-
## Output functions
6-
```@docs
7-
calc_vro
8-
get_state
9-
```
10-
11-
## Utility functions
5+
## Utility Functions and Macros
126
```@docs
137
@limit
148
saturate

docs/src/winchcontroller.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
CurrentModule = WinchControllers
33
```
44

5-
## Control components
6-
### CalcVSetIn
5+
## CalcVSetIn
76
```@docs
87
CalcVSetIn
98
CalcVSetIn(wcs::WCSettings)
@@ -12,8 +11,13 @@ calc_output(cvi::CalcVSetIn)
1211
on_timer(cvi::CalcVSetIn)
1312
```
1413

15-
## Controller and settings
14+
## Winch Controller
1615
```@docs
1716
WinchController
17+
```
18+
19+
## Controller Settings
20+
```@docs
1821
WCSettings
22+
calc_vro
1923
```

src/components.jl

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,18 @@ $(TYPEDFIELDS)
264264
select_b::Bool = false
265265
end
266266

267+
"""
268+
Mixer_2CH(dt, t_blend)
269+
270+
Constructor for Mixer_2CH, a component for mixing two analog inputs.
271+
272+
## Parameters
273+
- dt: the time-step [s]
274+
- `t_blend`: the time for blending over from one channel to the other [s]
275+
276+
## Returns
277+
- a struct of type Mixer_2CH
278+
"""
267279
function Mixer_2CH(dt, t_blend)
268280
Mixer_2CH(dt, t_blend, 0, false)
269281
end
@@ -347,11 +359,14 @@ function calc_output(m3::Mixer_3CH, input_a, input_b, input_c)
347359
end
348360

349361
"""
362+
function get_state(m3::Mixer_3CH)
363+
350364
Return the controller state as integer.
351365
352-
wcsLowerForceControl = 0 # input b selected
353-
wcsSpeedControl = 1 # input a selected
354-
wcsUpperForceControl = 2 # input c selected
366+
Returns:
367+
- wcsLowerForceControl = 0 # input b selected
368+
- wcsSpeedControl = 1 # input a selected
369+
- wcsUpperForceControl = 2 # input c selected
355370
"""
356371
function get_state(m3::Mixer_3CH)
357372
Int(! m3.select_b && ! m3.select_c) + 2 * Int(m3.select_c)

src/utils.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ function saturate(value, min_, max_)
2222
result
2323
end
2424

25-
"""
25+
"""
26+
macro limit(name, min, max=nothing)
27+
2628
Limit the value of a variable.
2729
2830
Usage:
29-
@limit x 1 4 # limits the value to the range 1 .. 4, modifies x
30-
@limit x 10 # limits the value to the range -inf .. 10, modifies x
31+
- @limit x 1 4 # limits the value to the range 1 .. 4, modifies x
32+
- @limit x 10 # limits the value to the range -inf .. 10, modifies x
3133
3234
"""
3335
macro limit(name, min, max=nothing)

src/wc_components.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Implemented as described in the PhD thesis of Uwe Fechner.
1515
"""
1616
mutable struct CalcVSetIn
1717
18-
Component for calculation v_set_in, using soft switching.
18+
Component for calculation `v_set_in`, using soft switching.
1919
2020
# Fields
2121

0 commit comments

Comments
 (0)