From 0edd7c93e1dd92fcf203e8d7e505b47f0ed9fefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 6 Aug 2018 20:04:07 +0200 Subject: [PATCH] posix main: check for ROS argument --- platforms/posix/src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platforms/posix/src/main.cpp b/platforms/posix/src/main.cpp index bf24137154..0d54a60abf 100644 --- a/platforms/posix/src/main.cpp +++ b/platforms/posix/src/main.cpp @@ -215,7 +215,11 @@ int main(int argc, char **argv) PX4_DEBUG("instance: %i", instance); if (myoptind < argc) { - data_path = argv[myoptind]; + std::string optional_arg = argv[myoptind]; + + if (optional_arg.compare(0, 2, "__") != 0 || optional_arg.find(":=") == std::string::npos) { + data_path = optional_arg; + } // else: ROS argument (in the form __:=) } if (is_already_running(instance)) {