This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
Now that we are using C++11 we can use variadic templates to simplify
the FastDelegate classes. It also simplifies moving away from the
FastDelegate implementation.
This is a Functor implementation that should cover the use cases we have
for FastDelegate. In contrary to the latter, it can be constructed at
compile time so the compiler can safely put it in a read-only section
which covers the cases in which we are not using it.
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.
- 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.
- 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.
* 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