mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 14:47:44 +08:00
uorb_rtps_classifier: add the capability to receive absolute and relative paths
This commit is contained in:
@@ -123,14 +123,13 @@ if __name__ == "__main__":
|
||||
# Parse arguments
|
||||
args = parser.parse_args()
|
||||
|
||||
msg_folder = args.msgdir
|
||||
msg_dir = args.msgdir
|
||||
if args.msgdir == 'msg':
|
||||
msg_folder = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if args.yaml_file != 'tools/uorb_rtps_message_ids.yaml':
|
||||
classifier = Classifier(os.path.abspath(args.yaml_file), msg_folder)
|
||||
msg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
else:
|
||||
classifier = Classifier(os.path.join(
|
||||
msg_folder, args.yaml_file), msg_folder)
|
||||
msg_dir = os.path.abspath(args.msgdir)
|
||||
classifier = (Classifier(os.path.abspath(args.yaml_file), msg_dir) if os.path.isabs(args.yaml_file) \
|
||||
else Classifier(os.path.join(msg_dir, args.yaml_file), msg_dir))
|
||||
|
||||
if args.send:
|
||||
if args.path:
|
||||
|
||||
Reference in New Issue
Block a user