Skip to content

Commit

Permalink
fakenect: handle _get/set_ir_brightness apis
Browse files Browse the repository at this point in the history
For applications that depend on getting and setting the IR brightness
this adds freenect_get/set_ir_brightness wrapper apis.

Signed-off-by: Robert Bragg <robert@impossible.com>
  • Loading branch information
rib committed Nov 21, 2017
1 parent 16b53cd commit 73fac7c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fakenect/fakenect.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static freenect_video_cb cur_rgb_cb = NULL;
static char *input_path = NULL;
static FILE *index_fp = NULL;
static freenect_raw_tilt_state state = { 0 };
static uint16_t ir_brightness = 25;
static int already_warned = 0;
static double playback_prev_time = 0.;
static double record_prev_time = 0.;
Expand Down Expand Up @@ -419,3 +420,13 @@ int freenect_update_tilt_state(freenect_device *dev)
{
return 0;
}
int freenect_get_ir_brightness(freenect_device *dev)
{
return ir_brightness;
}
int freenect_set_ir_brightness(freenect_device *dev, uint16_t brightness)
{
ir_brightness = (brightness % 50);
return 0;
}

0 comments on commit 73fac7c

Please sign in to comment.