Commit Graph

2308 Commits

Author SHA1 Message Date
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