UAVCAN driver silently ignores repeated start commands without error. This allows to avoid error messages when UAVCAN driver is started from extras script before default initialization sequence is executed.

This commit is contained in:
Pavel Kirienko 2015-04-23 22:02:34 +03:00
parent b7b9863595
commit 3f961bf3c6
1 changed files with 3 additions and 1 deletions

View File

@ -698,7 +698,9 @@ int uavcan_main(int argc, char *argv[])
if (!std::strcmp(argv[1], "start")) { if (!std::strcmp(argv[1], "start")) {
if (UavcanNode::instance()) { if (UavcanNode::instance()) {
errx(1, "already started"); // Already running, no error
warnx("already started");
::exit(0);
} }
// Node ID // Node ID