cleaned up function definitions for serial and print modules and added a comment about the deeply flawed printFloat method
This commit is contained in:
parent
5eea9f4c7c
commit
9488cb329c
3
print.c
3
print.c
@ -71,6 +71,9 @@ void printInteger(long n)
|
||||
printIntegerInBase(n, 10);
|
||||
}
|
||||
|
||||
// TODO: This is nasty. I can't remember where I got this, but this monster
|
||||
// will truncate leading zeroes from the fractional part so that
|
||||
// 3.5, 3.05 and 3.000005 all will print as 3.5!!! Needs fixing fast.
|
||||
void printFloat(double n)
|
||||
{
|
||||
double integer_part, fractional_part;
|
||||
|
4
print.h
4
print.h
@ -25,9 +25,13 @@
|
||||
#define print_h
|
||||
|
||||
void printString(const char *s);
|
||||
|
||||
void printPgmString(const char *s);
|
||||
|
||||
void printInteger(long n);
|
||||
|
||||
void printIntegerInBase(unsigned long n, unsigned long base);
|
||||
|
||||
void printFloat(double n);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user