NOW printFloat probably works

This commit is contained in:
Simen Svale Skogsrud 2011-06-03 21:56:55 +02:00
parent a7c13c497a
commit 903303579f

View File

@ -81,7 +81,7 @@ void printFloat(double n)
serial_write('.');
fractional_part *= 10;
int decimals = DECIMAL_PLACES;
while(decimals > 0) {
while(decimals-- > 0) {
decimal_part = floor(fractional_part);
printDigit(decimal_part);
fractional_part -= decimal_part;