aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/Print.h
Commit message (Collapse)AuthorAgeFilesLines
* Compromise Print implementation.Marti Bolivar2011-04-121-17/+23
| | | | | | | | | | | The users really hated the code size requirements for an snprintf()-based Print implementation, but I really hated how bad the old implementation was. Revised version fixes bugs related to printing 64-bit values and has some improved behavior when it comes to printing doubles. Now, instead of happily printing garbage values when large doubles are printed, we try printing "<large double>" or "-<large double>" (depending on sign) when the argument is too big for the old strategy to accommodate.
* Reverting "Rewrote Print class."Marti Bolivar2011-04-121-46/+41
| | | | This reverts commit 8bd3cebbee62e2dd7e961b149cc8bb0e980eaf88.
* Rewrote Print class.Marti Bolivar2011-02-241-41/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | The old Print class couldn't print uint64 values, and featured hand-hacked functionality better handled by snprintf(). Redid it using snprintf(), using "[u]int[8,16,32,64]" types for more clarity, and eliminated some private methods in favor of auxiliary functions in Print.cpp. Breaking compatibility with original implementation in three ways: - Print::print(double) is now accurate to 6 digits, rather than 2; this is consistent with the default behavior of the %f format specifier, and if you're using floating point, it's slow enough that you probably want the increased accuracy. - The only bases you can print a number to are 2, 8, 10, and 16. 8, 10, and 16 already have format specifiers, and 2 is an important special case; others complicate matters unnecessarily. - Printing numbers in bases other than 10 treats them as unsigned quantities (i.e., won't print '-' characters). This is more consistent with C++'s behavior for hexadecimal and octal literals (e.g., 0xFFFFFFFF has type uint32). Updated HardwareSerial and USBSerial class documentation to reflect the new behavior.
* wirish reformatted and code-styledMarti Bolivar2010-09-261-19/+20
|
* Support for Arduino's LiquidCrystal lib, which may help for a few other libs ↵xttocs2010-06-231-0/+1
| | | | | | too. Signed-off-by: Perry Hung <iperry@alum.mit.edu>
* Preliminary wirish USBSerial implementation.Perry Hung2010-06-041-1/+1
| | | | | | -updated examples -removed HardwareUSB -cleaned up a handful of includes
* Refactoring:Perry Hung2010-04-251-0/+61
The 'core' directory has now been renamed to 'wirish.' Wirish is our version of the Arduino Wiring language.