Skip to content

Commit 658c1b2

Browse files
committed
system: add missing plugins
1 parent d206647 commit 658c1b2

File tree

1 file changed

+49
-14
lines changed

1 file changed

+49
-14
lines changed

mavsdk/system.py

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@ class System:
1212
"Calibration",
1313
"Camera",
1414
"Core",
15+
"FollowMe",
16+
"Ftp",
1517
"Geofence",
1618
"Gimbal",
1719
"Info",
20+
"LogFiles",
1821
"Mission",
22+
"MissionRaw",
1923
"Mocap",
20-
"Param",
2124
"Offboard",
25+
"Param",
2226
"Shell",
23-
"Telemetry"
27+
"Telemetry",
28+
"Tune",
2429
]
2530

2631
"""Instantiate a System object, that will serve as a proxy to
@@ -93,6 +98,18 @@ def core(self) -> Core:
9398
raise RuntimeError("Core plugin has not been initialized! Did you run `System.connect()`?")
9499
return self._plugins["core"]
95100

101+
@property
102+
def follow_me(self) -> FollowMe:
103+
if "follow_me" not in self._plugins:
104+
raise RuntimeError("FollowMe plugin has not been initialized! Did you run `System.connect()`?")
105+
return self._plugins["follow_me"]
106+
107+
@property
108+
def ftp(self) -> Ftp:
109+
if "ftp" not in self._plugins:
110+
raise RuntimeError("Ftp plugin has not been initialized! Did you run `System.connect()`?")
111+
return self._plugins["Ftp"]
112+
96113
@property
97114
def geofence(self) -> Geofence:
98115
if "geofence" not in self._plugins:
@@ -111,17 +128,29 @@ def info(self) -> Info:
111128
raise RuntimeError("Info plugin has not been initialized! Did you run `System.connect()`?")
112129
return self._plugins["info"]
113130

131+
@property
132+
def log_files(self) -> LogFiles:
133+
if "log_files" not in self._plugins:
134+
raise RuntimeError("LogFiles plugin has not been initialized! Did you run `System.connect()`?")
135+
return self._plugins["log_files"]
136+
114137
@property
115138
def mission(self) -> Mission:
116139
if "mission" not in self._plugins:
117140
raise RuntimeError("Mission plugin has not been initialized! Did you run `System.connect()`?")
118141
return self._plugins["mission"]
119142

120143
@property
121-
def param(self) -> Param:
122-
if "param" not in self._plugins:
123-
raise RuntimeError("Param plugin has not been initialized! Did you run `System.connect()`?")
124-
return self._plugins["param"]
144+
def mission_raw(self) -> MissionRaw:
145+
if "mission_raw" not in self._plugins:
146+
raise RuntimeError("MissionRaw plugin has not been initialized! Did you run `System.connect()`?")
147+
return self._plugins["mission_raw"]
148+
149+
@property
150+
def mocap(self) -> Mocap:
151+
if "mocap" not in self._plugins:
152+
raise RuntimeError("Mocap plugin has not been initialized! Did you run `System.connect()`?")
153+
return self._plugins["mocap"]
125154

126155
@property
127156
def offboard(self) -> Offboard:
@@ -130,10 +159,10 @@ def offboard(self) -> Offboard:
130159
return self._plugins["offboard"]
131160

132161
@property
133-
def telemetry(self) -> Telemetry:
134-
if "telemetry" not in self._plugins:
135-
raise RuntimeError("Telemetry plugin has not been initialized! Did you run `System.connect()`?")
136-
return self._plugins["telemetry"]
162+
def param(self) -> Param:
163+
if "param" not in self._plugins:
164+
raise RuntimeError("Param plugin has not been initialized! Did you run `System.connect()`?")
165+
return self._plugins["param"]
137166

138167
@property
139168
def shell(self) -> Shell:
@@ -142,10 +171,16 @@ def shell(self) -> Shell:
142171
return self._plugins["shell"]
143172

144173
@property
145-
def mocap(self) -> Mocap:
146-
if "mocap" not in self._plugins:
147-
raise RuntimeError("Mocap plugin has not been initialized! Did you run `System.connect()`?")
148-
return self._plugins["mocap"]
174+
def telemetry(self) -> Telemetry:
175+
if "telemetry" not in self._plugins:
176+
raise RuntimeError("Telemetry plugin has not been initialized! Did you run `System.connect()`?")
177+
return self._plugins["telemetry"]
178+
179+
@property
180+
def tune(self) -> Tune:
181+
if "tune" not in self._plugins:
182+
raise RuntimeError("Tune plugin has not been initialized! Did you run `System.connect()`?")
183+
return self._plugins["tune"]
149184

150185
@staticmethod
151186
def _start_mavsdk_server(system_address=None):

0 commit comments

Comments
 (0)