module.yaml
5.69 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
__max_num_config_instances: &max_num_config_instances 3
module_name: MAVLink
serial_config:
- command: |
if [ $SERIAL_DEV != ethernet ]; then
set MAV_ARGS "-d ${SERIAL_DEV} -b p:${BAUD_PARAM} -m p:MAV_${i}_MODE -r p:MAV_${i}_RATE"
else
set MAV_ARGS "-u p:MAV_${i}_UDP_PRT -o p:MAV_${i}_REMOTE_PRT -m p:MAV_${i}_MODE -r p:MAV_${i}_RATE"
if param compare MAV_${i}_BROADCAST 1
then
set MAV_ARGS "${MAV_ARGS} -p"
fi
if param compare MAV_${i}_BROADCAST 2
then
set MAV_ARGS "${MAV_ARGS} -c"
fi
fi
if param compare MAV_${i}_FORWARD 1
then
set MAV_ARGS "${MAV_ARGS} -f"
fi
if param compare MAV_${i}_RADIO_CTL 1
then
set MAV_ARGS "${MAV_ARGS} -s"
fi
mavlink start ${MAV_ARGS} -x
port_config_param:
name: MAV_${i}_CONFIG
group: MAVLink
# MAVLink instances:
# 0: Telem1 Port (Telemetry Link)
# 1: Telem2 Port (Companion Link). Disabled by default to reduce RAM usage
# 2: Board-specific / no fixed function or port
default: [TEL1, "", ""]
num_instances: *max_num_config_instances
supports_networking: true
parameters:
- group: MAVLink
definitions:
MAV_${i}_MODE:
description:
short: MAVLink Mode for instance ${i}
long: |
The MAVLink Mode defines the set of streamed messages (for example the
vehicle's attitude) and their sending rates.
type: enum
values:
0: Normal
1: Custom
2: Onboard
3: OSD
4: Magic
5: Config
#6: Iridium # as the user does not need to configure this, hide it from the UI
7: Minimal
8: External Vision
#9: External Vision Minimal # hidden
10: Gimbal
11: Onboard Low Bandwidth
reboot_required: true
num_instances: *max_num_config_instances
default: [0, 2, 0]
MAV_${i}_RATE:
description:
short: Maximum MAVLink sending rate for instance ${i}
long: |
Configure the maximum sending rate for the MAVLink streams in Bytes/sec.
If the configured streams exceed the maximum rate, the sending rate of
each stream is automatically decreased.
If this is set to 0 a value of half of the theoretical maximum bandwidth is used.
This corresponds to baudrate/20 Bytes/s (baudrate/10 = maximum data rate on
8N1-configured links).
type: int32
min: 0
unit: B/s
reboot_required: true
num_instances: *max_num_config_instances
default: [1200, 0, 0]
MAV_${i}_FORWARD:
description:
short: Enable MAVLink Message forwarding for instance ${i}
long: |
If enabled, forward incoming MAVLink messages to other MAVLink ports if the
message is either broadcast or the target is not the autopilot.
This allows for example a GCS to talk to a camera that is connected to the
autopilot via MAVLink (on a different link than the GCS).
type: boolean
reboot_required: true
num_instances: *max_num_config_instances
default: [true, false, false]
MAV_${i}_RADIO_CTL:
description:
short: Enable software throttling of mavlink on instance ${i}
long: |
If enabled, MAVLink messages will be throttled according to
`txbuf` field reported by radio_status.
Requires a radio to send the mavlink message RADIO_STATUS.
type: boolean
reboot_required: true
num_instances: *max_num_config_instances
default: [true, true, true]
MAV_${i}_UDP_PRT:
description:
short: MAVLink Network Port for instance ${i}
long: |
If ethernet enabled and selected as configuration for MAVLink instance ${i},
selected udp port will be set and used in MAVLink instance ${i}.
type: int32
reboot_required: true
num_instances: *max_num_config_instances
default: [14556, 0, 0]
requires_ethernet: true
MAV_${i}_REMOTE_PRT:
description:
short: MAVLink Remote Port for instance ${i}
long: |
If ethernet enabled and selected as configuration for MAVLink instance ${i},
selected remote port will be set and used in MAVLink instance ${i}.
type: int32
reboot_required: true
num_instances: *max_num_config_instances
default: [14550, 0, 0]
requires_ethernet: true
MAV_${i}_BROADCAST:
description:
short: Broadcast heartbeats on local network for MAVLink instance ${i}
long: |
This allows a ground control station to automatically find the drone
on the local network.
type: enum
values:
0: Never broadcast
1: Always broadcast
2: Only multicast
num_instances: *max_num_config_instances
default: [1, 0, 0]
requires_ethernet: true