Commit Graph

2195 Commits

Author SHA1 Message Date
Andrew Tridgell
3ea05759d1 travis: setup BUILDROOT to try to make builds faster 2016-01-19 12:28:04 +11:00
Andrew Tridgell
1416780976 scripts: copy px4-v4 binaries to autobuild published directories
this allows users to use pre-built binaries for pixracer
2016-01-19 11:18:51 +11:00
Andrew Tridgell
d19c722963 autotest: fixed hex LOG_BITMASK for quadplane 2016-01-19 11:05:57 +11:00
Lucas De Marchi
d663a748f2 waf: fix blddestdir
The destination directory for binaries should be
<build_dir>/<board>/bin/ and not
<build_dir>/<board>/<where-wscript-file-is>/bin

The same reasoning can be applied for others: tools, examples, etc
should follow the same rule.

Before this patch, compiling for example ArduPlane for navio we would
have:

    [339/339] Linking build/navio/ArduPlane/bin/ArduPlane

And now we have:

    [339/339] Linking build/navio/bin/ArduPlane
2016-01-18 16:56:08 -02:00
Lucas De Marchi
eb6c89d09c waf: use os.path.join() for joining paths
Use platform-neutral way in python to join path components to improve
readability. Both will work when passing down to waf's Node object, even
on Windows.
2016-01-18 16:56:08 -02:00
Andrew Tridgell
df64a63243 scripts: use BUILDROOT in build_all.sh and build_binaries.sh
better ccache performance

fixup
2016-01-16 16:07:42 +11:00
Gustavo Jose de Sousa
60abd4ff2f waf: don't differentiate taskgen names from targets for programs
waf's terminology might be a bit confusing regarding the word 'target'. As an
attribute for a task generator, it means the paths of the files supposed to be
built. As a command line option (--target), it means the list of names of the
task generators to be used in the build.

Before this commit, only vehicles programs had their task generators' target
parameter value different from the name parameter. Now, there's no distinction
between those two parameters for the case of programs.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
2448ea1611 waf: ardupilotwaf: add function build_shortcut
That enable the easy creation of custom build commands with the purpose of
creating "shortcuts" for execution from command line.

For example, consider the following code fragment from a wscript:
```
copter = ardupilotwaf.build_shortcut(targets='ArduCopter')
```

With that, one can just issue `waf copter` instead of
`waf --target ArduCopter`.

The parameter target is made optional because more parameters might be added to
this function in the future.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
0b8eff79af waf: remove extension from programs' names
Each platform has its own build directory, no extension is necessary.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
ad0f2080c6 waf: reorganize destination of binaries in Tools
It makes more sense for Hello to be an example and for CPUInfo and Replay to be
placed inside a `build/<board>/tools/` directory.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
f4a6d13cef waf: make benchmarks and tests be placed in common directories
Benchmarks now go to `build/<board>/benchmarks/` and tests to
`build/<board>/tests/`. That's done by using ardupilotwaf.program() and passing
blddestdir and program_name.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
59562ad693 waf: add option program_name to ardupilotwaf.program()
That allows one to set explictly the program name instead of getting it from
the current directory.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
2ad91dc1bc waf: add option use_legacy_defines to ardupilotwaf.program()
This is to allow to use ardupilotwaf.program() for programs that don't need the
legacy defines.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
c933b94f4d waf: add shortcut function for examples build
The function example() calls program() passing blddestdir as 'examples'.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
e549d0a3eb waf: use blddestdir to define task generator name
The only exception is for binaries that go in 'bin', like vehicles.
That way, partial builds follow the rule:
 - If building a vehicle or some helper that goes into 'bin', just use the
   binary name as the argument for --target. Example: `waf --target
   ArduCopter`.
 - For other binaries, the name of the directory they are placed in must be
   used. Example: `waf --target tests/test_vectors`.
2016-01-15 16:46:41 -02:00
Gustavo Jose de Sousa
a55d803638 waf: make program() use blddestdir param
That param defines where the binary will be saved in the build directory,
namely `build/<board>/<blddestdir>`. The default is 'bin', for binaries that are
to be shipped for installation.
2016-01-15 16:46:40 -02:00
Andrew Tridgell
d65ace2e34 scripts: make build_examples.sh much faster 2016-01-15 19:09:21 +11:00
pkancir
85f0ef9265 waf : use LINKFLAGS for pthread
-pthread is the one supposed to be used because it defines pre-defined
macros as -lpthread doesn't, like was done in
2016-01-14 18:59:04 -02:00
Gustavo Jose de Sousa
ff02adf57e waf: mavgen: reorganize configure
The configure function was reorganized for:
 - removing variables that are not used
 - making it more general, i.e., not relying in ardupilotmega.xml, so that this
   tool can be used for generating other headers in the future
2016-01-15 07:28:49 +11:00
Gustavo Jose de Sousa
46449ee032 waf: mavgen: use output_dir instead of target
The option target for the waf task generator is meant for actual files that are
going to be build. Since our target files are dynamic, let's change the code to
use a new parameter output_dir instead.
2016-01-15 07:28:48 +11:00
Gustavo Jose de Sousa
ce294e841c waf: ardupilotwaf: make vehicle_stlib pass **kw to bld.stlib
That allows users to pass more parameters to bld.stlib.
2016-01-15 07:28:48 +11:00
Gustavo Jose de Sousa
5816dcba03 waf: mavgen: set system env during build instead of configure
By setting env.env during configure time makes changes be for the whole build
system scope and persistently, which may cause problems for other tasks and
tools.
2016-01-15 07:28:48 +11:00
Gustavo Jose de Sousa
e5c66de554 waf: mavgen: ensure order without bld.add_group()
This is a better approach, because there's no need of calling add_group() for
each time a mavgen task generator is created.
2016-01-15 07:28:48 +11:00
Gustavo Jose de Sousa
c9ca75e2cb waf: mavgen: set task signature for dynamic output
Since the output list for mavgen is dynamic, in the sense that we don't have
the information of what files will be generated by the task, that is not
captured by default by waf and post_run can't save the task signature for those
files. Although that doesn't cause build errors, the build time increase
significantly for when tasks that use the generate files are included (for
example, vehicles builds).

