Commit Graph

115 Commits

Author SHA1 Message Date
Lucas De Marchi 7c78955591 AP_Airspeed: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:42 +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
Caio Marcelo de Oliveira Filho 410bbe4c26 AP_Airspeed: examples use millis/micros/panic functions 2015-11-20 12:29:16 +09:00
Caio Marcelo de Oliveira Filho 2b10e0fac0 AP_Airspeed: use millis/micros/panic functions 2015-11-20 12:29:07 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Andrew Tridgell a3ca732403 AP_Airspeed: show health status in examples 2015-11-05 16:09:00 +11:00
Lucas De Marchi 221d822573 AP_Airspeed: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09: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
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
Caio Marcelo de Oliveira Filho 817248b2f5 AP_Airspeed: remove unnecessary includes from example 2015-10-21 09:16:11 +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
Gustavo Jose de Sousa d42b132507 AP_Airspeed: 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:42 +10:00
Staroselskii Georgii 402f46c56f AP_Airspeed: fixed a typo in the ARSPD_DEFAULT_PIN define
There was a redundant elif for Linux builds.
2015-07-07 21:02:21 +10:00
Andrew Tridgell e66b56970e AP_Airspeed: convert example from .pde to .cpp 2015-06-01 16:58:10 +10:00
Lucas De Marchi cc1fbddc95 AP_Airspeed: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +10:00
Andrew Tridgell f23bc463cb AP_Airspeed: fix for HAL_SITL rename 2015-05-05 09:45:54 +10:00
Randy Mackay 2a6421d1bf Airspeed: fix example sketch 2015-05-02 20:53:49 +09:00
Andrew Tridgell c565d3b805 AP_Airspeed: fixed example build 2015-03-14 20:00:15 +11:00
Andrew Tridgell 26a77dc502 AP_Airspeed: change for new PX4 paths 2015-02-14 12:25:43 +11:00
Andrew Tridgell 1c270d17a8 AP_Airspeed: ignore temperatures below -80
ETS driver on PX4 returns -1000
2015-02-06 21:41:15 +11:00
Emile Castelnuovo a863f0bca8 AP_Airspeed: VRBRAIN code clean up. Deleted unused boards. 2015-02-02 08:44:01 +11:00
LukeMike 61f4239e47 AP_Airspeed: enabled PX4 library for VR boards 2015-02-02 08:44:00 +11:00
Emile Castelnuovo 25818f08a3 AP_Airspeed: added VRBRAIN board type 2015-02-02 08:43:59 +11:00
Emile Castelnuovo de8a0ebc08 AP_Airspeed: added #defines for new VR boards. 2015-02-02 08:43:58 +11:00
LukeMike b29f50ba9b AP_Airspeed: Defined AirSpeed analog inputs for ArduPlane on VR Micro Brain 5 2015-02-02 08:43:57 +11:00
Randy Mackay 293eb74a37 AirSpeed: fix example sketch 2015-01-28 17:15:36 +09:00
Andrew Tridgell 2235d18d67 AP_Airspeed: make it possible to tell if a airspeed sensor is unhealthy
we need use() to reflect if the user wants to use the sensor, so the
arming checks can tell if it is not working as expected
2015-01-20 11:26:20 +11:00
Andrew Tridgell 258542b939 AP_Airspeed: added ARSPD_SKIP_CAL parameter
allows airspeed calibration to be skipped for easier startup
2014-11-13 21:12:37 +11:00
Andrew Tridgell 9c631944f7 AP_Airspeed: expose raw pressure for logging 2014-11-13 17:49:04 +11:00
Andrew Tridgell ad8b73c8aa AP_Airspeed: update ARSPD_AUTOCAL docs 2014-10-24 17:16:17 +11:00
Andrew Tridgell ef0eca4835 AP_Airspeed: fixed airspeed in Replay 2014-10-19 19:42:15 +11:00
Andrew Tridgell f6f51ceebe AP_Airspeed: fixed example build 2014-08-13 21:46:09 +10:00
Andrew Tridgell a4cd9c4bd7 AP_Airspeed: added HIL support 2014-08-10 18:16:53 +10:00
Andrew Tridgell c1646fec73 AP_Airspeed: fixed example build 2014-07-25 17:54:11 +10:00
Andrew Tridgell 0f7e78e418 Airspeed: fixed example to setup pin 2014-07-25 17:15:00 +10:00
Randy Mackay 4cf7f01694 AP_Airspeed: init members to reduce compiler warnings 2014-07-16 14:40:50 +09:00
Randy Mackay 4c76c77239 AP_Airspeed: use 'no break' to resolve compiler warning re switch 2014-07-16 14:40:49 +09:00
Andrew Tridgell 52c53e55f8 AP_Airspeed: use board subtypes 2014-07-14 09:44:35 +10:00
Andrew Tridgell 6b87c9fdf7 AP_Airspeed: avoid some float conversion warnings 2014-07-08 20:26:44 +10:00
LukeMike 8f552d5758 VRBRAIN: Changed the management of VirtualRobotix's boards. 2014-06-19 11:27:38 +02:00
Kevin Hester d09e871319 AP_Airspeed: fixup line endings 2014-04-15 15:56:26 +09:00
Emile Castelnuovo e8b9e9d53c AP_Airspeed: added #defines for VRBRAIN board 2014-04-08 16:19:20 +10:00
Andrew Tridgell b8e4e35a0d AP_Airspeed: use pythagorous3() 2014-04-01 22:15:12 +11:00
Andrew Tridgell 9ab1a79b5a AP_Airspeed: changed sqrt() to sqrtf() 2014-04-01 22:09:21 +11:00
Andrew Tridgell dbd8f4b735 AP_Airspeed: fixed example build 2014-03-19 12:14:03 +09:00
Andrew Tridgell ad4db4de6c AP_Airspeed: added setHIL() method
useful for log playback
2014-02-18 09:25:08 +11:00
Randy Mackay c18b3f6094 AP_Airspeed: fix example sketch 2014-02-15 06:09:08 +11:00