Commit Graph

3351 Commits

Author SHA1 Message Date
Matthew Brener
06388b0417 Global: Fix typos 2016-09-17 00:36:36 -03:00
Andrew Tridgell
19d580d60f Disco: adjust default Disco parameters 2016-09-16 19:31:28 +10:00
Andrew Tridgell
2d2ed7b06e autotest: added autobuild of disco 2016-09-15 19:57:32 +10:00
Andrew Tridgell
65bcead1bd autotest: build bebop static in build_binaries.sh 2016-09-15 19:56:27 +10:00
Andrew Tridgell
dd3d5152f6 Frame_params: added more Disco info 2016-09-15 18:17:09 +10:00
Andrew Tridgell
94460949e1 Frames: added Parrot Disco parameters 2016-09-15 18:09:35 +10:00
Peter Barker
074e9dc9b0 Tools: special --aircraft mavproxy pass-through for sim-vehicle.py 2016-09-09 17:36:37 +10:00
Lucas De Marchi
f5be0823f9 sim_vehicle.py: move exit handler and start message
Move them after the argument parser because otherwise they would display
and the handler be registered when using the 'help' option.
2016-09-09 15:50:52 +10:00
Lucas De Marchi
0a75e2f12a sim_vehicle.py: fix indent on epilog 2016-09-09 15:50:52 +10:00
Andrew Tridgell
26e1c30b19 autotest: avoid a race condition in quadplane test
this shows up on the new (faster) autotest server
2016-09-08 15:28:20 +10:00
Peter Barker
45bc95edeb Tools: LogAnalyzer: handle changed RCOU and parameters in motorbalance 2016-09-08 08:54:50 +10:00
Peter Barker
f42df1bc54 Tools: LogAnalyzer: handle MODE lines appearing before vehicle MSGs 2016-09-08 08:41:09 +10:00
Peter Barker
214bca8b30 Tools: LogAnalyzer: correct CTUN test 2016-09-08 08:41:09 +10:00
Peter Barker
f1641161d7 Tools: LogAnalyzer: correct Vcc test 2016-09-08 08:41:09 +10:00
Andrew Tridgell
6e2c600fe7 autotest: make px4-clean between px4 builds
avoids an issue where vehicle object files are re-used from other
targets
2016-09-05 18:22:01 +10:00
Andrew Tridgell
d529b5e3b8 autotest: build each set of px4 binaries separately 2016-09-05 12:43:52 +10:00
Lucas De Marchi
95d5752011 build: fix configure check for headers
When we are checking if a header is available we can't pass -I argument
to our missing/ directory. Otherwise we would end up telling the build
that a header is available when it actually isn't.

This fixes the build of sitl in MacOS with clang.
2016-09-03 01:19:14 -03:00
José Roberto de Souza
6a9addb2a8 waf: Add Intel Aero to waf build
This will be the first board that only build with waf.
2016-09-03 01:03:17 -03:00
Pierre Kancir
63a6b28065 param_metadata: change Ardupilot site to old Ardupilot site 2016-09-01 13:05:11 +10:00
Pierre Kancir
59ecccd4aa autotest: remove old apm_unit_tests 2016-09-01 13:05:11 +10:00
Pierre Kancir
9e1ffcae5d Tools: update python coding style
Tools: update PrintVersion.py coding style

autotest: update python coding style

pysim: update python coding style

jsb_sim: update Python coding style

param_metadata: update Python coding style
2016-09-01 13:05:11 +10:00
Gustavo Jose de Sousa
5d7ca3fd27 waf: build_summary: don't call size for empty list of nodes
Otherwise, that will cause an error.
2016-08-31 00:19:51 -03:00
Randy Mackay
e4efa4c07c Tools: EnRoute EX700 param file gets flow orientation 2016-08-31 10:34:26 +09:00
Peter Barker
198a7d7710 sim_vehicle.py: add arguments to pass args to waf build and configure 2016-08-31 11:04:40 +10:00
Lucas De Marchi
631d4a1152 Replay: add clean target for CI
CI has a generic infra that calls make clean before building and it
fails for Replay since it doesn't have a clean target.
2016-08-29 10:27:36 -03:00
Randy Mackay
4fbc686e68 Tools: EnRoute EX700 params get SF10b 2016-08-29 21:06:50 +09:00
Gustavo Jose de Sousa
87862a08ab waf: ap_library: make headers whitelist portable
Otherwise it won't work for platforms that don't use Unix style paths.
2016-08-26 13:13:56 -03:00
Randy Mackay
28715106d6 Tools: update Bebop2 parameter gains 2016-08-26 09:12:48 +09:00
Randy Mackay
29e18dba5b Tools: add battery failsafe to EnRoute EX700 param file 2016-08-25 13:07:56 +09:00
Gustavo Jose de Sousa
a6b55d90a7 waf: cmake: define a dictionary of supported generators
On Windows, using MSYS Makefiles generator doesn't work very well when the
CMakeLists.txt files use custom commands with paths as arguments. Furthermore,
MinGW Makefiles generator can't be used if sh.exe is in the system's path and
some build systems rely on sh for certain tasks (which is the case of PX4
Firmware build). Because of that, the list of generators for Windows has been
narrowed to Ninja and NMake Makefiles.
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa
07592d650e waf: px4: copy with shutil module instead of cp program
In order to make it independent of host platform.
2016-08-24 12:15:42 -03:00
Lucas De Marchi
e31a06cfdb waf: fix programs searches
Here we do the following:
    1) Move the pkg-config check to boards.py so we only check of it for
       linux boards
    2) Use cfg.find_toolchain_program() if possible, for example, for AR
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa
f430ef3825 waf: toolchain: override find_g{xx,cc}() instead of wrapping configure()
That's more correct than setting Waf environment variables:

 (1) We don't need to worry about differences between OSes - the previous
 implementation was actually broken for Windows because the program names in
 the environment variables were missing the ".exe" extension.

 (2) That looks better than looping over possible compiler names and running
 the configuration transactionally multiple times.
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa
31965689cb waf: persist implicit dependency information across clean
Implicit dependency scanning takes significant time and, since it doesn't
produce files, it's okay to keep the resulting information across clean
commands as long as the scanner is triggered again if there's need to. This
commit accomplishes that.

The advantage of this approach can be observed by the following timings when
building the group "bin":

 Method                                                         Time
 ------------------------------------------------------------------------
 Fully clean build                                              5m18.633s
 Clean build with scanning result persisted                     4m23.346s
 Clean build with ccache but non-persistent scan results        1m40.125s
 Clean build with scanning results persisted and with ccache      14.843s

While at it, move management of information persisted across clean commands to
a separate module.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
6abcf6150c waf: ap_library: use ap_persistent_task_sigs for header checking tasks
In order to make clean builds faster.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
ef4fd0e2d3 waf: add --clean-all-sigs option
Explanation on the option help string.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
0b7a98d40c waf: allow persisting tasks signatures across clean commands
That allows some time consuming tasks that don't really produce anything on the
file system to keep their signature after a clean command is issued.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
a98c42fef9 waf: define ap_groups in ardupilotwaf tool
That makes more sense, since that module is supposed to have basic Ardupilot
specific features. The root wscript should be a mere user of those features.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
a6ec802d28 ap_library: always check included headers when necessary
This approach is better then the previous one mainly because the latter
required creating the task generator for the checks in a separate group and
posting that target implied in posting the whole previous build groups.

Some notes:
 - This is implemented so that headers aren't checked more than once, so there
   might be some checking tasks that won't do anything because the headers are
   checked on another task. Even so, those headers are added to the result of
   scan() in order to provide a consistent output to the user.
 - It is safe manipulating the shared variable dispatched_headers because the
   scan() is called before the task is added to the execution queue.
 - Although we force ap_library_check_headers.scan() to always be called,
   that's OK, because we use the scanning result of the compilation task, which
   returns a cached value if there's no need to rescan.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
51bef96811 waf: px4: accommodate use of ap_library
- Use AP_LIBRARIES_OBJECTS_KW instead of AP_STLIB_FEATURES.
 - Change the feature name to one that makes more sense.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
b8e518a533 waf: use ap_library tool
That way we avoid recompiling source files that don't depend on vehicles.
Change notes:
- UTILITY_SOURCE_EXTS: moved to ap_library
- Task generators indexes: ap_library handles that now and in a better way
- Use of AP_STLIB_FEATURES: it doesn't make sense anymore, since the stlib
  taskgen has empty source list
