Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
voxl
ROS
voxl-hal3-tof-cam-ros
Commits
34cc5f4e
Commit
34cc5f4e
authored
Jan 13, 2021
by
Alex Kushleyev
Browse files
add error print in case tof camera autodetection fails
parent
fe08a0c5
Pipeline
#241866715
failed with stages
in 1 minute and 16 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
source/src/hello_hal3_camera_main.cpp
source/src/hello_hal3_camera_main.cpp
+11
-6
No files found.
source/src/hello_hal3_camera_main.cpp
View file @
34cc5f4e
...
...
@@ -108,16 +108,21 @@ int Hal3MainEnter(int argc, char* const argv[], ros::NodeHandle rosNodeHandle)
status
=
g_pCameraHAL3
->
Initialize
();
}
if
(
cameraid
==
-
1
)
//autodetect TOF camera id
if
((
status
==
0
)
&&
(
cameraid
==
-
1
)
)
//autodetect TOF camera id
{
printf
(
"
\n
User specified TOF camera id = -1.. Autodetecting.."
);
cameraid
=
g_pCameraHAL3
->
FindTofCamera
();
printf
(
"
\n
Found TOF camera with ID %d
\n
"
,
cameraid
);
}
if
(
cameraid
==
-
1
)
{
status
=
-
1
;
if
(
cameraid
==
-
1
)
{
printf
(
"
\n\n
ERROR: Could not autodetect TOF camera
\n
"
);
status
=
-
1
;
}
else
{
printf
(
"
\n
Found TOF camera with ID %d
\n
"
,
cameraid
);
status
=
0
;
}
}
if
(
status
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment