Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while using tlc_servos.h #12

Open
GoogleCodeExporter opened this issue Jul 2, 2015 · 0 comments
Open

Error while using tlc_servos.h #12

GoogleCodeExporter opened this issue Jul 2, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
If you set the maximum angle value in tlc_servox.h greater than 255, the 
behaviour of the package is wrong, due to an overflow problem.
All the functions in tlc_servoc.h erroneously use uint8_t instead of uint16_t. 

What is the expected output? What do you see instead?
If you set SERVO_MAX_ANGLE greater than 255, you get a wrong behaviour. 
Overflow.

What version of the product are you using? On what operating system?
Trunk version from svn.

Please provide any additional information below.
All the functions in tlc_servos.h have to be changed from uint8_t 
to unit16_t. 
The functions in Tlc5940.h and cpp are correct and the input and 
return values are uint16_t, but the tlc_servos.h calls those functions passing 
a uint8_t (trunked version) value instead of a uint16_t.

Original issue reported on code.google.com by [email protected] on 28 Aug 2012 at 7:02

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

No branches or pull requests

1 participant