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

RollerShutter : bug in abs #3

Open
fab33 opened this issue Jan 29, 2017 · 0 comments
Open

RollerShutter : bug in abs #3

fab33 opened this issue Jan 29, 2017 · 0 comments

Comments

@fab33
Copy link

fab33 commented Jan 29, 2017

Little bug in abs implementation for Arduino (but not only Arduino, abs must be banned from embeded devices !)
if (abs(oldacsread-acsread)>20)
if oldacsread=1 and acsread=2 abs return 65535 ! so the test is ok !
Simple workaround : change type of oldacsread and acsread to int16_t

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

No branches or pull requests

1 participant