Commit Graph

35 Commits

Author SHA1 Message Date
Peter Barker a9c4f1d0d5 AP_HAL_Linux: return RC protocol being decoded 2019-06-18 11:35:38 +10:00
Peter Barker eb73a14da8 AP_HAL_Linux: add missing override keywords 2019-02-22 15:01:09 +00:00
Aaron Wang Shi 4f2d9c2c4d AP_HAL_Linux: support PWM input for BH hat 2018-07-20 00:32:55 -07:00
Michael du Breuil 737c4ac36f AP_HAL_Linux: Remove RC overrides 2018-06-05 09:51:09 +10:00
Michael du Breuil 517e20093e AP_HAL_Linux: Remove set_overrides() method 2018-05-11 12:13:39 +01:00
Andrew Tridgell 9868ffe13b HAL_Linux: support receiver based RSSI 2017-07-03 11:22:21 +10:00
Lucas De Marchi b910f230fb AP_HAL_Linux: RCInput: replace volatile with atomic 2017-01-11 11:25:00 +11:00
Andrew Tridgell 0a18f5e7b2 HAL_Linux: fixed a bug in RCInput::new_input
when a library called read() it would clear the new input flag, which
would cause new_input() in the main loop to return false. This could
trigger a false RC failsafe.
2017-01-09 21:47:19 -08:00
Andrew Tridgell 513156a4cc HAL_Linux: make 115200 R/C decoders return a bool 2016-10-16 19:05:19 +11:00
Andrew Tridgell 710d08da6d HAL_Linux: support SRXL R/C input 2016-10-16 19:05:19 +11:00
Andrew Tridgell 5909552f67 HAL_Linux: added RCInput_115200
this is a RCInput module for multiple R/C uart protocols running at
115200 baud 8-bit. We can decode multiple protocols in parallel with
this module, relying on frame timing and CRCs to get the right
protocol
2016-09-21 10:33:15 -03:00
Lucas De Marchi e8f71a5bd2 AP_HAL_Linux: change define and members visibility
Make some member variables protected to follow what we do in other
places (and there's no reason to be private).

Move defines to .cpp to reduce their visibility.
2016-07-29 20:27:12 -03:00
Lucas De Marchi f36e8d9c05 AP_HAL_Linux: remove AP_HAL_Linux_Namespace header
This centralized namespace header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.

While at it, do some whitespace cleanups and minor changes to adhere to
coding style.
2016-07-29 20:25:03 -03:00
Andrew Tridgell cf83a43b56 HAL_Linux: support SBUS input on Disco 2016-07-20 13:38:16 +10:00
Lucas De Marchi 705393b30c AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Lucas De Marchi 2d3a62eae3 AP_HAL_Linux: RCInput_RPI: revert PWM support
This reverts support for RCInput via PWM. This is causing trouble in
some RPI-based boards, receiving a SIGSEGV. Let's revert it for now and
retry this later.

This reverts commit 5629f38b2c.
This reverts commit 51fd0b3d55.
This reverts commit 79d56073f7.
2016-01-18 20:07:42 -02:00
Aaron Wang Shi 79d56073f7 AP_HAL_Linux: support PWM input for BH hat 2016-01-15 00:16:14 -02:00
Lucas De Marchi 321803919c Revert "AP_HAL_Linux: support PWM input for BH hat"
This reverts commit 8cca0beba9.

The PWM input using the RPI DMA is causing trouble with RPI boards using
PPMSUM. Let's revert it until the solution is found. We still leave the
ifdef in RCInput for BH hat.
2016-01-07 10:27:07 -02:00
Andrew Tridgell dc8a3bbf92 HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
Aaron Wang Shi 8cca0beba9 AP_HAL_Linux: support PWM input for BH hat
Support 8 PWM channels as RCInput.
2015-12-21 15:54:31 +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
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
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