Skip to content

Commit 3f961bf

Browse files
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.
1 parent b7b9863 commit 3f961bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/uavcan/uavcan_main.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,9 @@ int uavcan_main(int argc, char *argv[])
698698

699699
if (!std::strcmp(argv[1], "start")) {
700700
if (UavcanNode::instance()) {
701-
errx(1, "already started");
701+
// Already running, no error
702+
warnx("already started");
703+
::exit(0);
702704
}
703705

704706
// Node ID

0 commit comments

Comments
 (0)