This patch search for the headers that were created by the task and set the
task signature for them. Using ant_glob isn't a very good solution, since there
may be stray file in the local build directory, but let's use that for now
until we find a better approach.
2016-01-15 07:28:48 +11:00
Gustavo Jose de Sousa
b3c1c2efd9 waf: mavgen: expand tabs to spaces
Although waf's coding style uses tabs instead of spaces, scripts created for
this repository have been using spaces from the beginning.
2016-01-15 07:28:48 +11:00
Siddharth Bharat Purohit
11b82474de waf: generate mavlink headers for waf build 2016-01-15 07:28:47 +11:00
Julien BERAUD
b8aef20ee8 Frame_Params: Fix bebop compass orient
Without COMPASS_EXTERNAL set to 1, COMPASS_ORIENT wasn't taken
into account, leading to bad data
2016-01-13 19:17:27 -02:00
khancyr
360d9fafb6 waf: force linking of phtread with gbenchmark
There is an issue with gbenchmark and waf on Ubuntu (15.04 and 15.10, ). Waf doesn't link pthread to gbenchmark and linking failed : 

````
[1652/1652] Linking build/linux/libraries/AP_Math/benchmarks/benchmark_matrix.linux
/home/khancyr/Workspace/APM/ardupilot/build/linux/gbenchmark/lib/libbenchmark.a(benchmark.cc.o): dans la fonction « benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*) »:
benchmark.cc:(.text+0x2e21): référence indéfinie vers « pthread_create »
/usr/bin/ld generated: référence indéfinie vers « pthread_create »
collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/khancyr/Workspace/APM/ardupilot/build/linux'
Build failed
 -> task in 'benchmark_matrix.linux' failed (exit status 1): 
    {task 139784788162576: cxxprogram benchmark_matrix.cpp.1.o -> benchmark_matrix.linux}
