Skip to content

Commit

Permalink
test: camtest prints device serial
Browse files Browse the repository at this point in the history
Signed-off-by: Benn Snyder <[email protected]>
  • Loading branch information
piedar committed Sep 20, 2022
1 parent 0c1b739 commit b2cd337
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/camtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libfreenect.h"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b2cd337

Please sign in to comment.