-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Why not using abs() from stdlib? #82
Comments
NicoHood
referenced
this issue
in NicoHood/FastLED
Sep 1, 2017
This is required as Arduino.h #define's its own abs() makro. Outside of Arduino environments stdlib is required. Also see: https://github.com/arduino/Arduino/issues/6684
To be considered for merge alongside https://github.com/arduino/Arduino/issues/6098 (I'm 👍 for both) |
focalintent
referenced
this issue
in FastLED/FastLED
Nov 2, 2017
* renamed boolean to bool * Rename byte to uint8_t * Fix compilation error: 'NULL' was not declared in this scope * Always typedef RoReg and RwReg for the AVR platform * Include stdlib.h if abs() is not available This is required as Arduino.h #define's its own abs() makro. Outside of Arduino environments stdlib is required. Also see: https://github.com/arduino/Arduino/issues/6684 * Replace digitalWrite() with Pin Class by FastLed * Include string.h for memset function This include is normally done by Arduino.h but still required for makefile environments $ grep string.h . -r ./Arduino.h:#include <string.h> * Include math.h for pow() math.h is normally included by Arduino.h but required for a makefile build $ grep math.h . -r ./Arduino.h:#include <math.h>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why does Arduino.h use its own abs() if stdlib has this already builtin. This causes me problems in build environments. I dont see any reason why one would prefer an Arduino definition. Can we get rid of it?
The text was updated successfully, but these errors were encountered: