Commit Graph

13 Commits

Author SHA1 Message Date
Lucas De Marchi 54c2c5f682 AP_HAL_Linux: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +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
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
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
Andrew Tridgell cebfef3ead HAL_Linux: don't accept less than 5 input channels 2014-10-09 09:19:35 +11:00
Andrew Tridgell a3fee16604 HAL_Linux: added DSM/Spektrum RCInput support
this decodes DSM using the RCIN pulses from the PRU
2014-10-08 12:50:50 +11:00
Andrew Tridgell b1845ed00d HAL_Linux: initial support for parallel SBUS and PPM-SUM decoding 2014-10-07 14:57:34 +11: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
Andrew Tridgell 5fb2ad0068 HAL_Linux: fixed safety of RCInput code
don't loop forever waiting for pulses
2014-08-19 10:08:16 +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 72f94444c4 HAL_Linux: added basic support for RC overrides
this allows for easier testing of RC output by allowing
mavproxy to setup fake inputs

Pair-Programmed-With: Sid, Anuj, Victor and Philip
2014-07-14 09:32:29 +10:00
Andrew Tridgell 6eee2421cc AP_HAL: removed RCInput valid_channels() and added new_input() and num_channels()
the valid_channels() method was inconsistently implemented between
boards, and served two quite different purposes. It is clearer as two
functions
2014-03-25 14:39:41 +11:00
Andrew Tridgell 4ba044c441 AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00