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.
12 years ago
Andrew Tridgell
2316c3bd11
AP_HAL: make storage->write_block() take a const pointer
12 years ago
Andrew Tridgell
a5b20b4dfc
AP_HAL: removed scaling factor on analog sources
...
these are not use anymore, as voltage_average() is used instead
12 years ago
Andrew Tridgell
589b8cdb58
AP_HAL: added voltage_average_ratiometric() call to AnalogIn
...
this is for ratiometric sensors such as the 3DR airspeed sensor and
the Maxbotix analog sonar
12 years ago
Andrew Tridgell
0b6cfc7294
AP_HAL: added set_stop_pin() and set_settle_time() interfaces to analogin
...
this is for multiple sonars on one vehicle, to prevent them
interfering with each other
12 years ago
Andrew Tridgell
500497f5fa
AP_HAL: update AnalogIn test to show the first 16 pins
12 years ago
Randy Mackay
bbbd90c430
AP_HAL: rename RCInput's valid() fn to valid_channels
12 years ago
Andrew Tridgell
3b0250b414
AP_HAL: define RC_12
...
we have 12 channels on PX4FMU+PX4IO
12 years ago
Andrew Tridgell
af7381e9e0
AP_HAL: added register_io_process()
...
this is used to register a low priority IO task. Used for file IO in
DataFlash_File.cpp
12 years ago
Andrew Tridgell
eb6c66af7e
AP_HAL: added gpio->analogPinToDigitalPin() API
12 years ago
Andrew Tridgell
7681f3b639
AP_HAL: update AnalogIn example to show voltages not raw values
12 years ago
Andrew Tridgell
b1c27407a2
AP_HAL: added voltage_average() interface to AnalogIn
...
returns voltage in Volts, using averaged reading over samples.
Where possible this should be auto-scaled against a known reference
voltage
12 years ago
Andrew Tridgell
8ed2f7d21c
AnalogIn: run the example sketch a bit slower
...
5Hz is plenty
12 years ago
Andrew Tridgell
5a55fd9a2f
AP_HAL: added HAL_BOARD_NAME define
12 years ago
Andrew Tridgell
a3ef58ac92
AP_HAL: moved AnalogIn example to generic examples
...
it is not AVR specific anymore
12 years ago
Andrew Tridgell
70f7cde9b8
AP_HAL: added run_debug_shell() hal.util method
12 years ago
Andrew Tridgell
76092eb590
AP_HAL: remove unused peek() interface from UART drivers
...
this is a bit tricky to implement on some platforms, and is unused
anyway
12 years ago
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.
12 years ago
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.
12 years ago
Andrew Tridgell
2ce18f588b
AP_HAL: added AP_HAL_Macros.h
...
this adds a define for constexpr, allowing code to build either with
or without -std=gnu++0x
12 years ago
Andrew Tridgell
6415f00ce3
AP_HAL: added a bulk transfer() method
...
very useful for dataflash
12 years ago
Pat Hickey
7a0f95c11c
AP_HAL: add Scheduler methods in_timerprocess, system_initialize
12 years ago
Andrew Tridgell
e76c77e86a
AP_HAL: mark semaphore take operations as WARN_IF_UNUSED
...
this prevents common bugs
12 years ago
Andrew Tridgell
90523ae975
AP_HAL: added WARN_IF_UNUSED macro
...
useful for key functions
12 years ago
Pat Hickey
3da864499d
AP_HAL Semaphore: don't use limits, they don't work on c++
12 years ago
James Bielman
eca1417858
AP_HAL: Add semaphores to I2C driver.
...
- Guard I2C transactions with this semaphore in the MS5611 and
HMC5843 drivers.
12 years ago
Pat Hickey
ea2a03344e
AP_HAL Scheduler: remove begin_atomic and end_atomic from api
...
* application-level atomic operations can now only be defined in
terms of suspend/resume_timer_procs
12 years ago
Pat Hickey
81d77d4a70
AP_HAL: New semaphore interface
...
* it now looks like a semaphore!
12 years ago
James Bielman
a4af314b57
Add AP_HAL_SMACCM implementation.
...
- Add a board definition for SMACCMPilot.
- Support the SMACCM HAL in required utility libraries.
12 years ago
Andrew Tridgell
a3c26d44e4
AP_HAL: rename Sempahore.h to Semaphores.h
...
this is needed to allow build on MacOS, as its case-insensitive
filesystem picks up the NuttX semaphore.h
12 years ago
Andrew Tridgell
ba1a6eb073
AP_HAL: fixed SITL build
12 years ago
Andrew Tridgell
d3f154bbae
AP_HAL: include stdbool.h for ARM build
12 years ago
Andrew Tridgell
0ef003a45f
AP_HAL: added PX4 board support
12 years ago
Andrew Tridgell
0186fabb3b
build: allow building with the "Empty" HAL
...
useful for porting
12 years ago
Pat Hickey
1678dcc6f0
AP_HAL: GPIO INTERRUPT defines
12 years ago
Andrew Tridgell
93040e5725
AP_HAL: removed the defer_timer_process() function
...
this is now unused
12 years ago
Andrew Tridgell
60d3df50ae
AP_HAL: changed delay() to take a uint16_t
...
this allows for up to 32 second delays, and saves a bit of flash space
12 years ago
Pat Hickey
7681fef988
AP_HAL: BetterStream gets vprintf and vprintf_P methods
12 years ago
Pat Hickey
0d702045b8
AP_HAL: Add Util member for string utilities
12 years ago
Andrew Tridgell
4cff98dcae
AP_HAL: added AP_HAL_BOARD_DRIVER define
...
this makes example sketches easier to read
12 years ago
Pat Hickey
d2f7402243
AP_HAL: add bulk transaction to SPIDeviceDriver
12 years ago
Pat Hickey
c86004d676
AP_HAL: Add panic method to scheduler
12 years ago
Pat Hickey
eda450a166
AP_HAL: I2CDriver bug fixed for pure virtual base class
12 years ago
Pat Hickey
b79bd01761
SPIDriver: namespace explicit to better permit copypasta
12 years ago
Pat Hickey
527dfb5af4
AP_HAL: remove EmptyUARTDriver
12 years ago
Pat Hickey
d18b9feaa1
AP_HAL: add HAL_BOARD_EMPTY to AP_HAL_BOARDS
12 years ago
Andrew Tridgell
e10e3ee3be
AP_HAL: fixed argv declaration to match getopt()
12 years ago
Andrew Tridgell
18824c7ef5
AP_HAL: expose argc/argv in hal.init()
...
used for SITL port
12 years ago
Pat Hickey
fa02ad7d4c
AP_HAL: preprocessor enum of HAL_BOARD
12 years ago
Pat Hickey
9cee6cc941
AP_HAL: remove Dataflash driver
12 years ago