diff --git a/MAVSDK_SERVER_VERSION b/MAVSDK_SERVER_VERSION index 61919cdd..2f8dfc4e 100644 --- a/MAVSDK_SERVER_VERSION +++ b/MAVSDK_SERVER_VERSION @@ -1 +1 @@ -v1.4.4 +v1.4.10 diff --git a/README.md b/README.md index 5308ff60..ed60ea3f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Python wrapper is based on a gRPC client communicating with the gRPC server ## Important Notes -- Python 3.6+ is required (because the wrapper is based on [asyncio](https://docs.python.org/3.7/library/asyncio.html)). +- Python 3.7+ is required (because the wrapper is based on [asyncio](https://docs.python.org/3.7/library/asyncio.html)). - You may need to run `pip3` instead of `pip` and `python3` instead of `python`, depending of your system defaults. - Auterion has a [Getting started with MAVSDK-Python](https://auterion.com/getting-started-with-mavsdk-python/) guide if you're a beginner and not sure where to start. diff --git a/examples/calibration.py b/examples/calibration.py index 133e4988..eb8bb417 100755 --- a/examples/calibration.py +++ b/examples/calibration.py @@ -31,5 +31,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/camera.py b/examples/camera.py index e39f0981..c027f36d 100755 --- a/examples/camera.py +++ b/examples/camera.py @@ -56,5 +56,5 @@ async def print_status(drone): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/camera_params.py b/examples/camera_params.py index d3c0a3b1..007a6420 100755 --- a/examples/camera_params.py +++ b/examples/camera_params.py @@ -185,5 +185,5 @@ async def make_user_choose_option_range(possible_options): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/failure_injection.py b/examples/failure_injection.py index d3437b56..036f252c 100755 --- a/examples/failure_injection.py +++ b/examples/failure_injection.py @@ -59,5 +59,5 @@ async def run(): await drone.param.set_param_int('SYS_FAILURE_EN', 0) if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/firmware_version.py b/examples/firmware_version.py index 63bc2d43..290b0d30 100755 --- a/examples/firmware_version.py +++ b/examples/firmware_version.py @@ -19,5 +19,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/follow_me_example.py b/examples/follow_me_example.py index da80bd6e..735ad732 100755 --- a/examples/follow_me_example.py +++ b/examples/follow_me_example.py @@ -64,5 +64,5 @@ async def fly_drone(): await drone.action.land() if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(fly_drone()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/geofence.py b/examples/geofence.py index e8a28209..96422fcb 100755 --- a/examples/geofence.py +++ b/examples/geofence.py @@ -7,7 +7,7 @@ """ This example shows how to use the geofence plugin. -Note: The behavior when your vehicle hits the geofence is NOT configured in this example. +Note: The behavior when your vehicle hits the geofence is NOT configured in this example. """ @@ -51,5 +51,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/gimbal.py b/examples/gimbal.py index a5c67c94..f278dc0b 100755 --- a/examples/gimbal.py +++ b/examples/gimbal.py @@ -83,6 +83,5 @@ async def print_gimbal_position(drone): if __name__ == "__main__": - # Start the main function - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/goto.py b/examples/goto.py index 198f255a..01e3fc26 100755 --- a/examples/goto.py +++ b/examples/goto.py @@ -43,5 +43,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/logfile_download.py b/examples/logfile_download.py index 71af0ff7..a6b833ab 100755 --- a/examples/logfile_download.py +++ b/examples/logfile_download.py @@ -42,4 +42,5 @@ async def get_entries(drone): if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/manual_control.py b/examples/manual_control.py index a0ed64b7..a3d86766 100755 --- a/examples/manual_control.py +++ b/examples/manual_control.py @@ -91,6 +91,5 @@ async def manual_controls(): if __name__ == "__main__": - - loop = asyncio.get_event_loop() - loop.run_until_complete(manual_controls()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/mission.py b/examples/mission.py index 93f0affd..07d5de63 100755 --- a/examples/mission.py +++ b/examples/mission.py @@ -116,5 +116,5 @@ async def observe_is_in_air(drone, running_tasks): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/mission_import.py b/examples/mission_import.py index 2b6f2dd2..225f6c6e 100755 --- a/examples/mission_import.py +++ b/examples/mission_import.py @@ -24,5 +24,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/offboard_attitude.py b/examples/offboard_attitude.py index 4ecbf13b..27e22024 100755 --- a/examples/offboard_attitude.py +++ b/examples/offboard_attitude.py @@ -72,5 +72,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/offboard_position_ned.py b/examples/offboard_position_ned.py index 5c6dedb7..eeb478f9 100755 --- a/examples/offboard_position_ned.py +++ b/examples/offboard_position_ned.py @@ -71,5 +71,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/offboard_position_velocity_ned.py b/examples/offboard_position_velocity_ned.py index d8513687..f093c95e 100755 --- a/examples/offboard_position_velocity_ned.py +++ b/examples/offboard_position_velocity_ned.py @@ -64,5 +64,5 @@ async def print_z_velocity(drone): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/offboard_velocity_body.py b/examples/offboard_velocity_body.py index aa6562b0..b4886ec5 100755 --- a/examples/offboard_velocity_body.py +++ b/examples/offboard_velocity_body.py @@ -86,5 +86,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/offboard_velocity_ned.py b/examples/offboard_velocity_ned.py index e8e70884..716af9df 100755 --- a/examples/offboard_velocity_ned.py +++ b/examples/offboard_velocity_ned.py @@ -79,5 +79,5 @@ async def run(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/send_status_message.py b/examples/send_status_message.py index 0d4a3546..ddbca512 100755 --- a/examples/send_status_message.py +++ b/examples/send_status_message.py @@ -29,5 +29,5 @@ async def run(): break if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/takeoff_and_land.py b/examples/takeoff_and_land.py index a5922c39..666897f5 100755 --- a/examples/takeoff_and_land.py +++ b/examples/takeoff_and_land.py @@ -47,5 +47,5 @@ async def print_status_text(drone): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/takeoff_and_land_keyboard_control.py b/examples/takeoff_and_land_keyboard_control.py old mode 100644 new mode 100755 index 5e9787f6..6561222a --- a/examples/takeoff_and_land_keyboard_control.py +++ b/examples/takeoff_and_land_keyboard_control.py @@ -1,6 +1,4 @@ -""" -Author: @woosal1337 -""" +#!/usr/bin/env python3 import asyncio import pygame @@ -148,6 +146,7 @@ async def print_position(drone=drone): if __name__ == "__main__": + # TODO: use new asyncio methods loop = asyncio.get_event_loop() loop.run_until_complete(setup()) loop.run_until_complete(main()) diff --git a/examples/telemetry.py b/examples/telemetry.py index ab632696..e85bd351 100755 --- a/examples/telemetry.py +++ b/examples/telemetry.py @@ -36,8 +36,5 @@ async def print_position(drone): if __name__ == "__main__": - # Start the main function - asyncio.ensure_future(run()) - - # Runs the event loop until the program is canceled with e.g. CTRL-C - asyncio.get_event_loop().run_forever() + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/telemetry_flight_mode.py b/examples/telemetry_flight_mode.py index 3159c759..05732bab 100755 --- a/examples/telemetry_flight_mode.py +++ b/examples/telemetry_flight_mode.py @@ -19,5 +19,5 @@ async def print_flight_mode(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(print_flight_mode()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/telemetry_is_armed_is_in_air.py b/examples/telemetry_is_armed_is_in_air.py index 73842629..283f941c 100755 --- a/examples/telemetry_is_armed_is_in_air.py +++ b/examples/telemetry_is_armed_is_in_air.py @@ -23,8 +23,5 @@ async def print_is_in_air(drone): if __name__ == "__main__": - # Start the main function - asyncio.ensure_future(run()) - - # Runs the event loop until the program is canceled with e.g. CTRL-C - asyncio.get_event_loop().run_forever() + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/telemetry_takeoff_and_land.py b/examples/telemetry_takeoff_and_land.py index 081a7958..caf5015d 100755 --- a/examples/telemetry_takeoff_and_land.py +++ b/examples/telemetry_takeoff_and_land.py @@ -108,4 +108,5 @@ async def observe_is_in_air(drone, running_tasks): if __name__ == "__main__": - asyncio.get_event_loop().run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/transponder.py b/examples/transponder.py index 194453fc..1af8201b 100644 --- a/examples/transponder.py +++ b/examples/transponder.py @@ -9,7 +9,7 @@ async def run(): drone = System() #await drone.connect(system_address="udp://:14540") await drone.connect() - + # Start the tasks asyncio.ensure_future(print_transponders(drone)) @@ -19,8 +19,5 @@ async def print_transponders(drone): if __name__ == "__main__": - # Start the main function - asyncio.ensure_future(run()) - - # Runs the event loop until the program is canceled with e.g. CTRL-C - asyncio.get_event_loop().run_forever() + # Run the asyncio loop + asyncio.run(run()) diff --git a/examples/tune.py b/examples/tune.py index 6989d03b..7dc3a984 100755 --- a/examples/tune.py +++ b/examples/tune.py @@ -64,5 +64,5 @@ async def run(): print("Tune played") if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(run()) + # Run the asyncio loop + asyncio.run(run()) diff --git a/mavsdk/log_files.py b/mavsdk/log_files.py index 65dc3d72..a608159d 100644 --- a/mavsdk/log_files.py +++ b/mavsdk/log_files.py @@ -431,52 +431,6 @@ async def download_log_file(self, entry, path): finally: download_log_file_stream.cancel() - async def download_log_file(self, entry, path): - """ - Download log file synchronously. - - Parameters - ---------- - entry : Entry - Entry of the log file to download. - - path : std::string - Path of where to download log file to. - - Returns - ------- - progress : ProgressData - Progress if result is progress - - Raises - ------ - LogFilesError - If the request fails. The error contains the reason for the failure. - """ - - request = log_files_pb2.DownloadLogFileRequest() - - - - entry.translate_to_rpc(request.entry) - - - - - request.path = path - - response = await self._stub.DownloadLogFile(request) - - - result = self._extract_result(response) - - if result.result != LogFilesResult.Result.SUCCESS: - raise LogFilesError(result, "download_log_file()", entry, path) - - - return ProgressData.translate_from_rpc(response.progress) - - async def erase_all_log_files(self): """ Erase all log files. diff --git a/mavsdk/log_files_pb2.py b/mavsdk/log_files_pb2.py index 0de55057..e87e2a25 100644 --- a/mavsdk/log_files_pb2.py +++ b/mavsdk/log_files_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19log_files/log_files.proto\x12\x14mavsdk.rpc.log_files\x1a\x14mavsdk_options.proto\"\x13\n\x11GetEntriesRequest\"\x82\x01\n\x12GetEntriesResponse\x12>\n\x10log_files_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.log_files.LogFilesResult\x12,\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x1b.mavsdk.rpc.log_files.Entry\"[\n\x1fSubscribeDownloadLogFileRequest\x12*\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.log_files.Entry\x12\x0c\n\x04path\x18\x02 \x01(\t\"\x8f\x01\n\x17\x44ownloadLogFileResponse\x12>\n\x10log_files_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.log_files.LogFilesResult\x12\x34\n\x08progress\x18\x02 \x01(\x0b\x32\".mavsdk.rpc.log_files.ProgressData\"R\n\x16\x44ownloadLogFileRequest\x12*\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.log_files.Entry\x12\x0c\n\x04path\x18\x02 \x01(\t\"\x19\n\x17\x45raseAllLogFilesRequest\"Z\n\x18\x45raseAllLogFilesResponse\x12>\n\x10log_files_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.log_files.LogFilesResult\")\n\x0cProgressData\x12\x19\n\x08progress\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"5\n\x05\x45ntry\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04\x64\x61te\x18\x02 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\r\"\xa1\x02\n\x0eLogFilesResult\x12;\n\x06result\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.log_files.LogFilesResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbd\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x0f\n\x0bRESULT_NEXT\x10\x02\x12\x16\n\x12RESULT_NO_LOGFILES\x10\x03\x12\x12\n\x0eRESULT_TIMEOUT\x10\x04\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x05\x12\x1b\n\x17RESULT_FILE_OPEN_FAILED\x10\x06\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x07\x32\xf2\x03\n\x0fLogFilesService\x12\x61\n\nGetEntries\x12\'.mavsdk.rpc.log_files.GetEntriesRequest\x1a(.mavsdk.rpc.log_files.GetEntriesResponse\"\x00\x12\x8c\x01\n\x18SubscribeDownloadLogFile\x12\x35.mavsdk.rpc.log_files.SubscribeDownloadLogFileRequest\x1a-.mavsdk.rpc.log_files.DownloadLogFileResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12t\n\x0f\x44ownloadLogFile\x12,.mavsdk.rpc.log_files.DownloadLogFileRequest\x1a-.mavsdk.rpc.log_files.DownloadLogFileResponse\"\x04\x80\xb5\x18\x01\x12w\n\x10\x45raseAllLogFiles\x12-.mavsdk.rpc.log_files.EraseAllLogFilesRequest\x1a..mavsdk.rpc.log_files.EraseAllLogFilesResponse\"\x04\x80\xb5\x18\x01\x42$\n\x13io.mavsdk.log_filesB\rLogFilesProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19log_files/log_files.proto\x12\x14mavsdk.rpc.log_files\x1a\x14mavsdk_options.proto\"\x13\n\x11GetEntriesRequest\"\x82\x01\n\x12GetEntriesResponse\x12>\n\x10log_files_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.log_files.LogFilesResult\x12,\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x1b.mavsdk.rpc.log_files.Entry\"[\n\x1fSubscribeDownloadLogFileRequest\x12*\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.log_files.Entry\x12\x0c\n\x04path\x18\x02 \x01(\t\"\x8f\x01\n\x17\x44ownloadLogFileResponse\x12>\n\x10log_files_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.log_files.LogFilesResult\x12\x34\n\x08progress\x18\x02 \x01(\x0b\x32\".mavsdk.rpc.log_files.ProgressData\"\x19\n\x17\x45raseAllLogFilesRequest\"Z\n\x18\x45raseAllLogFilesResponse\x12>\n\x10log_files_result\x18\x01 \x01(\x0b\x32$.mavsdk.rpc.log_files.LogFilesResult\")\n\x0cProgressData\x12\x19\n\x08progress\x18\x01 \x01(\x02\x42\x07\x82\xb5\x18\x03NaN\"5\n\x05\x45ntry\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0c\n\x04\x64\x61te\x18\x02 \x01(\t\x12\x12\n\nsize_bytes\x18\x03 \x01(\r\"\xa1\x02\n\x0eLogFilesResult\x12;\n\x06result\x18\x01 \x01(\x0e\x32+.mavsdk.rpc.log_files.LogFilesResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xbd\x01\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x0f\n\x0bRESULT_NEXT\x10\x02\x12\x16\n\x12RESULT_NO_LOGFILES\x10\x03\x12\x12\n\x0eRESULT_TIMEOUT\x10\x04\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x05\x12\x1b\n\x17RESULT_FILE_OPEN_FAILED\x10\x06\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x07\x32\xfc\x02\n\x0fLogFilesService\x12\x61\n\nGetEntries\x12\'.mavsdk.rpc.log_files.GetEntriesRequest\x1a(.mavsdk.rpc.log_files.GetEntriesResponse\"\x00\x12\x8c\x01\n\x18SubscribeDownloadLogFile\x12\x35.mavsdk.rpc.log_files.SubscribeDownloadLogFileRequest\x1a-.mavsdk.rpc.log_files.DownloadLogFileResponse\"\x08\x80\xb5\x18\x00\x88\xb5\x18\x01\x30\x01\x12w\n\x10\x45raseAllLogFiles\x12-.mavsdk.rpc.log_files.EraseAllLogFilesRequest\x1a..mavsdk.rpc.log_files.EraseAllLogFilesResponse\"\x04\x80\xb5\x18\x01\x42$\n\x13io.mavsdk.log_filesB\rLogFilesProtob\x06proto3') @@ -23,7 +23,6 @@ _GETENTRIESRESPONSE = DESCRIPTOR.message_types_by_name['GetEntriesResponse'] _SUBSCRIBEDOWNLOADLOGFILEREQUEST = DESCRIPTOR.message_types_by_name['SubscribeDownloadLogFileRequest'] _DOWNLOADLOGFILERESPONSE = DESCRIPTOR.message_types_by_name['DownloadLogFileResponse'] -_DOWNLOADLOGFILEREQUEST = DESCRIPTOR.message_types_by_name['DownloadLogFileRequest'] _ERASEALLLOGFILESREQUEST = DESCRIPTOR.message_types_by_name['EraseAllLogFilesRequest'] _ERASEALLLOGFILESRESPONSE = DESCRIPTOR.message_types_by_name['EraseAllLogFilesResponse'] _PROGRESSDATA = DESCRIPTOR.message_types_by_name['ProgressData'] @@ -58,13 +57,6 @@ }) _sym_db.RegisterMessage(DownloadLogFileResponse) -DownloadLogFileRequest = _reflection.GeneratedProtocolMessageType('DownloadLogFileRequest', (_message.Message,), { - 'DESCRIPTOR' : _DOWNLOADLOGFILEREQUEST, - '__module__' : 'log_files.log_files_pb2' - # @@protoc_insertion_point(class_scope:mavsdk.rpc.log_files.DownloadLogFileRequest) - }) -_sym_db.RegisterMessage(DownloadLogFileRequest) - EraseAllLogFilesRequest = _reflection.GeneratedProtocolMessageType('EraseAllLogFilesRequest', (_message.Message,), { 'DESCRIPTOR' : _ERASEALLLOGFILESREQUEST, '__module__' : 'log_files.log_files_pb2' @@ -109,8 +101,6 @@ _PROGRESSDATA.fields_by_name['progress']._serialized_options = b'\202\265\030\003NaN' _LOGFILESSERVICE.methods_by_name['SubscribeDownloadLogFile']._options = None _LOGFILESSERVICE.methods_by_name['SubscribeDownloadLogFile']._serialized_options = b'\200\265\030\000\210\265\030\001' - _LOGFILESSERVICE.methods_by_name['DownloadLogFile']._options = None - _LOGFILESSERVICE.methods_by_name['DownloadLogFile']._serialized_options = b'\200\265\030\001' _LOGFILESSERVICE.methods_by_name['EraseAllLogFiles']._options = None _LOGFILESSERVICE.methods_by_name['EraseAllLogFiles']._serialized_options = b'\200\265\030\001' _GETENTRIESREQUEST._serialized_start=73 @@ -121,20 +111,18 @@ _SUBSCRIBEDOWNLOADLOGFILEREQUEST._serialized_end=318 _DOWNLOADLOGFILERESPONSE._serialized_start=321 _DOWNLOADLOGFILERESPONSE._serialized_end=464 - _DOWNLOADLOGFILEREQUEST._serialized_start=466 - _DOWNLOADLOGFILEREQUEST._serialized_end=548 - _ERASEALLLOGFILESREQUEST._serialized_start=550 - _ERASEALLLOGFILESREQUEST._serialized_end=575 - _ERASEALLLOGFILESRESPONSE._serialized_start=577 - _ERASEALLLOGFILESRESPONSE._serialized_end=667 - _PROGRESSDATA._serialized_start=669 - _PROGRESSDATA._serialized_end=710 - _ENTRY._serialized_start=712 - _ENTRY._serialized_end=765 - _LOGFILESRESULT._serialized_start=768 - _LOGFILESRESULT._serialized_end=1057 - _LOGFILESRESULT_RESULT._serialized_start=868 - _LOGFILESRESULT_RESULT._serialized_end=1057 - _LOGFILESSERVICE._serialized_start=1060 - _LOGFILESSERVICE._serialized_end=1558 + _ERASEALLLOGFILESREQUEST._serialized_start=466 + _ERASEALLLOGFILESREQUEST._serialized_end=491 + _ERASEALLLOGFILESRESPONSE._serialized_start=493 + _ERASEALLLOGFILESRESPONSE._serialized_end=583 + _PROGRESSDATA._serialized_start=585 + _PROGRESSDATA._serialized_end=626 + _ENTRY._serialized_start=628 + _ENTRY._serialized_end=681 + _LOGFILESRESULT._serialized_start=684 + _LOGFILESRESULT._serialized_end=973 + _LOGFILESRESULT_RESULT._serialized_start=784 + _LOGFILESRESULT_RESULT._serialized_end=973 + _LOGFILESSERVICE._serialized_start=976 + _LOGFILESSERVICE._serialized_end=1356 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/log_files_pb2_grpc.py b/mavsdk/log_files_pb2_grpc.py index 938aed6c..b9417bfb 100644 --- a/mavsdk/log_files_pb2_grpc.py +++ b/mavsdk/log_files_pb2_grpc.py @@ -26,11 +26,6 @@ def __init__(self, channel): request_serializer=log__files_dot_log__files__pb2.SubscribeDownloadLogFileRequest.SerializeToString, response_deserializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.FromString, ) - self.DownloadLogFile = channel.unary_unary( - '/mavsdk.rpc.log_files.LogFilesService/DownloadLogFile', - request_serializer=log__files_dot_log__files__pb2.DownloadLogFileRequest.SerializeToString, - response_deserializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.FromString, - ) self.EraseAllLogFiles = channel.unary_unary( '/mavsdk.rpc.log_files.LogFilesService/EraseAllLogFiles', request_serializer=log__files_dot_log__files__pb2.EraseAllLogFilesRequest.SerializeToString, @@ -57,13 +52,6 @@ def SubscribeDownloadLogFile(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def DownloadLogFile(self, request, context): - """Download log file synchronously. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def EraseAllLogFiles(self, request, context): """Erase all log files. """ @@ -84,11 +72,6 @@ def add_LogFilesServiceServicer_to_server(servicer, server): request_deserializer=log__files_dot_log__files__pb2.SubscribeDownloadLogFileRequest.FromString, response_serializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.SerializeToString, ), - 'DownloadLogFile': grpc.unary_unary_rpc_method_handler( - servicer.DownloadLogFile, - request_deserializer=log__files_dot_log__files__pb2.DownloadLogFileRequest.FromString, - response_serializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.SerializeToString, - ), 'EraseAllLogFiles': grpc.unary_unary_rpc_method_handler( servicer.EraseAllLogFiles, request_deserializer=log__files_dot_log__files__pb2.EraseAllLogFilesRequest.FromString, @@ -140,23 +123,6 @@ def SubscribeDownloadLogFile(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod - def DownloadLogFile(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.log_files.LogFilesService/DownloadLogFile', - log__files_dot_log__files__pb2.DownloadLogFileRequest.SerializeToString, - log__files_dot_log__files__pb2.DownloadLogFileResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - @staticmethod def EraseAllLogFiles(request, target, diff --git a/mavsdk/source/index.rst b/mavsdk/source/index.rst index 54227fa3..1335da93 100644 --- a/mavsdk/source/index.rst +++ b/mavsdk/source/index.rst @@ -23,7 +23,7 @@ MAVSDK-Python API reference Important Notes --------------- -- Python 3.6+ is required. +- Python 3.7+ is required. - You may need to run ``pip3`` instead of ``pip`` and ``python3`` instead of ``python``, depending of your system defaults. - Auterion has a _Getting started with MAVSDK-Python: https://auterion.com/getting-started-with-mavsdk-python/ guide if you're a beginner and not sure where to start. diff --git a/proto b/proto index 743aa1d2..e6d38681 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 743aa1d24094db30ac3ed503d9552fb9c49ef4c4 +Subproject commit e6d38681b78fb50460fb8059d8bb82f6cfd52b28 diff --git a/setup.py b/setup.py index eb7498bf..097f2960 100644 --- a/setup.py +++ b/setup.py @@ -136,7 +136,7 @@ def version(): url="https://github.com/mavlink/MAVSDK-Python", maintainer="Jonas Vautherin, Julian Oes", maintainer_email="jonas@auterion.com, julian.oes@auterion.com", - python_requires='>=3.6', + python_requires='>=3.7', include_package_data=True, cmdclass={'build': custom_build}, @@ -144,7 +144,7 @@ def version(): "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", ], packages=find_packages(exclude=["other", "docs", "tests", "examples",