Permalink
Browse files

Fixed buf in float parsing. Now only using two first digits past deci…

…mal separator.
  • Loading branch information...
snebragd committed May 3, 2015
1 parent b14afd2 commit d55fd961226fd6f4b137c90801b3fa24c049379e
Showing with 8 additions and 3 deletions.
  1. +8 −3 Software/plotter/data.ino
@@ -240,9 +240,14 @@ readFloat(float* ret) {
return false;
}
else if((tmp[i] >= '0') && (tmp[i] <= '9')) {
f = f*10+(tmp[i]-'0');
if(pastPoint) {
div = div*10;
if(div < 100) {
f = f*10+(tmp[i]-'0');
if(pastPoint) {
div = div*10;
}
}
else {
//only care for two decimals
}
}
else if(tmp[i] == '.') {

0 comments on commit d55fd96

Please sign in to comment.