Commit Graph

29 Commits

Author SHA1 Message Date
Willian Galvani 710cbacef7 RCOutput_PC9685: refactor write/write_gpio 2022-09-06 09:34:07 +10:00
Willian Galvani 603bc5ecce RCOutput_PCA9685: implement gpio methods 2022-09-06 09:34:07 +10:00
Willian Galvani b5de26c1f2 AP_Hal_Linux: PCA9685: do not shutdown
Shutting down causes the pulses to be cut short, often causing
ESCs to interpret this pulse
2022-01-18 11:06:35 +11:00
Willian Galvani 68cbb47d68 HAL_Linux: RCOutput_PCA9685: implement force_safety_on/off 2021-09-14 10:11:17 +10:00
Jacob Walser e64d9816ce RCOutput_PCA9685: allow different external clock frequencies
The PCA9685 may use an external clock 0~50MHz
Specify the external clock frequency in constructor arguments for each board HAL
2020-11-21 00:25:19 -08:00
Peter Barker c917cd4dbb AP_HAL_Linux: make a static-const hal references references to external symbol 2020-03-03 10:12:14 +11:00
Patrick José Pereira 29fadc2417 AP_HAL_Linux: PCA9685: Check for device before accessing it
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-09-26 12:42:12 +10:00
Andrew Tridgell 4404c95cc8 HAL_Linux: use ceilf() 2018-05-07 11:43:23 +10: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
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Luiz Ywata 3e765e23a9 AP_HAL_Linux: RCOutput_PCA9685: use I2CDevice interface 2016-07-14 17:32:33 -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
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Andrew Tridgell 1e4fe7996e HAL_Linux: update URL 2016-03-25 20:47:53 +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
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 6984168a45 AP_HAL_Linux: don't log on failed semaphore
With commit 24f4153 ("AP_HAL_Linux: RCOutput_PCA9685: group writes") a
log was introduced when we can't get the bus semaphore. However since we
are calling the non blocking method, failing there is not that unlikely
if the bus is shared. Return back to the previous behavior of not
logging.
2015-11-03 11:08:00 +11:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35: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 24f41538cb AP_HAL_Linux: RCOutput_PCA9685: group writes 2015-10-06 11:03:30 +11:00
Julien BERAUD 1c46205c2b AP_HAL_Linux: fix warning
Fix warning and use htole16 instead of trying to implement it.
The current code does nothing on little endian platforms.
Moreover, the status variable was unused.
2015-10-06 10:34:59 +11:00
Lucas De Marchi 191ec10554 AP_HAL_Linux: remove unused write method 2015-09-29 11:53:46 +09: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
Fredrik Hedberg 9d9e6d0b34 AP_HAL_Linux: Only use enable pin for PCA9685 if we need to. 2015-09-09 08:43:22 +10:00
Fredrik Hedberg 21b9f96ce3 AP_HAL_Linux: Enable use of all 16 channels for non-Navio PCA9685. 2015-09-09 08:43:22 +10:00
Lucas De Marchi 0000ff45cb AP_HAL_Linux: RCOutput_PCA9685: remove trailing whitespace 2015-09-03 18:43:21 +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