Andrew Tridgell
928e06f52c
AP_HAL: use fabs() in print
...
fixes build on Arduino
12 years ago
Andrew Tridgell
0d662c52b3
AP_HAL: fixed length return from snprintf
12 years ago
Andrew Tridgell
60122f9877
AP_HAL: moved printf implementation from AP_HAL_AVR to AP_HAL
...
this gives a common printf implementation on all boards, which
simplifies testing, and also simplifies porting to new boards
12 years ago
Andrew Tridgell
16a0dfc38c
HAL_AVR: changed to C implementation of float formatting
...
Many thanks to Soren Kuula for this work!
12 years ago
Pat Hickey
1ed6a49a7a
AP_HAL_AVR: implementation for each BetterStream vprintf
...
* had to rename the utility vprintf function calls to print_vprintf
to make the naming work.
12 years ago
Pat Hickey
5ab4e57673
AP_HAL_AVR: rename vprintf function to print_vprintf
...
* because it takes an AP_HAL::Print
12 years ago
Pat Hickey
1b0bde2779
AP_HAL_AVR: rename vprintf files to print_vprintf
12 years ago
Andrew Tridgell
562b6a20c9
AP_HAL_AVR: conditionally build AVR specific helper code
12 years ago
Pat Hickey
de81267bd5
AP_HAL_AVR: utility/vprintf.cpp fixed for avr-gcc 4.6
12 years ago
Pat Hickey
a3a6482fd3
AP_HAL_AVR: vprintf implementation exists outside of class hierchary.
...
* Makes it easier to mix into other classes.
12 years ago
Pat Hickey
8eb9b39a44
AP_HAL_AVR move library classes to their own AP_HAL_AVR namespace
12 years ago
Pat Hickey
76e93e9fd7
AP_Common: PSTR def has specific version for avr-gcc 4.6 compatibility
...
* Also a small change in FastSerial/vprintf.cpp, which duplicates the
PSTR definition
* Won't effect others using earlier versions of avr-gcc
12 years ago
Andrew Tridgell
f812fc921f
build: fixed more build warnings
13 years ago
Andrew Tridgell
294c812b9b
desktop: use the libc printf engine
...
getting ftoa_engine right was too much work
13 years ago
Andrew Tridgell
41dd8d60ba
use ifdef for DESKTOP_BUILD
14 years ago
Andrew Tridgell
288aba074f
fastserial: allow vprintf() to build without assembler
14 years ago
james.goppert
7809b0ca2a
Massive warning fixes.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2089 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
tridge60@gmail.com
860998d337
implemented typesafe PSTR()
...
This makes PSTR() type safe by using a 1 byte wrapper
structure. Attempts to use the wrong varient of a print function will
generate a compilation error.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1797 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
DrZiplok@gmail.com
70baf31139
Resurrect lf -> crlf translation that was lost when I dropped the stdio support.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@921 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
DrZiplok@gmail.com
aa2bbe9131
A better workaround for the PSTR warning bug. This seems to work correctly.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@919 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
DrZiplok
c473af0082
Back out the "workaround" for PSTR() warnings; it doesn't.
...
14 years ago
DrZiplok@gmail.com
f30bf9cab7
Add format attributes to printf and printf_P. The latter is a bit wishful as gcc isn't smart enough to deal with what PSTR does, but with some other hackery this can be used to generate useful warnings.
...
Add a workaround for a GCC bug that generates spurious warnings when PSTR() is used.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@901 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago
DrZiplok@gmail.com
43262a573f
Bring in floating point support for BetterStream::printf, courtesy of the avr-libc implementation.
...
Strip the stdio integration from FastSerial as we aren't using it and it just wastes space.
Note that this does not attempt to fix the bogus floating point handling in ::print(ln). That's an issue for another day.
BetterStream::printf(_P) aka FastSerial::printf(_P) support is now as documented for avr-libc printf with floating point support enabled.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@895 f9c3cf11-9bcb-44bc-f272-b75c42450872
14 years ago