Skip to content

Conversation

@jturcotte
Copy link
Contributor

I can't set a negative angle using gcc 4.8.2 for ARM since negative double values get clamped to 0x0 when casted to uint16_t, as one would expect. Oddly it works on a x86_64 build.

Fix the issue by casting the double to int16_t instead.

@piedar
Copy link
Contributor

piedar commented Jun 24, 2014

Good find! I don't use other arches often enough to catch that.

Please sign the commit so I can merge it.

git commit -s --amend
git push origin -f

I can't set a negative angle using gcc 4.8.2 for ARM since negative double values get clamped to 0x0 when casted to uint16_t, as one would expect. Oddly it works on a x86_64 build.

Fix the issue by casting the double to int16_t instead.

Signed-off-by: Jocelyn Turcotte <[email protected]>
@jturcotte
Copy link
Contributor Author

Alright, I just updated the branch with a signed-off commit.

piedar added a commit that referenced this pull request Jun 25, 2014
Allow freenect_set_tilt_degs to take a negative angle
@piedar piedar merged commit 7a1bc22 into OpenKinect:master Jun 25, 2014
@piedar
Copy link
Contributor

piedar commented Jun 25, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants