Skip to content

Commit

Permalink
Merge pull request #396 from jturcotte/patch-1
Browse files Browse the repository at this point in the history
Allow freenect_set_tilt_degs to take a negative angle
  • Loading branch information
piedar committed Jun 25, 2014
2 parents 9b671cd + 213c39a commit 7a1bc22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tilt.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int freenect_set_tilt_degs(freenect_device *dev, double angle)
angle = (angle<MIN_TILT_ANGLE) ? MIN_TILT_ANGLE : ((angle>MAX_TILT_ANGLE) ? MAX_TILT_ANGLE : angle);
angle = angle * 2;

ret = fnusb_control(&dev->usb_motor, 0x40, 0x31, (uint16_t)angle, 0x0, empty, 0x0);
ret = fnusb_control(&dev->usb_motor, 0x40, 0x31, (int16_t)angle, 0x0, empty, 0x0);
return ret;
}

Expand Down

0 comments on commit 7a1bc22

Please sign in to comment.