Skip to content

Serial.parseFloat doesn't parse leading decimal points #1962

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

Closed
shardbearer opened this issue Mar 26, 2014 · 2 comments
Closed

Serial.parseFloat doesn't parse leading decimal points #1962

shardbearer opened this issue Mar 26, 2014 · 2 comments
Assignees
Milestone

Comments

@shardbearer
Copy link

If you send a string that starts with a decimal point to Serial.parseFloat, it does not include the decimal. For example, .034 becomes 34 while 0.034 works fine. Are there any plans to fix this?

@shardbearer shardbearer changed the title Serial.parseFloat requires leading zero Serial.parseFloat doesn't parse leading decimal points Mar 26, 2014
@matthijskooijman
Copy link
Collaborator

Your proposal makes sense to me. Any chance you could implement it and send a pull request?

ChocoChipset added a commit to ChocoChipset/Arduino that referenced this issue Apr 14, 2014
Fixes arduino#1962 :
Floating point numbers with a trailing '.' character would be rendered as integers.
For example: .032 => will become 32.
@sandeepmistry sandeepmistry added this to the Release 1.6.7 milestone Nov 23, 2015
@sandeepmistry
Copy link
Contributor

Resolved by #3337.

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

4 participants