Skip to content

Commit

Permalink
fix: fix argument handling
Browse files Browse the repository at this point in the history
  • Loading branch information
FaaizHaikal committed Mar 27, 2024
1 parent 5b6884b commit fae53e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ninshiki_cpp_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ int main(int argc, char ** argv)

const char * help_message =
"Usage: ros2 run ninshiki_cpp detector\n"
"[topic] [--detector DETECTOR] [--GPU {0,1}] [--MYRIAD {0,1}]\n"
"[path] [--detector DETECTOR] [--GPU {0,1}] [--MYRIAD {0,1}]\n"
"\n"
""
"Positional arguments:\n"
"topic specify topic name to subscribe\n"
"path path to detection configuration\n"
"\n"
"Optional arguments:\n"
"-h, --help show this help message and exit\n"
Expand All @@ -53,6 +54,9 @@ int main(int argc, char ** argv)

// Handle arguments
try {
if (argc < 2) {
throw std::runtime_error("");
}
int i = 1;
int pos = 0;
while (i < argc) {
Expand Down

0 comments on commit fae53e2

Please sign in to comment.