Commit Graph

14 Commits

Author SHA1 Message Date
Jack 4b24a61023 AP_HAL_Linux: fix spelling of generated in panics 2018-07-10 09:55:01 -07:00
Andrew Tridgell 9b297ef5a1 HAL_Linux: fixed nested cork/push
don't generate extra pulse sets if we nest
2017-05-01 14:32:18 +10:00
Lucas De Marchi 490841a814 AP_HAL_Linux: 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
Andrew Tridgell 7f09d20e3b HAL_Linux: implement cork and push for remaining RCOutput backends 2016-10-13 10:00:04 +11: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
Randy Mackay 58e65c836f HAL_Linux: remove unused pru_chan_map from RCOutput 2016-04-23 23:06:24 -07: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
Caio Marcelo de Oliveira Filho 7675913d5b AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09: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 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
Lucas De Marchi 191ec10554 AP_HAL_Linux: remove unused write method 2015-09-29 11:53:46 +09: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
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