forked from Archive/PX4-Autopilot
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:
parent
a36a3d6c5c
commit
334a599b2d
|
@ -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
|
||||
|
@ -432,12 +432,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;
|
||||
|
|
Loading…
Reference in New Issue