From b2cd33774173093b07aefd840c34f3f4caa59cd0 Mon Sep 17 00:00:00 2001 From: Benn Snyder Date: Fri, 23 Mar 2018 03:15:03 -0400 Subject: [PATCH] test: camtest prints device serial Signed-off-by: Benn Snyder --- examples/camtest.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/camtest.c b/examples/camtest.c index 7d796cc1..6830ca3d 100644 --- a/examples/camtest.c +++ b/examples/camtest.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "libfreenect.h" @@ -92,6 +93,12 @@ int main(int argc, char** argv) return ret; } + { + char* serial = freenect_get_device_serial(fn_dev); + if (serial) printf("Found device with serial %s\n", serial); + free(serial); + } + // Set depth and video modes. ret = freenect_set_depth_mode(fn_dev, freenect_find_depth_mode(FREENECT_RESOLUTION_MEDIUM, FREENECT_DEPTH_MM)); if (ret < 0)