Commit Graph

2424 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa 91e7f02d9d Tools: sim_vehicle: add calibration frame
The module `sitl_calibration` is loaded for convenience.
2016-05-18 13:28:52 -03:00
Gustavo Jose de Sousa 41f5602fea Tools: sim_vehicle: add local mavproxy modules path to PYTHONPATH
That's helpful for users that don't have that in their PYTHONPATH environment
variable and want to load a local module.
2016-05-18 13:28:52 -03:00
Gustavo Jose de Sousa ede0360ee1 Tools: sim_vehicle: allow passing keywords to run_cmd_blocking
That is redirected to subprocess.Popen().
2016-05-18 13:28:52 -03:00
Lucas De Marchi 524b0870ff Tools: remove unused Linux scripts/sources 2016-05-18 11:51:45 -03:00
mblsktxy bc5fb10ddc Added name to GIT_Success.txt 2016-05-18 10:26:31 +09:00
Glody Guo cda21a3d78 Fix argument 'valgrind' issue about fly.CopterAVC test
Commit 8774f15 causes fly.CopterAVC test failure.
Here is the failure info below:
>>>> FAILED STEP: fly.CopterAVC at Tue May 17 13:21:56 2016 (fly_CopterAVC() got an unexpected keyword argument 'valgrind')
Traceback (most recent call last):
  File "./Tools/autotest/autotest.py", line 406, in run_tests
    if not run_step(step):
  File "./Tools/autotest/autotest.py", line 232, in run_step
    return arducopter.fly_CopterAVC(viewerip=opts.viewerip, map=opts.map, valgrind=opts.valgrind)
TypeError: fly_CopterAVC() got an unexpected keyword argument 'valgrind'
('check step: ', 'fly.CopterAVC')
FAILED 1 tests: ['fly.CopterAVC']

Here is the commit info below:
commit 8774f15b9a
Author: Peter Barker <pbarker@barker.dropbear.id.au>
Date:   Mon Apr 11 18:05:39 2016 +1000

    Tools: add valgrind option to autotest.py

:040000 040000 a111bc5b18 609503f3b1 M      Tools
2016-05-17 21:36:57 +10:00
Peter Barker 27e7c870ed Tools: remove absolute paths in run_in_terminal_window
Also add quotes to avoid ambiguous redirect issue
2016-05-16 19:39:37 +10:00
Andrew Tridgell 4116f80901 Replay: added --no-params option 2016-05-16 17:22:11 +10:00
Peter Barker 18e0131680 sim_vehicle.py: avoid requesting process name on zombie process
This method does on OSX - in a non-catchable way prior to Py3
2016-05-16 17:18:32 +10:00
Peter Barker 38010cf3f3 sim_vehicle.py: wrap jsbsim version fetch in a try 2016-05-16 11:58:53 +10:00
Ricardo de Almeida Gonzaga 1062aed91e Tools: Fix typos 2016-05-13 19:20:07 -03:00
Francisco Ferreira 1ae85be918 autotest: fix copter_mission
Conditional command was left when change_alt command was removed and is now useless. Also fix jump to do what it did before
2016-05-13 19:06:03 +09:00
Francisco Ferreira ae5fdc2fde autotest: if auto mission fails, land the copter 2016-05-13 19:06:00 +09:00
Francisco Ferreira c873524966 autotest: change wait_waypoint mode check
If we change mode while waiting for waypoints then we are no longer running the mission and should fail
2016-05-13 19:05:57 +09:00
khancyr 14e2fa5642 sim_vehicle.py : load Rover default params
related to https://github.com/ArduPilot/ardupilot/issues/4090
2016-05-13 08:53:53 +10:00
Peter Barker f33cdaa212 sim_vehicle.py: add --strace option 2016-05-13 08:43:08 +10:00
Gustavo Jose de Sousa 4529028c8a waf: ardupilotwaf: ap_get_all_libraries: ignore non-directory files
Each library in ardupilot is a folder with the source in. That avoids build
failures when there are files in libraries/. That fixes #4099 ("waf doesn't
seem to like TAGS files") and #4093 ("sim_vehicle.py /w waf /w eclipse project
broken on Cygwin").

That problem can be reproduced by just creating a file in libraries/ and trying
to build with waf.

There should be a better way to confirm a path is an ardupilot library. That
can be done later.
2016-05-12 13:47:44 -03:00
Lucas De Marchi b012d5bb7b sim_vehicle.py: fix error to find binary
When trying to execute sim_vehicle.py this is the current output:

Warning: Could not find '../Tools/autotest/../../ArduCopter/../build/sitl/bin/arducopter-quad',
	starting '/bin/bash' instead.  Please check your profile settings.

