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

math.h fix #1310

Merged
merged 1 commit into from
Apr 26, 2017
Merged

math.h fix #1310

merged 1 commit into from
Apr 26, 2017

Conversation

m-mcgowan
Copy link
Contributor

@m-mcgowan m-mcgowan commented Apr 25, 2017

removed extraneous include of math.h in spark_wiring_arduino.h - we only want to include it when Arduino compatibility is enabled (via Arduino.h)

Problem

math.h was being included, plus a check for isnan being a defined symbol. This will fail if <algrithm> has already been included before the header.

Solution

Only include math.h when Arduino compatibility is requested. (math.h was not included in 0.6.0).

Steps to Test

Run the firmware library compile script to validate all libraries that compiled with 0.6.0 continue to compile with this PR. (this has been done.)


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • N/A Run unit/integration/application tests on device
  • N/A Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

Bug fix

  • [PR #1310] Fixes a error when <algorithm> has already been included before the math.h header. Now we only include math.h when Arduino compatibility is requested. (math.h was not included in 0.6.0).

…nly want to include it when Arduino compatibility is enabled (via Arduino.h)
@technobly technobly changed the base branch from develop to release/v0.6.2-rc.2 April 25, 2017 23:38
@technobly technobly added the bug label Apr 25, 2017
@technobly technobly added this to the 0.6.2 milestone Apr 25, 2017
@technobly technobly merged commit ea94668 into release/v0.6.2-rc.2 Apr 26, 2017
@technobly technobly deleted the fix/arduino_math branch April 26, 2017 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants