Commit Graph

7 Commits

Author SHA1 Message Date
Andrew Tridgell efe1e01700 AP_HAL: require a buffer write() function in all ports
this makes a sufficient performance difference that it is worth it
2013-10-03 12:21:07 +10:00
Tobias d3ea88e8c7 AP_HAL: resolved -Woverloaded-virtual warning
the function:
virtual size_t AP_HAL::Print::write(const uint8_t *buffer, size_t size);

was hidden in all derived classes by their
virtual size_t write(uint8_t) = 0; implementations.

To solve this, a non-virtual write(const uint8_t *, size_t) that calls a
virtual write_implementation was added.

This isn't necessary atm, because the derived classes don't call
write(const uint8_t *, size_t), BUT this decreases the apm2-quad Program
size by 40 bytes :D and removes warnings.
2013-07-08 12:17:34 +10:00
James Bielman 4fa7bb1486 Add AVR compatibility header for missing math.h definitions.
- Define float versions of math functions to the double versions
  on AVR (eg. #define sinf sin).
- These macros appear to be missing in older versions of avr-libs.
- Include AP_Math.h rather than math.h to get these definitions.
2013-01-16 13:52:17 +11:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell ba1a6eb073 AP_HAL: fixed SITL build 2013-01-02 14:48:15 +11:00
Andrew Tridgell 87e300b119 AP_HAL: added double print functions
this copes with the fact that the compiler doesn't really know that
float and double are the same things
2012-12-20 14:51:27 +11:00
Pat Hickey afd1f36400 AP_HAL: add BetterStream, Stream, and Print interfaces
* BetterStream Means AP_HAL depends on AP_Common, for now, in order to have
  the AVR specific pgm_char_t defined.
  I'll need to factor that out in the future but for now it can stay
2012-12-20 14:51:19 +11:00