Pierre Kancir
e627bbc912
AP_HAL: Board fix typo for baro BMP280_SPI
2017-01-17 17:33:37 +00:00
mirkix
4e06be38ac
AP_HAL: Add Bosch BMP280 driver
2017-01-14 12:52:07 +11:00
Lucas De Marchi
5472bc4de1
Global: change Device::PeriodicCb signature
...
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
Andrew Tridgell
9b7f0f7957
AP_HAL: make new_input() API clearer in comments
2017-01-09 21:47:11 -08:00
murata
974d63a6b5
AP_HAL: Change the format of the return value of the method header.
2017-01-09 15:46:03 +00:00
Andrew Tridgell
da45aef5c6
AP_HAL: fixed a logic bug in the srxl state machine
...
when decoding invalid input the buflen could grow to beyond the buffer
size, overwriting the next block of memory. On Disco this ended up
overwriting the Perf::_instance variable, which led to a segmentation
fault
2017-01-09 09:14:13 +11:00
Randy Mackay
a2f6d7c102
AP_HAL: minor comment fix to Device.h
2016-12-24 13:55:31 +09:00
Andrew Tridgell
29bc07f410
AP_HAL: setup for building ucavcan on FMUv3 but not FMUv2
...
save a lot of flash space on FMUv2
2016-12-19 08:07:12 +11:00
Andrew Tridgell
bd0a0510ed
AP_HAL: define FMUv3
2016-12-19 08:07:11 +11:00
Lucas De Marchi
b0ddf81687
Remove stdbool.h include for C++ sources
...
This header is not needed in our C++ sources.
2016-12-16 11:38:52 -08:00
Andrew Tridgell
c657ad449b
AP_HAL: added get_bus_address()
...
used to report sensor probing results in drivers
2016-12-05 16:51:49 -08:00
Andrew Tridgell
60c29417f1
AP_HAL: added uint16 access functions
2016-12-05 16:51:49 -08:00
mirkix
7e33ba04a9
AP_HAL: Add BBBmini PX4FLOW I2C bus number
2016-12-03 21:07:07 +11:00
Andrew Tridgell
28a318145c
AP_HAL: move set_retries() up to Device class
...
we really need set_retries() high during init for nearly all i2c
devices, and as many are written against the generic device class
moving it to the Device class makes this a lot easier. It is a NOP on
SPI.
2016-12-02 09:47:51 +11:00
Andrew Tridgell
fac8f1db03
AP_HAL: added MODE_PWM_BRUSHED16KHZ
2016-11-30 10:53:25 +11:00
Andrew Tridgell
00ccacb2ab
AP_HAL: expose device bus number
2016-11-28 10:18:32 +11:00
Andrew Tridgell
a96ed8c188
AP_HAL: added virtual destructor for Semaphores
2016-11-28 08:26:56 +11:00
Andrew Tridgell
fdc94ec28a
AP_HAL: fixed frequency init for register checking
2016-11-26 18:36:36 +11:00
Andrew Tridgell
954728c9e9
AP_HAL: added set_chip_select() API
...
for devices with unusual timings
2016-11-25 21:26:27 +11:00
Andrew Tridgell
7100272f14
AP_HAL: default to register checking every 10th call
...
this saves having this in nearly all callers
2016-11-25 20:31:36 +11:00
Andrew Tridgell
e42bb20052
AP_HAL: added dma allocation routines to hal.util
2016-11-25 17:49:58 +11:00
Andrew Tridgell
5934a099a4
AP_HAL: added support for more SRXL varients
...
based on work by Roman Seb <roman-29188@gmx.de>
2016-11-24 22:54:23 +11:00
Andrew Tridgell
14a26bee6c
AP_HAL: fixed ms5611 address on FMUv1
2016-11-13 16:21:05 +11:00
Andrew Tridgell
bc614de4b3
AP_HAL: added checked registers interface
...
allow drivers to easily monitor and correct critical registers
2016-11-11 08:08:55 +11:00
Andrew Tridgell
c565c9df35
AP_HAL: added ICM20608 external SPI name
2016-11-11 08:08:55 +11:00
Andrew Tridgell
fd8955a737
AP_HAL: define default rotations for mpu6000 based boards
2016-11-09 17:08:14 +11:00
Andrew Tridgell
d778ee2db0
AP_HAL: define device for icm20608 on ACCEL_MAG CS line on px4
...
for PHMINI
2016-11-09 17:08:12 +11:00
Andrew Tridgell
ba9b475782
AP_HAL: added MS5611 on I2C for px4-v1
2016-11-09 17:08:11 +11:00
Andrew Tridgell
ea74f8c12c
AP_HAL: added ICM20608 INS name
2016-11-09 17:08:07 +11:00
Andrew Tridgell
38a1f51b53
AP_HAL: define rotations for the MPU9250 in board/linux.h
2016-11-09 17:08:07 +11:00
Andrew Tridgell
1990aa96e1
AP_HAL: added get_bus_id_devtype()
...
used to do versioning on device types
2016-11-09 17:08:06 +11:00
Andrew Tridgell
3d48b6bb3a
AP_HAL: added device id tuples to Device class
...
this allows a bus connection and device type tuple to be identifed as
a 24 bit number for use in user visible device IDs. Every bus
connection has a unique device ID.
2016-11-09 17:08:04 +11:00
Andrew Tridgell
26ca2dd392
AP_HAL: added more px4 SPI device names
2016-11-09 17:08:03 +11:00
Andrew Tridgell
a06137bb68
AP_HAL: define 9250 devices
2016-11-09 17:08:01 +11:00
Andrew Tridgell
bf0b0c1773
AP_HAL: fixed HAL_SEMAPHORE_BLOCK_FOREVER to be zero
...
all implementations assume this
2016-11-09 17:07:57 +11:00
Andrew Tridgell
b697c978e6
AP_HAL: fixed lsm303d SPI name
2016-11-09 17:07:57 +11:00
Andrew Tridgell
e79b4f1c11
AP_HAL: added defines for ms5611 on other SPI buses
2016-11-09 17:07:57 +11:00
Andrew Tridgell
5db65cdb6d
AP_HAL: added subtype for PX4 FMUv4
2016-11-09 17:07:57 +11:00
Andrew Tridgell
3927994905
AP_HAL: added SPI device names to px4
2016-11-09 17:07:56 +11:00
Andrew Tridgell
4d5562764a
AP_HAL: provide default hmc5983 i2c bus address
2016-11-09 17:07:55 +11:00
Lucas De Marchi
7968736b1c
AP_HAL: add O_CLOEXEC in places missing it
...
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03:00
Lucas De Marchi
312a27dd20
AP_HAL: RCInput: rename deinit() to teardown()
2016-11-02 16:28:20 -02:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
hiro2233
3742c3b243
AP_HAL: Added subtype board URUS.
...
This is a linux system based with Raspberry Pi B+, it's a automated
domotic system using APM framework.
2016-10-27 11:51:31 -02:00
Lucas De Marchi
05a7eef1a2
RingBuffer: use explict "if" and return early
...
Remove confusing use of ternary operator together with assign + load.
No change in behavior.
2016-10-27 10:35:01 -03:00
Murilo Belluzzo
3f1896b9b7
RingBuffer: Remove 'old style' version
2016-10-27 14:24:10 +11:00
Murilo Belluzzo
8526b25654
RingBuffer: Add a faster method to read a single byte
2016-10-27 14:23:42 +11:00
Martin Evans
37b85fd3cd
AP_HAL: Add Dark Linux board
2016-10-24 09:59:02 -02:00
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell
8f88d7c784
AP_HAL: fixed comment on XPlus channels
...
thanks for Francisco for noticing
2016-10-17 06:49:40 +11:00
Andrew Tridgell
4d44591e62
AP_HAL: fixed decoding of XPlus channels
2016-10-16 19:05:19 +11:00
Andrew Tridgell
ec8c22f26e
AP_HAL: support up to 20 channels on SRXL
...
tested with 18 channels on a DSM18 transmitter with a AR7700 receiver
with SRXL port
2016-10-16 19:05:19 +11:00
Andrew Tridgell
ece0a8721f
AP_HAL: added standalone test program for dsm
...
useful for debugging
2016-10-16 19:05:19 +11:00
Andrew Tridgell
7b3d0234d1
AP_HAL: added an SRXL protocol decoder
...
SRXL ports are commonly found on newer spektrum receivers like the AR7700
2016-10-16 19:05:18 +11:00
murata
ba60cce0c1
AP_HAL: simplify the processing of milliseconds from the time
2016-10-15 18:33:54 +09:00
Peter Barker
e71c71fcac
AP_HAL: correct casting of get_system_clock_ms
2016-10-14 18:41:56 +11:00
Andrew Tridgell
e356797888
AP_HAL: make cork() mandatory in RCOutput
2016-10-13 10:00:04 +11:00
Lucas De Marchi
ae53920e5b
build: don't build examples with old build system
...
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file. Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Andy Little
4b2eedac05
AP_HAL: Split the AP_HAL_Boards.h header into per board sub headers for legibility
2016-09-29 08:26:50 -03:00
Andrew Tridgell
e7656fb7ac
AP_HAL: raise compass offset max again for Disco
...
values of 1600 happen on Z axis
2016-09-23 10:52:55 +10:00
Andrew Tridgell
2edd914634
AP_HAL: added st24 R/C protocol decoder
...
with thanks to the PX4 project
2016-09-21 10:33:15 -03:00
Andrew Tridgell
9a7af89b30
AP_HAL: added sumd decoder
...
with thanks to the PX4 project
2016-09-21 10:33:15 -03:00
Matthew Brener
06388b0417
Global: Fix typos
2016-09-17 00:36:36 -03:00
Andrew Tridgell
bf67d4277d
AP_HAL: define a larger compass offset max for Disco
2016-09-14 11:52:55 +10:00
Benoit Tran
9b89b4f561
AP_HAL: Correct HAL_PARAM_DEFAULTS_PATH for Parrot Disco
2016-09-08 13:05:25 +10:00
Gustavo Jose de Sousa
5c5ddc9d4a
AP_HAL: reformat AP_HAL_Boards.h
...
The definitions for each board haven't been reformatted here. They need a
little more thinking on how to format them in order to provide better
readability.
2016-09-03 01:03:17 -03:00
José Roberto de Souza
0b0be31a29
AP_HAL: add defines for Intel Aero
2016-09-03 01:03:07 -03:00
Lucas De Marchi
e1ab44f4a3
Global: remove get_fd() from Device API
...
This was there for compatibility with I2CDriver and SPIDriver. We don't
use them anymore so we can remove the compat method.
2016-08-29 10:27:36 -03:00
Lucas De Marchi
ead01855df
AP_HAL: remove default params for minlure
...
We are currently not using them.
2016-08-29 10:27:36 -03:00
LukeMike
13e3150023
VRBRAIN / AP_HAL_Boards: definition of new board VR Brain 5.4 and VR Core 1.0
2016-08-07 20:31:51 +10:00
Murilo Belluzzo
077e03678f
Global: Adapt Stream class to be used with Ringbuffer
2016-08-03 01:44:02 -03:00
Murilo Belluzzo
b856d26087
RingBuffer: ::set_size now returns true or false
2016-08-03 01:44:02 -03:00
Murilo Belluzzo
f7f203efa9
RingBuffer: Add ::clear() method to discard the buffer content
...
The same could be achieved with ::set_size(::get_size()), but was not
obvious and hurts code readability.
2016-08-03 01:44:02 -03:00
Murilo Belluzzo
75a1b102fb
RingBuffer: Handle zero sized better
...
Sometimes (like in DataFlash) the size of the ring buffer will be
determined in run time and the object can have size zero until proper
initialization. When this was the case, an underflow in ::get_size would
mess with the initializing algorithm.
Another issue was that the 'new' operator could fail what was not being
handled. Now, we only set the size member after we are sure 'new'
successfully allocated memory.
2016-08-03 01:44:02 -03:00
Lucas De Marchi
052f30bc70
AP_HAL: remove macros to use MS5611 in the main thread
2016-07-30 00:55:28 -03:00
Lucas De Marchi
590539f674
AP_HAL_Linux: implement threaded I2C
2016-07-30 00:55:27 -03:00
Lucas De Marchi
37de995960
AP_HAL: update Device interface for periodic tasks
...
Replace the previous not-implemented interface with a set of new methods
that can be resonably implemented:
- register_periodic_callback() now receives a functor returning bool
to easily allow "oneshot" timers
- adjust_periodic_callback() allows the caller to change the timer
for a specific handle. This way drivers like MS5611 can adjust the
timer depending on its state machine: the time to sample
temperature is smaller than the time to get a pressure sample
- add unregister_callback(): since we have an opaque pointer, we
can't tell the user to just delete it in order to unregister the
callback
2016-07-30 00:55:27 -03:00
Lucas De Marchi
57ec968b44
AP_HAL: remove SPIDriver
...
SPIDevice now controls all accesses to SPI bus.
2016-07-29 15:01:15 -03:00
Lucas De Marchi
3a5e8a17c7
AP_HAL: remove enum id for Ublox and RASPIO
2016-07-29 15:01:15 -03:00
Lucas De Marchi
01452bf922
AP_HAL: SPIDevice: add fullduplex method
...
This method is needed when we want to transfer both tx and rx at the
same time, as opposed to common cases for sensors in which they are like
in the I2C interface: half-duplex.
2016-07-29 15:01:14 -03:00
Lucas De Marchi
81345cc112
AP_HAL: Remove enum for Dataflash
2016-07-29 14:47:04 -03:00
Lucas De Marchi
b21ad36676
AP_HAL: remove I2CDriver
2016-07-28 18:08:56 -03:00
hiro2233
4a6447575c
AP_HAL: fixed and updated RCInput example.
2016-07-27 00:52:13 -03:00
Lucas De Marchi
cb01280d77
AP_HAL: define bus for Lightware rangefinder
2016-07-26 00:52:54 -03:00
Lucas De Marchi
cfb3124f2c
AP_HAL_Linux: remove types for spi drivers
...
Those drivers using SPIDevice interface don't need a global id for each
of them. Remove those that were already converted.
2016-07-21 16:05:03 -03:00
Andrew Tridgell
e407caaa41
AP_HAL: added support for Parrot Disco
2016-07-20 13:35:51 +10:00
Luiz Ywata
d5449a6f20
AP_HAL: Add read method
...
Provide a more intuitive api for reading an I2CDevice.
2016-07-14 17:32:33 -03:00
Lucas De Marchi
08ea1ea263
AP_HAL_Linux: RCOutput_Bebop: follow coding style
...
Minor changes to follow coding style and improve readability:
- sort headers
- move struct definition to compilation unit rather than header
- Add braces to if, for, etc
2016-07-14 17:32:33 -03:00
Luiz Ywata
7fb5db8077
AP_HAL_Linux: RCOutput_Bebop: use I2CDevice interface
2016-07-14 17:32:33 -03:00
Lucas De Marchi
b9f65996bc
AP_HAL: sparse-endian: unconditionally use byteswap.h
...
This is either provided by a system header or a minimal header from
'missing' directory.
2016-07-08 19:49:32 -03:00
Lucas De Marchi
40338c3272
AP_HAL: sparse-endian: use pragma once
2016-07-08 19:49:32 -03:00
Lucas De Marchi
6a80c3d70d
AP_HAL: RingBuffer: remove trailing whitespaces
2016-07-08 16:44:26 -03:00
Lucas De Marchi
24c7f76034
AP_HAL: RingBuffer: remove C++11 initialization
...
They are already initialized in the constructor.
2016-07-08 16:44:09 -03:00
Murilo Belluzzo
3e1acdcbbf
AP_HAL: Use atomic instead volatile on RingBuffer head/tail
...
Volatile will provide protection to sequence re-ordering and guarantee
the variable is fetched from memory, but it won't provide the memory
barrier needed to ensure that no re-ordering (by either the compiler or
the CPU) will happen among other threads of execution
accessing the same variables.
For more info about this effect can be found on articles about
std::memory_order.
2016-07-08 16:12:53 -03:00
Murilo Belluzzo
b7dd4dad64
AP_HAL: Fix ByteBuffer::reserve() breaking buffer state
...
When using reserved(), the reserved memory cannot be read before it's
written, therefore we cannot update 'tail' until the caller of
reserved() is done writing.
To solve that, a method called 'commit()' was added so the caller can
inform that is done with the memory usage and is safe to update 'tail'.
The caller also has to inform the length that was actually written.
This solution was developed to work considering the usage context of
this class: 1 reader and 1 writer **only**.
2016-07-08 13:10:16 -03:00
Murilo Belluzzo
43d4012884
AP_HAL: Fix TOCTOU in ByteBuffer::peekiovec()
2016-07-08 13:10:16 -03:00
Murilo Belluzzo
9951b94d40
AP_HAL: Change the return type of 'peekiovec'
...
Possible values are '0', '1' and '2' so uint8_t is a better fit. Also,
invert 'if' condition so it's clear that is returning 0, 1 or 2.
2016-07-08 13:10:16 -03:00
Murilo Belluzzo
625f47def7
AP_HAL: Improve ByteBuffer::set_size
...
So it doesn't delete and re-create the buffer if the size
happens to be the same. Still resets the buffer content.
2016-07-08 13:10:16 -03:00
Murilo Belluzzo
e9e31172c0
AP_HAL: Simplify ByteBuffer::readptr logic
2016-07-08 13:10:16 -03:00
Leandro Pereira
fbefe32017
AP_HAL: Add method to reserve space in the ring buffer
...
Adds a method called `reserve()`, that will take a ByteBuffer::IoVec
array of at least two elements, and return the number of elements
filled out. 0 will be returned if `len` is over the total space of
the buffer; 1 will be returned if there's enough contiguous bytes in
the buffer; 2 will be returned if there are two non-contiguous blocks
of memory.
This method is suitable to be used with POSIX system calls such as
readv(), and is an optimization to not require temporary memory copies
while reading from a file descriptor.
Also modify the write() method to use reserve(), so that similar checks
are performed only in one place.
2016-07-08 13:10:16 -03:00
Leandro Pereira
e3b676ba89
AP_HAL: Add method to peek non-contiguous parts of a ByteBuffer
...
Modify ByteBuffer class to have a `peekiovec()` method, that takes in a
`struct IoVec` array (similar to `struct iovec` from POSIX), and a
number of bytes, and returns the number of elements from this array
that have been filled out. It is either 0 (buffer is empty), 1
(there's enough contiguous bytes to read that amount) or 2 (ring buffer
is wrapping around).
This enables using scatter-gather I/O (i.e. writev()), removing calls
to memcpy(). That's one call when no wrap-around is happening, and
two calls if it is.
Also, rewrite `ByteBuffer::peekbytes()` to use `peekiovec()`, so that
some of the checks performed by the former are not replicated in the
latter.
2016-07-08 13:10:16 -03:00
Siddharth Bharat Purohit
8903bc9eab
AP_HAL: add support for get realtime on Darwin systems
2016-07-07 11:35:17 -03:00
Andrew Tridgell
6e065b3fe2
AP_HAL: fixed typo
2016-07-01 15:35:07 +10:00
Andrew Tridgell
8617db89dc
AP_HAL: added hal.util->set_imu_target_temp() API
2016-07-01 15:29:52 +10:00
Lucas De Marchi
1f96336f7c
Global: rename bus type enum entries
2016-06-27 17:51:41 -03:00
Gustavo Jose de Sousa
66f1ad9ed0
AP_HAL: Device: add support for read flag
...
Many of our SPI and I2C sensors define the protocol of setting the most
significant bit of the register address in order to perform a read operation.
Thus, enable the use of a "read flag" that is ORed with the register's address.
Since this is an abstraction for general devices, it's a good idea to have zero
as the default value for that flag.
While at it, add documentation to read_registers().
2016-06-27 17:18:35 -03:00
Gustavo Jose de Sousa
b6a1d598e3
AP_HAL: Device: document write_register()
2016-06-27 17:18:35 -03:00
Gustavo Jose de Sousa
4693501d9d
AP_HAL: Device: add bus_type field
...
Sometimes it's necessary to know the type of bus to make some decisions where
AP_HAL::Device abstraction is used.
2016-06-27 17:18:35 -03:00
Patrick J.P
eb44d75ed8
AP_HAL: Remove trailing spaces from AP_HAL_Namespace.h
2016-06-22 16:03:30 -03:00
Lucas De Marchi
9738be0ed6
AP_HAL: remove tabs and trailing whitespaces
2016-06-21 13:09:00 -03:00
Lucas De Marchi
e122b2b651
AP_HAL: GPIO: remove unused functions
...
These functions are not used by any HAL, so remove them.
2016-06-21 12:16:32 -03:00
Tom Pittenger
d3ac1dc161
AP_HAL: defer calls to safety_state switch to queue an async attempt.
...
- this allows for auto-retries if the state does not set correctly
2016-05-27 21:34:40 +10:00
Andrew Tridgell
163783fefd
AP_HAL: define CH_NONE
...
for servos not connected to a channel
2016-05-26 16:26:30 +10:00
Lucas De Marchi
bbe3a94175
AP_HAL: remove support for main without argc
...
This was only used by flymaple. Also add missing copyright notice to
header.
2016-05-23 21:49:45 -03:00
Lucas De Marchi
346bdf5f8f
AP_HAL: remove support for flymaple
2016-05-23 21:49:45 -03:00
Andrew Tridgell
595d5c0002
AP_HAL: added set_size() to RingBuffer API
2016-05-23 23:41:02 +10:00
Randy Mackay
67620f312d
AP_HAL: fix comment for get_time_utc
2016-05-19 16:05:29 +09:00
Niti Rohilla
faec752801
AP_HAL: add get_system_clock_utc functions to Util
2016-05-19 16:05:26 +09:00
Andrew Tridgell
e3107a7e10
AP_HAL: fixed optflow typos
2016-05-14 08:26:10 +10:00
Ricardo de Almeida Gonzaga
eb418f54ee
AP_HAL: Fix typos
2016-05-13 19:20:06 -03:00
Staroselskii Georgii
2e5cfc2849
AP_Compass: added external compass autodetection on Navio
2016-05-10 17:24:43 -03:00
Staroselskii Georgii
8be5ef1642
AP_HAL: added possibility to use several compassed on Navio 2
2016-05-10 17:24:43 -03:00
Staroselskii Georgii
b677f975e7
AP_Compass: added LSM9DS1 magnetometer support
2016-05-10 17:24:43 -03:00
Lucas De Marchi
68ae619448
AP_Compass: detect compasses for minlure
...
Minlure has an onboard compass (HMC5883L) as slave of MPU-6000, but also
allows the use of an external HMC5883L compass, which should be
connected to the lure's I2C port.
2016-05-10 16:08:39 -03:00
Lucas De Marchi
424434e31e
AP_HAL: allow to build without HAL_COMPASS_DEFAULT
...
Otherwise we need to change the ifdef chain adding HAL_COMPASS_<BOARD>
definitions.
2016-05-10 16:07:23 -03:00
Lucas De Marchi
cf11776150
AP_HAL: fix signed and unsigned comparison warning
...
../../libraries/AP_HAL/examples/Printf/Printf.cpp:63:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (ret != strlen(float_tests[i].result)) {
^
...
ardupilot/modules/gtest/include/gtest/gtest.h:1448:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (expected == actual) {
^
And similar ones.
2016-05-04 08:58:37 -03:00
Lucas De Marchi
9ac63d7128
AP_HAL: examples: fix coding style
2016-05-04 08:58:37 -03:00
Julien Beraud
d0114eac05
AP_HAL: Add bebop SPI Device to spi devices
...
Added to namespace
2016-05-03 16:43:39 -03:00
Lucas De Marchi
5a52533084
AP_OpticalFlow: move bus definition to AP_HAL header
2016-04-29 12:10:21 -03:00
Ricardo de Almeida Gonzaga
46fb57fcf1
AP_OpticalFlow: use I2CDevice interface
2016-04-29 12:01:04 -03:00
Peter Barker
e83b10cbc5
AP_HAL: move definition of callbacks structure out of C linkage
...
This fixes all the examples which use the AP_HAL_MAIN macro.
2016-04-27 14:21:28 +10:00
mirkix
b381045d5e
AP_HAL: BBBmini rework for dual MPU9250 and external HMC5843 compass
2016-04-24 10:57:57 -03:00
Andrew Tridgell
76868dd070
AP_HAL: added uartF
2016-04-20 09:39:48 +10:00
Andrew Tridgell
b94e577cb8
AP_HAL: added enable_sbus_out() call in RCOutput
2016-04-16 07:30:43 +10:00
Andrew Tridgell
e24d600e78
AP_HAL: added hal.rcout->set_output_mode()
2016-04-14 08:05:05 +10:00
hiro2233
7814841cd6
AP_HAL: Add RCOutput interactive example with Menu
2016-04-09 07:01:35 -07:00
Ricardo de Almeida Gonzaga
5bd034a5a8
Global: start using cmath instead of math.h
2016-04-05 21:06:19 -07:00
Lucas De Marchi
57f8db5672
AP_HAL: sparse-endian: conditionally include byteswap header
...
This is not present in qurt.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
c5dc54dac7
AP_HAL: utility: import sparse-endian header
2016-03-23 17:50:38 -03:00
Lucas De Marchi
0ed3a93142
AP_HAL: define compass locations for linux boards
2016-03-23 17:50:38 -03:00
Lucas De Marchi
c5022ef5c9
AP_HAL: add names for LSM9DS0 on raspilot
2016-03-18 21:51:37 -03:00
Lucas De Marchi
cb8355c315
AP_HAL: fix compass define for bebop
2016-03-17 02:55:51 -03:00
Jonathan Challinger
6663d30728
AP_HAL: add RCOutput::read_last_sent definition
2016-03-10 13:56:23 -08:00
Lucas De Marchi
6358876f58
AP_HAL: add missing MPU9250 name for BH
2016-03-07 14:50:14 -03:00
Staroselskii Georgii
392165c6a2
AP_HAL: added Navio2 board definitions
2016-02-27 03:06:50 -03:00
Gustavo Jose de Sousa
6144226c51
AP_HAL: always define HAL_OS_SOCKETS
...
And avoid warnings.
2016-02-26 14:17:33 -03:00
Andrew Tridgell
2120913ac2
AP_HAL: added ObjectArray template
...
this is a ring buffer that supports indexing for efficient handling of
queue peeking and manipulation
2016-02-24 09:18:06 +11:00
Tom Pittenger
9718ee23d1
AP_HAL: fix peekbytes casting
2016-02-24 09:18:06 +11:00
Andrew Tridgell
1df2512935
AP_HAL: added update() method for object ringbuffer
...
to support updating objects for GCS work Tom is doing
2016-02-23 16:34:06 +11:00
Tom Pittenger
1d528d552f
AP_HAL: rename RingBuffer.force() to RingBuffer.push_force()
2016-02-21 22:13:27 -08:00
Andrew Tridgell
4ff396dfa8
AP_HAL: added force() and peek() method for object ringbuffers
2016-02-22 12:34:32 +11:00
Víctor Mayoral Vilches
9bb039accd
AP_HAL: PXFmini add HAL_BARO_MS5611_NAME
...
Peer coded with @LanderU.
2016-02-19 19:17:34 -02:00
Lucas De Marchi
1f072c4353
AP_HAL: fix unused variable
...
../../libraries/AP_HAL/examples/UART_test/UART_test.cpp:13:28: warning: ‘uarts’ defined but not used [-Wunused-variable]
static AP_HAL::UARTDriver* uarts[] = {
^
2016-02-19 11:51:49 -02:00
Lucas De Marchi
dbf2aedf1e
AP_HAL: replace header guard with pragma once
2016-02-18 14:52:34 -02:00
mirkix
d868fe4eff
AP_HAL: Remove unused GPIO leds for BBBmini
2016-02-17 23:41:24 -02:00
Lucas De Marchi
10abec277d
AP_HAL: functor: use std::remove_reference
2016-02-16 19:49:09 -02:00
Lucas De Marchi
02a7fa5c2b
AP_InertialSensor: MPU9250: use AP_HAL::Device abstraction
...
This makes MPU9250 be almost the same as MPU6000 driver. Work has been
done here to make than similar so it's easier to spot the differences.
2016-02-16 19:49:09 -02:00
Lucas De Marchi
af846636e4
AP_InertialSensor: MPU60x0: use AP_HAL::Device abstraction
2016-02-16 19:49:09 -02:00
Lucas De Marchi
f1ade970a3
AP_Baro: MS5611: Use AP_HAL::Device abstraction
...
This allows to share almost all the I2C/SPI code and remove the
AP_Serial abstraction since that is now handled by AP_HAL itself.
2016-02-16 19:49:09 -02:00
Lucas De Marchi
b05954660a
AP_Baro: BMP085: use I2CDevice interface
2016-02-16 19:49:09 -02:00
Lucas De Marchi
66f644c50d
AP_HAL: add interface for SPIDevice devices
...
In order to interoperate with SPIDeviceDriver this is re-using the same
SPIDeviceManager interface.
2016-02-16 19:49:09 -02:00
Lucas De Marchi
2250d9d768
AP_HAL: initialize I2C manager
...
Add I2CManager to AP_HAL's contructor.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
f8e6c5b379
AP_HAL: add helper method to read registers
...
This just forwards to the transfer() method, avoiding the need in driver
code to have a similar method.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
b4ff2d7595
AP_HAL: add helper method to write register
...
This just forwards to the transfer() method, avoiding the need in driver
code to have a similar method.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
872b255384
AP_HAL: Add interface for I2CDevice
...
This is a new interface to replace I2CDriver in future, when all drivers
are converted.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
0eb450d379
AP_HAL: Add interface for I2C/SPI devices
...
These interfaces are intended to abstract I2C and SPI devices for
drivers.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
2e60e1b1f2
AP_HAL: utility: Add OwnPtr implementation
...
This is very similar to std::unique_ptr, but doesn't require including
the <memory> header which pulls lots of c++ headers and cause problems
with nuttx headers. It's header-only. It contains an explanation on what
it solves, how to use and unit tests.
2016-02-16 19:49:08 -02:00
Lucas De Marchi
9aa49cda93
Global: remove system_initializing() from scheduler
...
This is not used anymore.
2016-02-12 23:42:34 -02:00
mirkix
f777a25de8
AP_HAL: Enable optical flow onboard for BBBMINI
2016-02-08 08:52:10 -02:00
Lucas De Marchi
9d5fb97819
Global: rename enum SPIDevice to SPIDeviceType
...
Free the SPIDevice name so to have a consistent name for I2C/SPI device
classes.
2016-02-01 14:18:50 -02:00
Peter Barker
f0c165f0e4
AP_HAL: ensure CONFIG_MAIN_WITHOUT_ARGC_ARGV is always defined
2016-01-30 12:48:51 -02:00
Gustavo Jose de Sousa
c2e3f05dbf
waf: ardupilotwaf: prefix build context methods with ap_
...
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397
waf: examples: use methods from bld instead of ardupilotwaf
2016-01-22 20:10:29 -02:00
Julien BERAUD
d5c4917bcd
AP_HAL: add default support for timesliced timers
...
To keep compatibility
2016-01-18 16:57:48 -02:00
Gustavo Jose de Sousa
d281067bcc
waf: make example binaries be placed in 'examples' dir
...
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Ricardo de Almeida Gonzaga
7adbccac9a
AP_HAL_Linux: add support for OpticalFlow to MinnowBoardMax
...
This commit adds support for OpticalFlow to MinnowBoardMax trying to
leave the OpticalFlow implementation as generic as it already is.
We had to add some format conversion and software crop to the cameras that
do not have this features.
2016-01-11 15:31:27 -02:00
Andrew Tridgell
5f4bd10477
AP_HAL: added get_custom_defaults_file() to Util
2016-01-07 09:09:09 +11:00
Víctor Mayoral Vilches
0aee50b99e
HAL: Add PXFmini board
2016-01-05 15:31:43 -02:00
Jonathan Challinger
d7639ce03a
AP_HAL: fix example build
2015-12-29 10:46:35 -08:00
Andrew Tridgell
dafc9b4c6b
AP_HAL: allow getopt_cpp on QURT
...
avoid using stderr
2015-12-29 19:10:46 +11:00
Andrew Tridgell
bd2f548130
AP_HAL: allow argc and argc on QURT
2015-12-29 18:52:17 +11:00
Lucas De Marchi
97022a4161
AP_HAL: RingBuffer: fix macro expansion
...
Fix warning that reveals a real bug:
In file included from libraries/AP_HAL_Linux/UARTDriver.cpp:25:0:
libraries/AP_HAL_Linux/UARTDriver.cpp: In member function 'virtual bool Linux::UARTDriver::tx_pending()':
libraries/AP_HAL/utility/RingBuffer.h:21:35: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
#define BUF_EMPTY(buf) buf##_head == buf##_tail
^
libraries/AP_HAL_Linux/UARTDriver.cpp:355:13: note: in expansion of macro 'BUF_EMPTY'
return !BUF_EMPTY(_writebuf);
The problem is when there's a ! operator: without the parenthesis we would actually be doing
return !_write_buf_head == _write_buf_tail
which is not what we want.
2015-12-28 21:50:27 -02:00
Andrew Tridgell
c90d7dd86e
AP_HAL: fixed vprintf segfault
2015-12-28 08:44:40 +11:00
Lucas De Marchi
a096703b06
Global: don't link with AP_Progmem
...
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi
520b0384fd
AP_HAL: remove unused in_progmem flag to print_vprintf
2015-12-27 15:58:12 -02:00
Lucas De Marchi
8e0c125f56
AP_HAL: print_vprintf: follow coding style
...
- Use 4 spaces to indent
- Add braces to control statements
- Don't use tabs
2015-12-27 15:58:12 -02:00
Lucas De Marchi
c35730058a
AP_HAL: print_vprintf: stop using Progmem.h
...
Remove the unused support to data from progmem, including the unused %S
format specifier.
2015-12-27 15:58:12 -02:00
Lucas De Marchi
29ed01189d
AP_HAL: ftoa_engine: replace tabs with spaces
2015-12-27 15:58:12 -02:00
Lucas De Marchi
e751d632e6
AP_HAL: ftoa_engine: stop using Progmem.h
2015-12-27 15:58:12 -02:00
Andrew Tridgell
7c431b40f2
AP_HAL: enable HAL_QURT
2015-12-27 16:21:25 +11:00
Andrew Tridgell
cfd54c5683
AP_HAL: moved dsm implementation into AP_HAL/utility
2015-12-27 16:12:27 +11:00
Andrew Tridgell
fec9ffd1a0
AP_HAL: support UARTs on timer thread
...
This adds a macro for boards that need to have UARTs on the timer
thread instead of their own thread. This is needed for the qflight
port due to restrictions in the RPC API
2015-12-27 16:12:27 +11:00
Andrew Tridgell
ac1e75ae77
AP_HAL: added qflight linux subtype
2015-12-27 16:12:27 +11:00
Julien BERAUD
0ffba07ec8
AP_HAL: Set default params for Bebop
2015-12-23 10:24:04 -02:00
Aaron Wang Shi
c7a77af47f
AP_HAL: add BH HAT board info
2015-12-21 15:54:30 +11:00
Andrew Tridgell
9d4b31ca3c
AP_HAL: added a new_semaphore() interface to Util
2015-12-20 17:55:39 +11:00
Andrew Tridgell
ec6a679482
AP_HAL: added ByteBuffer and ObjectBuffer in RingBuffer
...
much better API than old macros
2015-12-20 07:33:54 +11:00
Julien BERAUD
eccef24fa7
AP_HAL: Add optical flow params for bebop
...
Params that are necessary for optical flow
2015-12-18 17:56:05 +11:00
Lucas De Marchi
c7668479bb
AP_HAL: follow coding style
2015-12-18 17:56:03 +11:00
Julien BERAUD
2b681f2f13
AP_HAL: Add support for an Optflow driver
...
This is meant to be used for onboard optical flow
2015-12-18 17:56:03 +11:00