Skip to content

Commit 7a28caa

Browse files
committed
Improve documentation
1 parent c2603cb commit 7a28caa

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "1.0.0-DEV"
55

66
[deps]
77
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
8+
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
89
KiteUtils = "90980105-b163-44e5-ba9f-8b1c83bb0533"
910
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
1011
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
@@ -17,6 +18,7 @@ WinchModels = "7dcfa46b-7979-4771-bbf4-0aee0da42e1f"
1718
[compat]
1819
BenchmarkTools = "1.6.0"
1920
ControlPlots = "0.2.7"
21+
DocStringExtensions = "0.9.4"
2022
Documenter = "1.11.4"
2123
KiteUtils = "0.10.6"
2224
NLsolve = "4.5.1"

docs/src/types.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
CurrentModule = WinchControllers
55
```
66

7-
## Basic types
7+
## Control components
88
```@docs
9+
Mixer_2CH
10+
```
11+
12+
## Controller and settings
13+
```@docs
14+
WinchController
915
WCSettings
1016
```

src/WinchControllers.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module WinchControllers
22

3-
using Parameters, StructTypes, KiteUtils, WinchModels, StaticArrays, NLsolve
3+
using Parameters, StructTypes, KiteUtils, WinchModels, StaticArrays, NLsolve, DocStringExtensions
44

55
export WCSettings, WinchController
66
export get_speed, set_force, calc_v_set, set_v_set, on_timer, get_acc, get_state, get_status

src/components.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,15 @@ function on_timer(rl::RateLimiter)
9191
rl.last_output = rl.output
9292
end
9393

94-
# Mixer_2CH
95-
# Mix two analog inputs. Implements the simulink block diagram, shown in
96-
# docs/mixer_2ch.png
94+
"""
95+
@with_kw mutable struct Mixer_2CH @deftype Float64
96+
97+
Mix two analog inputs. Implements the simulink block diagram, shown in `docs/mixer_2ch.png`.
98+
99+
# Fields
100+
101+
$(TYPEDFIELDS)
102+
"""
97103
@with_kw mutable struct Mixer_2CH @deftype Float64
98104
dt
99105
t_blend = 1.0

src/winchcontroller.jl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
# Winch winch controller component, implemented as described in the PhD thesis of Uwe Fechner.
22
@enum WinchControllerState wcsLowerForceLimit wcsSpeedControl wcsUpperForceLimit
33

4-
# Basic winch controller. Works in one of the three modes wcsLowerForceLimit, wcsSpeedControl and
5-
# wcsUpperForceLimit.
4+
5+
6+
"""
7+
@with_kw mutable struct WinchController @deftype Float64
8+
9+
Basic winch controller. Works in one of the three modes `wcsLowerForceLimit`, `wcsSpeedControl` and
10+
`wcsUpperForceLimit`.
11+
12+
# Fields
13+
14+
$(TYPEDFIELDS)
15+
"""
616
@with_kw mutable struct WinchController @deftype Float64
717
wcs::WCSettings
818
time = 0

0 commit comments

Comments
 (0)