- Flags and defines: passed down to ap_library through AP_LIBRARIES_OBJECTS_KW
- Set use='mavlink' in AP_LIBRARIES_OBJECTS_KW instead of calls to
  bld.ap_stlib().
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
9a6fcafade waf: ap_library: add tool
That's a tool for creating task generators for libraries object files. One of
the key objectives of this patch is to provide a way to avoid recompiling
sources that are independent of vehicles.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
b191269cc8 waf: px4: run firmware task after link task
This fix a bug introduced by 06a5156 ("waf: px4: reconfigure PX4Firmware for
each program"), with the removal of the call fw_task.set_run_after(cp_lib).
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
8fb6ccc8b7 waf: px4: use copy of "use" in px4_import_objects_from_use()
Utils.to_list() returns the argument if it is a list, which means that
px4_import_objects_from_use() cleared that attribute when processing the queue.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa
424f6490fc waf: px4: add missing import Errors 2016-08-24 10:46:23 -03:00
Craig Elder
68dfe42443 Autotest: Update logo.png 2016-08-22 19:50:03 -06:00
Craig Elder
30e1ee2c8f Autotest: Delete Logo 2016-08-22 19:49:16 -06:00
Peter Barker
569a7a4abd Tools: sim_vehicle.py - correct process termination
Closes #4699
2016-08-22 15:38:50 +10:00
Craig Elder
211175efac Autotest: Update Logo 2016-08-21 23:31:12 -06:00
Craig Elder
121c7f1136 Update Logo 2016-08-21 23:26:14 -06:00
Craig Elder
ac8b17c177 Autotest: Updated website names 2016-08-21 19:07:23 -06:00
Eduardo Cáceres de la Calle
0395141450 Tools: Add name to GIT_Success.txt 2016-08-18 20:17:16 +09:00
MitsuhiroKomiya
dc9c101594 Tools: Git_Success.txt added my name 2016-08-18 19:34:39 +09:00
ropizo
2d89c631ea Tools: Git test.
This is for the preliminary check of github PR.
2016-08-18 18:47:55 +09:00
SuzukiYasuyuki
9722e921d5 Update GIT_Success.txt
added Yasuyuki Suzuki
2016-08-18 18:42:58 +09:00
yoshinuma
0c2d01b60c add my name 2016-08-18 00:03:22 -07:00
muro008
7f0a4e3874 added name to GIT_Success.txt 2016-08-17 23:58:06 -07:00
Saegusa5
c2f23b88ed Add GIT_Success.txt 2016-08-17 23:56:58 -07:00
YukiMiyama
aaebfc9239 added my name to GIT_Success.txt 2016-08-17 23:50:47 -07:00
Peter Barker
25136ea15a Tools: correct tracker build 2016-08-17 08:33:53 +10:00
Peter Barker
08ef3271c1 Tools: bump Vagrant Ubuntu to Wily
This allows the Vagrant VM to build PX4 using waf.

The initvagrant script has been changed to run as much as possible
as the Vagrant user.

jsbsim is now compiled by the vagrant user, and run from the source directory.
2016-08-16 10:23:48 -03:00
Takanobu Minoshima
00eb5ed355 Git: added name to GIT_Success.txt
Testing whether I cann add changes to git success via the Windows Client
2016-08-16 10:55:59 +09:00
ysk73
8f1f9481eb Tools: added name to GIT_Success.txt
by Yuki Yoshioka
2016-08-16 09:58:58 +09:00
Kouichi Nakajima
6e643d64b7 Tools: add Kouichi Nakajim to Git_Success.txt 2016-08-16 09:47:41 +09:00
Lucas De Marchi
46be2cf026 Tools: build_binaries: fix generation of firmware-version.txt
For waf builds we build from root directory.
2016-08-13 17:44:38 -03:00
Lucas De Marchi
cd333cb43a Tools: build_binaries: fix check for wrong file
We get the version from version.h not APM_Config.h.
2016-08-13 17:44:38 -03:00
Lucas De Marchi
a511f97971 Tools: build_binaries: fix inverted condition 2016-08-11 09:01:43 -03:00
Lucas De Marchi
80b04ecb41 scripts: update command with sim_vehicle.py 2016-08-10 17:00:09 -03:00
Lucas De Marchi
8a3974f08f vagrant: update commands to sim_vehicle.py 2016-08-10 16:59:39 -03:00
Peter Barker
06b0dec15e Tools: remove sim_vehicle.sh in favour of sim_vehicle.py 2016-08-10 16:56:04 -03:00
Lucas De Marchi
53968e5d78 Tools: build_binaries: add bebop to arducopter-quad 2016-08-10 11:12:54 +09:00
Lucas De Marchi
6553e428c0 Tools: build_binaries: add navio/navio2 to antennatracker 2016-08-10 11:12:52 +09:00
Lucas De Marchi
6e9686a16b Tools: build_binaries: use waf for Linux boards 2016-08-10 11:12:50 +09:00
IndustrialWasteWeaponOfUltimate
431f7da5b3 Tools: add Shinya Oda to GIT_Success.txt 2016-08-09 16:21:31 +09:00
Randy Mackay
65ee71075c Tools: set GND_EFFECT_COMP for Bebop2 params 2016-08-09 16:19:53 +09:00
Lucas De Marchi
f0590581e4 autotest: standardize name of param files
Try to make the various param files to follow similar namings:

    - Lowercase the few ones using uppercase
    - Use dash to separate name components
    - Start with "copter", "plane", "rover", etc instead of the mix we
      had
    - Remove "params" from the filename since it's redundant with the
      extension
2016-08-08 10:12:14 -03:00
Tom Pittenger
127e86562a AP_Relay: remove FixedWing dependency on airspeed 2016-08-08 00:25:20 -07:00
Tom Pittenger
aa65fda01c Revert "Replay: Convert references to AP_Airspeed."
This reverts commit 96b287735f.
2016-08-07 17:54:24 -07:00
KenjiKoseki
d8367ecbef Tools:add Kenji Koseki to Git_Success.txt 2016-08-08 09:53:46 +09:00
Tatsuya Yamaguchi
be398864b7 Git: add Tatsuya Yamaguchi to Git_Success.txt 2016-08-08 09:51:33 +09:00
yHoriuchi
5b1d22f35d GIT_Test: add Yasuhide Horiuchi to GIT_Success.txt 2016-08-06 09:11:38 +09:00
Kunihiro.Yoshida
ab8a6da397 Tools: add name to Git_Success.txt 2016-08-05 21:12:43 +09:00
Randy Mackay
650d6756bf Tools: update EnRoute EX700 parameter defaults 2016-08-05 16:26:36 +09:00
Kazutaka Ozawa
0582cd254e assignment 2016-08-05 10:40:30 +09:00
AndersonRayner
96b287735f Replay: Convert references to AP_Airspeed. 2016-08-04 10:09:04 -07:00
EijiAoki
699d5bf99c Homework at Dronecode seminar 2016-08-04 09:38:50 -07:00
ikgmats
0b492288e7 Git: add Ikegami Atsushi to GIT_Success.txt 2016-08-04 22:07:11 +09:00
Randy Mackay
3b86ef71ca Tools: update EnRoute EX700 parameters 2016-08-04 16:56:46 +09:00
Yu Kuwahara
f5b4a482b0 Git: add Yu Kuwahara to Git_Success.txt 2016-08-04 14:42:57 +09:00
okapy
0141fa972f Git: added Hiroshi Kitaoka to GIT_Success.txt 2016-08-04 14:37:20 +09:00
Randy Mackay
de24d2ca3b Tools: add EnRoute EX700 frame parameters 2016-08-04 14:37:14 +09:00
Pierre Kancir
19d94737a0 autotest: move all default params to default_params directory 2016-08-03 17:44:37 -03:00
murata
ec59a83219 Git: add Murata Katsutoshi to Git_Success.txt 2016-08-03 15:16:23 +09:00
ShingoMatsuura
bf5a035024 Git: add Shingo Matsuura to Git_Success.txt 2016-08-03 13:28:24 +09:00
Gustavo Jose de Sousa
2e1ac0de8d waf: make get_legacy_defines() "public"
That function will be used by an upcoming separate tool.
2016-08-01 22:04:16 -03:00
Gustavo Jose de Sousa
f2dec971e7 waf: add "ap_" prefix to keywords "libraries" and "vehicle"
As an effort to keep things specific to ardupilot API in the build system
consistent and easy way to identify.
2016-08-01 22:04:16 -03:00
Pierre Kancir
07eb170b39 Autotest: correct mavproxy unloaded map error 2016-08-01 10:37:15 -03:00
Gustavo Jose de Sousa
d1c5691501 waf: build_summary: let the user register the post build callback
That allows more control from the user's point of view.
2016-07-28 17:50:19 -03:00
Pierre Kancir
ff8c772776 sim_vehicle.py: correct url 2016-07-28 16:44:18 -03:00
Pierre Kancir
40a594e137 sim_vehicle.py : style correction 2016-07-28 16:44:18 -03:00
Staroselskii Georgii
61e066513d FlightGear: remove the application
It seems like nobody uses this app because it can't even get compiled.
That's why I think it should go away.
2016-07-27 21:30:19 +10:00
Staroselskii Georgii
bd8c61542d Replay: make use of sigaction instead of signal API
It's a more proper and portable way to set up signal handlers.
2016-07-27 21:30:19 +10:00
Staroselskii Georgii
9576be3a21 Replay: encapsulated signal handling 2016-07-27 21:30:18 +10:00
Andrew Tridgell
70c4038751 Replay: changed Makefile to use waf 2016-07-27 21:28:30 +10:00
Gustavo Jose de Sousa
4bd17ab90c waf: git_submodule: allow warning about skipped submodules updates
Provide a function to register a post build routine to do the warnings. Do that
way so that the user can chose when to add the callback to the build (i.e.
allow the user to assert a desired order for the post build callbacks to be
called).
2016-07-25 16:45:57 -03:00
Gustavo Jose de Sousa
4cd70842d9 waf: git_submodule: don't update submodule if non-fastforward
Don't cause trouble to developers working on submodules.
2016-07-25 16:45:57 -03:00
Andrew Tridgell
db8bf48747 build: added AP_ICEngine to build 2016-07-25 10:06:03 +10:00
Andrew Tridgell
3489f7b576 autotest: use builtin plane sim for autotest
and simplify startup using defaults file
2016-07-22 16:42:46 +10:00
Andrew Tridgell
241b6edfcf Build: added AP_Button to build 2016-07-22 15:01:20 +10:00
Andrew Tridgell
fd286498af PX4: added otp to the build 2016-07-21 18:05:00 +10:00
Lucas De Marchi
2b1b23cabf build: fix static linking through --static option 2016-07-20 18:03:20 -03:00
Andrew Tridgell
9ea4a9233d autotest: updated OBC2016 mission
added butterfly search
2016-07-20 19:44:14 +10:00
Andrew Tridgell
3769e0fc64 waf: build support for Disco 2016-07-20 13:28:28 +10:00
priseborough
18c4327a2a autotest: reduce copter test run time
Signed-off-by: priseborough <p_riseborough@live.com.au>
2016-07-19 12:16:50 +10:00
priseborough
cc0d3b89d3 Replay: use separated EKF horiz/vert position interfaces 2016-07-19 12:16:49 +10:00
priseborough
e0d87bf529 autotest: Increase startup wait time to allow EKF and GPS checks to pass 2016-07-19 12:16:48 +10:00
Gustavo Jose de Sousa
9a9b59a97f waf: boards: fix funny CXXFLAGS typo 2016-07-18 15:26:07 -03:00
Julien Beraud
fdb43fdc6a Frame_Params: fix param name for bebop
Change-Id: Id1c16e11e68f0004019afc885acf0e0f119b78b7
2016-07-15 12:25:17 -03:00
Gustavo Jose de Sousa
849a83315a waf: git_submodule: fix for Waf 1.9
Tasks cwd must be Node objects in Waf 1.9
2016-07-14 14:00:07 -03:00
Andrew Tridgell
d25db426a3 waf: added AP_Module to the build 2016-07-14 13:39:47 +10:00
Andrew Tridgell
59e4e8def6 autotest: make bat files work with multiple versions of flightgear 2016-07-14 12:50:27 +10:00
Lucas De Marchi
b375b33189 waf: allow to disable tests
This allows to completely disable the tests. Even the gtest submodule is
not checked out allowing integration on build servers without needing to
download one more submodule.

This is different from the --notests flag. The latter only disables
executing the tests, but always use the submodule.
2016-07-13 15:38:50 -03:00
Lucas De Marchi
8967220652 waf: pass uselib_store in check_package()
This guarantees waf will always add the flags with our known prefix.
2016-07-13 15:24:42 -03:00
Andrew Tridgell
1b12371e25 waf: use define_name in libdl check 2016-07-13 15:24:42 -03:00
Andrew Tridgell
a5adae5fb4 waf: make linux check for libdl
needed for libiio
2016-07-13 15:24:42 -03:00
Andrew Tridgell
3322d7c321 waf: don't build bebop static
need dynamic for libiio
2016-07-13 15:24:42 -03:00
Andrew Tridgell
2980d47e23 waf: added check_package() function for pkg-config checks
this converts existing pkg-config checks to use check_package, which
sets up all the needed variables after a check.

This also disables libdl and libiio for static builds, where they make
no sense
2016-07-13 15:24:41 -03:00
Lucas De Marchi
ee62b61fc7 waf: use STDC format macros 2016-07-13 14:18:27 +10:00
Lucas De Marchi
8a27680fbb build: check for endian.h and byteswap.h 2016-07-08 19:49:32 -03:00
Andrew Tridgell
1a3b292aa3 autotest: fixed run_in_terminal_window() on Linux
try to retain MacOS functionality too
2016-07-08 08:20:20 +10:00
Lucas De Marchi
e2498a1090 autotest: add function to kill tasks on MacOS
Like done on other cases, add an explicit function for that, which turns
the comment redundant.
2016-07-07 11:35:18 -03:00
Siddharth Bharat Purohit
4f0dad19ea autotest: support mac osx terminal launch 2016-07-07 11:35:17 -03:00
Siddharth Bharat Purohit
71c2f69a63 waf: add support for sitl build on mac 2016-07-07 11:35:17 -03:00
snl1101
e15b1a8f2e SITL: add Sterling to locations.txt 2016-07-01 11:21:56 +09:00
Gustavo Jose de Sousa
f426e2c681 Replay: build: use separate library
There are checks for APM_BUILD_Replay in the source code, so Replay tools needs
a separate static library.
2016-06-30 12:55:18 -03:00
Andrew Tridgell
d477905fbd autotest: fixed XPlane with sim_vehicle.py 2016-06-30 20:26:14 +10:00
Andrew Tridgell
b1de768756 autotest: added quadplane-tilttri parameters 2016-06-30 17:00:56 +10:00
Andrew Tridgell
0f7b4a0cd1 autotest: fixed tricopter quadplane for sim_vehicle.py 2016-06-30 14:16:52 +10:00
Gustavo Jose de Sousa
a748c52f06 waf: bump to version 1.9.0
Some things worth mentioning:

- That version contains commits we had cherry picked on our submodule.
- There's a patch on top with a fix for the new process spawning used on
  version 1.9.0. That has already been applied to upstream's master, but not
  released yet.
- This patch also does necessary changes on our build system in order to
  accommodate the upgrade. Basically:
  - Use full task class names when calling create_task().
  - Use always_run class attribute instead of the decorator, which is
    deprecated.
2016-06-29 11:18:22 -03:00
Paul Riseborough
094dd9d769 Replay: Fix bug preventing use of IMT data during replay 2016-06-28 14:20:13 +10:00
Peter Barker
b23f983459 autotest: add --gdb option to autotest.py 2016-06-27 18:14:55 -03:00
Lucas De Marchi
3a5bc141bb build: use format macros in all linux boards
This doesn't work for px4 since it manually defines __STDC_FORMAT_MACROS
in some px4 modules, which needs to be updated.
2016-06-25 12:51:55 -03:00
Andrew Tridgell
a8e5255b90 autotest: look in parent directories for vehicle type in sim_vehicle.py
this allows eeprom.bin per vehicle type without using -v
2016-06-24 11:28:18 +10:00
Lucas De Marchi
a9919420c6 waf: allow to disable libiio at configuration
We default to autodetection for libiio so if the libraries are available
we enable it. However this may not always be desired.
2016-06-23 19:08:13 -03:00
Lucas De Marchi
348678888b waf: allow to disable lttng at configuration
We default to autodetection for LTTNG so if the libraries are available
we enable it. However this may not always be desired.
2016-06-23 19:07:26 -03:00
Peter Barker
febba9112f sim_vehicle.py: simply ignore any failure to kill tasks 2016-06-23 18:39:09 -03:00
Peter Barker
2266223665 sim_vehicle.py: shell out to pkill if psutil is not available 2016-06-23 18:39:09 -03:00
Peter Barker
d9ad962b33 sim_vehicle.py: allow starting mavproxy without --sitl option 2016-06-22 21:25:11 +10:00
Peter Barker
51020387c8 sim_vehicle.py: allow model to be overridden on command line 2016-06-22 21:25:11 +10:00
Randy Mackay
a7422153cb SITL: disable avoidance so we can trigger fence failsafe 2016-06-22 11:38:15 +09:00
David B. Bitton
f58ce71a77 Update initvagrant.sh
Made jsbsim origin URL more firewall friendly.
2016-06-21 13:03:35 -03:00
Peter Barker
6530c3bd91 autotest.py: exit with error if requested step not found 2016-06-20 11:48:07 +10:00
Andrew Tridgell
d9d53c82d0 autotest: added xplane as vehicle type 2016-06-19 13:59:15 +10:00
Randy Mackay
036349cd2f SITL: set copter MOT_THST_HOVER default 2016-06-18 11:55:49 +09:00
Randy Mackay
ed90d00fff SITL: throttle to 50 percent now that hover throttle automatically updates 2016-06-18 11:55:49 +09:00
Tom Pittenger
ed7af8c717 scripts: Add libc6-i386 to px4 package install.
Fixes https://github.com/ArduPilot/ardupilot/issues/4316
2016-06-16 08:06:06 -07:00
Peter Barker
eefdc32f51 Replay: print message when gap perceived in log 2016-06-07 14:00:14 +10:00
Peter Barker
f6c7a73170 Replay: command line option to disable FP exceptions 2016-06-07 12:45:38 +10:00
Peter Barker
53df307c2d sim_vehicle.py: older python has no accessors for proc.status 2016-06-06 12:27:41 +10:00
Peter Barker
91e72de302 sim_vehicle.py: remove unused parameter 2016-06-06 12:27:29 +10:00
Peter Barker
efef39732e autotest: pass any supplied -j through to waf make 2016-06-05 09:45:58 +10:00
Peter Barker
eb0e3c993d Tools: build_examples.sh implemented in terms of build_examples.py 2016-06-04 12:33:15 -03:00
Peter Barker
b6289af522 Tools: autotest uses waf directly for building examples 2016-06-04 12:33:14 -03:00
Peter Barker
8cf49d4e3e Tools: create build_examples.py, a replacement for build_examples.sh 2016-06-04 12:33:14 -03:00
Gustavo Jose de Sousa
6fa97c2289 waf: px4: require cmake version at least 3.2
That way we avoid build errors due to things not supported in earlier versions.
2016-06-03 09:55:17 -03:00
Gustavo Jose de Sousa
03728ac2f7 waf: cmake: enable minimum version checking
By using the environment variable CMAKE_MIN_VERSION.
2016-06-03 09:55:17 -03:00
Peter Barker
0924ae0d25 Tools: add cmake as a dep for PX4 in Vagrant 2016-06-02 13:05:25 +10:00
Francisco Ferreira
501284f65a ci: remove clang temporarily from APT packages 2016-05-31 19:25:51 +01:00
Andrew Tridgell
475579e8ff autotest: skip build of boards we don't support
this prevents us trying to build for boards like navio2 for
ArduCopter-stable which didn't support that board
2016-05-30 08:25:10 +10:00
Andrew Tridgell
168f4e52cf autotest: try to fix build of binaries 2016-05-28 07:29:23 +10:00
Andrew Tridgell
084a37d4fa autotest: enable LOG_REPLAY and LOG_DISARMED in autotest
this will give us the ability to analyse any EKF errors
2016-05-27 21:23:39 +10:00
Peter Barker
480e142cfb autotest.py: remove TARGET no longer required 2016-05-27 08:07:07 -03:00
Peter Barker
3548f90d3a autotest: create SIL object to hold valgrind logpath 2016-05-27 08:07:07 -03:00
Peter Barker
ced07906ad Tools: correct valgrind run in autotest.py 2016-05-27 08:07:07 -03:00
Peter Barker
7b86a05722 Tools: convert autotest build.X and fly.X to use waf build system 2016-05-27 08:07:07 -03:00
Andrew Tridgell
b76a993f7e autotest: support coaxcopter 2016-05-26 17:09:31 +10:00
Andrew Tridgell
ba3703303a autotest: added SingleCopter 2016-05-26 16:37:58 +10:00
Francisco Ferreira
ec0a80b6f4 ci: increase ccache size
make based builds require more space
insert exception for sitltest
2016-05-25 22:14:47 -03:00
Andrew Tridgell
1e44251d35 Replay: include a minimal set of FMT messages at start of log 2016-05-26 10:10:27 +10:00
Andrew Tridgell
366d95f45e Replay: fixed FMT messages in replay output 2016-05-26 09:40:21 +10:00
Gustavo Jose de Sousa
8e9752c3d3 waf: px4: setup build summary
- Pass the correct nodes as the binaries for the programs task generators.
- Print extra information specific to PX4 build.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
d65a7897e4 waf: px4: keep ELF files around
Including px4io. We need them for the build summary. Also, that makes it easier
to use gdb on them.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
4f3af94c57 waf: build_summary: add Waf tool 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
afcabda21c waf: use better style for add_option() calls
Setting the "help" keyword argument may not fit in one line sometimes. This
patch adds the following convention to calls to add_option() in order to
address that issue in a better way:

    1) The "help" keyword must always be the last argument to be passed.

    2) If the help string is a literal string or a literal string with some
    operation (e.g. "%" operator) and setting the "help" keyword in the code
    doesn't fit a line (considering the limit of characters in a line), then
    the help string must be a triple-quoted string. That has the advantage of
    not having to have several "+" operations for long help strings. In that
    case, the help message must start on the next line and the closing
    triple-quotes must be on a separate line together with the closing
    parenthesis.