Fix the path to the binary and use absolute paths to ease the debug.
2016-05-12 00:34:02 -03:00
Lucas De Marchi ad8cedc452 sim_vehicle.py: remove unused AUTOTEST variable 2016-05-12 00:31:37 -03:00
Lucas De Marchi e772c70536 sim_vehicle.py: use helper function to execute blocking command 2016-05-12 00:31:07 -03:00
Lucas De Marchi 1ef9eb637f sim_vehicle.py: configure project only once 2016-05-11 23:44:24 -03:00
Lucas De Marchi 7a548e45f9 sim_vehicle.py: default to -j1 if running in compat mode 2016-05-11 23:34:49 -03:00
Pierre Kancir 03e565ee47 sim_vehicle.py : change default number of jobs
By default waf use the max num of proc available. So let it set jobs by
itself. On contrary, with make only use one job by default.
2016-05-11 22:55:30 -03:00
Francisco Ferreira efc3f5058b ci: simplify build script 2016-05-11 22:48:03 -03:00
khancyr bb648280ae sim_vehicle.py: correct APMrover2 typo 2016-05-11 09:43:06 +02:00
Peter Barker b7d1e047aa sim_vehicle.py: correct binary to use for --debug 2016-05-11 16:37:34 +10:00
Andrew Tridgell 45609bb568 autotest: don't use --sitl if using flightaxis
we want rc override if using flightaxis
2016-05-11 05:55:25 +10:00
Andrew Tridgell 401b8d4fa6 autotest: use channel 13 for firefly tilt 2016-05-11 05:55:25 +10:00
Andrew Tridgell cafc3f131e autotest: improved firefly default parameters 2016-05-11 05:55:24 +10:00
Andrew Tridgell 5b3e4fc47a autotest: adjust tricopter parms for default yaw servo 2016-05-11 05:55:24 +10:00
Andrew Tridgell 12e5b7881f autotest: use more default parms for quadplanes 2016-05-11 05:55:24 +10:00
Andrew Tridgell b3cb83731c autotest: added quadplane-tilttri model 2016-05-11 05:55:24 +10:00
Lucas De Marchi cb0ffc0e07 Replay: fix build error due to missing noreturn
Add noreturn attribute to field_not_found(). This function always call
abort() if the field was not found. The compiler may not know about it
and may think some variables are used uninitialized:

../../Tools/Replay/LR_MsgHandler.cpp: In member function ‘void LR_MsgHandler_GPA_Base::update_from_msg_gpa(uint8_t, uint8_t*)’:
../../Tools/Replay/LR_MsgHandler.cpp:212:24: error: ‘sacc’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     gps.setHIL_Accuracy(gps_offset, vdop*0.01f, hacc*0.01f, vacc*0.01f, sacc*0.01f, have_vertical_velocity, sample_ms);
                        ^

Instead of just initializing the variable (which is pointless in this case),
teach the compiler that this function never returns so require_field() works
properly.
2016-05-10 16:15:41 -03:00
Lucas De Marchi f04b954a1c build_binaries.sh: fix typo on rebase 2016-05-10 14:34:30 -03:00
Lucas De Marchi 06f5a3ac39 build_binaries.sh: replace tabs with spaces 2016-05-10 14:32:47 -03:00
abilbaotm 9814955eef Update build_binaries.sh 2016-05-10 14:31:36 -03:00
LanderU df84cde3e6 Added erlebrain2 in build_binaries.sh 2016-05-10 14:28:22 -03:00
dgrat 76362caee0 AP_Math: Replace wrap_* functions with template versions 2016-05-10 11:41:26 -03:00
Gustavo Jose de Sousa a136e42d39 Tools: sitl_calibration: fix mavlink_packet() for magcal
That controller shouldn't actuate when inactive.
2016-05-10 10:56:28 -03:00
Gustavo Jose de Sousa c77e763eca Tools: sitl_calibration: add sitl_magcal command 2016-05-10 16:16:38 +10:00
Gustavo Jose de Sousa fcc80de20a Tools: sitl_calibration: add sitl_accelcal command 2016-05-10 16:16:38 +10:00
Gustavo Jose de Sousa 363f241e9a Tools: sitl_calibration: add initial implementation
Add initial implementation to interface with SITL calibration model.
2016-05-10 16:16:38 +10:00
Andrew Tridgell 84d45cce40 Replay: fixed log rate detection 2016-05-10 15:40:48 +10:00
Andrew Tridgell fcd7611248 waf: ensure we don't build a library twice 2016-05-10 14:21:43 +10:00
Andrew Tridgell 2f656c187a waf: cope with -ve return from mavgen on segv 2016-05-10 13:41:48 +10:00
Andrew Tridgell 9653aae21f waf: fixed link of antennatracker on windows 2016-05-10 12:48:41 +10:00
Andrew Tridgell 5ef0c4d3fe waf: added AP_RPM to build 2016-05-10 12:20:44 +10:00
Andrew Tridgell 237b63284b waf: fixed typo 2016-05-10 12:17:44 +10:00
Lucas De Marchi e5a21cd459 waf: allow mavgen to segfault without failing
This is a hackish way to allow waf running on windows. In some
combinations of the tools the python interpreter seems to be crashing on
windows:

	Found 180 MAVLink message types in 2 XML files
	Generating C implementation in directory /tmp/ArduPlane.build/libraries/GCS_MAVLink/include/mavlink/v1.0/ardupilotmega
	Generating C implementation in directory /tmp/ArduPlane.build/libraries/GCS_MAVLink/include/mavlink/v1.0/common
	Copying fixed headers
	last line in mavgen.py
	Aborted (core dumped)

	michael@WIN-3NBOUTHN4TN /cygdrive/c/Users/michael/Desktop/DIYDrones/ardupilot/ArduPlane
	$ echo $?
	134

