mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
vmount: tell user how to use vmount test
This confused me, so hopefully it will help the next user, e.g. me.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013-2017 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2013-2019 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -431,12 +431,21 @@ int vmount_main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "start") || !strcmp(argv[1], "test")) {
|
||||
const bool found_start = !strcmp(argv[1], "start");
|
||||
const bool found_test = !strcmp(argv[1], "test");
|
||||
|
||||
if (found_start || found_test) {
|
||||
|
||||
/* this is not an error */
|
||||
if (thread_running) {
|
||||
PX4_WARN("mount driver already running");
|
||||
return 0;
|
||||
if (found_start) {
|
||||
PX4_WARN("mount driver already running");
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
PX4_WARN("mount driver already running, run vmount stop before 'vmount test'");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
thread_should_exit = false;
|
||||
|
||||
Reference in New Issue
Block a user