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

Avoid division by zero when map() is called with incorrect parameters #1248

Merged
merged 2 commits into from
Mar 21, 2017

Conversation

sergeuz
Copy link
Member

@sergeuz sergeuz commented Feb 5, 2017

This PR fixes #1193 by adding a check into map() function that ensures that incorrect parameters won't cause division by zero error. The PR also overloads map() to take double arguments.


Doneness:

  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • API tests compiled
  • Run unit/integration/application tests on device
  • Add documentation (move docs to docs/prerelease)
  • Add to CHANGELOG.md after merging (add links to docs and issues)

Bug fixes

Enhancements

  • [PR #1248] Added an overload to map() function that takes double arguments.

@sergeuz sergeuz added this to the 0.7.0 milestone Feb 5, 2017
Copy link
Member

@monkbroc monkbroc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sergeuz
Copy link
Member Author

sergeuz commented Feb 10, 2017

Thanks for the docs, @monkbroc! I wasn't sure if we're still committing them directly to the firmware repo or not.

@technobly technobly merged commit fc36889 into develop Mar 21, 2017
@technobly technobly deleted the fix/map_range branch March 21, 2017 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protect map() against Usage Fault when fromEnd == fromStart
3 participants