Commit Graph

287 Commits

Author SHA1 Message Date
Lucas De Marchi 01b9316114 AP_HAL_AVR: remove examples
These were committed by mistake after AP_HAL_AVR was removed.
2016-05-23 21:49:45 -03:00
Andrew Tridgell 664d91802e HAL_AVR: update URL 2016-03-25 20:47:35 +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 3a3394ce36 HAL_AVR: fixed branch URL for AVR 2015-12-03 13:28:51 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi c495bdb299 Remove AP_HAL_AVR
Replace everything under AP_HAL_AVR with a README.md file pointing to
the correct branch for AVR support.
2015-11-04 12:14:11 +11:00
Lucas De Marchi 9eaf7c5660 AP_HAL: add format attribute to panic() 2015-10-24 14:26:36 +11:00
Lucas De Marchi ad61a93c14 AP_HAL: turn panic() into a variadic method
Change the declaration on all HAL implementations so panic() in future
may implement a printf-like interface.
2015-10-24 14:26:35 +11:00
Caio Marcelo de Oliveira Filho 19b4ca60c4 AP_HAL: provide AP_HAL_MAIN()
Move the macros to a single place and reduce the variations not based on
board, but based on

- The name of the entry-point function, specified by AP_MAIN;
- Whether it contains argc/argv arguments or not.

The goal here is that programs (vehicles and examples) don't need to
include all possible boards to define a main function. Further patches
will change the programs.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho e18884a328 AP_HAL_AVR: merge init() and run() 2015-10-21 09:16:08 +11:00
Caio Marcelo de Oliveira Filho 3fe1d86c80 AP_HAL_AVR: implement HAL::run() for APM1 and APM2 2015-10-21 09:16:08 +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
Lucas De Marchi f1e53a9bdd AP_HAL_AVR: remove unused write method 2015-09-29 11:53:40 +09:00
Gustavo Jose de Sousa 93f5abb274 AP_HAL_AVR: SPI: adapt to the new signature of transaction()
A default behaviour was added here.
2015-09-01 20:26:05 +10:00
Lucas De Marchi 29740ccb8a AP_HAL_AVR: standardize inclusion of libaries headers
It was not only standardized, but actually fixed since ".." would not
move to the libraries/ directory (and hence the include location was
actually wrong).
2015-08-18 17:12:52 +10:00
Gustavo Jose de Sousa 12423814ef AP_HAL_AVR: 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
Julien BERAUD 7275e33e79 AP_HAL: add the possibility to have more than 1 i2c
Bebop drone has 3 i2c
2015-07-10 14:23:17 +10:00
Andrew Tridgell c44ab01be8 AP_HAL: use noreturn attribute on panic
should reduce coverity warnings
2015-06-08 21:09:08 +10:00
Max Basescu 32994a5b1e AP_HAL_AVR: Changed constrain_period to use RC_OUTPUT bounds instead of RC_INPUT
Done in order to get full range of motion for servo output
2015-06-05 21:03:03 +10:00
Andrew Tridgell 0cc31c2db5 AP_HAL_AVR: convert example from .pde to .cpp 2015-06-01 17:03:37 +10:00
Lucas De Marchi dcf992b558 AP_HAL_AVR: 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:53 +10:00
Lucas De Marchi 9ef870c08a AP_HAL_AVR: Do not compare delegate to NULL
Use the simpler "if (delegate_name)" since it allows simpler
implementation in the class, i.e. the bool operator rather than having
to compare to another object.
2015-05-26 13:46:48 +10:00
Andrew Tridgell df21c6c68d AP_HAL: support micros64() and millis64() on all platforms
this will allow for 64 bit timestamps in DF logs (Peter is working on
that)
2015-04-30 12:17:34 +10:00
Andrew Tridgell 84cda98bec HAL_AVR: fixed example build 2015-02-09 13:08:45 +11:00
Andrew Tridgell 5d6f883887 HAL_AVR: implement updated new_input() semantics 2015-02-09 10:39:07 +11:00
Andrew Tridgell 7fb114752c AP_HAL_AVR: accept a much shorted sync pulse width on RCInput
this should fix issues with OpenLRSng default settings
2015-02-08 21:47:26 +11:00
Randy Mackay 7c293f01d9 HAL_AVR: fix example sketch 2015-01-28 17:15:41 +09:00
Grant Morphett 236efad159 AP_HAL_AVR: Increased number of AVR input channels from 8 to 11 2015-01-22 14:48:15 +11:00
Andrew Tridgell b8e73a737a HAL_AVR: fixed warning 2014-10-22 18:26:45 +11:00
Andrew Tridgell 928024854e HAL_AVR: fixed example build 2014-08-13 22:11:53 +10:00
Andrew Tridgell 4bb72f8d85 HAL_AVR: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell d40d0f6aec AP_HAL: removed old storage type read/write functions
not needed any more
2014-08-13 18:46:44 +10:00
Andrew Tridgell 02dec5634f AP_HAL: fixed example builds 2014-07-25 17:52:01 +10:00
Andrew Tridgell 273bc230e6 HAL_AVR: renamed pins_arduino_mega.c to .cpp
this fixes a compiler hang on at least one Ubuntu platform. May be a
problem building empty C files?

It also makes our build more consistent
2014-07-14 09:44:36 +10:00
Andrew Tridgell 3015356671 HAL_AVR: fixes for HAL_GPIO_ define change 2014-06-02 10:42:35 +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 d36989f6a1 AP_HAL: fixed example build 2014-03-19 12:14:06 +09:00
Andrew Tridgell 6c74ca58c3 HAL_AVR: no uartE 2014-02-26 08:19:15 +11:00
Randy Mackay 42d9225fbe HAL_AVR: ArduCopterLibs to use AC_P library 2014-02-15 06:09:08 +11:00
Andrew Tridgell 1849db7074 AP_HAL: added board_voltage AnalogIn method
this makes it easier to get the board voltage from any library,
without having to allocate another analog channel object
2014-02-14 21:25:38 +11:00
Andrew Tridgell fc6ce42a28 HAL_AVR: fixed build 2014-01-17 15:00:20 +11:00
Andrew Tridgell 87cc95dd7f AP_HAL: removed unused enable_mask and disable_mask functions 2014-01-16 17:16:17 +11:00
Andrew Tridgell 461638780b HAL_AVR: fixed warning on memcheck build 2014-01-14 21:27:52 +11:00
Andrew Tridgell ea649e036b AP_HAL: added HAL_CPU_CLASS define for selecting algorithms
this will make it easier to select the appropiate level of algorithm
for a CPU
2013-12-31 10:28:37 +11:00
Andrew Tridgell 75cb04dd8b HAL_AVR: use memcheck for available_memory() 2013-12-28 14:51:15 +11:00
Andrew Tridgell 36e06a1709 HAL_AVR: moved memcheck into HAL_AVR 2013-12-28 14:50:42 +11:00
Randy Mackay f8e269cd04 OptFlow: correct SPI mode and baud rates 2013-12-01 23:20:02 +09:00