File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
core/services/ardupilot_manager/mavlink_proxy Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11import re
22import subprocess
3+ from datetime import datetime
34from typing import Optional
45
56from mavlink_proxy .AbstractRouter import AbstractRouter
@@ -37,7 +38,11 @@ def convert_endpoint(endpoint: Endpoint) -> str:
3738 return f"zenoh:{ endpoint .place } :{ endpoint .argument } "
3839 raise ValueError (f"Endpoint of type { endpoint .connection_type } not supported on MAVLink-Server." )
3940
40- endpoints = " " .join ([convert_endpoint (endpoint ) for endpoint in [master_endpoint , * self .endpoints ()]])
41+ # MAVlink-Server takes direct file paths as endpoints, so we generate a timestamped file path
42+ now = datetime .now ().strftime ("%Y-%m-%d-%H-%M-%S" )
43+ logging_endpoint = f"tlogwriter:/root/.config/ardupilot-manager/firmware/logs/mavlink-server-{ now } .tlog"
44+ str_endpoints = [convert_endpoint (endpoint ) for endpoint in [master_endpoint , * self .endpoints ()]]
45+ endpoints = " " .join ([* str_endpoints , logging_endpoint ])
4146
4247 return f"{ self .binary ()} { endpoints } "
4348
You can’t perform that action at this time.
0 commit comments