Here we check the return code to be greater than 128 since that means the
interpreter received a signal. In this case we clear the return code.
2016-05-10 12:17:10 +10:00
Andrew Tridgell 276f5dd3f1 Replay: use a larger LOG_FILE_BUFSIZE for Replay 2016-05-09 13:58:37 +10:00
Andrew Tridgell 248ce2e0e6 Replay: enable LOG_REPLAY in replay 2016-05-09 12:48:30 +10:00
Peter Barker 5d24f0de23 sim_vehicle: use waf --debug option to create debug builds 2016-05-09 08:59:59 +10:00
Lucas De Marchi b07acea6b6 Tools: get version exclusively from version.h 2016-05-07 22:55:48 -03:00
Gustavo Jose de Sousa ff46384258 waf: add --debug configuration option
That sets a variant <board>-debug.
2016-05-07 22:55:03 -03:00
Peter Barker 50330e22d4 sim_vehicle.py: set default_waf_target, clearer help
sim_vehicle.py: choose default waf_target based on specified vehicle

sim_vehicle.py: add --no-rebuild-on-failure option

sim_vehicle.py: make help clearer by adding option groups
2016-05-08 09:57:11 +10:00
Peter Barker 39c29820c4 sim_vehicle.py: avoid exception when frame information not found 2016-05-08 00:31:23 +10:00
Andrew Tridgell d1a2749317 waf: fixed build for AP_Tuning 2016-05-07 18:34:11 +10:00
Andrew Tridgell dbe9091d58 Replay: set last sample time for GPS 2016-05-07 18:27:23 +10:00
Andrew Tridgell 7abaa75653 Replay: added --logmatch option
match logging rate to input log
2016-05-07 18:27:22 +10:00
Andrew Tridgell c2aeb058cd Replay: mark GPA as generated 2016-05-07 18:27:22 +10:00
Andrew Tridgell 468f020b51 Replay: cope with GPS ground couse in degrees 2016-05-07 18:27:21 +10:00
Andrew Tridgell 2bcd3c48f0 Replay: use baro last update time if available 2016-05-07 18:27:21 +10:00
Andrew Tridgell 0571f86c17 Replay: handle float ground speed in GPS 2016-05-07 18:27:21 +10:00
Andrew Tridgell d116071054 Replay: use new setHIL API for baro 2016-05-07 18:27:20 +10:00
Andrew Tridgell 827551c99f Replay: added replay of GPS speed accuracy 2016-05-07 18:27:20 +10:00
Andrew Tridgell 772acf056b Replay: fixed overriding of parameters
bug was later PARM messages in log
2016-05-07 18:27:19 +10:00
Andrew Tridgell 295c65277d Replay: restore exact timestamp in HIL 2016-05-07 18:27:19 +10:00
Andrew Tridgell 315d3854db Replay: improved log rate detection 2016-05-07 18:27:19 +10:00
Andrew Tridgell b31e896ef3 Replay: closer to goal of bit-accurate replay 2016-05-07 18:27:18 +10:00
Andrew Tridgell 640a04a1ee Replay: fixed to handle IMT copter logs 2016-05-07 18:27:17 +10:00
Charles Pippin a14bdf949a Adding Lee Field to locations.txt 2016-05-06 13:50:58 -04:00
Lucas De Marchi ddbce5b130 waf: change mavgen generation to blue
Like other generators in px4.
2016-05-06 13:11:28 -03:00
Lucas De Marchi 9e3ec3a16d waf: define git versions in a generated ap_version.h header 2016-05-06 13:11:28 -03:00
Peter Barker 75c965f512 sim_vehicle.py: interface improvements based on feedback; waf support
sim_vehicle.py: improve output of executed commands

Emit something that could be copy-and-pasted into a shell

sim_vehicle.py: allow specification of multiple gdb breakpoints

sim_vehicle.py: understand some specific mavproxy options

sim_vehicle.py: validate vehicle, throw warning if it looks suspect

sim_vehicle.py: avoid use of psutil (cygwin not supported)

sim_vehicle.py: rename build_target to make_target

