Commit Graph

57 Commits

Author SHA1 Message Date
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