Skip to content

Commit 22749aa

Browse files
authored
Merge pull request #253 from petergerten/fix-failure-plugin
Added Failure Plugin
2 parents c057ffc + 57de211 commit 22749aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mavsdk/system.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from . import calibration
77
from . import camera
88
from . import core
9+
from . import failure
910
from . import follow_me
1011
from . import ftp
1112
from . import geofence
@@ -99,6 +100,7 @@ async def _init_plugins(self, host, port):
99100
self._plugins["calibration"] = calibration.Calibration(plugin_manager)
100101
self._plugins["camera"] = camera.Camera(plugin_manager)
101102
self._plugins["core"] = core.Core(plugin_manager)
103+
self._plugins["failure"] = failure.Failure(plugin_manager)
102104
self._plugins["follow_me"] = follow_me.FollowMe(plugin_manager)
103105
self._plugins["ftp"] = ftp.Ftp(plugin_manager)
104106
self._plugins["geofence"] = geofence.Geofence(plugin_manager)
@@ -144,6 +146,12 @@ def core(self) -> core.Core:
144146
raise RuntimeError(self.error_uninitialized("Core"))
145147
return self._plugins["core"]
146148

149+
@property
150+
def failure(self) -> failure.Failure:
151+
if "failure" not in self._plugins:
152+
raise RuntimeError(self.error_uninitialized("Failure"))
153+
return self._plugins["failure"]
154+
147155
@property
148156
def follow_me(self) -> follow_me.FollowMe:
149157
if "follow_me" not in self._plugins:

0 commit comments

Comments
 (0)