Commit Graph

225 Commits

Author SHA1 Message Date
Andrew Tridgell 4deb01b8d5 RC_Channel: set AP_PARAM_NO_SHIFT 2016-03-18 12:33:34 +11:00
Lucas De Marchi 08cc7b2472 RC_Channel: replace header guard with pragma once 2016-03-16 18:40:44 +11:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa d281067bcc waf: make example binaries be placed in 'examples' dir
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Andrew Tridgell a07a8aece1 RC_Channel: added pwm_to_angle_dz_trim() 2016-01-06 22:47:21 +11:00
Andrew Tridgell 9941c91d36 RC_Channel: prevent a warning message for assigned RC channels 2016-01-06 19:16:12 +11:00
Andrew Tridgell b6155d2cb6 RC_Channel: fixed output for k_motor* 2016-01-05 06:41:51 +11:00
Andrew Tridgell 238e912000 RC_Channel: allow find_channel() to be called early
and fix a bug!
2016-01-05 06:40:48 +11:00
Andrew Tridgell 9123ef9f38 RC_Channel: added find_channel() and channel numbers 2016-01-04 17:06:57 +11:00
Andrew Tridgell 6a58264c6b RC_Channel: added set_aux_channel_default() API
this will allow for a default channel for aux functions. Also adds
heli_rsc and heli_tail_rsc functions
2016-01-04 16:14:09 +11:00
Andrew Tridgell 7cc53b6449 RC_Channel: setup only in or out part of channels for aux channels
this allows separate use of input and output
2016-01-04 11:23:36 +09:00
Andrew Tridgell 48b774bc63 RC_Channel: allow more complete separation of input and output of channels
this allows for the type and range of channels to be different on
input and output
2016-01-04 11:23:30 +09:00
Jonathan Challinger 027e622a3c RC_Channel: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Andrew Tridgell e1c890eb58 RC_Channel: added RC_UART example
useful for UART -> ESCs
2015-12-27 16:12:27 +11:00
Lucas De Marchi e8e48fd8e0 RC_Channel: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:44 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Andrew Tridgell 52f2fce1d5 RC_Channel: prevent float exception with bad RCn_MIN/MAX/TRIM
thanks to Michael for finding this
2015-11-30 21:53:54 +11:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Robert Lefebvre 58e918341d RC_Channel: Add motor_run_enable aux function 2015-11-12 19:37:27 +09:00
Andrew Tridgell ea5cd99651 RC_Channel: use is_bounded_int32() 2015-11-11 13:45:09 +11:00
Grant Morphett 7edf8c0e0a RC_Channel: New method to detect if channel is in trim location
This is a new method which will return true if an RC_Channel has a PWM
value that is at its TRIM value plus or minus the allowed dead zone
around the TRIM.
2015-11-11 13:39:38 +11:00
Lucas De Marchi 2a91d2169e RC_Channel: remove check for AVR CPUs
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:14 +11:00
Lucas De Marchi 2847af905e RC_Channel: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Jonathan Challinger 21e7d46944 RC_Channel: use set_default for runtime param defaults 2015-10-26 11:15:54 +11:00
Caio Marcelo de Oliveira Filho e36728d1db RC_Channel: make example compile again
By adding a missing library dependency. Also remove unnecessary
includes, in particular including each board HAL file is not needed
anymore.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
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
Grant Morphett 122e88dbed RC_Channel: remove the unused test function get_failsafe 2015-09-09 10:28:02 +10:00
Andrew Tridgell 1162503199 RC_Channel: fixed example build 2015-08-11 17:00:13 +10:00
Gustavo Jose de Sousa d2780623f7 RC_Channel: 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:38:25 +10:00
Andrew Tridgell c86ff1ac25 RC_Channel: prevent floating exception on bad MIN/MAX/TRIM values 2015-07-27 12:04:03 +10:00
Randy Mackay 03a336d496 RC_Channel: update_aux_servo_function made public 2015-06-10 16:47:06 +09:00
Andrew Tridgell e234844905 RC_Channel: fixed example sketch 2015-06-01 18:05:50 +10:00
Andrew Tridgell 6c1c2dd8bd RC_Channel: convert example from .pde to .cpp 2015-06-01 17:07:08 +10:00
Randy Mackay b121d83beb RC_Channel: add EPM, LandingGear to FUNCTION param description 2015-05-27 18:05:01 +09:00
Randy Mackay 1b13250fd8 RC_Channel: small parameter description change 2015-05-14 10:33:08 +09:00
Andrew Tridgell fa688a7b14 RC_Channel: fix for HAL_SITL rename 2015-05-05 09:45:57 +10:00
Randy Mackay 5b15c07d47 RC_Channel: fix example sketch 2015-05-01 21:02:57 +09:00
Andrew Tridgell 6959cdbf15 RC_Channel: fixed usage of _reverse to be consistent
users could set RCn_REV to 0 and get very confusing results
2015-02-18 12:47:56 +11:00
Robert Lefebvre 4935a42054 RC_Channel_Aux: Add new landing gear control to Aux_servo_function_t enum.
Conflicts:
	libraries/RC_Channel/RC_Channel_aux.h
2015-01-07 11:58:17 +09:00
Andrew Tridgell 86bf02d64c RC_Channel: update example sketch to copy input to output 2014-12-02 16:27:33 +11:00
Kirill A. Kornilov 33e4f44434 RC_Channel: added set_radio_trimmed()
take into account trim value in set_radio()
2014-11-25 08:19:27 +11:00
Randy Mackay 73f3b50e2f RC_Channel: make get_control_mid const 2014-11-17 18:16:12 -08:00
Jonathan Challinger 9375fc8947 RC_Channel: add get_control_mid function 2014-11-17 18:16:09 -08:00
Jonathan Challinger 4d7988b302 RC_Channel: replace long with int32_t 2014-11-17 18:16:08 -08:00
Andrew Tridgell 6b0c15b70f RC_Channel: added norm_input_dz()
normalised input, taking into account dead zone
2014-11-18 12:44:05 +11:00