mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
handled a document issue and the case of absent test_data directory
This commit is contained in:
@@ -335,10 +335,8 @@ int main(int argc, char **argv)
|
|||||||
string data_path;
|
string data_path;
|
||||||
string node_name;
|
string node_name;
|
||||||
|
|
||||||
bool skippingOutputRedirect = false;
|
|
||||||
|
|
||||||
// parse arguments
|
// parse arguments
|
||||||
while (index < argc && !skippingOutputRedirect) {
|
while (index < argc) {
|
||||||
//cout << "arg: " << index << " : " << argv[index] << endl;
|
//cout << "arg: " << index << " : " << argv[index] << endl;
|
||||||
|
|
||||||
if (argv[index][0] == '-') {
|
if (argv[index][0] == '-') {
|
||||||
@@ -368,9 +366,6 @@ int main(int argc, char **argv)
|
|||||||
cout << "node name: " << node_name << endl;
|
cout << "node name: " << node_name << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (strchr(argv[index], '>')) {
|
|
||||||
skippingOutputRedirect = true;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//cout << "positional argument" << endl;
|
//cout << "positional argument" << endl;
|
||||||
|
|
||||||
@@ -420,7 +415,7 @@ int main(int argc, char **argv)
|
|||||||
vector<string> path_sym_links;
|
vector<string> path_sym_links;
|
||||||
path_sym_links.push_back("ROMFS");
|
path_sym_links.push_back("ROMFS");
|
||||||
path_sym_links.push_back("posix-configs");
|
path_sym_links.push_back("posix-configs");
|
||||||
path_sym_links.push_back("test_data");
|
path_sym_links.push_back("test_data"); // optional
|
||||||
|
|
||||||
for (unsigned i = 0; i < path_sym_links.size(); i++) {
|
for (unsigned i = 0; i < path_sym_links.size(); i++) {
|
||||||
string path_sym_link = path_sym_links[i];
|
string path_sym_link = path_sym_links[i];
|
||||||
@@ -430,7 +425,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
PX4_DEBUG("Creating symlink %s -> %s", src_path.c_str(), dest_path.c_str());
|
PX4_DEBUG("Creating symlink %s -> %s", src_path.c_str(), dest_path.c_str());
|
||||||
|
|
||||||
if (dirExists(path_sym_link)) { continue; }
|
if (dirExists(path_sym_link) || !dirExists(dest_path)) { continue; }
|
||||||
|
|
||||||
// create sym-links
|
// create sym-links
|
||||||
int ret = symlink(src_path.c_str(), dest_path.c_str());
|
int ret = symlink(src_path.c_str(), dest_path.c_str());
|
||||||
|
|||||||
@@ -3023,8 +3023,7 @@ $ mavlink stream -u 14556 -s HIGHRES_IMU -r 50
|
|||||||
#endif
|
#endif
|
||||||
PRINT_MODULE_USAGE_PARAM_STRING('m', "normal", "custom|camera|onboard|osd|magic|config|iridium|minimal",
|
PRINT_MODULE_USAGE_PARAM_STRING('m', "normal", "custom|camera|onboard|osd|magic|config|iridium|minimal",
|
||||||
"Mode: sets default streams and rates", true);
|
"Mode: sets default streams and rates", true);
|
||||||
PRINT_MODULE_USAGE_PARAM_STRING('n', "SoftAp", "SoftAp|wlan|name of custom wifi interface",
|
PRINT_MODULE_USAGE_PARAM_STRING('n', nullptr, "<interface_name>", "wifi/ethernet interface name", true);
|
||||||
"wifi interface name", true);
|
|
||||||
PRINT_MODULE_USAGE_PARAM_FLAG('f', "Enable message forwarding to other Mavlink instances", true);
|
PRINT_MODULE_USAGE_PARAM_FLAG('f', "Enable message forwarding to other Mavlink instances", true);
|
||||||
PRINT_MODULE_USAGE_PARAM_FLAG('w', "Wait to send, until first message received", true);
|
PRINT_MODULE_USAGE_PARAM_FLAG('w', "Wait to send, until first message received", true);
|
||||||
PRINT_MODULE_USAGE_PARAM_FLAG('x', "Enable FTP", true);
|
PRINT_MODULE_USAGE_PARAM_FLAG('x', "Enable FTP", true);
|
||||||
|
|||||||
Reference in New Issue
Block a user