sim_vehicle.py: pass vehicle binary to start_vehicle

sim_vehicle.py: waf build system support

sim_vehicle.py: use waf by default
2016-05-05 10:59:08 +10:00
Lucas De Marchi c82f28f35a Tools: CPUInfo: fix warnings on printf
../../Tools/CPUInfo/CPUInfo.cpp:21:54: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
  hal.console->printf("char      : %d\n", sizeof(char));
                                                      ^
And so on.

Ideally for sizeof() which returns size_t we would use %zu, but that's not
implemented by our version of printf. So use %lu which should be ok in all of
our boards.
2016-05-04 08:58:37 -03:00
Lucas De Marchi 2c029ae1f9 waf: fix undef warnings in examples
Fix warnings like this:

<command-line>:0:21: warning: "APM_BUILD_DataFlash_test" is not defined [-Wundef]
/home/lucas/p/dronecode/ardupilot/libraries/AP_Vehicle/AP_Vehicle_Type.h:36:41: note: in expansion of macro ‘APM_BUILD_DIRECTORY’
 #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_DIRECTORY)
                                         ^
These happen because we are trying to set APM_BUILD_DIRECTORY to undefined
values. We should rather default to the APM_BUILD_DIRECTORY ==
APM_BUILD_UNKNOWN
2016-05-04 08:58:37 -03:00
Julien Beraud 3897e03d39 Frame_params: fix Bebop param names
Broken by AP_Motors refactoring
2016-05-04 10:09:31 +09:00
Lucas De Marchi 5b88ae90fd waf: be compatible with git < 1.8.5
The -C option was added to git in version 1.8.5 which is not available
in Ubuntu 12.04.
2016-05-03 18:02:32 -03:00
Julien Beraud 5418f71aae waf: add libiio support for bebop
check for the presence of libiio to enable the compilation of
the bebop rangefinder that needs it.
If the build remains static, there needs to be a rootfs that contains
the libiio.a file because it is not included in the debian package.
A solution can be to compile libiio and copy libiio.a in /usr/lib[/arch]
2016-05-03 16:43:39 -03:00
Michael du Breuil ebe552bdc5 autotest: remove condition_change_alt
no vehicle supports the command anymore, so it should not be in the copter test mission
2016-04-30 13:54:21 +09:00
Randy Mackay 3f31a4a1ff SITL: add copter terrain missions 2016-04-30 10:33:01 +09:00
Staroselskii Georgii 2b77bc02bf build: add navio 2 target to build server 2016-04-29 16:48:36 -03:00
Staroselskii Georgii 1605e34f7d Tools: added Navio 2 build to CI
This way Navio 2 will be built on Travis.
2016-04-29 16:48:36 -03:00
Peter Barker 53940e11c4 sim_vehicle.sh: tracker needs to be armed 2016-04-29 13:41:08 -03:00
Peter Barker f4d8ddaf48 sim_vehicle.sh: remove unused variable sets 2016-04-29 13:41:08 -03:00
Peter Barker 47436b9680 sim_vehicle.sh: remove unused SIMIN variable 2016-04-29 13:41:08 -03:00
Peter Barker 4ee1e3d804 sim_vehicle.sh: remove useless variable set
Also correct initialisation of a variable
2016-04-29 13:41:08 -03:00
Peter Barker 47e037cada sim_vehicle.sh: set options properly for heli-dual and heli-compound 2016-04-29 13:41:08 -03:00
mirkix 106f26d204 Linux_HAL_Essentials: Add missing make command in README.md for aiopru 2016-04-29 11:59:21 -03:00
Peter Barker a9940a8ca5 sim_vehicle.py: create from sim_vehicle.sh 2016-04-29 10:29:43 +10:00
Andrew Tridgell e3f5d4552e autotest: added params for quadplane tricopter 2016-04-28 22:40:25 +10:00
Andrew Tridgell bec8bf8880 autotest: support multicopter frame variants 2016-04-28 10:05:18 +10:00
Peter Barker 08e5959923 autotest: correct path to mavtogpx 2016-04-27 08:20:51 +10:00
Andrew Tridgell 909a46a33b Replay: pass delta angle time if available 2016-04-26 15:50:59 +10:00
Andrew Tridgell f367180f47 Replay: support 2 IMU EKF2 2016-04-26 14:39:44 +10:00
Peter Barker c869516a0b Replay: abort if field type not known; understand double 2016-04-26 14:20:11 +10:00
Luis Vale Gonçalves 69c6cfe5b9 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:47 -07:00
Luis Vale Gonçalves a3698e7da7 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:46 -07:00
Luis Vale Gonçalves f5466992e9 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:44 -07:00
Andrew Tridgell 05e9f360b2 autotest: fixed quadplane test with new valgrind option 2016-04-22 10:50:51 +10:00
Andrew Tridgell da548e934a autotest: control tilt with chan7 in in firefly 2016-04-22 10:29:32 +10:00
Andrew Tridgell 199d4fd6c1 autotest: added parameters for elevon plane, vtail plane and fireflyy6 2016-04-22 10:28:16 +10:00
Peter Barker 8774f15b9a Tools: add valgrind option to autotest.py 2016-04-22 09:42:33 +10:00
Andrew Tridgell bcc4a653d7 autotest: added Y6 to sim_vehicle.sh 2016-04-21 21:11:56 +10:00
Andrew Tridgell dea1fec14d autotest: support -f tri for sim_vehicle.sh 2016-04-21 20:30:15 +10:00
Randy Mackay a5de231a21 SITL: ease gps_glitch_auto_test
shortened glitch duration
extended timeout in gps_glitch_auto_test
2016-04-21 14:52:31 +09:00
Lucas De Marchi e6907a607b waf: link with winmm on cygwin
Otherwise it fails to link:

