Andrew Tridgell
b69170febd
HAL_Linux: fixed build for Disco with I2C changes
2016-07-20 13:38:17 +10:00
Andrew Tridgell
a40d704126
HAL_Linux: added RCOutput_Disco
...
combines Sysfs and Bebop RCOutput code
2016-07-20 13:38:16 +10:00
Andrew Tridgell
cf83a43b56
HAL_Linux: support SBUS input on Disco
2016-07-20 13:38:16 +10:00
Andrew Tridgell
aaaa6d38c7
HAL_Linux: initial support for Disco
2016-07-20 13:35:51 +10:00
Lucas De Marchi
24cdef24b8
AP_HAL_Linux: remove wrong ifdef
...
This was added when the support for navio2 went in, but the same ifdef
is already on the lines above.
2016-07-14 17:32:33 -03:00
Luiz Ywata
3e765e23a9
AP_HAL_Linux: RCOutput_PCA9685: use I2CDevice interface
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
Andrew Tridgell
847bfda48a
HAL_Linux: adjust include ordering
2016-07-14 13:39:47 +10:00
Andrew Tridgell
dd5d0ffbad
HAL_Linux: use default module directory
2016-07-14 13:39:47 +10:00
Andrew Tridgell
107f76828d
HAL_Linux: added AP_Module support
2016-07-14 13:39:46 +10:00
Andrew Tridgell
beb3591f67
HAL_Linux: improved help output and errors for udp and bcast
2016-06-28 21:01:45 +10:00
Leandro Pereira
3555e439a4
AP_HAL_Linux: Simplify I2C initialization in HAL_Linux_Class
2016-05-20 10:12:17 -03:00
Lucas De Marchi
71e10c9132
AP_HAL_Linux: fix include order
...
Sort include alphabetically and make them in order:
Main header
system headers
library headers
local headers
While reordering, change a include of endian.h to our sparse-endian.h
which is more reliant to toolchain changes.
2016-05-18 23:05:56 -03:00
Lucas De Marchi
45c6b750f2
AP_HAL_Linux: remove ifdef checks for HAL_BOARD_LINUX
...
Everything inside libraries/AP_HAL_Linux is for Linux boards, there's
not need to add the ifdefs.
2016-05-18 23:05:56 -03:00
Lucas De Marchi
3315f46800
AP_HAL_Linux: inline I2C bus options for minlure
...
We don't need all the comments in the array declaration and we can
inline its declaration in the function call. This makes it easier to
copy it to other places.
2016-05-10 16:06:53 -03:00
Andrew Tridgell
c7dabad02c
HAL_Linux: added uartF
2016-04-20 09:39:49 +10:00
Lucas De Marchi
6a6175df1c
AP_HAL_Linux: move dirname to I2CDevice core
...
All entries would need the "devices/" prefix and it's more natural not
using it.
2016-03-17 02:55:31 -03:00
Staroselskii Georgii
a327a8779e
AP_HAL_Linux: added Navio2 support
2016-02-27 03:06:50 -03:00
Lucas De Marchi
69f6a73c19
Global: fix missing renames for HAL_BOARD_SUBTYPE_LINUX_ERLEBOARD
...
Commit b87fd58
(AP_HAL: ERLEBOARD legacy support) renamed the define but
forgot some around.
2016-02-19 12:35:18 -02:00
Lucas De Marchi
3ace8b52de
AP_HAL_Linux: use AnalogIn_IIO for minlure
2016-02-19 11:55:31 -02:00
Lucas De Marchi
e40785b002
AP_HAL_Linux: Add fake device to I2CDriver
...
This allows us to re-use I2CDevice from I2CDriver while the drivers are
converted. We create a fake device with addr = 0 for each I2CDriver but
we only use the register/unregister logic. The transfer logic still uses
the methods from I2CDriver in order to use the right address.
Now we can interoperate I2CDevice drivers with the ones base in
I2CDriver since they are going to use the same semaphore and bus.
The I2CDriver constructors were changed to re-use the logic in I2CDevice
(it uses a number rather than an string) and the semaphore doesn't live
outside anymore, its embedded in the fake I2CDevice, as well as the
bus's file descritor.
2016-02-16 19:49:09 -02:00
Lucas De Marchi
c394de31a0
AP_HAL_Linux: register I2CManager instance
2016-02-16 19:49:09 -02:00
mirkix
5b8de06beb
AP_HAL_Linux: Enable optical flow onboard for BBBMINI
2016-02-08 08:52:10 -02:00
Lucas De Marchi
21b2d5d34c
AP_HAL_Linux: AnalogIn_Raspilot: rename classes to follow other names
2016-02-01 14:18:51 -02:00
Lucas De Marchi
87e7704b1c
AP_HAL_Linux: ADS1115: rename classes to follow other names
...
While at it, remove some dead/commented-out code.
2016-02-01 14:18:51 -02:00
mirkix
c622ff1539
AP_HAL_Linux: Enable AnalogIN_IIO for BBBMINI
2016-01-28 13:44:43 -02:00
Lucas De Marchi
1fde473afc
AP_HAL_Linux: AnalogIn_IIO: normalize names
...
Use same name for file and classes, preferring AnalogIn_IIO over
IIOAnalogIn.
2016-01-11 15:44:24 -02:00
Víctor Mayoral Vilches
546fbd1f25
HAL_Linux: mv AnalogIn_PXF to AnalogIn_IIO
...
Initial implementation used for the PXF moved for
a wider use. The implementation uses the Linux Industrial
I/O Subsystem (IIO) to get Analog Input.
2016-01-11 15:44:24 -02:00
pkancir
506db4eaf5
AP_HAL_Linux: add ADC support for PXF cape
2016-01-11 15:44:24 -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
Víctor Mayoral Vilches
fa3dad928b
HAL_Linux: Add PXFmini to Linux_Class
2016-01-05 15:35:56 -02:00
Andrew Tridgell
dc8a3bbf92
HAL_Linux: added qflight board subtype
2015-12-27 16:12:27 +11:00
Aaron Wang Shi
ac08eece84
AP_HAL_Linux: instantiate BH hat objects
2015-12-21 15:54:31 +11:00
Julien BERAUD
6f55f3734c
AP_HAL_Linux: Add optflow declaration
...
Add an empty driver for boards that are not bebop
2015-12-18 17:56:05 +11:00
Lucas De Marchi
6011eefb55
AP_HAL_Linux: rename AP_HAL_Empty instances
2015-12-08 11:12:14 +11:00
Lucas De Marchi
2439826c19
AP_HAL_Linux: use init() method without arguments
...
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00
Julien BERAUD
8c4803af10
AP_HAL_Linux: GPIO Sysfs for Bebop
...
copied from minlure implementation
2015-12-01 07:07:26 +11:00
Lucas De Marchi
1d51e60571
AP_HAL_Linux: move Util instantiation
...
The util object may be used by all other objects so we need to
instantiate it as earlier as possible.
2015-11-11 08:02:41 +11:00
Víctor Mayoral Vilches
d5d1bfae8c
AP_HAL_Linux: Adapt code to common RPI layer
2015-11-04 13:58:25 +11:00
Lucas De Marchi
cdaf67b749
AP_HAL_Linux: use PCA9685 for output in minlure
2015-10-22 12:04:53 +11:00
Lucas De Marchi
b75524a152
AP_HAL_Linux: use UART RC input for minlure
2015-10-22 12:04:53 +11:00
Lucas De Marchi
f72a5614d5
AP_HAL_Linux: add I2C buses for minlure
2015-10-22 12:04:53 +11:00
Lucas De Marchi
4992375bab
AP_HAL_Linux: add GPIO definitions for minlure
2015-10-22 12:04:52 +11:00
Lucas De Marchi
2ac96b942c
AP_HAL_Linux: remove prefix from AP_HAL_Linux classes
...
We have already a Linux namespace, so there's no need to prefix Linux on
all names.
2015-10-21 10:11:19 +11:00
Caio Marcelo de Oliveira Filho
3c22564307
AP_HAL_Linux: merge init() and run()
2015-10-21 09:16:08 +11:00
Caio Marcelo de Oliveira Filho
32dc822470
AP_HAL_Linux: implement HAL::run()
...
Added a note about the different ordering between setup callback and
scheduler initialized call.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2
AP_HAL: make code not depend on concrete HAL implementations
...
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.
A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.
The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.
Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.
The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
raspilot
aa4d16622e
HAL_Linux_Class: Init spi before rcin & rcout, because raspilot rcin & rcout use spi.
2015-10-02 09:54:55 +10:00
raspilot
5dc18b9a54
HAL_Linux_Class: Fix the broken declare of "LinuxUtilRPI utilInstance" at building raspilot.
2015-10-02 09:47:18 +10:00
Lucas De Marchi
fc2a1d27b4
AP_HAL_Linux: fix build for raspilot after Util change
...
Make sure raspilot also builds after making the Util class common for
RPI-based boards.
2015-09-24 15:31:32 +10:00
dgrat
15b3717d89
AP_HAL_Linux: Move RPi version check to util class
...
- Moved the version check functions to util.
- Removed a redundant version check.
- Removed redundant version check functions from RCInput.
2015-09-24 13:04:18 +10:00
raspilot
444081d38d
AP_HAL_Linux: added support for raspilot objects
2015-09-14 14:22:16 +10:00
Víctor Mayoral Vilches
728921f7c5
AP_HAL_Linux: ERLEBOARD legacy support
...
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
2015-09-09 10:31:55 +10:00
Fredrik Hedberg
d9a4b6b089
AP_HAL_Linux: Allow PCA9685 to be used on non-default I2C addresses.
2015-09-09 08:43:22 +10:00
Julien BERAUD
a057a8a009
AP_HAL_Linux: Add Support for RCInput_UDP
...
very simple protocol to receive RC cmds via UDP
Add support for it on the bebop
2015-09-07 12:10:08 +10:00
Lucas De Marchi
18321a77c4
AP_HAL_Linux: rename RCOutput_Navio to RCOutput_PCA9685
...
The RCOutput_Navio is now generic enough to be used by other boards.
Rename it to use the name of the chip, PCA9685.
2015-09-03 18:43:21 +10:00
Fabio Mello
c0caed1b64
AP_HAL_Linux: RCOutput_Navio: allow to use internal clock
...
It's possible to use the internal clock in PCA96895 if we account for
the drift it contains. This is a bit different from solutions in other
projects like the Adafruit library and the PX4 firmware: instead of
applying a correction to the final frequency we apply the correction to
the clock since this is the source of the error.
With this fix we arrived to much better results across different lots of
sensors.
The Navio board continues to use the external clock and should have no
difference behavior.
2015-09-03 18:43:21 +10:00
Lucas De Marchi
6c042b6666
AP_HAL_Linux: RCOutput_Navio: allow to have other offset
2015-09-03 18:43:21 +10:00
Lucas De Marchi
3beaf34aa1
AP_HAL_Linux: RCOutput_Navio: allow to have other OE pin
...
While at it also rename enable_pin to follow the convention of starting
with underscore for private members.
2015-09-03 18:43:21 +10:00
Gustavo Jose de Sousa
124b750c10
AP_HAL_Linux: standardize inclusion of libaries headers
...
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.
2015-08-11 16:28:43 +10:00
Julien BERAUD
954ec71630
HAL_Linux: added rcout implementation for bebop
2015-07-10 16:46:30 +10:00
Julien BERAUD
7275e33e79
AP_HAL: add the possibility to have more than 1 i2c
...
Bebop drone has 3 i2c
2015-07-10 14:23:17 +10:00
mirkix
e6363ea95d
AP_HAL_Linux: BBBMINI uses /dev/i2c-2
2015-07-06 10:09:21 +10:00
Andrew Tridgell
5f0302ed9f
HAL_Linux: fixed chaining of getopt calls
2015-07-01 20:44:07 +10:00
Andrew Tridgell
355575f793
HAL_Linux: fixed chaining of getopt instances
2015-07-01 15:42:07 +10:00
Andrew Tridgell
a3c7297d8e
HAL_Linux: fixed setting of custom directories
2015-06-30 15:08:10 +10:00
Víctor Mayoral Vilches
5c4ae15deb
HAL_Linux: Make use of GetOptLong
...
Use GetOptLong to process long args, support
custom terrain and log directories and update
_usage().
2015-06-30 14:36:00 +10:00
Andrew Tridgell
dbff6cab43
HAL_Linux: added udp example to help
2015-06-03 21:47:01 +10:00
Staroselskii Georgii
dff430e136
AP_HAL_Linux: added UART port for second GPS
2015-04-14 15:59:34 +10:00
mirkix
d4d42599b0
AP_HAL_Linux: Add RcInput and RcOutput with only one PRU when using a BBB. BBBMINI use the RC AIO PRU firmware already
2015-03-16 09:33:54 +11:00
Staroselskii Georgii
75cd41a7c1
AP_HAL_Linux: added NavioAnalogIn
2015-02-12 12:57:45 +11:00
mirkix
c58a022111
AP_HAL_Linux: add support for BBBMINI, simple ArduPilot DIY Cape for the BeagleBone Black
2015-01-12 21:36:40 +13:00
Staroselskii Georgii
e4a21f291d
AP_HAL_Linux: added LinuxSPIUARTDriver that can handle SPI-driven Ublox
2015-01-07 08:41:12 +11:00
John Williams
ae87399919
HAL_Linux: Basic Zynq Linux platform support
...
Preliminary support for Zynq/Linux on the 'ZyboPilot' HW platform.
see https://github.com/trjw/ZyboPilot-bsp for the PetaLinux / Vivado project
files.
At this stage CPPM/Pulse in and PWM out work, and in CLI mode the passthru
test works correctly.
The platform has passed minimal smoke testing in HIL mode.
ZYNQ IS NOT FLIGHT TESTED YET! FLY THIS PLATFORM AT YOUR OWN RISK!
Signed-off-by: John Williams <john@whelanwilliams.net>
2014-11-14 10:21:04 +11:00
bugobliterator
dd6d520385
HAL_Linux:Create subclass to handle FRAM Storage under main Storage Class
2014-11-08 11:36:09 +11:00
Mikhail Avkhimenia
81de994fef
HAL_Linux: separate RCInput for PRU and Navio
2014-10-30 13:30:07 +11:00
Mikhail Avkhimenia
e05151f0e0
HAL_Linux: Initialize i2c before rcoutput (required by i2c pwm chips for initialization)
2014-10-30 13:30:07 +11:00
Mikhail Avkhimenia
2f0900b0a8
HAL_Linux: add GPIO driver for Raspberry Pi
2014-10-30 13:30:07 +11:00
Mikhail Avkhimenia
07ed93cea0
HAL_Linux: add PCA9685 based RCOutput for Navio
2014-10-30 13:30:07 +11:00
Andrew Tridgell
94e14f5dcb
HAL_Linux: split off RCOutput class to be specific to PXF and ERLE
...
this fixes the Replay tool
2014-08-19 20:03:33 +10:00
Andrew Tridgell
2ce219aeb8
HAL_Linux: split RCInput class into generic and PRU implementations
...
this will make it easier for other boards (such as NAVIO) to implement
their own RCInput mechanism
2014-08-19 20:03:33 +10:00
bugobliterator
ac11d282b5
HAL_Linux: Add support for PPM input to HAL_Linux
...
rcin thread continuously scans for values inside ring buffer maintained by pru with rcinpru0 firmware.
2014-08-19 10:08:16 +10:00
Andrew Tridgell
fc8068adfe
HAL_Linux: use board subtypes
2014-07-14 09:44:35 +10:00
Víctor Mayoral Vilches
be68de20f1
HAL_Linux: UART-like TCP sockets impl. on AP_HAL_Linux
2014-07-14 09:31:30 +10:00
bugobliterator
a7ead42f52
HAL_Linux: added initial gpio library
2014-07-14 09:29:08 +10:00
bugobliterator
eb35c94a43
HAL_Linux: add rcout->init method to HAL_Linux_Class::init
2014-07-14 09:10:23 +10:00
bugobliterator
e9f5e0d6cc
HAL_Linux: add rcout->init method to HAL_Linux_Class::init method
2014-07-14 09:10:23 +10:00
Andrew Tridgell
74ee70d463
HAL_Linux: updates for ERLE board type
2014-07-14 08:52:27 +10:00
Andrew Tridgell
bf2dd141e9
HAL_PX4: support uartE for 2nd GPS
2014-02-26 08:18:11 +11:00
Andrew Tridgell
735c6449a1
AP_HAL: added support for commandline arguments
...
useful for log replay, specifying log file
2014-02-23 08:15:39 +11:00
Andrew Tridgell
c000a08d6f
HAL_LINUX: added uartD
2013-11-23 19:29:22 +11:00
Andrew Tridgell
b30f652cec
HAL_Linux: removed Console driver
2013-10-05 18:32:57 +10:00
Andrew Tridgell
bbac3265b2
HAL_Linux: default to hal.console on stdout
2013-10-01 12:49:58 +10:00
Andrew Tridgell
884af71ef6
HAL_Linux: added SPI support
2013-09-29 00:57:13 +10:00
Andrew Tridgell
58a31318ee
AP_HAL_Linux: initial I2C driver implementation
...
this works sufficiently for the HMC5883
2013-09-28 21:24:02 +10:00
Andrew Tridgell
4ba044c441
AP_HAL_Linux: initial Linux AP_HAL
2013-09-28 21:24:01 +10:00