From 199fc6d89321c89770c7509f466a01d440c361a8 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 5 Jun 2020 10:59:50 +0200 Subject: [PATCH 1/2] other: don't create separate folders for plugins This way - I hope - the weird includes like below would improve: help(mavsdk.action.action) Help on module mavsdk.action.action in mavsdk.action: To: help(mavsdk.action) Help on module mavsdk.action in mavsdk: --- other/templates/py/file.j2 | 2 +- other/templates/rst/file.j2 | 2 +- other/tools/run_protoc.sh | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/other/templates/py/file.j2 b/other/templates/py/file.j2 index 23cf5b9b..0e2fc1c9 100644 --- a/other/templates/py/file.j2 +++ b/other/templates/py/file.j2 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import {{ plugin_name.lower_snake_case }}_pb2, {{ plugin_name.lower_snake_case }}_pb2_grpc from enum import Enum diff --git a/other/templates/rst/file.j2 b/other/templates/rst/file.j2 index 34bf4221..09de634e 100644 --- a/other/templates/rst/file.j2 +++ b/other/templates/rst/file.j2 @@ -1,7 +1,7 @@ {{ plugin_name.upper_camel_case }} ==== -.. automodule:: mavsdk.generated.{{ plugin_name.lower_snake_case }} +.. automodule:: mavsdk.{{ plugin_name.lower_snake_case }} :members: :undoc-members: :show-inheritance: diff --git a/other/tools/run_protoc.sh b/other/tools/run_protoc.sh index 5d8cdc83..200a0c81 100755 --- a/other/tools/run_protoc.sh +++ b/other/tools/run_protoc.sh @@ -34,13 +34,17 @@ function generate { # We need to create the .original backup files, otherwise we're not compatible with # BSD sed. - sed -i'.sedoriginal' -e "s/import mavsdk_options_pb2/from .. import mavsdk_options_pb2/" \ + sed -i'.sedoriginal' -e "s/import mavsdk_options_pb2/from . import mavsdk_options_pb2/" \ "${GENERATED_DIR}/${plugin}/${plugin}_pb2.py" sed -i'.sedoriginal' -e "s/from ${plugin} import ${plugin}_pb2/from . import ${plugin}_pb2/" \ "${GENERATED_DIR}/${plugin}/${plugin}_pb2_grpc.py" - ## Clean up the backup files. + # Clean up the backup files. find ${GENERATED_DIR} -name '*.sedoriginal' -delete + mv "${GENERATED_DIR}/${plugin}/${plugin}_pb2.py" "${GENERATED_DIR}/${plugin}_pb2.py" + mv "${GENERATED_DIR}/${plugin}/${plugin}_pb2_grpc.py" "${GENERATED_DIR}/${plugin}_pb2_grpc.py" + + echo " -> [+] Generated protobuf and gRPC bindings for ${plugin}" # Generate plugin @@ -51,11 +55,7 @@ function generate { ${plugin}/${plugin}.proto # protoc-gen-dcsdk capitalizes filenames, and we don't want that with python - mv ${GENERATED_DIR}/${plugin}/$(snake_case_to_camel_case ${plugin}).py ${GENERATED_DIR}/${plugin}/${plugin}.py - - # Make a module out of it - echo "from .${plugin} import *" > ${GENERATED_DIR}/${plugin}/__init__.py - echo " -> [+] Generated plugin for ${plugin}" + mv ${GENERATED_DIR}/${plugin}/$(snake_case_to_camel_case ${plugin}).py ${GENERATED_DIR}/${plugin}.py # Generate plugin doc entry python3 -m grpc_tools.protoc -I${PROTO_DIR}/protos \ @@ -75,6 +75,8 @@ function generate { echo " ${plugin}" >> ${GENERATED_DIR_RST}/index.rst fi + rmdir ${GENERATED_DIR}/${plugin} + done } From b4cb88afc3e0f009d91734b597ac2403702182e8 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 5 Jun 2020 11:01:51 +0200 Subject: [PATCH 2/2] mavsdk: regenerated all --- mavsdk/{action => }/action.py | 2 +- mavsdk/action/__init__.py | 1 - mavsdk/{action => }/action_pb2.py | 0 mavsdk/{action => }/action_pb2_grpc.py | 0 mavsdk/{calibration => }/calibration.py | 2 +- mavsdk/calibration/__init__.py | 1 - mavsdk/{calibration => }/calibration_pb2.py | 2 +- .../{calibration => }/calibration_pb2_grpc.py | 0 mavsdk/{camera => }/camera.py | 2 +- mavsdk/camera/__init__.py | 1 - mavsdk/{camera => }/camera_pb2.py | 2 +- mavsdk/{camera => }/camera_pb2_grpc.py | 0 mavsdk/{core => }/core.py | 2 +- mavsdk/core/__init__.py | 1 - mavsdk/{core => }/core_pb2.py | 0 mavsdk/{core => }/core_pb2_grpc.py | 0 mavsdk/{follow_me => }/follow_me.py | 2 +- mavsdk/follow_me/__init__.py | 1 - mavsdk/{follow_me => }/follow_me_pb2.py | 2 +- mavsdk/{follow_me => }/follow_me_pb2_grpc.py | 0 mavsdk/{ftp => }/ftp.py | 2 +- mavsdk/ftp/__init__.py | 1 - mavsdk/{ftp => }/ftp_pb2.py | 2 +- mavsdk/{ftp => }/ftp_pb2_grpc.py | 0 mavsdk/{geofence => }/geofence.py | 2 +- mavsdk/geofence/__init__.py | 1 - mavsdk/{geofence => }/geofence_pb2.py | 0 mavsdk/{geofence => }/geofence_pb2_grpc.py | 0 mavsdk/{gimbal => }/gimbal.py | 2 +- mavsdk/gimbal/__init__.py | 1 - mavsdk/{gimbal => }/gimbal_pb2.py | 0 mavsdk/{gimbal => }/gimbal_pb2_grpc.py | 0 mavsdk/{info => }/info.py | 2 +- mavsdk/info/__init__.py | 1 - mavsdk/{info => }/info_pb2.py | 2 +- mavsdk/{info => }/info_pb2_grpc.py | 0 mavsdk/{log_files => }/log_files.py | 2 +- mavsdk/log_files/__init__.py | 1 - mavsdk/{log_files => }/log_files_pb2.py | 2 +- mavsdk/{log_files => }/log_files_pb2_grpc.py | 0 mavsdk/{mission => }/mission.py | 2 +- mavsdk/mission/__init__.py | 1 - mavsdk/{mission => }/mission_pb2.py | 2 +- mavsdk/{mission => }/mission_pb2_grpc.py | 0 mavsdk/{mission_raw => }/mission_raw.py | 2 +- mavsdk/mission_raw/__init__.py | 1 - mavsdk/{mission_raw => }/mission_raw_pb2.py | 2 +- .../{mission_raw => }/mission_raw_pb2_grpc.py | 0 mavsdk/{mocap => }/mocap.py | 2 +- mavsdk/mocap/__init__.py | 1 - mavsdk/{mocap => }/mocap_pb2.py | 2 +- mavsdk/{mocap => }/mocap_pb2_grpc.py | 0 mavsdk/{offboard => }/offboard.py | 2 +- mavsdk/offboard/__init__.py | 1 - mavsdk/{offboard => }/offboard_pb2.py | 2 +- mavsdk/{offboard => }/offboard_pb2_grpc.py | 0 mavsdk/{param => }/param.py | 2 +- mavsdk/param/__init__.py | 1 - mavsdk/{param => }/param_pb2.py | 2 +- mavsdk/{param => }/param_pb2_grpc.py | 0 mavsdk/{shell => }/shell.py | 2 +- mavsdk/shell/__init__.py | 1 - mavsdk/{shell => }/shell_pb2.py | 2 +- mavsdk/{shell => }/shell_pb2_grpc.py | 0 mavsdk/source/plugins/action.rst | 2 +- mavsdk/source/plugins/calibration.rst | 2 +- mavsdk/source/plugins/camera.rst | 2 +- mavsdk/source/plugins/core.rst | 2 +- mavsdk/source/plugins/follow_me.rst | 2 +- mavsdk/source/plugins/ftp.rst | 2 +- mavsdk/source/plugins/geofence.rst | 2 +- mavsdk/source/plugins/gimbal.rst | 2 +- mavsdk/source/plugins/info.rst | 2 +- mavsdk/source/plugins/log_files.rst | 2 +- mavsdk/source/plugins/mission.rst | 2 +- mavsdk/source/plugins/mission_raw.rst | 2 +- mavsdk/source/plugins/mocap.rst | 2 +- mavsdk/source/plugins/offboard.rst | 2 +- mavsdk/source/plugins/param.rst | 2 +- mavsdk/source/plugins/shell.rst | 2 +- mavsdk/source/plugins/telemetry.rst | 2 +- mavsdk/source/plugins/tune.rst | 2 +- mavsdk/system.py | 68 +++++++++---------- mavsdk/{telemetry => }/telemetry.py | 2 +- mavsdk/telemetry/__init__.py | 1 - mavsdk/{telemetry => }/telemetry_pb2.py | 2 +- mavsdk/{telemetry => }/telemetry_pb2_grpc.py | 0 mavsdk/{tune => }/tune.py | 2 +- mavsdk/tune/__init__.py | 1 - mavsdk/{tune => }/tune_pb2.py | 2 +- mavsdk/{tune => }/tune_pb2_grpc.py | 0 91 files changed, 84 insertions(+), 102 deletions(-) rename mavsdk/{action => }/action.py (99%) delete mode 100644 mavsdk/action/__init__.py rename mavsdk/{action => }/action_pb2.py (100%) rename mavsdk/{action => }/action_pb2_grpc.py (100%) rename mavsdk/{calibration => }/calibration.py (99%) delete mode 100644 mavsdk/calibration/__init__.py rename mavsdk/{calibration => }/calibration_pb2.py (99%) rename mavsdk/{calibration => }/calibration_pb2_grpc.py (100%) rename mavsdk/{camera => }/camera.py (99%) delete mode 100644 mavsdk/camera/__init__.py rename mavsdk/{camera => }/camera_pb2.py (99%) rename mavsdk/{camera => }/camera_pb2_grpc.py (100%) rename mavsdk/{core => }/core.py (99%) delete mode 100644 mavsdk/core/__init__.py rename mavsdk/{core => }/core_pb2.py (100%) rename mavsdk/{core => }/core_pb2_grpc.py (100%) rename mavsdk/{follow_me => }/follow_me.py (99%) delete mode 100644 mavsdk/follow_me/__init__.py rename mavsdk/{follow_me => }/follow_me_pb2.py (99%) rename mavsdk/{follow_me => }/follow_me_pb2_grpc.py (100%) rename mavsdk/{ftp => }/ftp.py (99%) delete mode 100644 mavsdk/ftp/__init__.py rename mavsdk/{ftp => }/ftp_pb2.py (99%) rename mavsdk/{ftp => }/ftp_pb2_grpc.py (100%) rename mavsdk/{geofence => }/geofence.py (99%) delete mode 100644 mavsdk/geofence/__init__.py rename mavsdk/{geofence => }/geofence_pb2.py (100%) rename mavsdk/{geofence => }/geofence_pb2_grpc.py (100%) rename mavsdk/{gimbal => }/gimbal.py (99%) delete mode 100644 mavsdk/gimbal/__init__.py rename mavsdk/{gimbal => }/gimbal_pb2.py (100%) rename mavsdk/{gimbal => }/gimbal_pb2_grpc.py (100%) rename mavsdk/{info => }/info.py (99%) delete mode 100644 mavsdk/info/__init__.py rename mavsdk/{info => }/info_pb2.py (99%) rename mavsdk/{info => }/info_pb2_grpc.py (100%) rename mavsdk/{log_files => }/log_files.py (99%) delete mode 100644 mavsdk/log_files/__init__.py rename mavsdk/{log_files => }/log_files_pb2.py (99%) rename mavsdk/{log_files => }/log_files_pb2_grpc.py (100%) rename mavsdk/{mission => }/mission.py (99%) delete mode 100644 mavsdk/mission/__init__.py rename mavsdk/{mission => }/mission_pb2.py (99%) rename mavsdk/{mission => }/mission_pb2_grpc.py (100%) rename mavsdk/{mission_raw => }/mission_raw.py (99%) delete mode 100644 mavsdk/mission_raw/__init__.py rename mavsdk/{mission_raw => }/mission_raw_pb2.py (99%) rename mavsdk/{mission_raw => }/mission_raw_pb2_grpc.py (100%) rename mavsdk/{mocap => }/mocap.py (99%) delete mode 100644 mavsdk/mocap/__init__.py rename mavsdk/{mocap => }/mocap_pb2.py (99%) rename mavsdk/{mocap => }/mocap_pb2_grpc.py (100%) rename mavsdk/{offboard => }/offboard.py (99%) delete mode 100644 mavsdk/offboard/__init__.py rename mavsdk/{offboard => }/offboard_pb2.py (99%) rename mavsdk/{offboard => }/offboard_pb2_grpc.py (100%) rename mavsdk/{param => }/param.py (99%) delete mode 100644 mavsdk/param/__init__.py rename mavsdk/{param => }/param_pb2.py (99%) rename mavsdk/{param => }/param_pb2_grpc.py (100%) rename mavsdk/{shell => }/shell.py (99%) delete mode 100644 mavsdk/shell/__init__.py rename mavsdk/{shell => }/shell_pb2.py (99%) rename mavsdk/{shell => }/shell_pb2_grpc.py (100%) rename mavsdk/{telemetry => }/telemetry.py (99%) delete mode 100644 mavsdk/telemetry/__init__.py rename mavsdk/{telemetry => }/telemetry_pb2.py (99%) rename mavsdk/{telemetry => }/telemetry_pb2_grpc.py (100%) rename mavsdk/{tune => }/tune.py (99%) delete mode 100644 mavsdk/tune/__init__.py rename mavsdk/{tune => }/tune_pb2.py (99%) rename mavsdk/{tune => }/tune_pb2_grpc.py (100%) diff --git a/mavsdk/action/action.py b/mavsdk/action.py similarity index 99% rename from mavsdk/action/action.py rename to mavsdk/action.py index 60d50e61..4f8b7192 100644 --- a/mavsdk/action/action.py +++ b/mavsdk/action.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import action_pb2, action_pb2_grpc from enum import Enum diff --git a/mavsdk/action/__init__.py b/mavsdk/action/__init__.py deleted file mode 100644 index 96256761..00000000 --- a/mavsdk/action/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .action import * diff --git a/mavsdk/action/action_pb2.py b/mavsdk/action_pb2.py similarity index 100% rename from mavsdk/action/action_pb2.py rename to mavsdk/action_pb2.py diff --git a/mavsdk/action/action_pb2_grpc.py b/mavsdk/action_pb2_grpc.py similarity index 100% rename from mavsdk/action/action_pb2_grpc.py rename to mavsdk/action_pb2_grpc.py diff --git a/mavsdk/calibration/calibration.py b/mavsdk/calibration.py similarity index 99% rename from mavsdk/calibration/calibration.py rename to mavsdk/calibration.py index c484343a..ec78e0b0 100644 --- a/mavsdk/calibration/calibration.py +++ b/mavsdk/calibration.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import calibration_pb2, calibration_pb2_grpc from enum import Enum diff --git a/mavsdk/calibration/__init__.py b/mavsdk/calibration/__init__.py deleted file mode 100644 index ab1f04c7..00000000 --- a/mavsdk/calibration/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .calibration import * diff --git a/mavsdk/calibration/calibration_pb2.py b/mavsdk/calibration_pb2.py similarity index 99% rename from mavsdk/calibration/calibration_pb2.py rename to mavsdk/calibration_pb2.py index 94c7989a..21c91926 100644 --- a/mavsdk/calibration/calibration_pb2.py +++ b/mavsdk/calibration_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/calibration/calibration_pb2_grpc.py b/mavsdk/calibration_pb2_grpc.py similarity index 100% rename from mavsdk/calibration/calibration_pb2_grpc.py rename to mavsdk/calibration_pb2_grpc.py diff --git a/mavsdk/camera/camera.py b/mavsdk/camera.py similarity index 99% rename from mavsdk/camera/camera.py rename to mavsdk/camera.py index c19bfd40..cd5b09d1 100644 --- a/mavsdk/camera/camera.py +++ b/mavsdk/camera.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import camera_pb2, camera_pb2_grpc from enum import Enum diff --git a/mavsdk/camera/__init__.py b/mavsdk/camera/__init__.py deleted file mode 100644 index e1235c57..00000000 --- a/mavsdk/camera/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .camera import * diff --git a/mavsdk/camera/camera_pb2.py b/mavsdk/camera_pb2.py similarity index 99% rename from mavsdk/camera/camera_pb2.py rename to mavsdk/camera_pb2.py index 666fca63..d376f9b6 100644 --- a/mavsdk/camera/camera_pb2.py +++ b/mavsdk/camera_pb2.py @@ -12,7 +12,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/camera/camera_pb2_grpc.py b/mavsdk/camera_pb2_grpc.py similarity index 100% rename from mavsdk/camera/camera_pb2_grpc.py rename to mavsdk/camera_pb2_grpc.py diff --git a/mavsdk/core/core.py b/mavsdk/core.py similarity index 99% rename from mavsdk/core/core.py rename to mavsdk/core.py index 64337fe5..9d62faef 100644 --- a/mavsdk/core/core.py +++ b/mavsdk/core.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import core_pb2, core_pb2_grpc from enum import Enum diff --git a/mavsdk/core/__init__.py b/mavsdk/core/__init__.py deleted file mode 100644 index bb67a43f..00000000 --- a/mavsdk/core/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .core import * diff --git a/mavsdk/core/core_pb2.py b/mavsdk/core_pb2.py similarity index 100% rename from mavsdk/core/core_pb2.py rename to mavsdk/core_pb2.py diff --git a/mavsdk/core/core_pb2_grpc.py b/mavsdk/core_pb2_grpc.py similarity index 100% rename from mavsdk/core/core_pb2_grpc.py rename to mavsdk/core_pb2_grpc.py diff --git a/mavsdk/follow_me/follow_me.py b/mavsdk/follow_me.py similarity index 99% rename from mavsdk/follow_me/follow_me.py rename to mavsdk/follow_me.py index 8836ea8a..be84d8c0 100644 --- a/mavsdk/follow_me/follow_me.py +++ b/mavsdk/follow_me.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import follow_me_pb2, follow_me_pb2_grpc from enum import Enum diff --git a/mavsdk/follow_me/__init__.py b/mavsdk/follow_me/__init__.py deleted file mode 100644 index 93c8abb7..00000000 --- a/mavsdk/follow_me/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .follow_me import * diff --git a/mavsdk/follow_me/follow_me_pb2.py b/mavsdk/follow_me_pb2.py similarity index 99% rename from mavsdk/follow_me/follow_me_pb2.py rename to mavsdk/follow_me_pb2.py index b806649d..ed82dcb1 100644 --- a/mavsdk/follow_me/follow_me_pb2.py +++ b/mavsdk/follow_me_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/follow_me/follow_me_pb2_grpc.py b/mavsdk/follow_me_pb2_grpc.py similarity index 100% rename from mavsdk/follow_me/follow_me_pb2_grpc.py rename to mavsdk/follow_me_pb2_grpc.py diff --git a/mavsdk/ftp/ftp.py b/mavsdk/ftp.py similarity index 99% rename from mavsdk/ftp/ftp.py rename to mavsdk/ftp.py index 199b83fa..2a2d94ef 100644 --- a/mavsdk/ftp/ftp.py +++ b/mavsdk/ftp.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import ftp_pb2, ftp_pb2_grpc from enum import Enum diff --git a/mavsdk/ftp/__init__.py b/mavsdk/ftp/__init__.py deleted file mode 100644 index b71d9c17..00000000 --- a/mavsdk/ftp/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .ftp import * diff --git a/mavsdk/ftp/ftp_pb2.py b/mavsdk/ftp_pb2.py similarity index 99% rename from mavsdk/ftp/ftp_pb2.py rename to mavsdk/ftp_pb2.py index a4a3fef9..490bfda8 100644 --- a/mavsdk/ftp/ftp_pb2.py +++ b/mavsdk/ftp_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/ftp/ftp_pb2_grpc.py b/mavsdk/ftp_pb2_grpc.py similarity index 100% rename from mavsdk/ftp/ftp_pb2_grpc.py rename to mavsdk/ftp_pb2_grpc.py diff --git a/mavsdk/geofence/geofence.py b/mavsdk/geofence.py similarity index 99% rename from mavsdk/geofence/geofence.py rename to mavsdk/geofence.py index 494e0fb2..125f36b0 100644 --- a/mavsdk/geofence/geofence.py +++ b/mavsdk/geofence.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import geofence_pb2, geofence_pb2_grpc from enum import Enum diff --git a/mavsdk/geofence/__init__.py b/mavsdk/geofence/__init__.py deleted file mode 100644 index 4685f1c9..00000000 --- a/mavsdk/geofence/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .geofence import * diff --git a/mavsdk/geofence/geofence_pb2.py b/mavsdk/geofence_pb2.py similarity index 100% rename from mavsdk/geofence/geofence_pb2.py rename to mavsdk/geofence_pb2.py diff --git a/mavsdk/geofence/geofence_pb2_grpc.py b/mavsdk/geofence_pb2_grpc.py similarity index 100% rename from mavsdk/geofence/geofence_pb2_grpc.py rename to mavsdk/geofence_pb2_grpc.py diff --git a/mavsdk/gimbal/gimbal.py b/mavsdk/gimbal.py similarity index 99% rename from mavsdk/gimbal/gimbal.py rename to mavsdk/gimbal.py index aff3fe17..0b004597 100644 --- a/mavsdk/gimbal/gimbal.py +++ b/mavsdk/gimbal.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import gimbal_pb2, gimbal_pb2_grpc from enum import Enum diff --git a/mavsdk/gimbal/__init__.py b/mavsdk/gimbal/__init__.py deleted file mode 100644 index 0f77c19a..00000000 --- a/mavsdk/gimbal/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .gimbal import * diff --git a/mavsdk/gimbal/gimbal_pb2.py b/mavsdk/gimbal_pb2.py similarity index 100% rename from mavsdk/gimbal/gimbal_pb2.py rename to mavsdk/gimbal_pb2.py diff --git a/mavsdk/gimbal/gimbal_pb2_grpc.py b/mavsdk/gimbal_pb2_grpc.py similarity index 100% rename from mavsdk/gimbal/gimbal_pb2_grpc.py rename to mavsdk/gimbal_pb2_grpc.py diff --git a/mavsdk/info/info.py b/mavsdk/info.py similarity index 99% rename from mavsdk/info/info.py rename to mavsdk/info.py index 4fec8cd2..54e0375e 100644 --- a/mavsdk/info/info.py +++ b/mavsdk/info.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import info_pb2, info_pb2_grpc from enum import Enum diff --git a/mavsdk/info/__init__.py b/mavsdk/info/__init__.py deleted file mode 100644 index e605810f..00000000 --- a/mavsdk/info/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .info import * diff --git a/mavsdk/info/info_pb2.py b/mavsdk/info_pb2.py similarity index 99% rename from mavsdk/info/info_pb2.py rename to mavsdk/info_pb2.py index 443c7596..1f1dc160 100644 --- a/mavsdk/info/info_pb2.py +++ b/mavsdk/info_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/info/info_pb2_grpc.py b/mavsdk/info_pb2_grpc.py similarity index 100% rename from mavsdk/info/info_pb2_grpc.py rename to mavsdk/info_pb2_grpc.py diff --git a/mavsdk/log_files/log_files.py b/mavsdk/log_files.py similarity index 99% rename from mavsdk/log_files/log_files.py rename to mavsdk/log_files.py index ec73c13b..a39ccf97 100644 --- a/mavsdk/log_files/log_files.py +++ b/mavsdk/log_files.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import log_files_pb2, log_files_pb2_grpc from enum import Enum diff --git a/mavsdk/log_files/__init__.py b/mavsdk/log_files/__init__.py deleted file mode 100644 index bef61eef..00000000 --- a/mavsdk/log_files/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .log_files import * diff --git a/mavsdk/log_files/log_files_pb2.py b/mavsdk/log_files_pb2.py similarity index 99% rename from mavsdk/log_files/log_files_pb2.py rename to mavsdk/log_files_pb2.py index 6542c47d..9b36ae80 100644 --- a/mavsdk/log_files/log_files_pb2.py +++ b/mavsdk/log_files_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/log_files/log_files_pb2_grpc.py b/mavsdk/log_files_pb2_grpc.py similarity index 100% rename from mavsdk/log_files/log_files_pb2_grpc.py rename to mavsdk/log_files_pb2_grpc.py diff --git a/mavsdk/mission/mission.py b/mavsdk/mission.py similarity index 99% rename from mavsdk/mission/mission.py rename to mavsdk/mission.py index 43fcb396..9e9f1961 100644 --- a/mavsdk/mission/mission.py +++ b/mavsdk/mission.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import mission_pb2, mission_pb2_grpc from enum import Enum diff --git a/mavsdk/mission/__init__.py b/mavsdk/mission/__init__.py deleted file mode 100644 index f941e169..00000000 --- a/mavsdk/mission/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .mission import * diff --git a/mavsdk/mission/mission_pb2.py b/mavsdk/mission_pb2.py similarity index 99% rename from mavsdk/mission/mission_pb2.py rename to mavsdk/mission_pb2.py index d1a09452..60401be0 100644 --- a/mavsdk/mission/mission_pb2.py +++ b/mavsdk/mission_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/mission/mission_pb2_grpc.py b/mavsdk/mission_pb2_grpc.py similarity index 100% rename from mavsdk/mission/mission_pb2_grpc.py rename to mavsdk/mission_pb2_grpc.py diff --git a/mavsdk/mission_raw/mission_raw.py b/mavsdk/mission_raw.py similarity index 99% rename from mavsdk/mission_raw/mission_raw.py rename to mavsdk/mission_raw.py index c66d4ed3..f348249b 100644 --- a/mavsdk/mission_raw/mission_raw.py +++ b/mavsdk/mission_raw.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import mission_raw_pb2, mission_raw_pb2_grpc from enum import Enum diff --git a/mavsdk/mission_raw/__init__.py b/mavsdk/mission_raw/__init__.py deleted file mode 100644 index 6c49186e..00000000 --- a/mavsdk/mission_raw/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .mission_raw import * diff --git a/mavsdk/mission_raw/mission_raw_pb2.py b/mavsdk/mission_raw_pb2.py similarity index 99% rename from mavsdk/mission_raw/mission_raw_pb2.py rename to mavsdk/mission_raw_pb2.py index 6f557dff..04e95efd 100644 --- a/mavsdk/mission_raw/mission_raw_pb2.py +++ b/mavsdk/mission_raw_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/mission_raw/mission_raw_pb2_grpc.py b/mavsdk/mission_raw_pb2_grpc.py similarity index 100% rename from mavsdk/mission_raw/mission_raw_pb2_grpc.py rename to mavsdk/mission_raw_pb2_grpc.py diff --git a/mavsdk/mocap/mocap.py b/mavsdk/mocap.py similarity index 99% rename from mavsdk/mocap/mocap.py rename to mavsdk/mocap.py index b3191941..354eb4c2 100644 --- a/mavsdk/mocap/mocap.py +++ b/mavsdk/mocap.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import mocap_pb2, mocap_pb2_grpc from enum import Enum diff --git a/mavsdk/mocap/__init__.py b/mavsdk/mocap/__init__.py deleted file mode 100644 index e7b1afdd..00000000 --- a/mavsdk/mocap/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .mocap import * diff --git a/mavsdk/mocap/mocap_pb2.py b/mavsdk/mocap_pb2.py similarity index 99% rename from mavsdk/mocap/mocap_pb2.py rename to mavsdk/mocap_pb2.py index d637cf9b..c26b19d0 100644 --- a/mavsdk/mocap/mocap_pb2.py +++ b/mavsdk/mocap_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/mocap/mocap_pb2_grpc.py b/mavsdk/mocap_pb2_grpc.py similarity index 100% rename from mavsdk/mocap/mocap_pb2_grpc.py rename to mavsdk/mocap_pb2_grpc.py diff --git a/mavsdk/offboard/offboard.py b/mavsdk/offboard.py similarity index 99% rename from mavsdk/offboard/offboard.py rename to mavsdk/offboard.py index 3431185a..445c0b26 100644 --- a/mavsdk/offboard/offboard.py +++ b/mavsdk/offboard.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import offboard_pb2, offboard_pb2_grpc from enum import Enum diff --git a/mavsdk/offboard/__init__.py b/mavsdk/offboard/__init__.py deleted file mode 100644 index 0c77f6fb..00000000 --- a/mavsdk/offboard/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .offboard import * diff --git a/mavsdk/offboard/offboard_pb2.py b/mavsdk/offboard_pb2.py similarity index 99% rename from mavsdk/offboard/offboard_pb2.py rename to mavsdk/offboard_pb2.py index 83e24e71..a728d1d9 100644 --- a/mavsdk/offboard/offboard_pb2.py +++ b/mavsdk/offboard_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/offboard/offboard_pb2_grpc.py b/mavsdk/offboard_pb2_grpc.py similarity index 100% rename from mavsdk/offboard/offboard_pb2_grpc.py rename to mavsdk/offboard_pb2_grpc.py diff --git a/mavsdk/param/param.py b/mavsdk/param.py similarity index 99% rename from mavsdk/param/param.py rename to mavsdk/param.py index 014e6533..56631549 100644 --- a/mavsdk/param/param.py +++ b/mavsdk/param.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import param_pb2, param_pb2_grpc from enum import Enum diff --git a/mavsdk/param/__init__.py b/mavsdk/param/__init__.py deleted file mode 100644 index e3254e6d..00000000 --- a/mavsdk/param/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .param import * diff --git a/mavsdk/param/param_pb2.py b/mavsdk/param_pb2.py similarity index 99% rename from mavsdk/param/param_pb2.py rename to mavsdk/param_pb2.py index 2e111ad9..162e44d8 100644 --- a/mavsdk/param/param_pb2.py +++ b/mavsdk/param_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/param/param_pb2_grpc.py b/mavsdk/param_pb2_grpc.py similarity index 100% rename from mavsdk/param/param_pb2_grpc.py rename to mavsdk/param_pb2_grpc.py diff --git a/mavsdk/shell/shell.py b/mavsdk/shell.py similarity index 99% rename from mavsdk/shell/shell.py rename to mavsdk/shell.py index ed99ef8e..3366a40a 100644 --- a/mavsdk/shell/shell.py +++ b/mavsdk/shell.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import shell_pb2, shell_pb2_grpc from enum import Enum diff --git a/mavsdk/shell/__init__.py b/mavsdk/shell/__init__.py deleted file mode 100644 index a0acae51..00000000 --- a/mavsdk/shell/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .shell import * diff --git a/mavsdk/shell/shell_pb2.py b/mavsdk/shell_pb2.py similarity index 99% rename from mavsdk/shell/shell_pb2.py rename to mavsdk/shell_pb2.py index a19ede2a..1de5ded9 100644 --- a/mavsdk/shell/shell_pb2.py +++ b/mavsdk/shell_pb2.py @@ -11,7 +11,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/shell/shell_pb2_grpc.py b/mavsdk/shell_pb2_grpc.py similarity index 100% rename from mavsdk/shell/shell_pb2_grpc.py rename to mavsdk/shell_pb2_grpc.py diff --git a/mavsdk/source/plugins/action.rst b/mavsdk/source/plugins/action.rst index 51809ab5..1f008172 100644 --- a/mavsdk/source/plugins/action.rst +++ b/mavsdk/source/plugins/action.rst @@ -1,7 +1,7 @@ Action ==== -.. automodule:: mavsdk.generated.action +.. automodule:: mavsdk.action :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/calibration.rst b/mavsdk/source/plugins/calibration.rst index 974915d1..39ca428d 100644 --- a/mavsdk/source/plugins/calibration.rst +++ b/mavsdk/source/plugins/calibration.rst @@ -1,7 +1,7 @@ Calibration ==== -.. automodule:: mavsdk.generated.calibration +.. automodule:: mavsdk.calibration :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/camera.rst b/mavsdk/source/plugins/camera.rst index 8baa3b85..2b75b5f1 100644 --- a/mavsdk/source/plugins/camera.rst +++ b/mavsdk/source/plugins/camera.rst @@ -1,7 +1,7 @@ Camera ==== -.. automodule:: mavsdk.generated.camera +.. automodule:: mavsdk.camera :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/core.rst b/mavsdk/source/plugins/core.rst index 24bc7e02..6991ec99 100644 --- a/mavsdk/source/plugins/core.rst +++ b/mavsdk/source/plugins/core.rst @@ -1,7 +1,7 @@ Core ==== -.. automodule:: mavsdk.generated.core +.. automodule:: mavsdk.core :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/follow_me.rst b/mavsdk/source/plugins/follow_me.rst index 8fe242c9..8cd65362 100644 --- a/mavsdk/source/plugins/follow_me.rst +++ b/mavsdk/source/plugins/follow_me.rst @@ -1,7 +1,7 @@ FollowMe ==== -.. automodule:: mavsdk.generated.follow_me +.. automodule:: mavsdk.follow_me :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/ftp.rst b/mavsdk/source/plugins/ftp.rst index 3b0e33e7..c07469fa 100644 --- a/mavsdk/source/plugins/ftp.rst +++ b/mavsdk/source/plugins/ftp.rst @@ -1,7 +1,7 @@ Ftp ==== -.. automodule:: mavsdk.generated.ftp +.. automodule:: mavsdk.ftp :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/geofence.rst b/mavsdk/source/plugins/geofence.rst index d64406b5..533cb0b5 100644 --- a/mavsdk/source/plugins/geofence.rst +++ b/mavsdk/source/plugins/geofence.rst @@ -1,7 +1,7 @@ Geofence ==== -.. automodule:: mavsdk.generated.geofence +.. automodule:: mavsdk.geofence :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/gimbal.rst b/mavsdk/source/plugins/gimbal.rst index 700450fc..dfef4251 100644 --- a/mavsdk/source/plugins/gimbal.rst +++ b/mavsdk/source/plugins/gimbal.rst @@ -1,7 +1,7 @@ Gimbal ==== -.. automodule:: mavsdk.generated.gimbal +.. automodule:: mavsdk.gimbal :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/info.rst b/mavsdk/source/plugins/info.rst index 1b5439be..930a8348 100644 --- a/mavsdk/source/plugins/info.rst +++ b/mavsdk/source/plugins/info.rst @@ -1,7 +1,7 @@ Info ==== -.. automodule:: mavsdk.generated.info +.. automodule:: mavsdk.info :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/log_files.rst b/mavsdk/source/plugins/log_files.rst index c7a6109e..e394ec2a 100644 --- a/mavsdk/source/plugins/log_files.rst +++ b/mavsdk/source/plugins/log_files.rst @@ -1,7 +1,7 @@ LogFiles ==== -.. automodule:: mavsdk.generated.log_files +.. automodule:: mavsdk.log_files :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/mission.rst b/mavsdk/source/plugins/mission.rst index e00a929d..9bd74f35 100644 --- a/mavsdk/source/plugins/mission.rst +++ b/mavsdk/source/plugins/mission.rst @@ -1,7 +1,7 @@ Mission ==== -.. automodule:: mavsdk.generated.mission +.. automodule:: mavsdk.mission :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/mission_raw.rst b/mavsdk/source/plugins/mission_raw.rst index f0772fe3..20aa6e4e 100644 --- a/mavsdk/source/plugins/mission_raw.rst +++ b/mavsdk/source/plugins/mission_raw.rst @@ -1,7 +1,7 @@ MissionRaw ==== -.. automodule:: mavsdk.generated.mission_raw +.. automodule:: mavsdk.mission_raw :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/mocap.rst b/mavsdk/source/plugins/mocap.rst index 2ba3ec50..b7d36ad5 100644 --- a/mavsdk/source/plugins/mocap.rst +++ b/mavsdk/source/plugins/mocap.rst @@ -1,7 +1,7 @@ Mocap ==== -.. automodule:: mavsdk.generated.mocap +.. automodule:: mavsdk.mocap :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/offboard.rst b/mavsdk/source/plugins/offboard.rst index 93fcbdfa..412c3258 100644 --- a/mavsdk/source/plugins/offboard.rst +++ b/mavsdk/source/plugins/offboard.rst @@ -1,7 +1,7 @@ Offboard ==== -.. automodule:: mavsdk.generated.offboard +.. automodule:: mavsdk.offboard :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/param.rst b/mavsdk/source/plugins/param.rst index 2009860f..c301b85e 100644 --- a/mavsdk/source/plugins/param.rst +++ b/mavsdk/source/plugins/param.rst @@ -1,7 +1,7 @@ Param ==== -.. automodule:: mavsdk.generated.param +.. automodule:: mavsdk.param :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/shell.rst b/mavsdk/source/plugins/shell.rst index 57c4f77b..29d28900 100644 --- a/mavsdk/source/plugins/shell.rst +++ b/mavsdk/source/plugins/shell.rst @@ -1,7 +1,7 @@ Shell ==== -.. automodule:: mavsdk.generated.shell +.. automodule:: mavsdk.shell :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/telemetry.rst b/mavsdk/source/plugins/telemetry.rst index 54fa537d..5b44d56d 100644 --- a/mavsdk/source/plugins/telemetry.rst +++ b/mavsdk/source/plugins/telemetry.rst @@ -1,7 +1,7 @@ Telemetry ==== -.. automodule:: mavsdk.generated.telemetry +.. automodule:: mavsdk.telemetry :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/source/plugins/tune.rst b/mavsdk/source/plugins/tune.rst index 6a72a910..47913084 100644 --- a/mavsdk/source/plugins/tune.rst +++ b/mavsdk/source/plugins/tune.rst @@ -1,7 +1,7 @@ Tune ==== -.. automodule:: mavsdk.generated.tune +.. automodule:: mavsdk.tune :members: :undoc-members: :show-inheritance: diff --git a/mavsdk/system.py b/mavsdk/system.py index 34af16b3..63856fa7 100644 --- a/mavsdk/system.py +++ b/mavsdk/system.py @@ -2,45 +2,46 @@ from .async_plugin_manager import AsyncPluginManager -from .action import action -from .calibration import calibration -from .camera import camera -from .core import core -from .follow_me import follow_me -from .ftp import ftp -from .geofence import geofence -from .gimbal import gimbal -from .info import info -from .log_files import log_files -from .mission import mission -from .mission_raw import mission_raw -from .mocap import mocap -from .offboard import offboard -from .param import param -from .shell import shell -from .telemetry import telemetry -from .tune import tune +from . import action +from . import calibration +from . import camera +from . import core +from . import follow_me +from . import ftp +from . import geofence +from . import gimbal +from . import info +from . import log_files +from . import mission +from . import mission_raw +from . import mocap +from . import offboard +from . import param +from . import shell +from . import telemetry +from . import tune from . import bin class System: + """ + Instantiate a System object, that will serve as a proxy to + all the MAVSDK plugins. + + Parameters + ---------- + mavsdk_server_address: str + Address of a running mavsdk_server instance. If None, + an instance of mavsdk_server will be automatically + started (on localhost). + + port: int + Port of the running mavsdk_server instance specified by + mavsdk_server_address. + + """ def __init__(self, mavsdk_server_address=None, port=50051): - """Instantiate a System object, that will serve as a proxy to - all the MAVSDK plugins. - - Parameters - ---------- - mavsdk_server_address: str - Address of a running mavsdk_server instance. If None, - an instance of mavsdk_server will be automatically - started (on localhost). - - port: int - Port of the running mavsdk_server instance specified by - mavsdk_server_address. - - """ self._mavsdk_server_address = mavsdk_server_address self._port = port @@ -90,7 +91,6 @@ async def _init_plugins(self, host, port): self._plugins["telemetry"] = telemetry.Telemetry(plugin_manager) self._plugins["tune"] = tune.Tune(plugin_manager) - @staticmethod def error_uninitialized(plugin_name: str) -> str: return "{plugin_name} plugin has not been initialized!" \ diff --git a/mavsdk/telemetry/telemetry.py b/mavsdk/telemetry.py similarity index 99% rename from mavsdk/telemetry/telemetry.py rename to mavsdk/telemetry.py index 7bb1c201..31ea845b 100644 --- a/mavsdk/telemetry/telemetry.py +++ b/mavsdk/telemetry.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import telemetry_pb2, telemetry_pb2_grpc from enum import Enum diff --git a/mavsdk/telemetry/__init__.py b/mavsdk/telemetry/__init__.py deleted file mode 100644 index c9395342..00000000 --- a/mavsdk/telemetry/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .telemetry import * diff --git a/mavsdk/telemetry/telemetry_pb2.py b/mavsdk/telemetry_pb2.py similarity index 99% rename from mavsdk/telemetry/telemetry_pb2.py rename to mavsdk/telemetry_pb2.py index 9effa60a..9c071662 100644 --- a/mavsdk/telemetry/telemetry_pb2.py +++ b/mavsdk/telemetry_pb2.py @@ -12,7 +12,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/telemetry/telemetry_pb2_grpc.py b/mavsdk/telemetry_pb2_grpc.py similarity index 100% rename from mavsdk/telemetry/telemetry_pb2_grpc.py rename to mavsdk/telemetry_pb2_grpc.py diff --git a/mavsdk/tune/tune.py b/mavsdk/tune.py similarity index 99% rename from mavsdk/tune/tune.py rename to mavsdk/tune.py index 1445e65d..7038a6bb 100644 --- a/mavsdk/tune/tune.py +++ b/mavsdk/tune.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from .._base import AsyncBase +from ._base import AsyncBase from . import tune_pb2, tune_pb2_grpc from enum import Enum diff --git a/mavsdk/tune/__init__.py b/mavsdk/tune/__init__.py deleted file mode 100644 index 72a7109e..00000000 --- a/mavsdk/tune/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .tune import * diff --git a/mavsdk/tune/tune_pb2.py b/mavsdk/tune_pb2.py similarity index 99% rename from mavsdk/tune/tune_pb2.py rename to mavsdk/tune_pb2.py index b4cbd440..7ec41eb1 100644 --- a/mavsdk/tune/tune_pb2.py +++ b/mavsdk/tune_pb2.py @@ -12,7 +12,7 @@ _sym_db = _symbol_database.Default() -from .. import mavsdk_options_pb2 as mavsdk__options__pb2 +from . import mavsdk_options_pb2 as mavsdk__options__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/mavsdk/tune/tune_pb2_grpc.py b/mavsdk/tune_pb2_grpc.py similarity index 100% rename from mavsdk/tune/tune_pb2_grpc.py rename to mavsdk/tune_pb2_grpc.py