Skip to content

Commit 5b98892

Browse files
committed
Update mavsdk_server version and proto
This should fix the log_files API. Signed-off-by: Julian Oes <[email protected]>
1 parent c493e52 commit 5b98892

File tree

5 files changed

+17
-109
lines changed

5 files changed

+17
-109
lines changed

MAVSDK_SERVER_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.4.4
1+
v1.4.10

mavsdk/log_files.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -431,52 +431,6 @@ async def download_log_file(self, entry, path):
431431
finally:
432432
download_log_file_stream.cancel()
433433

434-
async def download_log_file(self, entry, path):
435-
"""
436-
Download log file synchronously.
437-
438-
Parameters
439-
----------
440-
entry : Entry
441-
Entry of the log file to download.
442-
443-
path : std::string
444-
Path of where to download log file to.
445-
446-
Returns
447-
-------
448-
progress : ProgressData
449-
Progress if result is progress
450-
451-
Raises
452-
------
453-
LogFilesError
454-
If the request fails. The error contains the reason for the failure.
455-
"""
456-
457-
request = log_files_pb2.DownloadLogFileRequest()
458-
459-
460-
461-
entry.translate_to_rpc(request.entry)
462-
463-
464-
465-
466-
request.path = path
467-
468-
response = await self._stub.DownloadLogFile(request)
469-
470-
471-
result = self._extract_result(response)
472-
473-
if result.result != LogFilesResult.Result.SUCCESS:
474-
raise LogFilesError(result, "download_log_file()", entry, path)
475-
476-
477-
return ProgressData.translate_from_rpc(response.progress)
478-
479-
480434
async def erase_all_log_files(self):
481435
"""
482436
Erase all log files.

mavsdk/log_files_pb2.py

Lines changed: 15 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mavsdk/log_files_pb2_grpc.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ def __init__(self, channel):
2626
request_serializer=log__files_dot_log__files__pb2.SubscribeDownloadLogFileRequest.SerializeToString,
2727
response_deserializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.FromString,
2828
)
29-
self.DownloadLogFile = channel.unary_unary(
30-
'/mavsdk.rpc.log_files.LogFilesService/DownloadLogFile',
31-
request_serializer=log__files_dot_log__files__pb2.DownloadLogFileRequest.SerializeToString,
32-
response_deserializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.FromString,
33-
)
3429
self.EraseAllLogFiles = channel.unary_unary(
3530
'/mavsdk.rpc.log_files.LogFilesService/EraseAllLogFiles',
3631
request_serializer=log__files_dot_log__files__pb2.EraseAllLogFilesRequest.SerializeToString,
@@ -57,13 +52,6 @@ def SubscribeDownloadLogFile(self, request, context):
5752
context.set_details('Method not implemented!')
5853
raise NotImplementedError('Method not implemented!')
5954

60-
def DownloadLogFile(self, request, context):
61-
"""Download log file synchronously.
62-
"""
63-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
64-
context.set_details('Method not implemented!')
65-
raise NotImplementedError('Method not implemented!')
66-
6755
def EraseAllLogFiles(self, request, context):
6856
"""Erase all log files.
6957
"""
@@ -84,11 +72,6 @@ def add_LogFilesServiceServicer_to_server(servicer, server):
8472
request_deserializer=log__files_dot_log__files__pb2.SubscribeDownloadLogFileRequest.FromString,
8573
response_serializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.SerializeToString,
8674
),
87-
'DownloadLogFile': grpc.unary_unary_rpc_method_handler(
88-
servicer.DownloadLogFile,
89-
request_deserializer=log__files_dot_log__files__pb2.DownloadLogFileRequest.FromString,
90-
response_serializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.SerializeToString,
91-
),
9275
'EraseAllLogFiles': grpc.unary_unary_rpc_method_handler(
9376
servicer.EraseAllLogFiles,
9477
request_deserializer=log__files_dot_log__files__pb2.EraseAllLogFilesRequest.FromString,
@@ -140,23 +123,6 @@ def SubscribeDownloadLogFile(request,
140123
options, channel_credentials,
141124
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
142125

143-
@staticmethod
144-
def DownloadLogFile(request,
145-
target,
146-
options=(),
147-
channel_credentials=None,
148-
call_credentials=None,
149-
insecure=False,
150-
compression=None,
151-
wait_for_ready=None,
152-
timeout=None,
153-
metadata=None):
154-
return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.log_files.LogFilesService/DownloadLogFile',
155-
log__files_dot_log__files__pb2.DownloadLogFileRequest.SerializeToString,
156-
log__files_dot_log__files__pb2.DownloadLogFileResponse.FromString,
157-
options, channel_credentials,
158-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
159-
160126
@staticmethod
161127
def EraseAllLogFiles(request,
162128
target,

proto

Submodule proto updated from 743aa1d to e6d3868

0 commit comments

Comments
 (0)