From 85de48989da4009dced261ac326c70bad0ba0684 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Fri, 25 Dec 2009 20:20:27 +0000 Subject: Adding precision parameter for printing of floats / doubles. Restructured the print() and println() functions a bit. --- cores/arduino/Print.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'cores/arduino/Print.h') diff --git a/cores/arduino/Print.h b/cores/arduino/Print.h index a69e85d..8a1e2b8 100755 --- a/cores/arduino/Print.h +++ b/cores/arduino/Print.h @@ -38,25 +38,25 @@ class Print virtual void write(uint8_t) = 0; virtual void write(const char *str); virtual void write(const uint8_t *buffer, size_t size); - void print(char); + void print(const char[]); - void print(uint8_t); - void print(int); - void print(unsigned int); - void print(long); - void print(unsigned long); - void print(long, int); - void print(double); - void println(void); - void println(char); + void print(char, int = BYTE); + void print(unsigned char, int = BYTE); + void print(int, int = DEC); + void print(unsigned int, int = DEC); + void print(long, int = DEC); + void print(unsigned long, int = DEC); + void print(double, int = 2); + void println(const char[]); - void println(uint8_t); - void println(int); - void println(unsigned int); - void println(long); - void println(unsigned long); - void println(long, int); - void println(double); + void println(char, int = BYTE); + void println(unsigned char, int = BYTE); + void println(int, int = DEC); + void println(unsigned int, int = DEC); + void println(long, int = DEC); + void println(unsigned long, int = DEC); + void println(double, int = 2); + void println(void); }; #endif -- cgit v1.2.3-18-g5258