Skip to content

Commit

Permalink
Merge pull request #443 from TSC21/enable_server_plugins
Browse files Browse the repository at this point in the history
Enable server plugins
  • Loading branch information
JonasVautherin authored Feb 17, 2022
2 parents 74178f0 + f8d6e20 commit 3c2ad41
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mavsdk/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
from . import mocap
from . import offboard
from . import param
from . import server_utility
from . import shell
from . import telemetry
from . import telemetry_server
from . import tracking_server
from . import transponder
from . import tune
Expand Down Expand Up @@ -136,8 +138,10 @@ async def _init_plugins(self, host, port):
self._plugins["mocap"] = mocap.Mocap(plugin_manager)
self._plugins["offboard"] = offboard.Offboard(plugin_manager)
self._plugins["param"] = param.Param(plugin_manager)
self._plugins["server_utility"] = server_utility.ServerUtility(plugin_manager)
self._plugins["shell"] = shell.Shell(plugin_manager)
self._plugins["telemetry"] = telemetry.Telemetry(plugin_manager)
self._plugins["telemetry_server"] = telemetry_server.TelemetryServer(plugin_manager)
self._plugins["tracking_server"] = tracking_server.TrackingServer(plugin_manager)
self._plugins["transponder"] = transponder.Transponder(plugin_manager)
self._plugins["tune"] = tune.Tune(plugin_manager)
Expand Down Expand Up @@ -249,6 +253,12 @@ def param(self) -> param.Param:
raise RuntimeError(self.error_uninitialized("Param"))
return self._plugins["param"]

@property
def server_utility(self) -> server_utility.ServerUtility:
if "server_utility" not in self._plugins:
raise RuntimeError(self.error_uninitialized("ServerUtility"))
return self._plugins["server_utility"]

@property
def shell(self) -> shell.Shell:
if "shell" not in self._plugins:
Expand All @@ -261,6 +271,12 @@ def telemetry(self) -> telemetry.Telemetry:
raise RuntimeError(self.error_uninitialized("Telemetry"))
return self._plugins["telemetry"]

@property
def telemetry_server(self) -> telemetry_server.TelemetryServer:
if "telemetry_server" not in self._plugins:
raise RuntimeError(self.error_uninitialized("TelemetryServer"))
return self._plugins["telemetry_server"]

@property
def tracking_server(self) -> tracking_server.TrackingServer:
if "tracking_server" not in self._plugins:
Expand Down

0 comments on commit 3c2ad41

Please sign in to comment.