[335/335] Linking build/sitl/bin/arducopter-quad.exe
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8AircraftC2EPKcS2_+0x230): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft16setup_frame_timeEff+0x9f): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft16setup_frame_timeEff+0x125): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft15sync_frame_timeEv+0x21): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft15sync_frame_timeEv+0x152): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZNK4SITL8Aircraft16get_wall_time_usEv+0xe): more undefined references to `_imp__timeGetTime@0' follow
collect2: error: ld returned 1 exit status
2016-04-19 19:02:25 -03:00
Lucas De Marchi b8cb88092f Tools: install-prereqs-ubuntu: fix exporting PATH
Since we escape $PATH, we can't just try to export that way. Since PATH
is unset if we do this, we end up with things like :

./Tools/scripts/install-prereqs-ubuntu.sh: line 101: apt-cache: command
not found
2016-04-19 00:14:09 -03:00
Lucas De Marchi 0fae368635 Tools: install-prereqs-ubuntu: allow to run from repository
If we are running the script, we are likely inside the repository, in
which case the script would fail while searching for a directory named
ardupilot. Derive the root directory from the script location.
2016-04-19 00:14:09 -03:00
Lucas De Marchi 757f48ff83 Tools: install-prereqs-ubuntu: fix return code checking
We are running the script with -e so we can't check the return code like
that.
2016-04-19 00:14:09 -03:00
Lucas De Marchi 4c6dac2d5d Tools: install-prereqs-ubuntu: install python-setuptools 2016-04-19 00:14:09 -03:00
Lucas De Marchi 03f5362538 Tools: install-prereqs-ubuntu: remove 32-bit variants
These are not necessary and cause trouble in Ubuntu 16.04.
2016-04-19 00:14:09 -03:00
Lucas De Marchi 1a24a3174f Tools: install-prereqs-ubuntu: fix string concatenation
ubuntu@ubuntu-xenial:~/ardupilot$ ./Tools/scripts/install-prereqs-ubuntu.sh
./Tools/scripts/install-prereqs-ubuntu.sh: line 19:  python-wxgtk3.0: command not found

While at each, change to use lsb_release like the other scripts.
2016-04-19 00:14:09 -03:00
Andre Kjellstrup b6b593b6fb Tools: install-prereqs-ubuntu: update for Ubuntu 16.x
No older versions of Ubuntu is affected by this script.
2016-04-19 00:14:09 -03:00
Francisco Ferreira 0f69b49ff1 ci: add ccache to clang builds 2016-04-17 14:47:55 -03:00
Francisco Ferreira 95343255e1 ci: use updated version of ccache 2016-04-17 14:47:55 -03:00
Francisco Ferreira b5faf9c361 ci: allow build systems to use ccache more efficiently 2016-04-17 14:47:55 -03:00
Francisco Ferreira d3b20f9fd1 waf: px4: allow git version to be defined externally 2016-04-17 14:47:55 -03:00
Francisco Ferreira 25f9832717 ci: split configure script between installing APT packages and other configurations 2016-04-17 14:47:55 -03:00
Andrew Tridgell 8408428339 travis: disable px4 builds in waf for now
they are broken by the PX4Firmware merge
2016-04-14 08:05:06 +10:00
Andrew Tridgell 5bd0adf980 waf: mark build as ARDUPILOT_BUILD
this helps with small build differences in px4 tree
2016-04-14 08:05:05 +10:00
Peter Barker 27fadb2572 Tools: rstemit: render parameter information in h tables
Render ranges as "min - max"
2016-04-13 21:16:41 +10:00
Andrew Tridgell fa36d6cac1 Travis: added force-yes to try to fix build 2016-04-12 05:56:27 +10:00
Lucas De Marchi cc24f323d2 waf: add messages to the things we are checking for
Before:
Checking for code snippet                : yes
Checking for code snippet                : yes
Checking for code snippet                : yes
Checking for code snippet                : yes
Checking for code snippet                : no
Checking for code snippet                : no

After:
Checking for HAVE_CMATH_ISFINITE         : yes
Checking for HAVE_CMATH_ISINF            : yes
Checking for HAVE_CMATH_ISNAN            : yes
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : no
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : no
2016-04-05 21:06:25 -07:00
Lucas De Marchi 169c350e85 waf: rename AP_Config.h to ap_config.h
The usual name for this header is config.h, but that's already used by
vehicles. Using uppercase could give the impression this is a
file to be modified, but it's not. Use lowercase instead.
2016-04-05 21:06:25 -07:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Ricardo de Almeida Gonzaga 5e45c9dfb0 waf: add cxx_checks tool
In order to start generating AP_Config header and detect
parameter such as the existence of cmath functions.
2016-04-05 20:44:15 -07:00
Ricardo de Almeida Gonzaga 14dbc16d46 waf: start using 'AP_Common/missing' to all boards 2016-04-05 20:44:15 -07:00
Peter Barker 009bb7fa9c build_binaries: regenerate manifest after building binaries 2016-04-05 09:05:57 +10:00
Peter Barker d7977dfcc2 Tools/scripts/generate-manifest.py: json description of binaries directory 2016-04-05 09:05:57 +10:00
Andrew Tridgell a8ca41abf1 autotest: use 60% engine speed for stability test
can't handle 55% in SITL now in quad
2016-04-04 11:28:28 +10:00
Andrew Tridgell ae5b8849ec autotest: added CMAC VTOL mission 2016-04-02 16:44:50 +11:00
Andrew Tridgell 27934a893e autotest: raise timeout again
after trying lots of other things to speed up build_binaries.sh it
still isn't fast enough, so this just raises the timeout by 50%
2016-04-02 07:47:16 +11:00
Randy Mackay badfdcf54c Tools: autotest params renamed after copter moves PIDs to attitude controller 2016-04-01 11:59:30 +09:00
Randy Mackay 08a485eec4 AutoTest: reduce heli rate P values
Also remove explicit params to use EKF2 because it is used by default now
2016-04-01 11:59:30 +09:00
Randy Mackay 12d9ffee12 AutoTest: remove H_RSC_MIN and MAX from heli params
These parameters are not used and having them causes errors during testing if we remove the corresponding parameters from the tradheli code
2016-04-01 11:59:30 +09:00
Andrew Tridgell 72e4ed5665 autotest: no need to check other repos now
we don't need to check other repos now we use submodules for all code
2016-04-01 09:44:33 +11:00
Andrew Tridgell 36ef4d422c Revert "autotest: added a temporary web bug"
It has done its job, and we now know the IP of the old server
2016-04-01 08:10:02 +11:00
Andrew Tridgell 20cd06da09 autotest: added a temporary web bug
(we need to find IP of old autotest server)
2016-03-31 15:22:09 +11:00
Gustavo Jose de Sousa 051e8a6bda waf: px4: use explicit list for ROMFS static files
Files that are not really part of the ROMFS in the folder might cause problems.

One problem that motivated this patch was caused because the make-based build
system copies the bootloader to the ROMFS in the source tree (mk/PX4/ROMFS)
instead of the build tree. That potentially could cause race condition between
the tasks created by 'px4_romfs_static_files' and 'px4_romfs_bootloader'.

Also, now we have only one task generator for static files.
2016-03-30 18:49:11 -03:00
Gustavo Jose de Sousa 218dc3fdf2 waf: px4: fix log output for px4_copy task
It was displaying the source path as the destination!
2016-03-30 18:49:11 -03:00
Francisco Ferreira d54a22baaa waf: boards: change no-unknown-pragmas to all compilers instead of only Clang 2016-03-30 01:32:45 -03:00
Andrew Tridgell e90edd0abc autotest: build in a constant directory
this gives a much higher hit rate in ccache
2016-03-30 09:01:24 +11:00
Andrew Tridgell e0a465f8f4 autotest: added some parallelism to px4 build in build_binaries 2016-03-30 07:45:11 +11:00
Francisco Ferreira 0eaf6f17c8 waf: toolchain: fix Clang toolchain detection 2016-03-29 15:02:33 -03:00
Andrew Tridgell af68fa94c0 autotest: fixed build_binaries.sh script bug 2016-03-29 15:39:08 +11:00
Andrew Tridgell 2806171839 autotest: use recursive forced update in build_binaries.sh 2016-03-28 15:01:01 +11:00
Gustavo Jose de Sousa b251d14778 waf: ardupilotwaf: allow multiple program groups for program
The program_dir defaults to the first group's name. That feature will be useful
for "copter" build command, which will build all frame types.
2016-03-26 15:43:08 -03:00
Gustavo Jose de Sousa 22b0b7e833 waf: ardupilotwaf: add program_dir option to ap_program()
That way we don't force other programs to be built on a directory of their
program group name. The directory name defaults to the program group.

We are separating those two concepts because of the upcoming support for
multiple groups for a program.
2016-03-26 15:43:08 -03:00
Andrew Tridgell df765f0d43 autotest: raise lock timeout 2016-03-26 19:28:04 +11:00
Peter Barker 39ab0e5b7d autotest: buildand retain version files 2016-03-25 21:02:40 +11:00
Peter Barker e135659165 Tools: PrintVersion.py; print version of vehicle code 2016-03-25 21:02:40 +11:00
Andrew Tridgell fa15057792 Tools: update URLs 2016-03-25 20:47:27 +11:00
Andrew Tridgell dea708b368 Tools: switch to ardupilot.org for firmware and autotest 2016-03-25 16:46:11 +11:00
Gustavo Jose de Sousa 6e658452ec waf: toolchain: filter supported compilers for cross-compilation
We currently only support GNU and clang compilers.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 1b6a87d8b4 waf: toolchain: clang: use waf to find toolchain path
The find_realexec_path function was used for finding the toolchain path mostly
because of two reasons:

 1) We couldn't really use CXX or CC variables because the user could set those
 from the OS's environment and Waf wouldn't look for the executable file in
 that case.

 2) Our CI configuration sets up symlinks for ccache and find_realexec_path
 works around that issue.

The bad side about using find_realexec_path() is that, besides working aroung
symlinks, it does the same thing that is done by Waf. This patch removes the
dependency for such a function by addressing each of the reasons above stated:

 1) We create a local copy of os.environ and, if there's a variable with the
 same name we are using, we remove it from the local copy.

 2) As done before, we are looking for the cross ar program instead of gcc
 program, since that is not used for ccache symlinks.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 019cf3d483 waf: toolchain: clang: use configure wrapper
This is a better approach than checking command line options
--check-cxx-compiler and --check-c-compiler. Those values expect a list of
compilers to try instead of the compiler to use.

The benefits of this approach are:
 - Allowing correct use of options --check-cxx-compiler and --check-c-compiler.
 - Allowing user to pass CXX and CC environment variables, which is a common
   way of selecting the compiler.
 - Configuration is done *and committed* only for the specific compiler.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 7ede9600db waf: toolchain: gcc: use cross-compilation prefix wrapper
This is a better approach than checking command line options
--check-cxx-compiler and --check-c-compiler. Those values expect a list of
compilers to try instead of the compiler to use.

The benefits of this approach are:
 - Allowing correct use of options --check-cxx-compiler and --check-c-compiler.
 - Allowing user to pass CXX and CC environment variables, which is a common
   way of selecting the compiler.
 - Configuration is done *and committed* only for the specific compiler.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 95aeb0346e waf: load compilers tools in toolchain tool
It makes more sense the toolchain Waf tool to be responsible of loading the
compilers. Furthermore, that allows toolchain tool to have control on doing
configuration before and after loading compiler tools.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 19d6a88e84 waf: toolchain: refactor configure function
- Use early return and reduce one indentation level.
- Set AR for both GNU compilers and clang just once and reduce redundancy.
- Reduce indentation level for clang-specific setup. There's no need to nest it
  inside check if compilers are GNU or clang.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa ceda86bbd8 waf: toolchain: get rid of suffixes variable
The only variables used so far are CXX, CC and AR. Let's make it
simpler.
2016-03-23 17:05:33 -03:00
Peter Barker 14b51080a9 Tools: remove erroneous space in rst output 2016-03-22 18:31:05 +11:00
Peter Barker 9f9e3843e0 Tools: formatting changes for rst parameter file 2016-03-21 20:56:49 +11:00
Francisco Ferreira 4643c7bf9e travis: add Clang builds
PX4 isn't supported at the moment and sitltest always use GCC, so we include the only ones that build
Travis has old LLVM installed and old Clang in a strange path (not a package) which interfere with the use of clang-3.7
2016-03-20 00:17:02 -03:00
Francisco Ferreira dd93f62bdd ci: fix PATH export 2016-03-20 00:17:02 -03:00
Francisco Ferreira 34de26502d ci: add Clang package
Use flags to tell Waf what compiler to use
Don't use Make build system if compiler is Clang
2016-03-20 00:17:02 -03:00
Francisco Ferreira 02af9b6ab1 waf: toolchain: support Clang in toolchain for cross-compilation
Define function to help find the toolchain path
2016-03-20 00:17:02 -03:00
Francisco Ferreira a8aae048c2 waf: boards: change toolchain to a board class attribute 2016-03-20 00:17:02 -03:00
Francisco Ferreira f8727f7362 waf: boards: fix bug in boards environment merge 2016-03-20 00:17:02 -03:00
Francisco Ferreira bf3dda9156 waf: boards: support Clang by adding necessary flags
Don't add unsupported flag when compiler is Clang
2016-03-20 00:17:02 -03:00
Francisco Ferreira 3b3d59efd1 waf: boards: load toolchain and compiler before configuring env 2016-03-20 00:17:02 -03:00
Peter Barker 48f7aa1556 Tools: build_parameters.sh also stashes Parameters.rst 2016-03-17 18:16:10 +11:00
Peter Barker 6a44cb244d Tools: factor build_parameters.sh 2016-03-17 18:16:10 +11:00
Peter Barker a8e9fc19b0 Tools: allow param parser to emit ReStructured Text 2016-03-17 16:10:11 +11:00
Don Gagne cae7ea0d13 Add @Volatile, @ReadOnly support 2016-03-17 10:58:05 +11:00
Lucas De Marchi 36336e17b3 Tools: replace header guard with pragma once 2016-03-16 18:40:45 +11:00
Lucas De Marchi df150cd8dd ci: add missing ppa for Trusty
Thanks Francisco Ferreira.
2016-03-14 18:48:03 -03:00
Lucas De Marchi 02619b4a25 ci: install cmake >= 3.2
Also remove the -qq from the call to apt-get install so it's easier to
debug failures in future.
2016-03-14 14:55:22 -03:00
Gustavo Jose de Sousa f416f1e5a1 waf: px4: implement --upload option
We tweak the task's cmd_kw so that the user can see what is happening from the
terminal (e.g. progress bar).
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa e6fa2d54e8 waf: px4: build firmware
Copy the program library to the place where PX4Firmware CMake build will look
for and trigger the firmware build. There isn't really a real output defined
for px4_copy_lib because Waf would complain about multiple tasks having same
output when building multiple programs.

After the firmware build, copy it to the correct place (from program group and
name perspective) and add git hashes.

Since the place where the library is placed is shared by different target
programs, we need to synchronize the firmware build, that's why the use of
_firmware_semaphorish_tasks. That variable is set as a list because of the
upcoming upload task.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa bf91286ade waf: px4: prepare ROMFS
Copy necessary files to a folder in the build directory and use that folder as
the ROMFS for the external build.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa a36a766e1a waf: px4: make program as single library
Recursively collect objects from dependency libraries and create a single
library. That way we just need to pass down one single library to PX4Firmware
build system.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 79d9bf2f8a waf: px4: define dynamic environment
We get the flags used by PX4Firmware build system so that we can use foreign
headers properly. Also, we add some defines used by PX4.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 95848488e7 waf: boards: define PX4 boards 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 658bead862 waf: px4: add initial implementation
The initial implementation defines only the pre-build task generators.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 7ba3df8c80 Tools: waf: build Replay only for linux boards
Other boards (like PX4 ones) aren't supported yet.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 841771096d waf: let toolchain loading in charge of the Board class
That allows boards (i.e. subclasses of Board) to use toolchain related
information for configuration. The upcoming PX4 build is an example.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa b7e3071ba3 waf: gtest: disable for PX4 boards
Google Test code uses functions signatures not implemented by the current
toolchain for PX4.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 6753b54b52 waf: git_submodule: support recursive submodules 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa d57851e2a9 waf: git_submodule: add function git_submodule_head_hash 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 33fce2bfe5 waf: ardupilotwaf: add option --upload
That option can (and will by PX4) be used by platforms that support uploading
programs to a connected device.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 0329cb14ed waf: ardupilotwaf: export program_name and program_group
Export those values to the task generators, so that other tools may use it.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 45d1af8833 waf: ardupilotwaf: allow to build ap_program as a static library
In the upcoming build for PX4 boards, we will pass down the program a single
static library to PX4 Firmware's cmake build system. This patch is partially
providing a way to do that: the configuration for PX4 will define the
AP_PROGRAM_AS_STLIB environment variable.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 32402b93af waf: ardupilotwaf: remove SITL from common libraries
Only SITL port uses it and using it for PX4 raises compilation errors.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 03c067921e waf: ardupilotwaf: allow extra features for ap_program and ap_stlib
That allows tweak programs and static libraries builds for different
configurations.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 12946db4dc waf: ardupilotwaf: remove common_features()
The function ap_program() was the only one that was using it, so let's just
inline it. Besides, the name was misleading, since the (only) feature added was
for programs instead of general task generators.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 9c5593ef09 waf: ardupilotwaf: don't use common_features() unnecessarily
That function is already used in ap_program().
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 8664c0344d waf: allow boards to tweak build
We define a function build() that can be overrode by Board subclasses.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 1fe795f283 waf: boards: set Board as an abstract board
Let's have a unified way to do that - no need for checking the board name
anymore.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 93156e4325 waf: boards: allow defining abstract boards
That avoids instantiation of wrong board classes and also listing invalid board
names in the help message.
2016-03-14 11:54:30 -03:00