mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
CameraRGBD example, show usage when no argument is set
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1585 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -38,9 +38,13 @@ int main(int argc, char * argv[])
|
||||
ULogger::setLevel(ULogger::kInfo);
|
||||
|
||||
int driver = 0;
|
||||
if(argc > 1)
|
||||
if(argc < 2)
|
||||
{
|
||||
driver = atoi(argv[1]);
|
||||
showUsage();
|
||||
}
|
||||
else
|
||||
{
|
||||
driver = atoi(argv[argc-1]);
|
||||
if(driver < 0 || driver > 4)
|
||||
{
|
||||
UERROR("driver should be between 0 and 4.");
|
||||
|
||||
Reference in New Issue
Block a user