The requirement (1) makes it easier to make the style exception in (2)
acceptable.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
64b8ec61c7 waf: set lib as output dir for static libraries 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
236a62f4b9 waf: create program_dir directory
There's an upcoming patch that moves all static libraries to
`build/<board>/lib/`. That way, the program directory won't be created
automatically by the build system and that will cause problems for PX4 builds,
since it builds ardupilot programs as static libraries and copies stuff to the
program directory.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
844222870c waf: boards: bind get_board() to configure and build contexts
A convenience, since we don't expect the board to change for a given
configuration.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
80f03b618b waf: toolchain: add find_toolchain_program() 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa
06a515645e waf: px4: reconfigure PX4Firmware for each program
A (possible) bug in CMake makes it not to relink firmware_nuttx sometimes when
the following sequence of events happen with very short period of time in
between them:
    1) cmake target build_firmware_px4fmu-v2 just finishes
    2) px4-extra-files/libap_program.a is replaced with the next library
    3) cmake target build_firmware_px4fmu-v2 is run

It's unfortunate to have to reconfigure PX4Firmware with a different path
because of the overhead added.

That problem was found with CMake 3.5.2 and is reproducible with the following
bash script (with git HEAD at ae3cb05 'HAL_PX4: disable "Overtime in task"
msg'):

```
modules/waf/waf-light configure --board px4-v2
modules/waf/waf-light build --targets bin/arduplane,bin/arducopter-quad

fails=0
total=0
while true; do
    cp build/px4-v2/bin/libarducopter-quad.a \
       build/px4-v2/px4-extra-files/libap_program.a
    cmake --build build/px4-v2/modules/PX4Firmware \
          --target build_firmware_px4fmu-v2 &> /dev/null
    h1=$(sha256sum build/px4-v2/modules/PX4Firmware/src/firmware/nuttx/firmware_nuttx \
                   | cut -d" " -f1)

    cp build/px4-v2/bin/libarduplane.a build/px4-v2/px4-extra-files/libap_program.a
    cmake --build build/px4-v2/modules/PX4Firmware \
          --target build_firmware_px4fmu-v2 &> /dev/null
    h2=$(sha256sum build/px4-v2/modules/PX4Firmware/src/firmware/nuttx/firmware_nuttx \
                   | cut -d" " -f1)

    [[ $h1 == $h2 ]] && ((fails++))
    ((total++))
    printf "\r%d/%d" $fails $total
done
```
2016-05-25 11:51:40 -03:00
Gustavo Jose de Sousa
fee5053493 waf: cmake: reconfigure when configuration data change
Create a new configuration task a configuration in the CMakeConfig object
changes. That allows building targets for different configurations in one waf
build run.
2016-05-25 11:51:40 -03:00
Gustavo Jose de Sousa
ce0ae66b19 waf: cmake: add CMAKE_VARS to task uid()
To allow the correct multiple instantiations of the cmake_configuration tasks
for different states CMake variables.
2016-05-25 11:51:40 -03:00
Gustavo Jose de Sousa
b6a5052a97 waf: cmake: use CMakeConfig class instead of taskgen
That will make it easier to allow reconfiguration of cmake builds on a single
waf build run.
2016-05-25 11:51:40 -03:00
Francisco Ferreira
fe0c49ec54 ci: only run make builds for PX4 or when it is a scheduled job
Let waf figure out how many jobs to run
2016-05-25 11:39:07 -03:00
Francisco Ferreira
292251e2aa ci: add time to complete make builds 2016-05-25 11:38:59 -03:00
Francisco Ferreira
a74a7e5dfe ci: update ccache and improve its support
Update ccache to 3.2.5
Set ccache size
Display ccache statistics for each build
Disable ccache for configure phase
Export ccache bin path
travis: remove ccache stats before saving cache
2016-05-25 11:38:51 -03:00
Andrew Tridgell
736c162d21 Replay: added --param-file option 2016-05-25 20:46:18 +10:00
Andrew Tridgell
600c23f3bf Replay: use SCHED_LOOP_RATE for loop rate if available 2016-05-25 10:45:46 +10:00
Peter Barker
0c70f0fc35 sim_vehicle.py: correct rebase 2016-05-24 21:02:36 +10:00
khancyr
c9e877b3a5 sim_vehicle.py : reorder frame by type 2016-05-24 19:54:12 +10:00
khancyr
25066be990 sim_vehicle.py : add hexacopter 2016-05-24 19:53:36 +10:00
Grant Morphett
2f7a386b30 Rover: Added the new skid steering parameters file for SITL. 2016-05-24 12:24:53 +10:00
Grant Morphett
d993c25cb1 Rover: Added skid steering rover as frame type for SITL. 2016-05-24 12:24:53 +10:00
Grant Morphett
6d675dfcb7 Rover: Just fixing a type in the default params.
Should of been RC1, not RC2.  I also added a couple of other default
parameters for completeness.
2016-05-24 12:24:53 +10:00
Lucas De Marchi
92411402b6 Tools: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi
563614e84b waf: check for libiio for all linux boards 2016-05-23 12:06:42 -03:00
Lucas De Marchi
04fc1e22da waf: check for lttng-ust for all linux boards 2016-05-23 12:06:42 -03:00
Lucas De Marchi
9ac6c399e9 waf: accept env variable to append library
Change check_librt() to do everything it needs to check for librt.
2016-05-23 12:06:42 -03:00
Andrew Tridgell
a1c52415e9 waf: pass mavlink include path into cmake build 2016-05-21 15:25:18 +10:00
Andrew Tridgell
7e7c21d114 waf: update for MAVLink2 build 2016-05-21 15:25:17 +10:00
Andrew Tridgell
d521852f84 autotest: make -P2 only control mavproxy mavlink protocol version 2016-05-21 15:25:15 +10:00
Andrew Tridgell
511ca6d764 autotest: support -P2 option for SITL with MAVLink2 2016-05-21 15:25:11 +10:00
Paul Riseborough
b1e9207c0f Replay: extend ekf fault status reporting coverage 2016-05-21 15:13:51 +10:00
Randy Mackay
00445ce7bd SITL: parameter file to enable rangefinder in copter 2016-05-21 10:36:53 +09:00
Peter Barker
a5db4194bd Tools: update PrintVersion.py for new firmware version location 2016-05-21 09:03:31 +10:00
Gustavo Jose de Sousa
bc62164ac9 waf: mavgen: scan for implicit dependencies
Process the input file to catch dependencies. Otherwise, changes in included
files wouldn't trigger the code regeneration.
2016-05-19 18:47:07 -03:00
Gustavo Jose de Sousa
0f60c8ed4f waf: boards: check for librt when necessary 2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa
f10c150e70 waf: cxx_checks: add check_librt()
That function verifies for the necessity of linking against librt. If so, then
it checks if it is possible to do so.
2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa
e630c2b33f waf: cxx_checks: define ap_common_checks() instead of configure()
That allow loading the cxx_checks tool before the calls to configure_env().
That way, we can add check functions to be used across boards.
2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa
83244dfe10 waf: cxx_checks: add copyright notice 2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa
468e8284f0 waf: cxx_checks: use check() instead of check_cxx()
check_cxx() is deprecated.
2016-05-19 18:15:06 -03:00
Francisco Ferreira
f7f90546d1 ci: build PX4 with waf again 2016-05-18 15:36:48 -03:00
Francisco Ferreira
057124bd90 waf: px4: use lib/rc for v4
Some functions from that module are necessary for px4-v4.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa
8578d7c16f waf: px4: don't add libarm_cortexM4lf_math.a to extra libs
This is following d02abf2 ("Removed CMSIS.") from PX4Firmware.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa
de96ca95a6 CPUInfo: cast result of sizeof to unsigned long
That fix works when size_t is 32 or 64 bits.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa
f29d8bd42c waf: px4: set ARDUPILOT_BUILD cmake variable
That allow changing PX4Firmware build system to accommodate ardupilot's build.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa
5b91a6e065 Tools: magcal_graph: add mavproxy module
That is added as a reference implementation on how to interpret the field
`completion_mask` from the `MAG_CAL_PROGRESS` mavlink message.
2016-05-18 13:28:52 -03:00
Gustavo Jose de Sousa
2b57c146fe Tools: sitl_calibration: add note on using calibration model
This can avoid users having problems as reported at issue #4088 ("Calibration
not working in sitl").
2016-05-18 13:28:52 -03:00
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
Gustavo Jose de Sousa
b53f38bb02 waf: boards: cache board in a variable
That allows subsequent calls to get_board() to work nicely, with no need of
instantiating a board on every single call.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
36b49debf6 waf: boards: allow defining board name
If the name is not defined, then the class name will be used.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
4f55c75767 waf: boards: pass configure context to configure_env()
There will be cases when the configuration context will be needed.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
2f324c056f waf: cmake: live output!
Waf buffers command output and spit it after the command is done. For external
builds, that might give the wrong impression that the build stalled.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
1f60e9e3e8 waf: cmake: refactor methods to accept cmake_config parameter
That makes methods more flexible for use.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
b0e7fe26d5 waf: cmake: fix target processing for cmake_build
Accept passing a single Node object to target option.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
07700a821c waf: cmake: add method get_cmake_bldnode()
That allows a user to have access to the cmake build node before the configure
task generator is posted.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
b077613f28 waf: cmake: use BLUE color for cmake tasks 2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
03146c5d15 waf: cmake: move cmake build task creation to a function
That enables other tools to create the task directly.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
049abec55b waf: cmake: add keyword parameter cmake_output_patterns 2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa
4f82120c8f waf: cmake: improve documentation regarding target option
That feature can also be used within wscripts with no problem. The code added
in the example shows that.
2016-03-14 11:54:29 -03:00
Grant Morphett
0d9a3840d8 autotest: Added submodule update and removed old modules update
Firstly build.All was failing as the submodules had not been updated
so the 'git submodule update' in this commit resovles that.
Secondly, now that the dependant projects like PX4Firmware etc are git
submodules of ardupilot we no longer need to check them out separately
and update them so I have removed all those.
I left MAVProxy as it isn't a submodule of ardupilot.
2016-03-08 11:40:48 +11:00
Gustavo Jose de Sousa
86c1c6da5c waf: fix environment boolean values
It is more natural to use `env.FOO = True` then `env.foo = [True]`.
2016-03-03 14:58:03 -03:00
Gustavo Jose de Sousa
79b724dce8 waf: ardupilotwaf: fix board env processing
Two things are fixed with this patch:
    1. We sort dictionaries' keys if they aren't OrderedDict instances. Since
    dict objects don't guarantee order, environment variables may have contents
    in wrong order, causing unnecessary rebuilds.
    2. We only use prepend_value() if there's already a value set for the key
    and that value is list. Before this change, boards couldn't set
    non-iterable values.
2016-03-03 14:58:03 -03:00
Lucas De Marchi
cca8a86962 Tools: Use GCC 4.9 as an Ubuntu prereq
This should actually use the install-prereq script so we don't duplicate
effort on the maintenance of these scripts. But let's at least install
the correct version for now.
2016-02-29 17:00:27 -03:00
Fredrik Hedberg
e88e8835b1 Tools: Use GCC 4.9 as an Ubuntu prereq as older version is no longer available. 2016-02-29 16:58:48 -03:00
Gustavo Jose de Sousa
1233022c78 waf: cmake: synchronize cmake build tasks of same configuration
Running cmake build tasks of the same configuration in parallel my cause race
condition.
2016-02-27 03:15:45 -03:00
Gustavo Jose de Sousa
8734432196 waf: ardupilotwaf: don't use Node object for ap_program target
That will make platform specific naming be ignored. We use a string instead, to
let Waf tweak the target name correctly for us. The '#' prefix is to tell Waf
that the path is relative to bld.bldnode (instead of bld.path, which is the
default).
2016-02-27 03:13:08 -03:00
Staroselskii Georgii
1107190656 waf: boards: add navio2 2016-02-27 03:06:50 -03:00
Andrew Tridgell
15945c50cb scripts: ensure we have clean build for px4 2016-02-24 19:33:16 +11:00
Gustavo Jose de Sousa
181b6f5c2e waf: cmake: do a clean configuration
We need to remove CMakeCache.txt, otherwise cached variables would remain the
old value when they are removed from cmake_vars parameter.

We use `os.remove()` instead of `Node.delete()` because the latter removes the
node instance from its parent's children list. That makes the node be ignored
when storing persistent information after the build, thus the node signature
wouldn't be saved with that approach, which would make waf always think that
the task should be executed.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
eacf9d8a0e waf: cmake: declare CMAKE_BLD_DIR as a value dependency
Since we set that value to the task's cwd property, we need to declare it as a
value dependency of cmake_configure_task.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
6c914349d0 waf: cmake: define proper uid() functions
The default implementation takes into account the task's output and input
nodes. That isn't very well applicable for cmake tasks, so we define proper
uid() methods.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
b5f20459e7 waf: cmake: set CMakeCache.txt as output of cmake_configure task
That provides the behavior we implemented in runnable_status(). Thus, we don't
have to override that method anymore.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
ed288ed345 waf: cmake: ensure order of cmake_vars
We need to ensure the order in which the variables are defined to avoid
unnecessary execution of the configuration task.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
c609b27afc waf: gbenchmark: use cmake tool
A little addition in the root wscript was also necessary.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
e883242c31 waf: cmake: add Waf tool 2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
38da32853a ci: use --enable-benchmarks in waf configure 2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
662e45fda2 waf: move --check-verbose option declaration
We move it to the correct "scope", that is, ardupilotwaf.py, where it's really
used.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa
8c4d4f3f2a waf: make options groups accessible for any tool
That allows options being declared where they're really used. Additionally, we
load ardupilotwaf after the other tools so that we can create our groups after
all non-ardupilot option groups are created. That makes our groups appear as
the last ones in the help message, which makes it easier to locate them.
2016-02-22 15:36:48 -03:00
Kevin Guest
17378bd42a autotest: Add Rotherham 2016-02-22 16:21:16 +11:00
Andrew Tridgell
119cf6bb13 ci: added sitltest target
this adds some basic SITL testing to our CI
2016-02-22 12:34:32 +11:00
Gustavo Jose de Sousa
898c2faaab waf: git_submodule: fix uid() method for python3
Python3's hashlib.md5() requires Unicode-objects to be encoded before hashing.
2016-02-19 20:28:03 -02:00
Lucas De Marchi
15ce176818 waf: add -Wundef to all boards 2016-02-19 12:34:24 -02:00
Lucas De Marchi
f0277cecb4 waf: ignore -Wundef for gtest
The gtest header uses lots of undefined macros, showing lots of warnings
if we enable -Wundef. Ideally we could use a #pragma to ignore the
warning only from the correct header, but this currently doesn't work
with g++ - see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

So for now we disable the warning completely when compiling gtest or any
test that uses its header.

Thanks Gustavo Sousa
2016-02-19 12:34:24 -02:00
Gustavo Jose de Sousa
393bea8945 waf: boards: use classes for boards definition
In order to provide board-specific behavior. For example, the incoming PX4
build will require custom build behavior.
2016-02-18 14:33:46 -02:00
Lucas De Marchi
a01b933cb9 waf: add missing warnings from AP_Common.h
Copy the missing warnings from AP_Common.h and reorder the warnings to
be more clear on intent. This will later let us remove the warnings from
the header.
2016-02-12 20:41:29 +11:00
Gustavo Jose de Sousa
7259ac33f0 waf: git_submodule: override uid()
By running waf with option -v, waf was complaining about the update_submodule
tasks having the same identifier. That happened because the default uid()
method depended on the class name, inputs and outputs. Since this type of task
doesn't have input nor output file, we need to override uid() so that it uses
the submodule path for the task identifier.
2016-02-11 17:08:35 -02:00
Randy Mackay
898673f5e8 web-firmware: fix link to companion computer images 2016-02-08 14:22:37 +09:00
Randy Mackay
434fe919d6 web-firmware: add link to companion computer images 2016-02-08 10:19:19 +09:00
Gustavo Jose de Sousa
8655fdfd7f waf: use git_submodule tool through GIT_SUBMODULES variable
With this change, there's no need to verify if the submodule is initialized,
because the submodules in GIT_SUBMODULES are automatically initialized and
updated if necessary before the build tasks are performed.

One downside of this change is that Google Benchmark configuration is now done
only during build. However that is minor, since now there are easy ways to
separately build different targets and program groups, so that a fail in
benchmark build doesn't really affect the other targets.
2016-02-06 10:25:08 -02:00
Gustavo Jose de Sousa
fdc87df074 waf: create taskgen for gtest in _build_common_taskgens
So that it belongs to 'build' group.
2016-02-06 10:25:08 -02:00
Gustavo Jose de Sousa
049feb3e9e waf: git_submodule: add git_submodule tool 2016-02-06 10:25:08 -02:00
Daniel Frenzel
970b171414 waf: remove AP_Limits from ignored libraries 2016-02-04 09:50:55 +09:00
Daniel Frenzel
a735db2870 Tools: remove AP_Limits unit test 2016-02-04 09:50:43 +09:00
Gustavo Jose de Sousa
05f4c8b5b1 waf: ardupilotwaf: reset LAST_IDX on every build
That is a workaround so that one can use `waf bin tests`, for example.  In our
context, the only restriction to the task generators creation is values defined
during configuration. Thus, ideally, the recursion and task generators creation
should be done only once for multiple build calls. We should do that in the
future.
2016-02-03 12:24:21 -02:00
Gustavo Jose de Sousa
7b0a6d301d ci: use command 'all' instead of 'build' for waf
The command build uses 'bin' programs group by default. By using the command
'all', we tell the build system to build all programs.
2016-02-01 14:08:39 -02:00
Gustavo Jose de Sousa
8718f5be4f waf: ardupilotwaf: rename build_shortcut() to build_command()
Rationale:
 1. That function creates a separate build context class instead of just
    creating a wrapper for calling build (previous approach).
 2. The check command isn't a build shortcut since there's no way of calling it
    without using 'check' explicitly.
2016-02-01 14:08:39 -02:00
Gustavo Jose de Sousa
8be2db4d01 waf: ardupilotwaf: add parameter doc to build_shortcut()
That makes it possible to display meaningful information on the help message.
2016-02-01 14:08:38 -02:00
Gustavo Jose de Sousa
c5c129d15f waf: ardupilotwaf: add parameter program_group_list to build_shortcut() 2016-02-01 14:08:38 -02:00
Gustavo Jose de Sousa
a867dcdd07 waf: ardupilotwaf: make build_shortcut create build context class
Instead of just creating a wrapper. With that, the option targets is visible
only to that command instead of all commands in Options.commands.
2016-02-01 14:08:38 -02:00
Gustavo Jose de Sousa
5699bf04d0 waf: rename parameter blddestdir to program_group
It's a good idea to consolidate the idea that all programs belong to a group
that has it's own directory.
2016-02-01 14:08:32 -02:00
Gustavo Jose de Sousa
b93c3d1772 waf: add option --program-group 2016-02-01 14:08:10 -02:00
Lucas De Marchi
d844b90d5e waf: remove duplicated warning flag 2016-01-30 13:47:28 -02:00
Randy Mackay
e78595bf48 Frame_Params: remove defaults from Bebop2 params
Removed parameter values that should already be these values by default on a fresh install
2016-01-23 11:42:13 +09:00
Gustavo Jose de Sousa
53f22f4982 waf: fix legacy defines
The following fixes where applied:
 - Value for APM_BUILD_DIRECTORY must be prefixed with APM_BUILD_
 - Renamed parameter name to sketchname, so we differentiate the real program
   name from the legacy sketch name
 - Use directory name instead of program name as argument for
   _get_legacy_defines()
2016-01-22 20:14:57 -02:00
Gustavo Jose de Sousa
c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
a2d2661765 waf: use methods from bld instead of ardupilotwaf for the remaining 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
12cfe222eb waf: ardupilotwaf: decorate build methods with @conf
Bind functions used in wscripts to build context. Additionally, a new function
is created and also decorated with @conf, common_vehicle_libraries(), which
returns COMMON_VEHICLE_DEPENDENT_LIBRARIES.  This patch is a preparation for
making wscripts use methods bound to the build context instead of using them
directly from ardupilotwaf.
2016-01-22 20:10:28 -02:00
Gustavo Jose de Sousa
cf432e8b3e waf: ardupilotwaf: rename vehicle_stlib to ap_stlib
That function is not only for vehicles.
2016-01-22 20:10:28 -02:00
Gustavo Jose de Sousa
a35c0d48b0 waf: ardupilotwaf: rename program to ap_program
Make the rename so that there is no name clashes when defining it as a taskgen
method.
2016-01-22 20:10:28 -02:00
Julien BERAUD
90d266698d Frame_Params: Bebop 2 tuning by Leonard 2016-01-22 13:58:46 -02:00
Andrew Tridgell
417176c0b2 autotest: reduce speedup on quadplane test to 10
mavproxy wasn't keeping up on autotest server
2016-01-21 07:46:18 +11:00
Lucas De Marchi
36d669a2ab ci: switch linux/sitl compiler to 4.9 2016-01-20 14:19:08 -02:00
Lucas De Marchi
1cd20c50a6 ci: integrate ccache configuration
Also split the exportline setting to allow one PATH per line.
2016-01-20 14:19:07 -02:00
Ricardo de Almeida Gonzaga
c8d01f4bf4 ci: add configure-ci.sh
In order to use it in Travis and in Semaphore.
2016-01-20 14:19:07 -02:00
Ricardo de Almeida Gonzaga
0db54e7b36 ci: change TRAVIS_BUILD_TARGET to CI_BUILD_TARGET on build_ci.sh 2016-01-20 14:19:07 -02:00
Ricardo de Almeida Gonzaga
e816a4845a ci: rename build_all_travis.sh to build_ci.sh
Since we're going to support SemaphoreCI[1] besides Travis.

[1] - https://semaphoreci.com/
2016-01-20 14:19:07 -02:00
Andrew Tridgell
926c37a876 autotest: increase timeout in quadplane test 2016-01-20 17:23:36 +11:00
Andrew Tridgell
c2a12b55a0 scripts: raise max lockage in autotest 2016-01-20 07:43:43 +11:00
Andrew Tridgell
b8c6bee132 autotest: raise overall timeout 2016-01-20 07:42:29 +11:00
Andrew Tridgell
15c8a27d5e scripts: added some debug to travis script 2016-01-20 07:42:28 +11:00
Gustavo Jose de Sousa
6ca58eac78 travis: fix verification for calling waf check
The use of `[[ $t == linux ]] && $waf check` makes the script exit with
non-zero status when $t isn't linux *and* that's the last thing executed.
2016-01-19 11:56:30 -02:00
Andrew Tridgell
56f8e3d414 scripts: added runfliptest.sh example script 2016-01-19 14:30:09 +11:00
Andrew Tridgell
889da98ca6 scripts: cope with older releases that don't support FMUv4 2016-01-19 14:18:32 +11:00
Gustavo Jose de Sousa
d7f50ab668 travis: call waf check for linux
That helps preventing applying code that break unit tests.
2016-01-19 00:21:15 -02:00
Gustavo Jose de Sousa
54d938e2c4 waf: fail the check if not all test programs succeed
So that integration with Travis work properly.
2016-01-19 00:21:15 -02:00
Gustavo Jose de Sousa
8d0522f6ef waf: gtest: add gtest Waf tool
Tool for building gtest from the submodule.
2016-01-19 00:21:15 -02:00
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
Lucas De Marchi
a124fbc4c2 Travis: don't build same configuration multiple times
In ArduPlane "make all" is the same as "make sitl" and both sitl and
linux are already covered by the loop below.  Don't build the same
configuration multiple times.
2015-06-17 09:26:03 +10:00
Andrew Tridgell
43d6060ba7 autotest: removed "Library Parameters" heading in autodocs 2015-06-16 10:01:03 +10:00
Andrew Tridgell
c7cb980498 Replay: support IMT messages 2015-06-16 09:53:55 +10:00
Andrew Tridgell
46926765c4 autotest: support general models 2015-06-15 09:20:56 +10:00
Andrew Tridgell
22d5d2e251 scripts: fixed build_binaries for submodules
no longer have PX4_ROOT
2015-06-15 06:54:02 +10:00
Peter Barker
71bc48189e Replay: remove dangling declarations from LogReader.h
These seem to have been left in after MsgHandler was factored out
2015-06-14 17:25:08 +10:00
Peter Barker
f996bf4307 Replay: move LR_MsgHandlers into their own files 2015-06-14 17:17:42 +10:00
Peter Barker
7eb588e9ff Replay: use a subclasss of DataFlashFileReader to determine log rate 2015-06-14 16:47:52 +10:00
Peter Barker
d41b21cd19 Replay: split off a base class for reading dataflash logs 2015-06-14 16:47:52 +10:00
Peter Barker
0b5e645075 Replay: grab reference to timestamp rather than timestamp
PARM messages would not have been updating the clock correctly
Also, random stack corruption...
2015-06-14 16:34:01 +10:00
Staroselskii Georgii
c0dceb667d Travis: reduced number of threads used for a build 2015-06-11 16:27:51 +10:00
Peter Barker
125042e1db Replay: use GetOptLong for command line parsing 2015-06-10 10:14:15 +10:00
Peter Barker
f4db241bf6 Replay: avoid dataflash buffer filling up on many pass-through messages 2015-06-09 21:52:46 +10:00
Peter Barker
5fb46b0e11 Replay: fix dataflash overflow on timestamp-poor (older) logfiles 2015-06-09 21:52:45 +10:00
Andrew Tridgell
57cef63b94 autotest: enable submodule build for binaries 2015-06-09 16:57:30 +10:00
Andrew Tridgell
28ffd9d4ed travis: setup for git submodules 2015-06-09 16:51:55 +10:00
Randy Mackay
fbec1e63ad autotest: fix typo in Bitmask keyword for autodocs 2015-06-05 09:19:26 +09:00
Randy Mackay
7c851b781b autotest: allow Bitmask keyword in autodocs 2015-06-04 21:31:41 +09:00
Andrew Tridgell
b1002eae3b Replay: fixed -A0 for "arm immediately" 2015-06-03 12:31:21 +10:00
Randy Mackay
08466d34e8 Frame: add SToRM32 gimbal parameters
These parameters can be used to configure ardupilot to control a SToRM32
3-axis gimbal attached to Pixhawk Telem2 port using the MAVLink
protocol.  Gimbal Tilt is controlled using the RC6 input
2015-06-02 14:49:40 +09:00
Andrew Tridgell
a87279cfe5 Hello: convert example from .pde to .cpp 2015-06-01 18:12:16 +10:00
Andrew Tridgell
e233376074 scripts: don't build VARTest example 2015-06-01 17:07:09 +10:00
Andrew Tridgell
bd71e8e848 VARTest: removed example sketch
this isn't of much use any more
2015-06-01 17:07:09 +10:00
Andrew Tridgell
a3546a3ac2 CPUInfo: convert example from .pde to .cpp 2015-06-01 17:07:08 +10:00
Andrew Tridgell
26e55f078a Replay: converted to .cpp files 2015-06-01 16:15:08 +10:00
Andrew Tridgell
f4c61acbc2 autotest: removed old python antennatracker simulator 2015-06-01 14:20:27 +10:00
Andrew Tridgell
074a6cad91 autotest: use new tracker simulator in sim_vehicle.sh 2015-06-01 12:54:06 +10:00
Andrew Tridgell
b6ed86465b autotest: prioritise .cpp projects over .pde projects 2015-05-30 15:21:25 +09:00
Andrew Tridgell
337cd3d4a7 autotest: allow RebootRequired keyword in autodocs 2015-05-29 16:35:33 +10:00
Andrew Tridgell
b27d0a6525 Replay: handle replay on older logs
we now pass-thru all messages except those that are being generated by
replay. We also pass-thru the FMT headers for those messages
2015-05-28 13:30:38 +10:00
Andrew Tridgell
2007d2b6eb Replay: cope with FRAM messages
use them to trigger ahrs updates
2015-05-28 13:30:37 +10:00
Peter Barker
8eafc209a9 Replay: understand and use 64-bit timestamps in Replay 2015-05-27 11:54:17 +10:00
Andrew Tridgell
320b69c375 autotest: make sim_vehicle.sh work better on windows 2015-05-25 16:50:27 +10:00
Andrew Tridgell
532839d7dd autotest: remove old python simulators 2015-05-25 12:22:28 +10:00
Andrew Tridgell
9f09ac64cf autotest: enable internal MAVLink gimbal
and add -B option to help debugging
2015-05-25 12:20:27 +10:00
Andrew Tridgell
0d20167294 autotest: removed earth-frame rates usage
work only with rates in body frame
2015-05-25 08:42:21 +10:00
Andrew Tridgell
8f5c663463 autotest: show -M option in usage for sim_vehicle.sh 2015-05-24 15:24:02 +10:00
Andrew Tridgell
90aa834102 autotest: use internal simulator backends when possible 2015-05-23 17:14:52 +10:00
Andrew Tridgell
2392481945 autotest: remove old ROS runsim code 2015-05-22 16:09:58 +10:00
Andrew Tridgell
d734e700fc autotest: support last_letter in sim_vehicle.sh 2015-05-22 16:07:44 +10:00
Andrew Tridgell
d00f1c0d4d scripts: fixed handling of no-pde for fw version 2015-05-22 16:07:43 +10:00
Andrew Tridgell
088fb95192 autotest: make last_letter run at 500Hz 2015-05-22 16:07:43 +10:00
Andrew Tridgell
a661187ac0 autotest: added some debug to last_letter startup 2015-05-21 21:17:38 +10:00
Andrew Tridgell
4c96ec26e5 autotest: fixed the -e option for sim_vehicle.sh 2015-05-21 21:16:32 +10:00
Andrew Tridgell
dfc7878b14 autotest: fixed cpp files for parameter parsing 2015-05-21 11:42:32 +10:00
Andrew Tridgell
332fdbbbea Scripts: removed 'make configure' 2015-05-21 10:54:19 +10:00
Andrew Tridgell
64ace3c0c1 autotest: removed 'make configure' 2015-05-21 10:54:19 +10:00
Andrew Tridgell
b63028621a VARTest: removed NOINLINE define 2015-05-21 09:36:04 +10:00
Andrew Tridgell
dc1ff9a757 Replay: added in_list() method
neaten up code
2015-05-19 20:22:46 +10:00
Andrew Tridgell
34fe39f17d Replay: force COMPASS_ORIENT to 0
we use compass.setHIL() in body frame, or must use an orientation of 0
to give the right value
2015-05-19 20:22:46 +10:00
Peter Barker
91b761cfb0 Replay: merge MessageHandler_* into MsgHandler.h/MsgHandler.cpp
These were trivial classes; having lots of these files around made
it painful to work with.
2015-05-19 20:22:45 +10:00
Andrew Tridgell
f08f0ca2f9 Replay: show time of AHRS health change 2015-05-19 15:21:22 +10:00
Andrew Tridgell
ba930f8cf1 Replay: removed the timestamp rounding code
this makes things worse for plane replay
2015-05-19 13:18:02 +10:00
Andrew Tridgell
52f6332fa9 Replay: pass through some message types to output log
this gives mode information in output log
2015-05-18 10:08:27 +10:00
Andrew Tridgell
7177d5df7e Replay: removed attempt to interpolate IMU data
it seems to cause more harm than good
2015-05-18 09:51:14 +10:00
Andrew Tridgell
dd7c42be67 autotest: setup offsets for 2 SITL compasses 2015-05-16 07:07:35 +10:00
Andrew Tridgell
be8ebd5802 travis: don't require apm1-nologging to work 2015-05-15 17:55:50 +10:00
Andrew Tridgell
49146a2a88 Replay: call Log_Write_POS() 2015-05-15 14:28:15 +10:00
Andrew Tridgell
56f44266d8 Replay: fixed for new compass API 2015-05-15 14:25:44 +10:00
Andrew Tridgell
a356ad1c79 Replay: added MAG2 message 2015-05-15 14:25:44 +10:00
Andrew Tridgell
9f05e54d90 Replay: added support for EV message for copter arming 2015-05-15 14:25:44 +10:00
Andrew Tridgell
4e3d18bee4 Replay: added ARM message to logs, and auto ARM/DISARM 2015-05-15 14:25:43 +10:00
Randy Mackay
c86a396ca0 SITL: allow easier slowing of copter test 2015-05-13 22:40:03 +09:00
Lucas De Marchi
35b550f03d autotest: fix usage of tabs instead of space
Python 3 is stricter with regard to using tabs instead of space (PEP8):
	Spaces are the preferred indentation method.

	Tabs should be used solely to remain consistent with code that
	is already indented with tabs.

	Python 3 disallows mixing the use of tabs and spaces for
	indentation.

	Python 2 code indented with a mixture of tabs and spaces should
	be converted to using spaces exclusively.
2015-05-13 20:51:37 +09:00
Randy Mackay
2ac30a53ad SITL: remove copters 3rd accel scaling from params 2015-05-12 16:43:02 +09:00
Randy Mackay
2ad5011177 SITL: slow down autotest for slow VMs 2015-05-12 16:31:32 +09:00
Andrew Tridgell
fb245cd77b autotest: removed unmaintained jenkins autotest code
this can be revived later if there is interest
2015-05-11 11:27:48 +10:00
Andrew Tridgell
68515d0324 autotest: fixed CopterAVC test 2015-05-11 11:26:54 +10:00
Andrew Tridgell
64a55c908f Replay: fixed trailing nul and don't wait for EKF to init 2015-05-11 11:19:11 +10:00
Andrew Tridgell
460489e2dc Replay: fixed cast of AP_AHRS_DCM 2015-05-11 09:41:43 +10:00
Andrew Tridgell
044a09425b autotest: cope with environments with no $DISPLAY 2015-05-11 09:19:54 +10:00
Andrew Tridgell
068b862888 autotest: use buildlogs directory consistently 2015-05-11 08:37:49 +10:00
Andrew Tridgell
aaff670ec4 autotest: use builtin JSBSim support for plane testing 2015-05-11 08:06:31 +10:00
Andrew Tridgell
ebf358138f autotest: use internal sim code for JSBSim 2015-05-10 21:58:05 +10:00
Peter Barker
32beaea48c Replay: use column labels rather than IDs in Replay.pde 2015-05-10 08:33:32 +10:00
Andrew Tridgell
6b668c08dc autotest: use internal rover sim in sim_vehicle.sh 2015-05-09 21:22:02 +10:00
Peter Barker
f3d1242d60 Replay: update Attitude on ATT rather than AHRS2 2015-05-09 20:54:07 +10:00
Holger Steinhaus
1cdc5f7c7f LogAnalyser: adapt to new APM:* vehicle names 2015-05-09 12:20:28 +09:00
Holger Steinhaus
46c3c26065 LogAnalyser: fix buffer calculations 2015-05-09 12:20:25 +09:00
Holger Steinhaus
a146b188a7 LogAnalyser: fix parsing of log messages without attributes (e.g. STRT) 2015-05-09 12:20:23 +09:00
Fabio Kruger
d585d5691d autotest: Enables copy to clipboard from xterm shells. Useful to copy gdb output. 2015-05-08 16:42:43 +10:00
Andrew Tridgell
7d3b3533e4 autotest: updated wiki page names for auto-generated parms 2015-05-08 16:38:17 +10:00
Ramón Roche
a2a0d834aa autotest: provide a custom location to set as sim home
this helps to set a custom home location on sim, if the location is
outside of the locations in Tools/autotest/locations.txt

Usage:

sim_vehicle.sh -l 37.872991,-122.302348,20,260

The location needs to be in the same format as the locations defined in
locations.txt inside autotest
2015-05-08 13:51:37 +10:00
Michael Day
a17f53254c autotest: Separated McMillan into McMillan and McMillan_East in locations.txt 2015-05-08 09:18:28 +09:00
Andrew Tridgell
c27b605b86 autotest: fixed sim_vehicle -w for plane 2015-05-07 17:28:00 +10:00
Andrew Tridgell
98df4fe60e autotest: make sim command clearer in logs 2015-05-06 10:10:13 +10:00
Andrew Tridgell
fe536a4b89 autotest: use internal copter sim for autotest 2015-05-05 16:56:40 +10:00
Andrew Tridgell
d5b51f2129 autotest: use internal simulator for copter test 2015-05-05 16:56:39 +10:00
Andrew Tridgell
209896afc7 autotest: use builtin rover model for autotest 2015-05-05 16:56:39 +10:00
Staroselskii Georgii
33aa05d7b3 Travis: NavIO compiler fix 2015-05-05 15:08:59 +10:00
Andrew Tridgell
75229ebf6c Tools: removed fast_atan 2015-05-05 13:57:10 +10:00
Andrew Tridgell
8c8c910ad0 autotest: removed the old AVR/2560 code in autotest
now checked with build_all
2015-05-05 10:39:31 +10:00
Andrew Tridgell
3d14b47d8b autotest: try to run at 10x, not 100x speed
if we run too fast mavproxy can't keep up
2015-05-05 09:45:59 +10:00
Andrew Tridgell
5d8a897330 autotest: use right sim backend for different vehicles 2015-05-05 09:45:59 +10:00
Andrew Tridgell
9e02ce44ae Tools: fix for HAL_SITL rename 2015-05-05 09:45:57 +10:00
Peter Barker
e1be814853 Replay: correct case for Airspeed when parsing airspeed messages 2015-05-01 09:18:49 +10:00
Peter Barker
67ba043b65 Replay: fix replay for CTUN (type=0) messages 2015-05-01 09:18:11 +10:00
Peter Barker
2b05f6e2b1 Replay: correct vehicle detection from MSG messages 2015-05-01 09:17:29 +10:00
Peter Barker
db833a6473 Replay: fix null-pointer dereference when fields not present 2015-04-30 20:01:49 +10:00
Andrew Tridgell
9204cab7d5 autotest: fixed rover test 2015-04-30 18:45:38 +10:00
Andrew Tridgell
1cbbf1ab9e autotest: start SITL in synthetic clock mode 2015-04-30 17:19:56 +10:00
Andrew Tridgell
a262f9d31b autotest: disable the devrelease build for now
not being kept updated
2015-04-30 14:09:59 +10:00
Randy Mackay
ff5f0f1d23 CPUInfo: add include to fix compile error 2015-04-29 10:10:21 +09:00
Peter Barker
56a8bf5460 Replay: use the message's name rather than number to determine which message handler to use for a message 2015-04-28 21:10:16 +10:00
Peter Barker
42351edfa6 Replay: use dataflash log format messages to extract message data instead of using structs
dataflash logs have been self-describing since 2013.  Replay now uses the descriptions supplied in the dataflash log to understand the format of any particular message.

This change should allow fields to be added to messages with no impact on Replay.
2015-04-28 21:10:15 +10:00
Randy Mackay
60bc986e71 VARTest: remove duplicate ap_message enum 2015-04-28 20:09:07 +09:00
Andrew Tridgell
d1de89f933 Travis: disable navio build due to another travis compiler bug 2015-04-28 14:50:10 +10:00
Staroselskii Georgii
9517bb3049 Travis: added navio target 2015-04-28 11:43:56 +10:00
Randy Mackay
211bdb0bb6 Replay: include AP_RangeFinder.h 2015-04-24 15:49:09 +09:00
Randy Mackay
1f58cb9980 Replay: pass range finder into ahrs constructor 2015-04-24 11:27:27 +09:00
Andrew Tridgell
3300de2c9d autotest: added some gyro and accel noise to copter sim
this noise should be kinematically consistent, so will be better for
the EKF
2015-04-21 21:33:27 +10:00
Andrew Tridgell
79f6d93dc9 autotest: change SIM_GPS_DELAY in parameters to 1
better matches uBlox
2015-04-21 21:05:07 +10:00
Andrew Tridgell
03b5305837 autotest: allow for negative col pitch in crrcsim heli
this allows for hovering upside down in acro mode
2015-04-21 20:45:30 +10:00
Randy Mackay
cebd578403 Frame Params: remove unused Advanced, Beginner 2015-04-21 10:44:26 +09:00
Andrew Tridgell
5f8c05b712 autotest: fixed extraction of defaults 2015-04-20 15:12:51 +10:00
Andrew Tridgell
8f09ee077c Replay: try to cope better with millisecond timestamps in 400Hz copter logs 2015-04-20 15:12:51 +10:00
Andrew Tridgell
76a81069c2 autotest: removed unused Rascal XML config 2015-04-20 09:09:23 +10:00
Andrew Tridgell
4fe39c67b4 Build: use git checkout -f
this is an attempt to avoid CRLF attributes breakage with builds
2015-04-20 08:59:50 +10:00
Andrew Tridgell
ffd4662ec4 autotest: convert rover sim to use sim_wrapper.py 2015-04-20 08:36:52 +10:00
Andrew Tridgell
dbeaccc3d9 autotest: auto-adjust frame rate for crrcsim 2015-04-20 08:20:50 +10:00
Andrew Tridgell
6897bfdc6b autotest: fixes for crrcsim with heli model 2015-04-20 08:05:29 +10:00
Andrew Tridgell
e9b6863b23 autotest: changed to new crrcsim FDM protocol format 2015-04-19 15:49:05 +10:00
Andrew Tridgell
59e25d4b2c autotest: added CRRCSim frame targets 2015-04-19 12:08:27 +10:00
Andrew Tridgell
1cd114e300 autotest: added initial CRRCSim backend 2015-04-19 12:08:26 +10:00
Andrew Tridgell
b5c40cad76 autotest: added gps_distance and gps_bearing
needed for CRRCSim backend
2015-04-19 12:08:26 +10:00
Andrew Tridgell
b6ff19e86c autotest: make default rate depend on model type 2015-04-19 12:08:26 +10:00
Andrew Tridgell
633e7122e7 autotest: added some lateral thrust to helicopter simulator 2015-04-19 12:08:26 +10:00
Andrew Tridgell
6b21aceed0 autotest: moved constrain() into util.py 2015-04-19 12:08:26 +10:00
Andrew Tridgell
b56538ff70 Tools: removed unused file 2015-04-19 12:08:26 +10:00
Andrew Tridgell
d691cfc3d8 autotest: rename sim_multicopter.py to sim_wrapper.py
it now supports multiple vehicle types
2015-04-19 12:08:25 +10:00
Randy Mackay
a04bc263f6 SITL: remove redundant takeoff from copter test 2015-04-16 21:00:38 +09:00
Randy Mackay
d0036290c1 SITL: copter test displays which RTL failed 2015-04-16 21:00:17 +09:00
Randy Mackay
1af6fb13ad SITL: clear glitches before running test 2015-04-15 17:33:25 +09:00
Randy Mackay
90b02a2685 SITL: shorten GPS glitch duration for copter 2015-04-15 17:33:23 +09:00
Hamish Willee
568e4c4d0e Update README.md
Ensure we only have to document the instructions in one place
2015-04-14 17:05:51 +10:00
Lucas De Marchi
5d69e2027c Travis: install gcc-multilib to get dependency libraries
We are failing to execute arm-none-eabi-gcc due to missing 32 bits
libraries in travis. Install gcc-multilib so we get all of them.

This commit also calls this version of gcc in the end of
install-travis-env.sh so if it's to fail, force it to fail early on.
2015-04-14 09:07:31 +10:00
Andrew Tridgell
d4e9418ad4 autotest: rename jsmsim folder to jsb_sim
this prevents problems on windows with virtualbox. It tries to run
JSBSim as the directory 'jsbsim' and fails
2015-04-14 09:04:11 +10:00
Andrew Tridgell
82f6bb3c17 autotest: use common frame time handling 2015-04-13 10:08:12 +10:00
Andrew Tridgell
7f89f73ad1 autotest: use simulation time for all time delays 2015-04-13 10:08:12 +10:00
Andrew Tridgell
d2a188c55d autotest: run plane test at maximum speed 2015-04-13 10:08:12 +10:00
Andrew Tridgell
9fdb74e006 autotest: run JSBSim in lock step mode
this requires an updated JSBSim
2015-04-13 10:08:11 +10:00
Andrew Tridgell
e8c115b9c3 autotest: check for the right version of JSBSim 2015-04-13 09:06:21 +10:00
Andrew Tridgell
370edde286 autotest: no need for special SIGCONT handling any more 2015-04-13 06:08:35 +10:00
Randy Mackay
11d0801c99 SITL: fix copter-avc test 2015-04-08 15:24:48 +09:00