['/usr/lib/ccache/g++', '-Wl,--gc-sections', 'libraries/AP_Math/benchmarks/benchmark_matrix.cpp.1.o', '-o', '/home/khancyr/Workspace/APM/ardupilot/build/linux/libraries/AP_Math/benchmarks/benchmark_matrix.linux', '-Wl,-Bstatic', '-L.', '-lap', '-Wl,-Bdynamic', '-L/home/khancyr/Workspace/APM/ardupilot/build/linux/gbenchmark/lib', '-lm', '-lpthread', '-lrt', '-lbenchmark']
`````

Adding 'pthread' to env.LIB_GBENCHMARK solve the issue

see https://github.com/diydrones/ardupilot/pull/3460 and https://github.com/diydrones/ardupilot/issues/3461
2016-01-12 18:05:46 -02:00
Linus
81fc4ec838 SITL: add NFSC flying club location 2016-01-12 20:05:41 +09:00
Gustavo Jose de Sousa
d5e7b321f6 waf: add most linux boards 2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
e21d41afe3 waf: enable fully static linking
Some boards (e.g. bebop) require fully statically linked binaries.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
c90b0e8659 waf: add static_linking tool
Some platforms (e.g. bebop) might need to create fully statically linked
binaries. This serves to force a program to be statically linked. It has only
been tested on GNU compilers, other compilers may have unexpected behavior.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
41e2a8cf1e waf: gbenchmark: disable cross-compilation
That's a temporary solution to allow cross compilation for the common binaries.
We can enable cross compilation of benchmark later.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
e7312a1f81 waf: add toolchain tool for cross-compiling 2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
82a33399ef waf: gbenchmark: call _configure_cmake() in waf configuration
The cmake checks for gbenchmark need to run some code. Calling
_configure_cmake() only during build can potentially fail build. That would
happen in some cross-compilations for example.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
a31816c039 waf: gbenchmark: move cmake configuration to a separate function 2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
7e8d25a56a waf: gbenchmark: use dict for cmake variables
That makes it easy to add new variables for the build system generation
command.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa
7d94095497 travis: unset CXX and CC at the beginning
Those environment variables are set by default by Travis. That fails cross
compilation with waf. There is a GitHub issue open related to that behavior at
https://github.com/travis-ci/travis-ci/issues/4682 .  This change can be
reverted if eventually that is fixed.
2016-01-11 16:31:59 -02:00
Peter Barker
f9f6cbaf9e SITL: use (larger!) font6 as default xterm font 2016-01-11 11:42:07 +11:00
Andrew Tridgell
6e418c2cf5 autotest: always sleep for 3 seconds on starting SITL 2016-01-11 09:31:13 +11:00
Andrew Tridgell
decb6dbab0 autotest: added option of autotest with gdb 2016-01-10 21:26:50 +11:00
Andrew Tridgell
9bb251a3fa autotest: disable DF log for QuadPlane test
it is just too big to be useful
2016-01-10 17:43:02 +11:00
Andrew Tridgell
6cf1fd762b autotest: don't show line noise in log download 2016-01-10 17:43:01 +11:00
Andrew Tridgell
bd111bd90b autotest: lower log bitmask for QuadPlane
reduce log size
2016-01-10 17:43:01 +11:00
Gustavo Jose de Sousa
d6b4e98a88 waf: remove already fixed TODOs
The TODOs removed with this patch were already fixed. Below is the explanation
for each.

 - TODO: add support for unit tests.
    - Supported already added.

 - TODO: Check if we should simply use the signed 'waf' "binary" (after
   verifying it) instead of generating it ourselves from the sources.
    - We're using a submodule for waf.

 - TODO: evaluate if we need shortcut commands for the common targets
   (vehicles). currently using waf --targets=NAME the target name must contain
   the board extension so make it less convenient, maybe hook to support
   automatic filling this extension?
    - There's no need of adding the extension anymore.

 - TODO: Once HAL patches get in, need to filter out the HAL based on the
   bld.env.BOARD.
    - The board-specific HAL library folders is indicated in
      bld.env.AP_LIBRARIES.
2016-01-09 14:08:07 -02:00
Andrew Tridgell
2c617cf8f0 scripts: stop building flymaple for plane
it no longer fits in flash
2016-01-09 17:03:41 +11:00
Andrew Tridgell
62b6057249 autotest: switch QuadPlane mission to full OBC2016 mission in Dalby 2016-01-09 16:50:17 +11:00
Andrew Tridgell
eec1b95f69 autotest: added quadplane test 2016-01-09 16:27:03 +11:00
Andrew Tridgell
9e43d5a4bb autotest: added defaults_file option to start_SIL() 2016-01-09 16:26:51 +11:00
Andrew Tridgell
7667ad3af0 autotest: don't see dynamic vars in defaults file 2016-01-09 07:38:55 +11:00
Andrew Tridgell
626b468930 autotest: added quadplane parameter file 2016-01-09 07:38:54 +11:00
Jonathan Challinger
f299fa7b3d CodeStyle: xmlpretty.py considers nodes with only text children to be one-liners 2016-01-07 17:39:09 +11:00
Jonathan Challinger
3e4b931d18 CodeStyle: update xmlpretty.py 2016-01-07 17:39:09 +11:00
Andrew Tridgell
67c3cf3d9b autotest: fixed incorrect default parms for plane 2016-01-07 13:48:59 +11:00
Andrew Tridgell
e7d7ab5ef6 autotest: no need to forceload parms now 2016-01-07 09:42:22 +11:00
Andrew Tridgell
0d26e3a445 autotest: automatically use sensible defaults for each vehicle type
this make first time use of SITL simpler
2016-01-07 09:10:20 +11:00
Gustavo Jose de Sousa
f338b917d0 waf: gbenchmark: get build node from variant
If there's no variant configuration, then cfg.variant will be '', which will
make bldnode be cfg.bldnode. Thus, this patch prepare gbenchmark build for
variant builds and doesn't break the current build.
2016-01-05 10:21:42 -02:00
Gustavo Jose de Sousa
f577c1702c waf: gbenchmark: catch WafError instead of Exception
Also, change the output.
2016-01-05 10:21:42 -02:00
Peter Barker
d72a833ad4 sim_vehicle.sh: remove unused -e option and unused variables
Closes #3336
2016-01-05 15:23:37 +11:00
Peter Barker
2c78b4f537 SITL: encourage bash to create a subshell when spawning ardupilot
This issue is evident in Vagrant if you don't forward X.

_fdm_input_step determined there was no parent and killed ArduPilot.

Closed #3249
2016-01-04 16:02:48 +11:00
Andrew Tridgell
eb73a2b0c9 autotest: fixed fg_quad_view for new FlightGear versions 2016-01-04 14:31:21 +11:00
Andrew Tridgell
568b1da797 autotest: added VTOL mission at KSFO airport 2016-01-04 10:24:27 +11:00
Andrew Tridgell
881ada9694 autotest: added windows flightgear view scripts 2016-01-04 10:24:17 +11:00
Andrew Tridgell
55e8e0742a autotest: fixed fg_plane_view.sh 2016-01-04 07:58:54 +11:00
Andrew Tridgell
9672b525f5 autotest: prevent duplication locations 2016-01-04 07:58:52 +11:00
Jonathan Challinger
ee18a1c5ed Tools: add xmlpretty.py 2016-01-02 08:42:33 +11:00
Andrew Tridgell
2f4933ec41 autotest: added two new locations 2016-01-01 17:03:43 +11:00
Andrew Tridgell
8932c21155 autotest: added quadplane model 2016-01-01 14:35:15 +11:00
Lucas De Marchi
09ebbac7ab waf: fix unsorted library
The list of libraries is maintained sorted to ease maintenance, avoid
repeating libraries, etc.
2015-12-30 10:42:20 -02:00
bugobliterator
57d2594bd7 Tools: add AP_AccelCal lib to waf library list 2015-12-29 10:46:35 -08:00
bugobliterator
065c67af57 Replay: fix replay 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
26ced77ebc Replay: fixes for AP_Scheduler change 2015-12-27 14:57:28 +09:00
Don Gagne
07c0c6d519 autotest: Validate Range meta data for correctness 2015-12-27 16:10:43 +11:00
Lucas De Marchi
e9f4d4f1ed waf: use better and simpler syntax to find program
We can pass a list of possible binaries to find_program. This gives us a
better output while configuring:

	Checking for program 'ninja, ninja-build' : /usr/bin/ninja-build

instead of:

	Checking for program 'ninja'             : not found
	Checking for program 'ninja-build'       : /usr/bin/ninja-build
2015-12-23 10:20:17 -02:00
Julien BERAUD
e22fe34259 Params: add arming check for bebop
Taken from bebop 2
2015-12-22 16:50:27 -02:00
Jonathan Challinger
07d87d8877 Replay: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Julien BERAUD
514b60cf5e Tools: add bebop build to travis 2015-12-15 18:59:03 +09:00
Randy Mackay
4f612f5d69 Frame_params: Bebop2 parameters
Rate PIDs are taken from original bebop which are slightly too high
2015-12-14 11:51:34 +09:00
Randy Mackay
8be0f9371f Frame_params: update recommended Bebop parameters 2015-12-14 11:49:00 +09:00
Gustavo Jose de Sousa
c4c9ce6a2a waf: ardupilotwaf: use name without board extention
If the attribute name is passed, then it is the one used to process the option
--target[s] of waf build. The board name should be used only in configuration
time. The build targets should be board/platform agnostic.

Now, instead of using `waf --target ArduCopter.sitl`, we use `waf --target
ArduCopter` and the binary continues named as "ArduCopter.sitl".
2015-12-10 10:40:37 +09:00
Gustavo Jose de Sousa
9b7f365e3a travis: fix waf calls
The path to waf became wrong after the decision of using waf as a submodule.
2015-12-08 11:14:04 +11:00
Gustavo Jose de Sousa
1e119c2182 waf: remove AP_ADC_AnalogSource from common libraries
That library was removed in a recent pull request. That PR was raised before
waf build system was integrated in the tree, that's why the fix just now.
2015-12-07 15:42:02 +09:00
Lucas De Marchi
8f9fa568b4 Tools: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:45 +11:00
Peter Barker
45d80080c3 Replay: use IMT in preference to IMU 2015-12-03 13:23:19 +11:00
Caio Marcelo de Oliveira Filho
6856950bd3 waf: use ConfigSet for board environments
Instead of a dictionary of dictionaries, have a dictionary of
ConfigSets. Using ConfigSet have two benefits: (1) allow easily copying
values from other, (2) have syntax for specifying the keys directly as
attributes.

With this change now it's easier to specify minlure without
repetition. New boards can override a value, append or prepend depending
on the need.

DEFINES attribute is treated as a dictionary instead of a list, so
that's easier to override values (at expense of ordering). When reading
the board environment, the code converts back to a list.

The board configuration is now stored in a separate file, there's also a
function to get the boards names.
2015-12-03 07:54:32 +11:00
Gustavo Jose de Sousa
8456cb4532 travis: support waf build
Currently, an associative array variable waf_supported_boards is used to
trigger waf build only the currently supported boards. After the transition to
the new build system is done, that variable can be removed.

We're just building for now - there is a current issue related to the rotation
for solo, and it turns out that the first unit test added as an example is for
vector rotations. After that is solved we can use waf check, so that unit tests
are run as well.
2015-12-03 07:54:32 +11:00
Gustavo Jose de Sousa
2828f66a6a waf: enable writing and building benchmarks 2015-12-03 07:54:31 +11:00
Gustavo Jose de Sousa
119948f263 waf: add gbenchmark Waf tool 2015-12-03 07:54:31 +11:00
Gustavo Jose de Sousa
6b4a6f5389 waf: use gtest for tests
It was implemented in such a way that gtest is required only if the user wants
to build and run tests. Initially we're considering all tests should be gtests.
We can change that assumption in the future if necessary.
2015-12-03 07:54:31 +11:00
Gustavo Jose de Sousa
8556b5dfb8 waf: add support to run (unit) tests
We're currently using the tests standard error for reporting tests. We can add
TAP later to integrate with other tools.

Additionally, this patch simplifies the exclude patterns passed to
collect_dirs_to_recurse.
2015-12-03 07:54:31 +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
proficnc
efbe350182 Tools: firmware.diydrones gets reference to companion computers 2015-12-01 20:04:52 +09:00
Michael du Breuil
f19be28e89 autotest: allow delaying the mavproxy instance in SITL
This useful when using X forwarding, as mavproxy can start to quickly, and then break the sim enviorment. If the argument isn't used there is no change in behaviour
2015-12-01 15:01:24 +11:00
mirkix
ef56d952cd Linux_HAL_Essentials: Add HC-SR04 README.md 2015-12-01 07:04:10 +11:00
mirkix
fe442d35df Linux_HAL_Essentials: Add AioPRU README.md 2015-12-01 07:03:28 +11:00
Hamish Willee
7bbe73b233 Tools: fix up URL in readme to SITL via Vagrant doc 2015-11-30 09:55:07 +09:00
Andrew Tridgell
dfa107c7bb autotest: added Dalby OBC2016 mission and geofence 2015-11-30 07:46:40 +11:00
Andrew Tridgell
a6ed3e5e80 autotest: added Dalby location
location of OBC2016
2015-11-30 07:46:18 +11:00
Andrew Tridgell
6fdc6074d6 autotest: fixed "Reached command" string 2015-11-29 21:46:31 +11:00
Andrew Tridgell
ffa316c1f3 autotest: fixed copter for new strings for arm/disarm 2015-11-29 18:39:32 +11:00
Andrew Tridgell
672fc86d44 Travis: added px4-v4 to the travis build 2015-11-27 19:23:29 +11:00
Andrew Tridgell
084b607862 autotest: updated string for "Flight plan received" 2015-11-26 12:52:19 +11:00
Lucas De Marchi
17d9da4036 travis: use container infrastructure
In order to use the container infrastructure we can't use sudo to
install packages. Now Travis has a way to install packages by specifying
them in the .travis.yml. This greatly simplifies how we install the
packages and there's no need for a separate script anymore.

This also removes several outdated packages that aren't needed anymore.
2015-11-26 07:56:52 +11:00
Andrew Tridgell
fc7cdc1266 autotest: support a wider range of heli backends 2015-11-22 17:30:28 +11:00
Caio Marcelo de Oliveira Filho
071d8e541e Replay: use millis/micros/panic functions 2015-11-20 12:26:55 +09:00
Caio Marcelo de Oliveira Filho
ee7e3e34c0 Tools: CPUInfo use millis/micros/panic functions 2015-11-20 12:26:48 +09:00
Andrew Tridgell
4192c3d0ad autotest: calibrate 2nd accel in SITL for rover 2015-11-17 08:56:48 +11:00
Andrew Tridgell
8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Andrew Tridgell
d43ef07f98 autotest: switched examples build to navio
apm2 no longer supported. Navio provides good coverage of the code for
example builds
2015-11-16 07:57:57 +11:00
Robert Lefebvre
4f7246c432 SITL: Helicopter parameter updates 2015-11-12 19:37:38 +09:00
Grant Morphett
5c499484a8 Added a default astyle options file and a linux script to run it. 2015-11-11 13:53:28 +11:00
Grant Morphett
e1b608d56d autotest: added arming to the Rover autotesting. 2015-11-11 13:39:39 +11:00
Andrew Tridgell
6bad33c922 scripts: use px4-clean for all binaries targets 2015-11-05 16:38:48 +11:00
Andrew Tridgell
ad9d50a457 autotest: changed -A to be used for arbitrary command line options 2015-11-04 14:24:01 +11:00
Gustavo Jose de Sousa
fe8d471490 Tools: RCInput_UART PIC firmware: keep status led on
Keep status led on while we are continuously sending packets to serial. That
shows the user we are receiving input properly.
2015-11-04 13:55:10 +11:00
Gustavo Jose de Sousa
2c9472c634 Tools: RCInput_UART PIC firmware: blink status led when idle
Blink status led if there's no input in more than (2 * NUM_INPUT) ms. That's
useful to show the user that the program is working, but not receiving proper
input.
2015-11-04 13:55:10 +11:00
Gustavo Jose de Sousa
6a8420aa48 Tools: RCInput_UART PIC firmware: remove code out of place
That code for serial configuration was not really setting TXSTA register, since
the selected bank is 2. Looking at the datasheet, it seems that we were
actually messing with a register named VRCON (full name "VOLTAGE REFERENCE
CONTROL REGISTER").

This is probably a leftover from a copy/paste, since the same is done (in the
right place) previously.
2015-11-04 13:55:10 +11:00
Gustavo Jose de Sousa
2a7e4baa7d Tools: RCInput_UART PIC firmware: add informative comments 2015-11-04 13:55:10 +11:00
Fabio Mello
8110104361 Tools: add PIC assembly code for RCInput_UART
This patch adds the assembly source code for the PIC firmware responsible for
processing PWM input from the RC Receiver and pushing the values to the serial
output.
2015-11-04 13:55:10 +11:00
Lucas De Marchi
d16a924a15 scripts: don't install avr tools 2015-11-04 12:14:16 +11:00
Lucas De Marchi
5c29703732 build: remove tools to find arduino 2015-11-04 12:14:16 +11:00
Lucas De Marchi
5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09: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
Lucas De Marchi
ddc3988b4a Travis: add minlure target 2015-10-24 14:28:31 +11:00
Peter Barker
5da7d6eac2 Replay: set INS_GYRO_CAL to never to avoid losing samples 2015-10-23 12:37:44 +11:00
Caio Marcelo de Oliveira Filho
f27f8f2f5d Tools: include SITL only for SITL board
Include board-specific files only when the board is used. Since these
should be exceptional cases, let the includer handle the ifdef instead
of putting ifdefs in every platform-specific header.

In the future we should evaluate whether the HAL for the board should
instantiate this.
2015-10-22 13:36:14 -02:00
Caio Marcelo de Oliveira Filho
49a42dc985 SITL: use a SITL namespace 2015-10-22 11:04:42 -02:00
Peter Barker
e502f353c1 Replay: handle df format changes - IMT vs IMU 2015-10-22 16:28:11 +11:00
Caio Marcelo de Oliveira Filho
36ffef97c0 CPUInfo: remove unnecessary includes 2015-10-21 09:16:10 +11:00
Caio Marcelo de Oliveira Filho
01b11ba48f Hello: remove unnecessary includes 2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho
ef615a5da1 Replay: implement HAL::Callbacks
Also removes includes for each board since they are not necessary
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
Andrew Tridgell
3af4a7fee7 autotest: make CopterAVC use EKF2
this gives some testing of EKF2 in autotest
2015-10-20 21:00:59 +11:00
Andrew Tridgell
16bc7d8b2e Tools: fixed datestamp on compiler download 2015-10-20 15:54:44 +11:00
Andrew Tridgell
279a320f44 Tools: switch autobuild to 4.9 compiler 2015-10-20 15:28:13 +11:00
orlando3d
6d266d2063 Update 3DR_X8-M_RTF.param 2015-10-18 09:27:54 +09:00
orlando3d
7c0239e59c Update 3DR_X8+_RTF.param 2015-10-18 09:27:51 +09:00
orlando3d
11ae5a64d0 Update 3DR_Iris+.param 2015-10-18 09:27:49 +09:00
Peter Barker
e357be3d85 LogAnalyzer: adjust for change in vehicle definition MSG string
We changed from ArduCopter to APM:Copter, breaking parts of the LogAnalyzer

This change has LogAnalyzer canonicalise its output to Ardu{Plane,Rover,Copter}

Also account for change in MODE message - ThrCrs has gone away
2015-10-15 09:40:25 +09:00
Randy Mackay
b068f51c45 SITL: update copter_optflow params
Allow sonar to become healthy even if reported alt is zero
switch off EKF's use of GPS
2015-10-14 12:01:38 +09:00
Peter Barker
82d36520ad LogAnalyzer: fix for 64-bit ints
Also, sqrt must come from math
Also, d indicates a double (a Python float)
2015-10-14 08:50:38 +09:00
Peter Barker
f49aedb639 LogAnalyzer: turn times from strings to ints before doing maths 2015-10-13 19:39:02 +09:00
Grant Morphett
fd0a442c92 autotest: added a timeout check
There was 1 while loop in the arducopter.py autotest that didn't have
a timeout check and of course we tripped over it.
2015-10-12 14:20:52 +09:00
Philippe Hamelin
3af95cc3da scripts: add catkin_pkg and python-empy to Ubuntu prerequisites 2015-10-08 15:30:10 +09:00
Mirko Denecke
d93200f3b1 Linux_HAL_Essentials: Update README.md 2015-10-08 15:24:14 +09:00
Leonard Hall
041dd3c855 Frame: new Bebop default parameters 2015-10-08 12:21:14 +09:00
Randy Mackay
c4f1cf2a64 SITL: add Karuizawa to Locations 2015-10-05 21:00:11 +09:00
Andrew Tridgell
fd5d449210 autotest: enable EK2 for autotest 2015-09-29 11:01:43 +10:00
Lucas De Marchi
6cf1c5fdd6 Tools: add raspilot to travis builds 2015-09-24 15:31:32 +10:00
Andrew Tridgell
643178fbe3 Replay: handle EKF2 replay 2015-09-23 18:56:15 +10:00
Andrew Tridgell
b71678b901 Replay: fixed build with NavEKF2 2015-09-23 11:57:18 +10:00
Randy Mackay
803ca92f73 Replay: remove INS start style 2015-09-21 17:06:53 +09:00
Stephen Dade
a15d27194c Scripts: JSBSim now runs when user selects HIL mode in sim_vehicle.sh 2015-09-17 21:37:43 +10:00
Grant Morphett
f871f040fb scripts: Adding AT to autotest build 2015-09-16 09:24:29 +09:00
Grant Morphett
69a65a7234 autotest: Adding AntennaTracker to build and test results 2015-09-16 09:24:26 +09:00
Andrew Tridgell
9346596949 autotest: allow for multiple heli frame types 2015-09-14 12:46:03 +10:00
Leonard Hall
1f287da70b Tools: first draft Parrot Bebop parameters 2015-09-12 12:53:43 +09:00
Gustavo Jose de Sousa
18ec6aa7b4 Tools: gittools: add git-subsystems-split
A git extension for splitting HEAD commit into commits separated by subsystems.
2015-09-09 10:50:35 +10:00
Gustavo Jose de Sousa
fea8299ff3 Tools: gittools: add git-commit-subsystems
A git extension for committing multiple subsystems.
2015-09-09 10:50:35 +10:00
Gustavo Jose de Sousa
c2a940ddea Tools: gittools: add scripts that list subsystems
Those scripts print a list of subsystems (first level folders and libraries).
They are useful for other future tools.
2015-09-09 10:50:35 +10:00
Víctor Mayoral Vilches
5036be6771 Linux_HAL_Essentials: ERLEBOARD legacy support
This config referred to the legacy Erle-Board
https://erlerobotics.com/blog/product/erle-board/
The configuration is preserved to support the
existing boards.
2015-09-09 10:31:55 +10:00
Andrew Tridgell
da2ad49276 Replay: fix for changes to AP_RangeFinder API 2015-09-08 16:46:52 +10:00
Grant Morphett
00e6cd40e5 scripts: Support to build for frame specific tags
The driver for this is to separate the Copter and TradHeli builds so
Copter and TradHeli do not have to be released at the same time.  This
will also work for all frame times but it is anticipated only required
by Heli.
2015-09-08 09:05:43 +10:00
Andrew Tridgell
6c74782997 autotest: added QMAC to locations list
Queanbeyan Model Aircraft Club, where CASA OC tests are run in
Canberra
2015-09-07 08:07:17 +10:00
Peter Barker
43adcd39ab Replay: DataFlash needs a version string 2015-09-03 15:20:20 +10:00
Andrew Tridgell
ee91a41405 autotest: added H_RSC_MIN/MAX to heli parms 2015-09-01 16:34:20 +10:00
Andrew Tridgell
717c04d507 autotest: fly CopterAVC mission as a helicopter
this ensures heli gets basic testing
2015-09-01 16:34:20 +10:00
Randy Mackay
a21eed9695 AutoTest: reduce MOT_THST_EXPO to 0.5 2015-08-31 21:53:43 +09:00
Grant Morphett
ccfefac2fe build_all: Remove the all target as it just builds SITL. 2015-08-31 20:45:11 +09:00
Grant Morphett
2769487ac0 build_all: Need to remove APM2 from the default master build 2015-08-31 18:31:43 +10:00
Grant Morphett
c0a28c45f8 scripts: using the wrong variable for the board type 2015-08-28 12:00:07 +10:00
Andrew Tridgell
b03c6137a8 Travis: don't do APM2 build in travis any more
we no longer require APM2 compatibility for patches in master
2015-08-28 10:42:45 +10:00
Randy Mackay
53b65675b2 SITL: param change to for copter optflow testing 2015-08-27 20:57:35 +09:00
Andrew Tridgell
81d4864c10 autotest: added more autotest build logging 2015-08-27 12:03:28 +10:00
Andrew Tridgell
b966f7fc3e autotest: ensure we start on master branch 2015-08-27 12:03:14 +10:00
Grant Morphett
50b732d2af web-firmware: Added an icon and link for AntennaTracker 2015-08-27 09:23:57 +09:00
Andrew Tridgell
6caea9e07c autotest: fixed sim_vehicle.sh with no realpath 2015-08-24 10:47:41 +10:00
mirkix
6f77d3ae98 Linux_HAL_Essentials: Add PRU firmware files. Prevent user to install PRU compiler 2015-08-24 08:43:11 +10:00
Lucas De Marchi
a2d17b87c7 Tools: add realpath to ubuntu prerequisites
The realpath tool may be missing on a Ubuntu distro and we use it in
sim_vehicle.sh.  Make sure it's also installed as part of sitl packages.

On Archlinux it's part of the coreutils package which is part of the
base group. Therefore it's guaranteed to be available.

Fix #2730.
2015-08-23 11:14:53 +09:00
Andrew Tridgell
1cd5b9da9b scripts: use AVR specific branches for builds for APM1/APM2 2015-08-20 10:45:00 +10:00
Lucas De Marchi
1f90d43c57 Tools: allow script to fixup a single file
Instead of always trying to fix the entire tree, accept paths in the
command line so it only fixes that paths. This allows to easily rebase a
branch after the header changes, without touching the rest of the tree.
2015-08-18 17:12:52 +10:00
Andrew Tridgell
2e5d517691 autotest: added basic helicopter parameters 2015-08-13 18:58:14 +10:00
Fredrik Hedberg
e2027a8414 SITL: Add HELI_DUAL_FRAME and HELI_COMPOUND_FRAME. 2015-08-13 18:23:30 +10:00
Andrew Tridgell
730b5d228e autotest: cope with symlinks in vehicle path 2015-08-13 15:14:23 +10:00
Andrew Tridgell
596cac58d0 autotest: removed the need for run_cmd.sh 2015-08-13 14:56:33 +10:00
squilter
79efad339f Tools: add ccache setup to arch setup script 2015-08-12 14:29:51 -07:00
squilter
a112e08e42 Tools: add script to set up Arch Linux 2015-08-12 14:29:48 -07:00
Gustavo Jose de Sousa
ae9a314295 Tools: add script for standardize includes of libraries headers 2015-08-11 16:38:25 +10:00
Gustavo Jose de Sousa
84b5555a1a Tools: 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:41 +10:00
Andrew Tridgell
5cc7c456a7 autotest: fixed sense of test for autotest directory
fixes PR#2593
2015-07-23 14:36:18 +10:00
John Hsu
94bf440e8f autotest: added Gazebo frame type 2015-07-20 09:10:48 +10:00
John Hsu
c75a231846 autotest: added OSRF location 2015-07-20 09:10:48 +10:00
squilter
c5550329a3 Tools: fix ubuntu prereqs script to force python2 2015-07-18 13:48:29 +09:00
squilter
506970fbd3 Tools: Add Bebop prereqs to Ubuntu script 2015-07-14 18:10:56 +09:00
mirkix
1226cc7dae Tools/autotest: Add location Bremerhaven 2015-07-13 11:04:53 +09:00
Peter Barker
ec9be695fb LogAnalyzer: don't die if no arm/disarm eveents 2015-07-10 19:00:22 +10:00
Peter Barker
1dba943a10 LogAnalyzer: if no GPS, try GPS2 2015-07-10 19:00:22 +10:00
Peter Barker
ce558b2b98 LogAnalyzer: cope with TimeUS
See also: 177f61656f
2015-07-10 19:00:22 +10:00
Jason Martens
a08d57149e LogAnalyser: Add double support to DataflashLog.py
Doubles were added to dataflash in commit 3991e0c476.
2015-07-10 18:58:11 +10:00
Peter Barker
818bb3f88f Tools: correct array-out-of-bounds in PRU test 2015-07-10 18:56:20 +10:00
Peter Barker
dbbc5ed816 Replay: fix double-free in MsgHandler 2015-07-10 18:56:20 +10:00
Andrew Tridgell
338ae68537 autotest: allow run without $PATH setup 2015-07-09 14:06:03 +10:00
Andrew Tridgell
01eb27908f autotest: fixed typo 2015-07-09 11:59:24 +10:00
Andrew Tridgell
7f425a97a3 autotest: use current autotest directory if possible 2015-07-09 11:53:46 +10:00
Andrew Tridgell
f2106f39aa Replay: save CHEK messages when not being generated 2015-07-09 10:20:45 +10:00
Andrew Tridgell
2eb204d0ca Replay: added --downsample option 2015-07-07 15:55:41 +10:00
Andrew Tridgell
dd53f5a7a1 Replay: added --nottypes option 2015-07-07 15:14:05 +10:00
mirkix
38318c4b51 Linux_HAL_Essentials: Add support for HC-SR04 Range Finder 2015-07-07 08:00:32 +10:00
Lucas De Marchi
547dbb3906 Replay: use ARRAY_SIZE macro 2015-07-07 07:56:30 +10:00
Andrew Tridgell
dee1bf3da3 Replay: show smaller parameter changes 2015-07-07 07:56:17 +10:00
Andrew Tridgell
bdddfae57f Replay: don't write out duplicate FMT messages
this makes replay output the same as input for when input is a replay
log
2015-07-04 22:43:54 +10:00
Andrew Tridgell
93800fb3a1 Replay: automatically find message types, and improve rate detection 2015-07-04 15:14:14 +10:00
Andrew Tridgell
b20318aaeb Replay: remap msgids on pass-through to avoid conflicts
if msg IDs have changed since the log was produced they need to be
remapped
2015-07-03 09:32:05 +10:00
Andrew Tridgell
bd27fed241 Replay: fixed missing import 2015-07-02 17:14:42 +10:00
Andrew Tridgell
ef36d74a1c Replay: added generation of -checked logs 2015-07-02 17:05:09 +10:00
Andrew Tridgell
c74d39558c Replay: initial version of CheckLogs.py 2015-07-02 17:05:09 +10:00
Andrew Tridgell
4f9ccf727a Replay: cope with bad NSats field from old logs 2015-07-02 17:05:09 +10:00
Andrew Tridgell
a5abb7c698 Replay: use tabs in replay_results.txt 2015-07-02 14:28:44 +10:00
Andrew Tridgell
f79ae4b749 Replay: add to replay_results.txt when run with --check 2015-07-02 14:28:44 +10:00
Andrew Tridgell
b93101b1bf Replay: reduced verbosity 2015-07-01 21:11:46 +10:00
Andrew Tridgell
2c0d6c0406 Replay: fixed yaw error calculation 2015-07-01 20:44:08 +10:00
Andrew Tridgell
d07b93e661 Replay: fixed writing of CHEK messages 2015-07-01 20:44:08 +10:00
Peter Barker
8bbeedb158 Replay: flush dataflash log on floating point exception 2015-06-30 16:19:22 +10:00
Andrew Tridgell
34689cf949 autotest: cope with mavproxy logging msg changes 2015-06-30 14:06:17 +10:00
Andrew Tridgell
2291a8994e Replay: fixed build 2015-06-29 15:59:53 +10:00
Peter Barker
2266f118e9 Replay: DataFlash frontend/backend split 2015-06-26 16:02:50 +10:00
Andrew Tridgell
f2756ecb22 Replay: added checking of solution 2015-06-26 15:55:19 +10:00
Andrew Tridgell
9016a3d3db Replay: added --chek-generate option
adds CHEK messages based on current estimates
2015-06-26 15:55:18 +10:00
Andrew Tridgell
42023eb17a autotest: check for .gitmodules before ldir check
another attempt to get build_binaries going
2015-06-26 11:32:15 +10:00
Peter Barker
d4a34b3da1 SITL: abort sim_vehicle.sh if build fails a second time
Previously a build could fail and we would end up running the old code
2015-06-25 10:16:24 +10:00
Andrew Tridgell
48828a7834 autotest: more changes to cope with older builds without submodules 2015-06-24 09:36:21 +10:00
Andrew Tridgell
fd17a69cd1 autotest: skip binary builds without submodules
the build_binaries is trying to build for navio and pxf without
submodules
2015-06-23 21:43:44 +10:00
Andrew Tridgell
63895cbe75 autotest: build pxf and navio binaries for firmware.diydrones.com 2015-06-23 14:27:49 +10:00
Peter Barker
54efa3d727 Replay: split off a ReplayVehicle class
Like "Copter copter" and "Plane plane": "ReplayVehicle replayvehicle"
2015-06-23 09:49:13 +10:00
Andrew Tridgell
7e23912d17 autotest: added -b option for build target to sim_vehicle.sh 2015-06-19 16:39:45 +10:00
Grant Morphett
0645474b3b autotest: Fixed the LOG_BITMASK for Rover in SITL. 2015-06-18 17:54:19 +10:00
Andrew Tridgell
9e36e2c562 Replay: fixed handling of dual-GPS HDop field 2015-06-18 09:28:59 +10:00
Andy Piper
a8df968441 Fix vagrant build issues with submodules. 2015-06-18 08:47:32 +10:00
Andrew Tridgell
47834759e5 Replay: fixed build warnings 2015-06-17 12:46:55 +10:00
Andrew Tridgell
31f7525a61 Replay: added --no-imt flag 2015-06-17 12:46:55 +10:00
Lucas De Marchi
ac09a61238 Travis: split build by target instead of vehicle
This way we can group together the builds that are fast so we pay the
"setup price" just once.  Let the long PX4 build on its own VM because
it's the one that takes most of the time building NuttX.

By grouping the projects by target it's also easier to split the build
in more VMs if we want to speed up the build.
2015-06-17 09:26:04 +10:00
Lucas De Marchi
a435269839 Travis: make most targets run with -j2
As documented in Travis the VMs have 1.5 cores
(http://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-your-build-on-one-VM).
So let's make it only -j2.

The exception is PX4 build that runs without any -j setting since NuttX
fails to build if we do that.
2015-06-17 09:26:04 +10:00
Lucas De Marchi
985764fb1c Travis: build APMrover2 and AntennaTracker for apm2 2015-06-17 09:26:03 +10:00
Lucas De Marchi
5c5bdc2c7b Travis: use associative arrays
This makes the script be more declarative and easier to extend.
2015-06-17 09:26:03 +10:00
Lucas De Marchi
ae40aed2a2 Travis: split build using vehicle types
Travis build is timing out because it's taking too much time. Let's
split the build so 1) they can run concurrently and 2) we don't timeout.
We still lose some time due to multiple checkouts, but at least we don't
fail the build due to timeout.
2015-06-17 09:26:03 +10:00