mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-13 04:30:04 +08:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0902401115 | |||
| 87a6d36341 | |||
| bdf01061d0 | |||
| 62c76d62cd | |||
| 65c4a9190c | |||
| 5070238504 | |||
| 2f52c90885 | |||
| 9b4b67644d | |||
| 556c33cf8c | |||
| ac256eb64d | |||
| fd3efe168a | |||
| d091af4fc0 | |||
| 3ebea78d91 | |||
| 8361b8b3c6 | |||
| 2807e53838 | |||
| 2cc613cf64 |
-88
@@ -1,88 +0,0 @@
|
||||
Checks: '*
|
||||
,-cert-dcl50-cpp
|
||||
,-cert-err34-c
|
||||
,-cert-err58-cpp
|
||||
,-cert-msc30-c
|
||||
,-cert-msc50-cpp
|
||||
,-clang-analyzer-core.CallAndMessage
|
||||
,-clang-analyzer-core.NullDereference
|
||||
,-clang-analyzer-core.UndefinedBinaryOperatorResult
|
||||
,-clang-analyzer-core.uninitialized.Assign
|
||||
,-clang-analyzer-core.VLASize
|
||||
,-clang-analyzer-cplusplus.NewDelete
|
||||
,-clang-analyzer-cplusplus.NewDeleteLeaks
|
||||
,-clang-analyzer-deadcode.DeadStores
|
||||
,-clang-analyzer-optin.cplusplus.VirtualCall
|
||||
,-clang-analyzer-optin.performance.Padding
|
||||
,-clang-analyzer-security.insecureAPI.strcpy
|
||||
,-clang-analyzer-unix.API
|
||||
,-clang-analyzer-unix.cstring.BadSizeArg
|
||||
,-clang-analyzer-unix.Malloc
|
||||
,-clang-analyzer-unix.MallocSizeof
|
||||
,-cppcoreguidelines-c-copy-assignment-signature
|
||||
,-cppcoreguidelines-interfaces-global-init
|
||||
,-cppcoreguidelines-no-malloc
|
||||
,-cppcoreguidelines-pro-bounds-array-to-pointer-decay
|
||||
,-cppcoreguidelines-pro-bounds-constant-array-index
|
||||
,-cppcoreguidelines-pro-bounds-pointer-arithmetic
|
||||
,-cppcoreguidelines-pro-type-const-cast
|
||||
,-cppcoreguidelines-pro-type-cstyle-cast
|
||||
,-cppcoreguidelines-pro-type-member-init
|
||||
,-cppcoreguidelines-pro-type-reinterpret-cast
|
||||
,-cppcoreguidelines-pro-type-union-access
|
||||
,-cppcoreguidelines-pro-type-vararg
|
||||
,-cppcoreguidelines-special-member-functions
|
||||
,-google-build-using-namespace
|
||||
,-google-explicit-constructor
|
||||
,-google-global-names-in-headers
|
||||
,-google-readability-casting
|
||||
,-google-readability-namespace-comments
|
||||
,-google-readability-todo
|
||||
,-google-runtime-int
|
||||
,-google-runtime-references
|
||||
,-llvm-header-guard
|
||||
,-llvm-include-order
|
||||
,-llvm-namespace-comment
|
||||
,-misc-incorrect-roundings
|
||||
,-misc-macro-parentheses
|
||||
,-misc-misplaced-widening-cast
|
||||
,-misc-redundant-expression
|
||||
,-misc-unconventional-assign-operator
|
||||
,-misc-unused-parameters
|
||||
,-modernize-deprecated-headers
|
||||
,-modernize-loop-convert
|
||||
,-modernize-use-auto
|
||||
,-modernize-use-bool-literals
|
||||
,-modernize-use-default-member-init
|
||||
,-modernize-use-emplace
|
||||
,-modernize-use-equals-default
|
||||
,-modernize-use-equals-delete
|
||||
,-modernize-use-override
|
||||
,-modernize-use-using
|
||||
,-modernize-pass-by-value
|
||||
,-performance-inefficient-string-concatenation
|
||||
,-readability-avoid-const-params-in-decls
|
||||
,-readability-else-after-return
|
||||
,-readability-implicit-bool-cast
|
||||
,-readability-inconsistent-declaration-parameter-name
|
||||
,-readability-non-const-parameter
|
||||
,-readability-redundant-declaration
|
||||
,-readability-redundant-member-init
|
||||
,-readability-simplify-boolean-expr
|
||||
'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: google-readability-function-size.BranchThreshold
|
||||
value: '600'
|
||||
- key: google-readability-function-size.LineThreshold
|
||||
value: '4000'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '4000'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: readability-function-size.LineThreshold
|
||||
value: '4000'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
value: '4000'
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of the bug.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Drone switched on '...'
|
||||
2. Uploaded mission '....' (attach QGC mission file)
|
||||
3. Took off '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Log Files and Screenshots**
|
||||
*Always* provide a link to the flight log file:
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/en/getting_started/flight_reporting.html)).
|
||||
- Share the link to a log showing the problem on [PX4 Flight Review](http://logs.px4.io/).
|
||||
|
||||
Add screenshots to help explain your problem.
|
||||
|
||||
**Drone (please complete the following information):**
|
||||
- Describe the type of drone.
|
||||
- Photo of the IMU / autopilot setup if possible.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/).
|
||||
|
||||
**Describe problem solved by the proposed feature**
|
||||
A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
|
||||
|
||||
**Describe your preferred solution**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe possible alternatives**
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots for the feature request here.
|
||||
@@ -1,55 +0,0 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 60
|
||||
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 14
|
||||
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- priority-crtical
|
||||
- security
|
||||
- "[Status] Maybe Later"
|
||||
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: true
|
||||
|
||||
# Set to true to ignore issues in a milestone (defaults to false)
|
||||
exemptMilestones: true
|
||||
|
||||
# Label to use when marking as stale
|
||||
staleLabel: status/STALE
|
||||
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed in 2 weeks if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
|
||||
# Comment to post when removing the stale label.
|
||||
# unmarkComment: >
|
||||
# Your comment here.
|
||||
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
closeComment: >
|
||||
Closing as stale.
|
||||
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 10
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
|
||||
# pulls:
|
||||
# daysUntilStale: 30
|
||||
# markComment: >
|
||||
# This pull request has been automatically marked as stale because it has not had
|
||||
# recent activity. It will be closed if no further activity occurs. Thank you
|
||||
# for your contributions.
|
||||
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - confirmed
|
||||
@@ -1,33 +0,0 @@
|
||||
# How to install:
|
||||
# gem install github_changelog_generator
|
||||
# How to run:
|
||||
# github_changelog_generator -u PX4 -p Firmware
|
||||
# Description:
|
||||
# The following params are sensible defaults for the PX4 project,
|
||||
# if you want to do a changelog before a release you need to update since-tag and future-releases,
|
||||
|
||||
# Params:
|
||||
# github_changelog_generator --help for all options
|
||||
|
||||
# max-issues
|
||||
# max threshold for github api queries
|
||||
# make sure you set your CHANGELOG_GITHUB_TOKEN before
|
||||
# running
|
||||
max-issues=1500
|
||||
|
||||
# exclude-tags-regex
|
||||
# excludes release candidates
|
||||
exclude-tags-regex=rc[0-9]{1,}|beta[0-9]{1,}
|
||||
|
||||
# since-tag
|
||||
# version of last stable release
|
||||
# you need to change this depending on what you need
|
||||
# if you want a changelog between versions this is the lowest version
|
||||
since-tag=1.6.5
|
||||
|
||||
# future-release
|
||||
# version you are about to release
|
||||
# if you want a changelog between a version and all unreleased changes grouped as a release
|
||||
# eg: v1.6.5 to v1.7.0
|
||||
future-release=v1.7.0
|
||||
|
||||
+21
-19
@@ -1,6 +1,10 @@
|
||||
*.d
|
||||
!ROMFS/*/*.d
|
||||
!ROMFS/*/*/*.d
|
||||
!ROMFS/*/*/*/*.d
|
||||
*.px4log
|
||||
*.dSYM
|
||||
*.o
|
||||
*.gch
|
||||
*.pyc
|
||||
*~
|
||||
.*.swp
|
||||
@@ -12,10 +16,9 @@
|
||||
.settings
|
||||
.swp
|
||||
.~lock.*
|
||||
Archives/*
|
||||
Build/*
|
||||
Testing/
|
||||
Packages/*
|
||||
s3deploy-branch/
|
||||
s3deploy-archive/
|
||||
build/*
|
||||
build_*/
|
||||
core
|
||||
@@ -24,6 +27,15 @@ cscope.in.out
|
||||
cscope.po.out
|
||||
Firmware.sublime-workspace
|
||||
user.sublime*
|
||||
Images/*.bin
|
||||
Images/*.px4
|
||||
mavlink/include/mavlink/v0.9/
|
||||
/nuttx-configs/px4io-v2/src/.depend
|
||||
/nuttx-configs/px4io-v2/src/Make.dep
|
||||
/nuttx-configs/px4io-v2/src/libboard.a
|
||||
/nuttx-configs/px4io-v1/src/.depend
|
||||
/nuttx-configs/px4io-v1/src/Make.dep
|
||||
/nuttx-configs/px4io-v1/src/libboard.a
|
||||
/Documentation/doxy.log
|
||||
/Documentation/html/
|
||||
/Documentation/doxygen*objdb*tmp
|
||||
@@ -37,6 +49,7 @@ src/modules/uORB/topics/*
|
||||
src/platforms/nuttx/px4_messages/*
|
||||
src/platforms/ros/px4_messages/*
|
||||
Firmware.zip
|
||||
unittests/build
|
||||
*.generated.h
|
||||
.vagrant
|
||||
*.pretty
|
||||
@@ -51,23 +64,12 @@ CMakeLists.txt.user
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
*.config
|
||||
*.creator
|
||||
*.creator.user
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# CLion ignores
|
||||
.idea
|
||||
cmake-build-*/
|
||||
|
||||
.vscode
|
||||
|
||||
posix-configs/SITL/init/test/*_generated
|
||||
|
||||
/airframes.md
|
||||
/airframes.xml
|
||||
/parameters.md
|
||||
/parameters.xml
|
||||
/modules
|
||||
|
||||
*.gcov
|
||||
# uavcan firmware
|
||||
ROMFS/px4fmu_common/uavcan/
|
||||
vectorcontrol/
|
||||
|
||||
+16
-36
@@ -1,60 +1,40 @@
|
||||
[submodule "mavlink/include/mavlink/v2.0"]
|
||||
path = mavlink/include/mavlink/v2.0
|
||||
url = https://github.com/mavlink/c_library_v2.git
|
||||
branch = master
|
||||
[submodule "mavlink/include/mavlink/v1.0"]
|
||||
path = mavlink/include/mavlink/v1.0
|
||||
url = git://github.com/mavlink/c_library.git
|
||||
[submodule "NuttX"]
|
||||
path = NuttX
|
||||
url = git://github.com/PX4/NuttX.git
|
||||
[submodule "src/modules/uavcan/libuavcan"]
|
||||
path = src/modules/uavcan/libuavcan
|
||||
url = https://github.com/UAVCAN/libuavcan.git
|
||||
branch = master
|
||||
[submodule "msg/tools/genmsg"]
|
||||
path = msg/tools/genmsg
|
||||
url = git://github.com/UAVCAN/libuavcan.git
|
||||
[submodule "Tools/genmsg"]
|
||||
path = Tools/genmsg
|
||||
url = https://github.com/ros/genmsg.git
|
||||
branch = indigo-devel
|
||||
[submodule "msg/tools/gencpp"]
|
||||
path = msg/tools/gencpp
|
||||
[submodule "Tools/gencpp"]
|
||||
path = Tools/gencpp
|
||||
url = https://github.com/ros/gencpp.git
|
||||
branch = indigo-devel
|
||||
[submodule "Tools/jMAVSim"]
|
||||
path = Tools/jMAVSim
|
||||
url = https://github.com/PX4/jMAVSim.git
|
||||
branch = master
|
||||
[submodule "Tools/sitl_gazebo"]
|
||||
path = Tools/sitl_gazebo
|
||||
url = https://github.com/PX4/sitl_gazebo.git
|
||||
branch = master
|
||||
[submodule "unittests/googletest"]
|
||||
path = unittests/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
ignore = untracked
|
||||
[submodule "src/lib/matrix"]
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/Matrix.git
|
||||
branch = master
|
||||
[submodule "src/lib/DriverFramework"]
|
||||
path = src/lib/DriverFramework
|
||||
url = https://github.com/PX4/DriverFramework.git
|
||||
branch = master
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
branch = master
|
||||
[submodule "cmake/cmake_hexagon"]
|
||||
path = cmake/cmake_hexagon
|
||||
url = https://github.com/ATLFlight/cmake_hexagon.git
|
||||
branch = master
|
||||
url = https://github.com/ATLFlight/cmake_hexagon
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/GpsDrivers.git
|
||||
branch = master
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/eProsima/micro-CDR.git
|
||||
branch = master
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4-NuttX/nuttx.git
|
||||
branch = px4_firmware_nuttx-7.22+
|
||||
[submodule "platforms/nuttx/NuttX/apps"]
|
||||
path = platforms/nuttx/NuttX/apps
|
||||
url = https://github.com/PX4-NuttX/apps.git
|
||||
branch = px4_firmware_nuttx-7.22+
|
||||
[submodule "cmake/configs/uavcan_board_ident"]
|
||||
path = cmake/configs/uavcan_board_ident
|
||||
url = https://github.com/PX4/uavcan_board_ident.git
|
||||
branch = master
|
||||
|
||||
+131
-50
@@ -1,62 +1,143 @@
|
||||
# Build and autotest script for PX4 Firmware
|
||||
# http://travis-ci.org
|
||||
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
language: cpp
|
||||
|
||||
git:
|
||||
depth: 2000
|
||||
submodules: false
|
||||
|
||||
env:
|
||||
global:
|
||||
# COVERITY_SCAN_TOKEN
|
||||
- secure: "Q4IAcmo1r5cr/UvhcixQa6QN5e5eTcP7FeidzEbX2+BA38yo2BH5O9YQCvZe2AI1Na8ZCjVx3H2luGgDwOKgzAIAjXjZ2KbmXYc6Ns/j/BXScY05dCCzYEhXKD98NZxIKH9lLN9pYDGRA8pChGRJnVlFOr1JHHHnB801+osHy7M="
|
||||
# AWS KEY: $PX4_AWS_KEY
|
||||
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
|
||||
# AWS SECRET: $PX4_AWS_SECRET
|
||||
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- env: BUILD_TARGET=coverity_scan
|
||||
dist: trusty
|
||||
if: branch = coverity_scan
|
||||
allow_failures:
|
||||
- env: BUILD_TARGET=tests_coverage
|
||||
- os: linux
|
||||
sudo: false
|
||||
env: GCC_VER=4.8
|
||||
- os: linux
|
||||
sudo: false
|
||||
env: GCC_VER=4.9
|
||||
- os: osx
|
||||
osx_image: xcode7
|
||||
sudo: true
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
|
||||
before_install:
|
||||
# install dependencies for the coverity build (target and branch), otherwise exit early
|
||||
- if [[ "${TRAVIS_BRANCH}" = "coverity_scan" ]]; then
|
||||
sudo pip install empy jinja2 numpy toml;
|
||||
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-;
|
||||
fi
|
||||
# use git:// to fetch instead of https://
|
||||
- git config --global url."git://".insteadOf https://
|
||||
|
||||
script:
|
||||
- ./Tools/docker_run.sh make ${BUILD_TARGET}
|
||||
|
||||
after_success:
|
||||
# upload code coverage
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
||||
[ "${BUILD_TARGET}" = "tests_coverage" ] && bash <(curl -s https://codecov.io/bash) -F unittests;
|
||||
fi
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
|
||||
addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "PX4/Firmware"
|
||||
description: "Build submitted via Travis CI"
|
||||
notification_email: ci@px4.io
|
||||
build_command_prepend: "make distclean"
|
||||
build_command: "make posix_sitl_default"
|
||||
branch_pattern: coverity_scan
|
||||
apt:
|
||||
sources:
|
||||
- kubuntu-backports
|
||||
- ubuntu-toolchain-r-test
|
||||
- george-edison55-precise-backports
|
||||
packages:
|
||||
- build-essential
|
||||
- ccache
|
||||
- clang-3.5
|
||||
- cmake
|
||||
- g++-4.9
|
||||
- gcc-4.9
|
||||
- genromfs
|
||||
- libc6-i386
|
||||
- libncurses5-dev
|
||||
- ninja-build
|
||||
- python-argparse
|
||||
- python-empy
|
||||
- s3cmd
|
||||
- texinfo
|
||||
- zlib1g-dev
|
||||
|
||||
before_install:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
pushd .
|
||||
&& cd ~ && mkdir gcc && cd gcc
|
||||
&& if [ "$GCC_VER" = "4.8" ]; then GCC_URL="https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2" ; fi
|
||||
&& if [ "$GCC_VER" = "4.9" ]; then GCC_URL="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2" ; fi
|
||||
&& wget -O gcc.tar.bz2 ${GCC_URL}
|
||||
&& tar -jxf gcc.tar.bz2 --strip 1
|
||||
&& exportline="export PATH=$HOME/gcc/bin:\$PATH"
|
||||
&& if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
|
||||
&& . ~/.profile
|
||||
&& popd
|
||||
&& git clone git://github.com/PX4/CI-Tools.git
|
||||
&& ./CI-Tools/s3cmd-configure
|
||||
&& mkdir -p ~/bin
|
||||
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
|
||||
&& astyle --version
|
||||
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||
;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
brew tap PX4/homebrew-px4
|
||||
&& brew update; brew update
|
||||
&& brew install cmake ninja
|
||||
&& brew install genromfs
|
||||
&& sudo easy_install pip
|
||||
&& sudo pip install empy
|
||||
;
|
||||
fi
|
||||
|
||||
before_script:
|
||||
# setup ccache
|
||||
- mkdir -p ~/bin
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-size
|
||||
- ln -s /usr/bin/ccache ~/bin/arm-none-eabi-objcopy
|
||||
- ln -s /usr/bin/ccache ~/bin/clang++
|
||||
- ln -s /usr/bin/ccache ~/bin/clang++-3.4
|
||||
- ln -s /usr/bin/ccache ~/bin/clang++-3.5
|
||||
- ln -s /usr/bin/ccache ~/bin/clang
|
||||
- ln -s /usr/bin/ccache ~/bin/clang-3.4
|
||||
- ln -s /usr/bin/ccache ~/bin/clang-3.5
|
||||
- export PATH=~/bin:$PATH
|
||||
|
||||
env:
|
||||
global:
|
||||
- NINJA_BUILD=1
|
||||
# AWS KEY: $PX4_AWS_KEY
|
||||
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
|
||||
# AWS SECRET: $PX4_AWS_SECRET
|
||||
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
|
||||
- PX4_AWS_BUCKET=px4-travis
|
||||
|
||||
script:
|
||||
- git submodule update --quiet --init --recursive
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
arm-none-eabi-gcc --version && make check VECTORCONTROL=1;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
make check_posix_sitl_default;
|
||||
fi
|
||||
|
||||
after_success:
|
||||
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${GCC_VER}" = "4.8" ]]; then
|
||||
make package_firmware
|
||||
&& find . -name \*.px4 -exec cp "{}" . \;
|
||||
&& find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
|
||||
&& ./CI-Tools/s3cmd-put `find . -maxdepth 1 -mindepth 1 -type f -name '*_default.px4'` build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
|
||||
&& ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
|
||||
&& ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
|
||||
&& ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
|
||||
&& ./CI-Tools/s3cmd-put CI-Tools/timestamp.html timestamp.html
|
||||
&& echo ""
|
||||
&& echo "Binaries have been posted to:" https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
|
||||
;
|
||||
fi
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
|
||||
file: "Firmware.zip"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
all_branches: true
|
||||
repo: PX4/Firmware
|
||||
condition: $GCC_VER = 4.8
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/2b9c4a4cb2211f8befba
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
slack:
|
||||
secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
|
||||
on_success: change # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
|
||||
@@ -61,6 +61,7 @@ flags = [
|
||||
'c++',
|
||||
'-undef', # get rid of standard definitions to allow us to include arm math header
|
||||
'-I', os.path.join(os.path.expanduser("~"),'gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include'),
|
||||
'-I', 'Build/px4io-v1_default.build/nuttx-export/include/',
|
||||
'-I', 'Build/px4io-v2_default.build/nuttx-export/include/',
|
||||
'-I', './NuttX/nuttx/arch/arm/include',
|
||||
'-include', './src/include/visibility.h',
|
||||
|
||||
+178
-272
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2017 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -55,6 +55,24 @@
|
||||
#
|
||||
# * For else, endif, endfunction, etc, never put the name of the statement
|
||||
#
|
||||
# Instead of the very confusing:
|
||||
# if (${var} STREQUAL "1") <-- condition now becomes if name
|
||||
# # do somthing
|
||||
# elseif (${var} STREQUAL "2") <-- another condition
|
||||
# # do somthing
|
||||
# else (${var} STREQUAL "1") <-- tag is referring to name of if
|
||||
# # do somthing
|
||||
# endif (${var} STREQUAL "1") <-- tag is referring to name of if
|
||||
#
|
||||
# Do this:
|
||||
# if (${var} STREQUAL "1") <-- condition now becomes if name
|
||||
# # do somthing
|
||||
# elseif (${var} STREQUAL "2") <-- another condition
|
||||
# # do somthing
|
||||
# else () <-- leave blank
|
||||
# # do somthing
|
||||
# endif () <-- leave blank
|
||||
#
|
||||
# Functions/Macros
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
@@ -69,7 +87,7 @@
|
||||
#
|
||||
# * Avoid use of global variables in functions. Functions in a nested
|
||||
# scope may use global variables, but this makes it difficult to
|
||||
# reuse functions.
|
||||
# resuse functions.
|
||||
#
|
||||
# Included CMake Files
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -83,7 +101,7 @@
|
||||
#
|
||||
# * Setting a global variable in a CMakeLists.txt file is ok, because
|
||||
# each CMakeLists.txt file has scope in the current directory and all
|
||||
# subdirectories, so it is not truly global.
|
||||
# subdirecties, so it is not truly global.
|
||||
#
|
||||
# * All toolchain files should be included in the cmake
|
||||
# directory and named Toolchain-"name".cmake.
|
||||
@@ -99,185 +117,152 @@
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
# Warning: Changing this modifies CMake's internal workings
|
||||
# and leads to wrong toolchain detection
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
|
||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
|
||||
# Use clang
|
||||
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
|
||||
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
|
||||
|
||||
#=============================================================================
|
||||
# git
|
||||
# parameters
|
||||
#
|
||||
include(common/px4_git)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_MODULE_LIBRARIES
|
||||
BRIEF_DOCS "PX4 module libs"
|
||||
FULL_DOCS "List of all PX4 module libraries"
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
|
||||
BRIEF_DOCS "PX4 module paths"
|
||||
FULL_DOCS "List of paths to all PX4 modules"
|
||||
)
|
||||
set(CMAKE_BUILD_TYPE "" CACHE STRING "build type")
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
STRINGS ";Debug;Release;RelWithDebInfo;MinSizeRel")
|
||||
set(CONFIG "nuttx_px4fmu-v2_default" CACHE STRING "desired configuration")
|
||||
file(GLOB_RECURSE configs RELATIVE cmake/configs "cmake/configs/*.cmake")
|
||||
set_property(CACHE CONFIG PROPERTY STRINGS ${configs})
|
||||
set(THREADS "4" CACHE STRING
|
||||
"number of threads to use for external build processes")
|
||||
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
|
||||
|
||||
#=============================================================================
|
||||
# configuration
|
||||
#
|
||||
|
||||
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
|
||||
# must come before project to set toolchain
|
||||
|
||||
string(REPLACE "_" ";" config_args ${CONFIG})
|
||||
list(GET config_args 0 OS)
|
||||
list(GET config_args 1 BOARD)
|
||||
list(GET config_args 2 LABEL)
|
||||
set(target_name "${OS}-${BOARD}-${LABEL}")
|
||||
|
||||
set(THREADS "4" CACHE STRING "number of threads to use for external build processes")
|
||||
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
|
||||
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
|
||||
message(STATUS "${target_name}")
|
||||
|
||||
if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
|
||||
endif()
|
||||
# switch to ros CMake file if building ros
|
||||
if (${OS} STREQUAL "ros")
|
||||
include("cmake/ros-CMakeLists.txt")
|
||||
else() # otherwise use the rest of this file
|
||||
|
||||
include(platforms/${OS}/cmake/px4_impl_os.cmake)
|
||||
include(configs/${CONFIG})
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${OS}/cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
set(config_module "configs/${CONFIG}")
|
||||
include(${config_module})
|
||||
|
||||
# CMake build type (Debug Release RelWithDebInfo MinSizeRel Coverage)
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
if (${OS} STREQUAL "nuttx")
|
||||
set(PX4_BUILD_TYPE "MinSizeRel")
|
||||
else()
|
||||
set(PX4_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
# cmake modules
|
||||
include(ExternalProject)
|
||||
|
||||
set(CMAKE_BUILD_TYPE ${PX4_BUILD_TYPE} CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage")
|
||||
|
||||
#=============================================================================
|
||||
|
||||
message(STATUS "PX4 VERSION: ${git_tag}")
|
||||
message(STATUS "CONFIG: ${CONFIG}")
|
||||
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
#=============================================================================
|
||||
# project definition
|
||||
#
|
||||
project(px4 CXX C ASM)
|
||||
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# Setup install paths
|
||||
if (${OS} STREQUAL "posix")
|
||||
|
||||
include(common/coverage)
|
||||
include(common/sanitizers)
|
||||
|
||||
# Define GNU standard installation directories
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if (NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
||||
endif()
|
||||
|
||||
# cmake testing only on posix
|
||||
enable_testing()
|
||||
include(CTest)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# require px4 module interface
|
||||
set(px4_required_interface
|
||||
px4_os_prebuild_targets
|
||||
px4_os_add_flags
|
||||
)
|
||||
foreach(cmd ${px4_required_interface})
|
||||
if (NOT COMMAND ${cmd})
|
||||
message(FATAL_ERROR "${CONFIG} must implement ${cmd}")
|
||||
if(NOT COMMAND ${cmd})
|
||||
message(FATAL_ERROR "${config_module} must implement ${cmd}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(px4_required_config config_module_list)
|
||||
set(px4_required_config
|
||||
config_module_list
|
||||
)
|
||||
foreach(conf ${px4_required_config})
|
||||
if (NOT DEFINED ${conf})
|
||||
message(FATAL_ERROR "cmake/${CONFIG} must define ${conf}")
|
||||
if(NOT DEFINED ${conf})
|
||||
message(FATAL_ERROR "cmake/${config_module} must define ${conf}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# ccache
|
||||
#
|
||||
option(CCACHE "Use ccache if available" ON)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
# List the DriverFramework drivers
|
||||
if(DEFINED config_df_driver_list)
|
||||
message("DF Drivers: ${config_df_driver_list}")
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# find programs and packages
|
||||
# project definition
|
||||
#
|
||||
|
||||
# see if catkin was invoked to build this
|
||||
if (CATKIN_DEVEL_PREFIX)
|
||||
message(STATUS "catkin ENABLED")
|
||||
find_package(catkin REQUIRED)
|
||||
if (catkin_FOUND)
|
||||
catkin_package()
|
||||
else()
|
||||
message(FATAL_ERROR "catkin not found")
|
||||
endif()
|
||||
project(px4 CXX C ASM)
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0)
|
||||
cmake_policy(SET CMP0045 NEW) # error on non-existent target in get prop
|
||||
cmake_policy(SET CMP0046 NEW) # no non-existent targets as dependencies
|
||||
cmake_policy(SET CMP0025 OLD) # still report AppleClang as Clang
|
||||
endif()
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
|
||||
cmake_policy(SET CMP0054 NEW) # don't dereference quoted variables
|
||||
endif()
|
||||
|
||||
set(version_major 1)
|
||||
set(version_minor 0)
|
||||
set(version_patch 1)
|
||||
set(version "${version_major}.${version_minor}.${version_patch}")
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
#=============================================================================
|
||||
# programs
|
||||
#
|
||||
find_package(PythonInterp REQUIRED)
|
||||
px4_find_python_module(jinja2 REQUIRED)
|
||||
|
||||
#=============================================================================
|
||||
# cmake modules
|
||||
#
|
||||
enable_testing()
|
||||
|
||||
#=============================================================================
|
||||
# check required toolchain variables
|
||||
#
|
||||
|
||||
set(required_variables CMAKE_C_COMPILER_ID CMAKE_CXX_COMPILER_ID)
|
||||
set(required_variables
|
||||
CMAKE_C_COMPILER_ID
|
||||
)
|
||||
foreach(var ${required_variables})
|
||||
if (NOT ${var})
|
||||
message(FATAL_ERROR "Toolchain/config must define ${var}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# print full c compiler version
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE c_compiler_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
STRING(REGEX MATCH "[^\n]*" c_compiler_version_short ${c_compiler_version})
|
||||
message(STATUS "C compiler: ${c_compiler_version_short}")
|
||||
#=============================================================================
|
||||
# git
|
||||
#
|
||||
px4_add_git_submodule(TARGET git_genmsg PATH "Tools/genmsg")
|
||||
px4_add_git_submodule(TARGET git_gencpp PATH "Tools/gencpp")
|
||||
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
|
||||
px4_add_git_submodule(TARGET git_gtest PATH "unittets/gtest")
|
||||
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
|
||||
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
|
||||
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
|
||||
px4_add_git_submodule(TARGET git_ecl PATH "src/lib/ecl")
|
||||
px4_add_git_submodule(TARGET git_jmavsim PATH "Tools/jMAVSim")
|
||||
px4_add_git_submodule(TARGET git_gazebo PATH "Tools/sitl_gazebo")
|
||||
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
|
||||
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "cmake/cmake_hexagon")
|
||||
|
||||
# print full c++ compiler version
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
|
||||
OUTPUT_VARIABLE cxx_compiler_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
STRING(REGEX MATCH "[^\n]*" cxx_compiler_version_short ${cxx_compiler_version})
|
||||
message(STATUS "C++ compiler: ${cxx_compiler_version_short}")
|
||||
add_custom_target(submodule_clean
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND git submodule deinit -f .
|
||||
COMMAND rm -rf .git/modules/*
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# misc targets
|
||||
#
|
||||
add_custom_target(check_format
|
||||
COMMAND Tools/check_code_style.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(config
|
||||
COMMAND cmake-gui .
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# external libraries
|
||||
@@ -293,47 +278,39 @@ px4_os_add_flags(
|
||||
BOARD ${BOARD}
|
||||
C_FLAGS c_flags
|
||||
CXX_FLAGS cxx_flags
|
||||
OPTIMIZATION_FLAGS optimization_flags
|
||||
EXE_LINKER_FLAGS exe_linker_flags
|
||||
INCLUDE_DIRS include_dirs
|
||||
LINK_DIRS link_dirs
|
||||
DEFINITIONS definitions)
|
||||
|
||||
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_C_FLAGS LIST "${CMAKE_C_FLAGS};${c_flags};${optimization_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_CXX_FLAGS LIST "${CMAKE_CXX_FLAGS};${cxx_flags};${optimization_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${exe_linker_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags}" GLUE " ")
|
||||
|
||||
include_directories(${include_dirs})
|
||||
#message("INCLUDE_DIRS=${include_dirs}")
|
||||
link_directories(${link_dirs})
|
||||
add_definitions(${definitions})
|
||||
|
||||
#=============================================================================
|
||||
# message, and airframe generation
|
||||
# source code generation
|
||||
#
|
||||
include(common/px4_metadata)
|
||||
|
||||
add_subdirectory(msg EXCLUDE_FROM_ALL)
|
||||
|
||||
px4_generate_airframes_xml(BOARD ${BOARD})
|
||||
|
||||
#=============================================================================
|
||||
# DriverFramework
|
||||
#
|
||||
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
|
||||
add_subdirectory(src/lib/DriverFramework/framework)
|
||||
|
||||
# List the DriverFramework drivers
|
||||
if (DEFINED config_df_driver_list)
|
||||
message("DF Drivers: ${config_df_driver_list}")
|
||||
endif()
|
||||
|
||||
set(df_driver_libs)
|
||||
foreach(driver ${config_df_driver_list})
|
||||
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
||||
list(APPEND df_driver_libs df_${driver})
|
||||
message("Adding DF driver: ${driver}")
|
||||
endforeach()
|
||||
file(GLOB_RECURSE msg_files msg/*.msg)
|
||||
px4_generate_messages(TARGET msg_gen
|
||||
MSG_FILES ${msg_files}
|
||||
OS ${OS}
|
||||
DEPENDS git_genmsg git_gencpp
|
||||
)
|
||||
px4_generate_parameters_xml(OUT parameters.xml BOARD ${BOARD})
|
||||
px4_generate_airframes_xml(OUT airframes.xml BOARD ${BOARD})
|
||||
add_custom_target(xml_gen
|
||||
DEPENDS parameters.xml airframes.xml)
|
||||
|
||||
#=============================================================================
|
||||
# external projects
|
||||
#
|
||||
set(ep_base ${PX4_BINARY_DIR}/external)
|
||||
|
||||
set(ep_base ${CMAKE_BINARY_DIR}/external)
|
||||
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
|
||||
|
||||
# add external project install folders to build
|
||||
@@ -344,130 +321,59 @@ execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/lib)
|
||||
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include)
|
||||
|
||||
#=============================================================================
|
||||
# external modules
|
||||
# DriverFramework Drivers
|
||||
#
|
||||
set(external_module_paths)
|
||||
if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
message(STATUS "External modules: ${EXTERNAL_MODULES_LOCATION}")
|
||||
add_subdirectory("${EXTERNAL_MODULES_LOCATION}/src" external_modules)
|
||||
|
||||
foreach(external_module ${config_module_list_external})
|
||||
add_subdirectory(${EXTERNAL_MODULES_LOCATION}/src/${external_module} external_modules/${external_module})
|
||||
list(APPEND external_module_paths ${EXTERNAL_MODULES_LOCATION}/src/${external_module})
|
||||
endforeach()
|
||||
endif()
|
||||
set(df_driver_libs)
|
||||
foreach(driver ${config_df_driver_list})
|
||||
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
||||
list(APPEND df_driver_libs df_${driver})
|
||||
message("Adding DF driver: ${driver}")
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# subdirectories
|
||||
#
|
||||
add_library(parameters_interface INTERFACE)
|
||||
add_subdirectory(src/lib EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(src/platforms/common EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(src/modules/systemlib EXCLUDE_FROM_ALL) # TODO: split into libraries in platform layer
|
||||
add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
|
||||
add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL)
|
||||
|
||||
set(module_libraries)
|
||||
foreach(module ${config_module_list})
|
||||
add_subdirectory(src/${module})
|
||||
endforeach()
|
||||
|
||||
# must be the last module before firmware
|
||||
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(parameters_interface INTERFACE parameters)
|
||||
|
||||
# firmware added last to generate the builtin for included modules
|
||||
add_subdirectory(platforms/${OS})
|
||||
|
||||
#=============================================================================
|
||||
# generate custom target to print for all executable and module cmake targets
|
||||
#
|
||||
if (all_posix_cmake_targets)
|
||||
list(SORT all_posix_cmake_targets)
|
||||
px4_join(OUT posix_cmake_target_list LIST ${all_posix_cmake_targets} GLUE "\\n")
|
||||
add_custom_target(list_cmake_targets
|
||||
COMMAND sh -c "printf \"${posix_cmake_target_list}\\n\""
|
||||
COMMENT "List of cmake targets that can be matched by PX4_NO_OPTIMIZATION:"
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# uORB graph generation: add a custom target 'uorb_graph'
|
||||
#
|
||||
set(uorb_graph_config ${BOARD})
|
||||
|
||||
set(graph_module_list "")
|
||||
foreach(module ${config_module_list})
|
||||
set(graph_module_list "${graph_module_list}" "--src-path" "src/${module}")
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${uorb_graph_config}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
|
||||
${module_list}
|
||||
--exclude-path src/examples
|
||||
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMENT "Generating uORB graph"
|
||||
)
|
||||
add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
|
||||
|
||||
#=============================================================================
|
||||
# Doxygen
|
||||
#
|
||||
option(BUILD_DOXYGEN "Build doxygen documentation" OFF)
|
||||
|
||||
if (BUILD_DOXYGEN)
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
# set input and output files
|
||||
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/Documentation/Doxyfile.in)
|
||||
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
|
||||
# request to configure the file
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
|
||||
# note the option ALL which allows to build the docs together with the application
|
||||
add_custom_target(doxygen ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating documentation with Doxygen"
|
||||
DEPENDS uorb_msgs parameters
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
string(REGEX MATCH "^[./]" external_module ${module})
|
||||
if(external_module)
|
||||
STRING(REGEX REPLACE "//" "/" EXT_MODULE ${module})
|
||||
STRING(REGEX REPLACE "/" "__" EXT_MODULE_PREFIX ${EXT_MODULE})
|
||||
add_subdirectory(${module} ${CMAKE_BINARY_DIR}/${EXT_MODULE_PREFIX})
|
||||
else()
|
||||
message("Doxygen needs to be installed to generate documentation")
|
||||
add_subdirectory(src/${module})
|
||||
endif()
|
||||
px4_mangle_name(${module} mangled_name)
|
||||
list(APPEND module_libraries ${mangled_name})
|
||||
#message(STATUS "adding module: ${module}")
|
||||
endforeach()
|
||||
|
||||
add_subdirectory(src/firmware/${OS})
|
||||
|
||||
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
|
||||
if (NOT "${OS}" STREQUAL "nuttx")
|
||||
endif()
|
||||
|
||||
if (config_io_board)
|
||||
add_subdirectory(src/modules/px4iofirmware)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# generate git version
|
||||
#
|
||||
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
|
||||
|
||||
#=============================================================================
|
||||
# packaging
|
||||
#
|
||||
# Important to having packaging at end of cmake file.
|
||||
#
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
|
||||
set(CPACK_PACKAGE_VERSION ${git_version})
|
||||
set(CPACK_PACKAGE_CONTACT ${package-contact})
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${git_version}")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "")
|
||||
set(CPACK_SET_DESTDIR "OFF")
|
||||
set(CPACK_PACKAGE_VERSION ${version})
|
||||
set(CPACK_PACKAGE_CONTACT ${package_contact})
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
include(CPack)
|
||||
|
||||
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
set(CPACK_GENERATOR "TBZ2")
|
||||
find_program(DPKG_PROGRAM dpkg)
|
||||
if (EXISTS ${DPKG_PROGRAM})
|
||||
list (APPEND CPACK_GENERATOR "DEB")
|
||||
endif()
|
||||
else()
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
endif()
|
||||
endif() # ros alternative endif
|
||||
|
||||
include(CPack)
|
||||
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lorenz@px4.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
+1
-1
@@ -41,4 +41,4 @@ Since we care about safety, we will regularly ask you for test results. Best is
|
||||
|
||||
Push changes to your repo and send a [pull request](https://github.com/PX4/Firmware/compare/).
|
||||
|
||||
MuncherMake sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Flight Review](http://logs.px4.io) and link the resulting report.
|
||||
Make sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Log Muncher](http://dash.oznet.ch) and link the resulting report.
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
##
|
||||
## # The following are required to submit to the CDash dashboard:
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
|
||||
set(CTEST_PROJECT_NAME "PX4 Firmware")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=PX4+Firmware")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
@@ -81,7 +81,7 @@ class NX_register_set(object):
|
||||
self.regs['LR'] = self.mon_reg_call('lr')
|
||||
self.regs['R15'] = self.mon_reg_call('r15')
|
||||
self.regs['PC'] = self.mon_reg_call('pc')
|
||||
#self.regs['XPSR'] = self.mon_reg_call('xPSR')
|
||||
self.regs['XPSR'] = self.mon_reg_call('xPSR')
|
||||
else:
|
||||
for key in self.v7em_regmap.keys():
|
||||
self.regs[key] = int(xcpt_regs[self.v7em_regmap[key]])
|
||||
@@ -91,11 +91,11 @@ class NX_register_set(object):
|
||||
register is the register as a string e.g. 'pc'
|
||||
return integer containing the value of the register
|
||||
"""
|
||||
str_to_eval = "info registers "+register
|
||||
str_to_eval = "mon reg "+register
|
||||
resp = gdb.execute(str_to_eval,to_string = True)
|
||||
content = resp.split()[-1]
|
||||
content = resp.split()[-1];
|
||||
try:
|
||||
return int(content)
|
||||
return int(content,16)
|
||||
except:
|
||||
return 0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Various PX4-specific macros
|
||||
#
|
||||
source platforms/nuttx/Debug/NuttX
|
||||
source platforms/nuttx/Debug/ARMv7M
|
||||
source Debug/NuttX
|
||||
source Debug/ARMv7M
|
||||
|
||||
echo Loading PX4 GDB macros. Use 'help px4' for more information.\n
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# copy the file to .gdbinit in your Firmware tree, and adjust the path
|
||||
# below to match your system
|
||||
# For example:
|
||||
# target extended /dev/serial/by-id/usb-Black_Sphere_Technologies_Black_Magic_Probe_DDE5A1C4-if00
|
||||
# target extended /dev/ttyACM4
|
||||
|
||||
|
||||
monitor swdp_scan
|
||||
attach 1
|
||||
monitor vector_catch disable hard
|
||||
set mem inaccessible-by-default off
|
||||
set print pretty
|
||||
source Debug/PX4
|
||||
@@ -2,7 +2,7 @@
|
||||
# To run type openocd -f mavprogram.cfg
|
||||
|
||||
source [find interface/olimex-arm-usb-ocd-h.cfg]
|
||||
source [find px4fmu-board.cfg]
|
||||
source [find px4fmu-v1-board.cfg]
|
||||
|
||||
init
|
||||
halt
|
||||
@@ -15,7 +15,7 @@ mon poll
|
||||
mon cortex_m maskisr auto
|
||||
set mem inaccessible-by-default off
|
||||
set print pretty
|
||||
source platforms/nuttx/Debug/PX4
|
||||
source Debug/PX4
|
||||
|
||||
echo PX4 resumed, press ctrl-c to interrupt\n
|
||||
continue
|
||||
@@ -1,20 +1,12 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
|
||||
#
|
||||
# Poor man's sampling profiler for NuttX.
|
||||
#
|
||||
# Usage: Install flamegraph.pl in your PATH, configure your .gdbinit, run the script with proper arguments and go
|
||||
# have a coffee. When you're back, you'll see the flamegraph. Note that frequent calls to GDB significantly
|
||||
# interfere with normal operation of the target, which means that you can't profile real-time tasks with it.
|
||||
# For best results, ensure that the PC is not overloaded, the USB host controller to which the debugger is
|
||||
# connected is not congested. You should also allow the current user to set negative nice values.
|
||||
#
|
||||
# The FlameGraph script can be downloaded from https://github.com/brendangregg/FlameGraph. Thanks Mr. Gregg.
|
||||
#
|
||||
# Requirements: ARM GDB with Python support. You can get one by downloading the sources from
|
||||
# https://launchpad.net/gcc-arm-embedded and building them with correct flags.
|
||||
# Note that Python support is not required if no per-task sampling is needed.
|
||||
# Requirements: ARM GDB with Python support
|
||||
#
|
||||
|
||||
set -e
|
||||
@@ -41,7 +33,7 @@ which flamegraph.pl > /dev/null || die "Install flamegraph.pl first"
|
||||
nsamples=0
|
||||
sleeptime=0.1 # Doctors recommend 7-8 hours a day
|
||||
taskname=
|
||||
elf=
|
||||
elf=$root/Build/px4fmu-v2_default.build/firmware.elf
|
||||
append=0
|
||||
fgfontsize=10
|
||||
fgwidth=1900
|
||||
@@ -77,8 +69,6 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
[[ -z "$elf" ]] && die "Please specify the ELF file location, e.g.: build/px4fmu-v4_default/src/firmware/nuttx/firmware_nuttx"
|
||||
|
||||
#
|
||||
# Temporary files
|
||||
#
|
||||
@@ -102,20 +92,13 @@ then
|
||||
do
|
||||
if [[ "$taskname" = "" ]]
|
||||
then
|
||||
arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" \
|
||||
-ex "target extended /dev/ttyACM0" \
|
||||
-ex "monitor swdp_scan" \
|
||||
-ex "attach 1" \
|
||||
-ex bt \
|
||||
arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" -ex bt \
|
||||
2> $gdberrfile \
|
||||
| sed -n 's/\(#.*\)/\1/p' \
|
||||
>> $stacksfile
|
||||
else
|
||||
arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" \
|
||||
-ex "target extended /dev/ttyACM0" \
|
||||
-ex "monitor swdp_scan" \
|
||||
-ex "attach 1" \
|
||||
-ex "source $root/platforms/nuttx/Debug/Nuttx.py" \
|
||||
-ex "source $root/Debug/Nuttx.py" \
|
||||
-ex "show mybt $taskname" \
|
||||
2> $gdberrfile \
|
||||
| sed -n 's/0\.0:\(#.*\)/\1/p' \
|
||||
@@ -254,8 +237,8 @@ for s, f in sorted(stacks.items(), key=lambda (s, f): s):
|
||||
|
||||
print('Total stack frames:', num_stack_frames, file=sys.stderr)
|
||||
print('Top consumers (distribution of the stack tops):', file=sys.stderr)
|
||||
for name,num in sorted(stack_tops.items(), key=lambda (name, num): num, reverse=True)[:300]:
|
||||
print('% 7.3f%% ' % (100 * num / num_stack_frames), name, file=sys.stderr)
|
||||
for name,num in sorted(stack_tops.items(), key=lambda (name, num): num, reverse=True)[:10]:
|
||||
print('% 5.1f%% ' % (100 * num / num_stack_frames), name, file=sys.stderr)
|
||||
EOF
|
||||
|
||||
cat $stacksfile | python /tmp/pmpn-folder.py > $foldfile
|
||||
@@ -35,3 +35,4 @@ gdb_memory_map enable
|
||||
|
||||
# doesn't work yet
|
||||
gdb_flash_program disable
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
openocd -f interface/olimex-arm-usb-ocd-h.cfg -f $DIR/px4fmu-v1-board.cfg
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,121 +0,0 @@
|
||||
# Use: `doxygen -g test.txt` to generate all possible settings for this file
|
||||
|
||||
# For modern doxygen style uncomment these three lines:
|
||||
#HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/doxygen/customdoxygen.css
|
||||
#HTML_HEADER = @CMAKE_SOURCE_DIR@/Documentation/header.html
|
||||
#HTML_FOOTER = @CMAKE_SOURCE_DIR@/Documentation/footer.html
|
||||
|
||||
# not interested build output
|
||||
QUIET = YES
|
||||
|
||||
# Basic settings:
|
||||
PROJECT_NAME = "@CMAKE_PROJECT_NAME@"
|
||||
PROJECT_NUMBER = @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@@VERSION_TYPE@
|
||||
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@
|
||||
|
||||
INPUT = @CMAKE_SOURCE_DIR@/README.md \
|
||||
@CMAKE_SOURCE_DIR@ \
|
||||
@CMAKE_SOURCE_DIR@/src \
|
||||
@CMAKE_BINARY_DIR@/ \
|
||||
@CMAKE_BINARY_DIR@/uORB
|
||||
|
||||
FILE_PATTERNS = *.h \
|
||||
*.hpp \
|
||||
*.hh \
|
||||
*.c \
|
||||
*.cc \
|
||||
*.cpp.in \
|
||||
*.cpp \
|
||||
*.md
|
||||
|
||||
RECURSIVE = YES
|
||||
USE_MDFILE_AS_MAINPAGE = "@CMAKE_SOURCE_DIR@/README.md"
|
||||
# output location
|
||||
HTML_OUTPUT = "@CMAKE_BINARY_DIR@/Documentation"
|
||||
|
||||
IMAGE_PATH = "@CMAKE_SOURCE_DIR@"
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
|
||||
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
|
||||
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
|
||||
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
|
||||
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
|
||||
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
|
||||
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
|
||||
# Ukrainian and Vietnamese.
|
||||
# The default value is: English.
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# Color style
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_SAT = 40
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
|
||||
# max size 200x55px
|
||||
PROJECT_LOGO =
|
||||
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# function all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
REFERENCED_BY_RELATION = YES
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES then for each documented function
|
||||
# all documented entities called/used by that function will be listed.
|
||||
# The default value is: NO.
|
||||
REFERENCES_RELATION = YES
|
||||
|
||||
# This is nice to have - callgraphs of functions
|
||||
HAVE_DOT = YES
|
||||
CALL_GRAPH = YES
|
||||
CALLER_GRAPH = YES
|
||||
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
GENERATE_LEGEND = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = svg
|
||||
INTERACTIVE_SVG = YES
|
||||
|
||||
# More insight to templates, generaly not needed
|
||||
TEMPLATE_RELATIONS = NO
|
||||
|
||||
# in class diagrams, you will have members and such
|
||||
# Also they will be bigger
|
||||
UML_LOOK = YES
|
||||
UML_LIMIT_NUM_FIELDS = 6
|
||||
|
||||
# should all pictures be collapsed?
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
|
||||
|
||||
# use with: /// @todo Do more stuff.
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# we want all we can get
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# We do not need latex output
|
||||
GENERATE_LATEX = NO
|
||||
USE_PDFLATEX = NO
|
||||
|
||||
# this makes first sentence from comment block a brief description.
|
||||
# It is VERY useful
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# Why not...
|
||||
BUILTIN_STL_SUPPORT = YES
|
||||
|
||||
# Do we want source code browser? YES! Do we want strip comments? NO
|
||||
SOURCE_BROWSER = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
|
||||
# Side panel
|
||||
# If you enable this, change .container max-width: 960px; to 1240px
|
||||
GENERATE_TREEVIEW = YES
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
Linux/Mac OS X
|
||||
==============
|
||||
To install doxygen:
|
||||
$sudo apt-get install doxygen
|
||||
|
||||
If the above does not work go to:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html for the correct download.
|
||||
|
||||
Then go to the following website for inforamtion on the install:
|
||||
http://www.stack.nl/~dimitri/doxygen/install.html
|
||||
|
||||
Then to generate the html, run the following code while you are in this directory:
|
||||
$doxygen Doxyfile
|
||||
|
||||
The html file index.html should be in doc/html unless you changed the output directory.
|
||||
|
||||
The other option for generating the documentation is to use the wizard:
|
||||
$doxywizard &
|
||||
|
||||
doxywizard information:
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Or go to the Doxygen Manual for information at the website noted below.
|
||||
|
||||
Windows
|
||||
=======
|
||||
Go to the following website for the correct download and follow the wizard to install:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
|
||||
Run the wizard to generate the documentation.
|
||||
Go to the website below or the Doxygen Manual for information on running doxywizard.
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Doxygen Manual
|
||||
==============
|
||||
http://www.stack.nl/~dimitri/doxygen/
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
rm -rf html
|
||||
doxygen
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@@ -0,0 +1,98 @@
|
||||
[TOC]
|
||||
|
||||
# Introduction
|
||||
|
||||
The HIL architecture allows you to test the flight stack replacing the real physical vehicle and sensors with a simulator of vehicle dynamics and sensor outputs. The flight stack "is not aware" that it is not on a real vehicle. This is a powerful tool for develping and testing code rapidly in a benchtop environment.
|
||||
|
||||
The flight stack can be run anywhere that supports a network connection to the simulator (with sufficient bandwidth and latency to transport the sensor and actuator messages). This can be on a standard linux workstation, an on-target linux image, or the on-target DSP image. These modes can be selected based on the goals of the testing. Workstation is useful for rapid testing in a tool-rich environment. DSP image testing is the closest to the final implementation, so is useful for testing actual HW operation, other than the physical sensing and actuation.
|
||||
|
||||
## Px4 High-level HIL Architecture
|
||||
|
||||
A diagram of the setup described is shown here. Note that UDP port numbers are only displayed on the socket server and are left blank on the socket client.
|
||||
|
||||
(???NOTES: This diagram needs to be updated to use control inputs over UDP, either from QGC or from other)
|
||||
|
||||

|
||||
|
||||
## Requirements
|
||||
The simulator that is currently supported is jMAVSim. The setup described here requires PX4 and jMAVSim installed and running. qGroundControl (QGC) is also required because it is the supported method of providing manual control commands.
|
||||
|
||||
## Assumptions
|
||||
|
||||
# Compiling Code
|
||||
|
||||
## JMAVSim
|
||||
|
||||
### Platform Requirements
|
||||
Linux with java-1.7.x or greater
|
||||
|
||||
### Build Instructions
|
||||
In a clean directory
|
||||
```
|
||||
> git clone https://github.com/PX4/jMAVSim.git
|
||||
> cd jMAVSim
|
||||
> git submodule init
|
||||
> git submodule update
|
||||
> ant
|
||||
```
|
||||
|
||||
## qGroundControl
|
||||
|
||||
### Platform Requirements
|
||||
Windows 7
|
||||
Logitech Gamepad F310 joystick controller
|
||||
|
||||
### Download/Install Instructions
|
||||
Download QGC from http://qgroundcontrol.org/downloads and install using the windows executable.
|
||||
|
||||
|
||||
## PX4
|
||||
|
||||
### Platform Requirements
|
||||
Linux or Eagle with a working IP interface (?? does this need further instructions?)
|
||||
|
||||
### Build Host Requirements
|
||||
(???Notes: Windows?)
|
||||
|
||||
### Download & Build Instructions
|
||||
|
||||
### Installing binaries on the Qualcomm Target
|
||||
|
||||
# Running PX4 in HIL Mode
|
||||
|
||||
## Starting PX4 on Qualcomm Eagle
|
||||
|
||||
```
|
||||
> adb shell
|
||||
# bash
|
||||
root@linaro-developer:/# cd ???
|
||||
root@linaro-developer:/# ./mainapp
|
||||
App name: mainapp
|
||||
Enter a command and its args:
|
||||
uorb start
|
||||
muorb start
|
||||
mavlink start -u 14556
|
||||
simulator start -p
|
||||
```
|
||||
|
||||
## Starting jMAVSim
|
||||
In the directory where jMAVSim is installed
|
||||
```
|
||||
java -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp <IPADDR>:14560 -n 100
|
||||
```
|
||||
replacing <IPADDR> with the IP address of the machine running PX4 (Eagle). This can be found by running "ifconfig" on that machine.
|
||||
|
||||
## Starting qGroundControl
|
||||
Launch the qGroundControl application
|
||||
1. Set up the communication to the flight stack. In the menu File:Settings:CommLinks, select Add. Enter a Link Name of your choice. Select Link Type: UDP. Set the listening port to an unused port (example: 14561). Select Add. Enter the IP address and port of the PX4 Mavlink app, which is <IPADDR>:14556 with <IPADDR> being the IP address of the Eagle board. Select OK.
|
||||
1. Set up the joystick. Plug in the joystick to your Windows machine. In the menu File:Settings:CommLinks, check Enable Controllers. Select "Gamepad F310". Select "Manual". Set the axes/channel mapping to 0:Yaw, 1:Throttle, 2:unset, 3:Pitch, 4:Roll. Seletct "Inverted" for the throttle axis. Click "Calibrate range". Move the right joystick through its full range of motion. Move the left joystick full left then full right. Move the left joystick full forward (but not full backward). Click "end calibration."
|
||||
1. Connect to the flight stack. Click Analyze. Click the "Connect" button in the upper right, and select the connection that you created in the first step.
|
||||
|
||||
You should now be connected to the flight stack. You can see incoming Mavlink packets using the MAVLink Instpector (from Advanced:Tool Widgets)
|
||||
|
||||
|
||||
## Controlling PX4 flight in HIL Mode
|
||||
The joystick can now be used to fly the simulated vehicle. The jMAVSim world visualization gives a FPV view, and QGC can be used to display instruments such as artificial horizon and maps (if GPS simulation is enabled).
|
||||
|
||||
|
||||
# Debugging/FAQ
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git log --pretty=format:"Last change: commit %h - %aN, %ar : %s" -1 $1 || echo no git
|
||||
@@ -25,8 +25,7 @@
|
||||
[
|
||||
".settings",
|
||||
"nuttx/arch/arm/src/board",
|
||||
"nuttx/arch/arm/src/chip",
|
||||
"build_*"
|
||||
"nuttx/arch/arm/src/chip"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -40,12 +39,12 @@
|
||||
"options_c":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astyle/astylerc"
|
||||
"additional_options_file": "${project_path}/Tools/astylerc"
|
||||
},
|
||||
"options_c++":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astyle/astylerc"
|
||||
"additional_options_file": "${project_path}/Tools/astylerc"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 19,
|
||||
"magic": "AeroCore",
|
||||
"description": "Firmware for the Gumstix AeroCore board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "AEROCORE",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 9,
|
||||
"magic": "PX4FWv2",
|
||||
"description": "Firmware for the MindPx-V2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "MindPx-v2",
|
||||
"version": "2.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
"summary": "PX4/STM32F4Discovery",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 1032192,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 5,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4FMU board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4FMU",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
"summary": "PX4FMUv2",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 1032192,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
"summary": "PX4FMUv4",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 2080768,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 7,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4IO board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4IO",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
"summary": "PX4IOv2",
|
||||
"version": "2.0",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 61440,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 10,
|
||||
"magic": "PX4FWv2",
|
||||
"description": "Firmware for the PX4IOv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4IOv2",
|
||||
"version": "2.0",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
Vendored
-783
@@ -1,783 +0,0 @@
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
def builds = [:]
|
||||
|
||||
def docker_base = "px4io/px4-dev-base:2018-03-30"
|
||||
def docker_nuttx = "px4io/px4-dev-nuttx:2018-03-30"
|
||||
def docker_ros = "px4io/px4-dev-ros:2018-03-30"
|
||||
def docker_rpi = "px4io/px4-dev-raspi:2018-03-30"
|
||||
def docker_armhf = "px4io/px4-dev-armhf:2017-12-30"
|
||||
def docker_arch = "px4io/px4-dev-base-archlinux:2018-03-30"
|
||||
def docker_snapdragon = "lorenzmeier/px4-dev-snapdragon:2017-12-29"
|
||||
def docker_clang = "px4io/px4-dev-clang:2018-03-30"
|
||||
|
||||
// fmu-v2_{default, lpe} and fmu-v3_{default, rtps}
|
||||
// bloaty compare to last successful master build
|
||||
builds["px4fmu-v2"] = {
|
||||
node {
|
||||
stage("Build Test px4fmu-v2") {
|
||||
docker.image(docker_nuttx).inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
|
||||
stage("px4fmu-v2") {
|
||||
checkout scm
|
||||
sh "export"
|
||||
sh "make distclean"
|
||||
sh "ccache -z"
|
||||
sh "git fetch --tags"
|
||||
sh "make nuttx_px4io-v2_default"
|
||||
sh "make nuttx_px4io-v2_default bloaty_symbols"
|
||||
sh "make nuttx_px4io-v2_default bloaty_compileunits"
|
||||
sh "make nuttx_px4io-v2_default bloaty_compare_master"
|
||||
sh "make nuttx_px4fmu-v2_default"
|
||||
sh "make nuttx_px4fmu-v2_default bloaty_symbols"
|
||||
sh "make nuttx_px4fmu-v2_default bloaty_compileunits"
|
||||
sh "make nuttx_px4fmu-v2_default bloaty_inlines"
|
||||
sh "make nuttx_px4fmu-v2_default bloaty_templates"
|
||||
sh "make nuttx_px4fmu-v2_default bloaty_compare_master"
|
||||
sh "make nuttx_px4fmu-v2_lpe"
|
||||
sh "make nuttx_px4fmu-v2_test"
|
||||
sh "make nuttx_px4fmu-v3_default"
|
||||
sh "make nuttx_px4fmu-v3_rtps"
|
||||
sh "make sizes"
|
||||
sh "ccache -s"
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build/**/*.px4, build/**/*.elf', fingerprint: true, onlyIfSuccessful: true)
|
||||
sh "make distclean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// nuttx default targets that are archived and uploaded to s3
|
||||
for (def option in ["px4fmu-v4", "px4fmu-v4pro", "px4fmu-v5", "aerofc-v1", "aerocore2", "auav-x21", "crazyflie", "mindpx-v2", "nxphlite-v3", "tap-v1", "omnibus-f4sd"]) {
|
||||
def node_name = "${option}"
|
||||
builds[node_name] = createBuildNodeArchive(docker_nuttx, "${node_name}_default")
|
||||
}
|
||||
|
||||
// other nuttx default targets
|
||||
for (def option in ["px4-same70xplained-v1", "px4-stm32f4discovery", "px4cannode-v1", "px4esc-v1", "px4nucleoF767ZI-v1", "s2740vc-v1"]) {
|
||||
def node_name = "${option}"
|
||||
builds[node_name] = createBuildNode(docker_nuttx, "${node_name}_default")
|
||||
}
|
||||
|
||||
builds["sitl_rtps"] = createBuildNode(docker_base, 'posix_sitl_rtps')
|
||||
builds["sitl (GCC 7)"] = createBuildNode(docker_arch, 'posix_sitl_default')
|
||||
|
||||
builds["rpi"] = createBuildNode(docker_rpi, 'posix_rpi_cross')
|
||||
builds["bebop"] = createBuildNode(docker_rpi, 'posix_bebop_default')
|
||||
|
||||
builds["ocpoc"] = createBuildNode(docker_armhf, 'posix_ocpoc_ubuntu')
|
||||
|
||||
// snapdragon (eagle_default)
|
||||
builds["eagle (linux)"] = createBuildNodeDockerLogin(docker_snapdragon, 'docker_hub_dagar', 'posix_eagle_default')
|
||||
builds["eagle (qurt)"] = createBuildNodeDockerLogin(docker_snapdragon, 'docker_hub_dagar', 'qurt_eagle_default')
|
||||
|
||||
// posix_sitl_default with package
|
||||
builds["sitl"] = {
|
||||
node {
|
||||
stage("Build Test sitl") {
|
||||
docker.image(docker_ros).inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE') {
|
||||
stage("sitl") {
|
||||
checkout scm
|
||||
sh "export"
|
||||
sh "make distclean"
|
||||
sh "ccache -z"
|
||||
sh "make posix_sitl_default"
|
||||
sh "make posix_sitl_default sitl_gazebo"
|
||||
sh "make posix_sitl_default package"
|
||||
sh "ccache -s"
|
||||
stash name: "px4_sitl_package", includes: "build/posix_sitl_default/*.bz2"
|
||||
sh "make distclean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MAC OS posix_sitl_default
|
||||
builds["sitl (OSX)"] = {
|
||||
node("mac") {
|
||||
withEnv(["CCACHE_BASEDIR=${pwd()}"]) {
|
||||
stage("sitl (OSX)") {
|
||||
checkout scm
|
||||
sh "export"
|
||||
sh "make distclean"
|
||||
sh "ccache -z"
|
||||
sh "make posix_sitl_default"
|
||||
sh "ccache -s"
|
||||
sh "make distclean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MAC OS nuttx_px4fmu-v4pro_default
|
||||
builds["px4fmu-v4pro (OSX)"] = {
|
||||
node("mac") {
|
||||
withEnv(["CCACHE_BASEDIR=${pwd()}"]) {
|
||||
stage("px4fmu-v4pro (OSX)") {
|
||||
checkout scm
|
||||
sh "export"
|
||||
sh "make distclean"
|
||||
sh "ccache -z"
|
||||
sh "make nuttx_px4fmu-v4pro_default"
|
||||
sh "ccache -s"
|
||||
sh "make distclean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parallel builds
|
||||
} // script
|
||||
} // steps
|
||||
} // stage Builds
|
||||
|
||||
stage('Test') {
|
||||
parallel {
|
||||
|
||||
stage('Style Check') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base:2018-03-30' }
|
||||
}
|
||||
|
||||
steps {
|
||||
sh 'make check_format'
|
||||
}
|
||||
}
|
||||
|
||||
stage('clang analyzer') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-clang:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make scan-build'
|
||||
// publish html
|
||||
publishHTML target: [
|
||||
reportTitles: 'clang static analyzer',
|
||||
allowMissing: false,
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
reportDir: 'build/scan-build/report_latest',
|
||||
reportFiles: '*',
|
||||
reportName: 'Clang Static Analyzer'
|
||||
]
|
||||
sh 'make distclean'
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'beta'
|
||||
branch 'stable'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('clang tidy') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-clang:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make clang-tidy-quiet'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('cppcheck') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:ubuntu17.10'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make cppcheck'
|
||||
// publish html
|
||||
publishHTML target: [
|
||||
reportTitles: 'Cppcheck',
|
||||
allowMissing: false,
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
reportDir: 'build/cppcheck/',
|
||||
reportFiles: '*',
|
||||
reportName: 'Cppcheck'
|
||||
]
|
||||
sh 'make distclean'
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'beta'
|
||||
branch 'stable'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('tests') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make posix_sitl_default test_results_junit'
|
||||
junit 'build/posix_sitl_default/JUnitTestResults.xml'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('test mission (code coverage)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
|
||||
sh 'make tests_mission_coverage'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s'
|
||||
}
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: PX4 requires clean shutdown first
|
||||
// stage('tests (address sanitizer)') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-base:2018-03-30'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
// }
|
||||
// }
|
||||
// environment {
|
||||
// PX4_ASAN = 1
|
||||
// ASAN_OPTIONS = "color=always:check_initialization_order=1:detect_stack_use_after_return=1"
|
||||
// }
|
||||
// steps {
|
||||
// sh 'export'
|
||||
// sh 'make distclean'
|
||||
// sh 'make tests'
|
||||
// sh 'make distclean'
|
||||
// }
|
||||
// }
|
||||
|
||||
// TODO: test and re-enable once GDB is available in px4-dev-ros
|
||||
// stage('tests (code coverage)') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-ros:2018-03-30'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// sh 'export'
|
||||
// sh 'make distclean'
|
||||
// sh 'ulimit -c unlimited; make tests_coverage'
|
||||
// sh 'ls'
|
||||
// withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
// sh 'curl -s https://codecov.io/bash | bash -s'
|
||||
// }
|
||||
// sh 'make distclean'
|
||||
// }
|
||||
// post {
|
||||
// failure {
|
||||
// sh('find . -name core')
|
||||
// sh('gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" build/posix_sitl_default/px4 core')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
stage('check stack') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make px4fmu-v2_default stack_check'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS vtol standard mission') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS vtol tailsitter mission') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tailsitter'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS vtol tiltrotor mission') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tiltrotor'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS vtol mission new 2') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS vtol mission old 1') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS vtol mission old 2') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS MC mission box') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS offboard att') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ROS offboard pos') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
|
||||
unstash 'px4_sitl_package'
|
||||
sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
|
||||
sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test'
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
|
||||
archiveArtifacts '.ros/**/*.pdf'
|
||||
archiveArtifacts '.ros/**/*.csv'
|
||||
deleteDir()
|
||||
}
|
||||
failure {
|
||||
sh 'ls -a'
|
||||
archiveArtifacts '.ros/**/*.ulg'
|
||||
archiveArtifacts '.ros/**/rosunit-*.xml'
|
||||
archiveArtifacts '.ros/**/rostest-*.log'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate Metadata') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('airframe') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base:2018-03-30' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
sh 'make airframe_metadata'
|
||||
archiveArtifacts(artifacts: 'airframes.md, airframes.xml', fingerprint: true)
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('parameter') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base:2018-03-30' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
sh 'make parameters_metadata'
|
||||
archiveArtifacts(artifacts: 'parameters.md, parameters.xml', fingerprint: true)
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('module') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base:2018-03-30' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
sh 'make module_documentation'
|
||||
archiveArtifacts(artifacts: 'modules/*.md', fingerprint: true)
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('uorb graphs') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2018-03-30'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make uorb_graphs'
|
||||
archiveArtifacts(artifacts: 'Tools/uorb_graph/graph_sitl.json')
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: actually upload artifacts to S3
|
||||
stage('S3 Upload') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base:2018-03-30' }
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'beta'
|
||||
branch 'stable'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'echo "uploading to S3"'
|
||||
}
|
||||
}
|
||||
} // stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
def createBuildNode(String docker_repo, String target) {
|
||||
return {
|
||||
node {
|
||||
docker.image(docker_repo).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
|
||||
stage(target) {
|
||||
sh('export')
|
||||
checkout scm
|
||||
sh('make distclean')
|
||||
sh('git fetch --tags')
|
||||
sh('ccache -z')
|
||||
sh('make ' + target)
|
||||
sh('ccache -s')
|
||||
sh('make sizes')
|
||||
sh('make distclean')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def createBuildNodeArchive(String docker_repo, String target) {
|
||||
return {
|
||||
node {
|
||||
docker.image(docker_repo).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
|
||||
stage(target) {
|
||||
sh('export')
|
||||
checkout scm
|
||||
sh('make distclean')
|
||||
sh('git fetch --tags')
|
||||
sh('ccache -z')
|
||||
sh('make ' + target)
|
||||
sh('ccache -s')
|
||||
sh('make sizes')
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build/**/*.px4, build/**/*.elf, build/**/*.bin', fingerprint: true, onlyIfSuccessful: true)
|
||||
sh('make distclean')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def createBuildNodeDockerLogin(String docker_repo, String docker_credentials, String target) {
|
||||
return {
|
||||
node {
|
||||
docker.withRegistry('https://registry.hub.docker.com', docker_credentials) {
|
||||
docker.image(docker_repo).inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
|
||||
stage(target) {
|
||||
sh('export')
|
||||
checkout scm
|
||||
sh('make distclean')
|
||||
sh('git fetch --tags')
|
||||
sh('ccache -z')
|
||||
sh('make ' + target)
|
||||
sh('ccache -s')
|
||||
sh('make sizes')
|
||||
sh('make distclean')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2012 - 2018, PX4 Development Team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
The PX4 firmware is licensed generally under a permissive 3-clause BSD license. Contributions are required
|
||||
to be made under the same license. Any exception to this general rule is listed below.
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
- PX4 middleware: BSD 3-clause
|
||||
- PX4 flight control stack: BSD 3-clause
|
||||
- NuttX operating system: BSD 3-clause
|
||||
- Exceptions: Currently only this [400 LOC file](https://github.com/PX4/Firmware/blob/master/src/lib/external_lgpl/tecs/tecs.cpp) remains LGPL, but will be replaced with a BSD implementation.
|
||||
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 - 2017 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 - 2016 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -39,6 +39,26 @@ ifeq ($(wildcard .git),)
|
||||
$(error YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.)
|
||||
endif
|
||||
|
||||
CMAKE_VER := $(shell Tools/check_cmake.sh; echo $$?)
|
||||
ifneq ($(CMAKE_VER),0)
|
||||
$(warning Not a valid CMake version or CMake not installed.)
|
||||
$(warning On Ubuntu, install or upgrade via:)
|
||||
$(warning )
|
||||
$(warning 3rd party PPA:)
|
||||
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
|
||||
$(warning sudo apt-get update)
|
||||
$(warning sudo apt-get install cmake)
|
||||
$(warning )
|
||||
$(warning Official website:)
|
||||
$(warning wget https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.sh)
|
||||
$(warning chmod +x cmake-3.3.2-Linux-x86_64.sh)
|
||||
$(warning sudo mkdir /opt/cmake-3.3.2)
|
||||
$(warning sudo ./cmake-3.3.2-Linux-x86_64.sh --prefix=/opt/cmake-3.3.2 --exclude-subdir)
|
||||
$(warning export PATH=/opt/cmake-3.3.2/bin:$$PATH)
|
||||
$(warning )
|
||||
$(error Fatal)
|
||||
endif
|
||||
|
||||
# Help
|
||||
# --------------------------------------------------------------------
|
||||
# Don't be afraid of this makefile, it is just passing
|
||||
@@ -53,351 +73,208 @@ endif
|
||||
# make px4fmu-v2_default test (builds and tests)
|
||||
#
|
||||
# This tells cmake to build the nuttx px4fmu-v2 default config in the
|
||||
# directory build/nuttx_px4fmu-v2_default and then call make
|
||||
# directory build_nuttx_px4fmu-v2_default and then call make
|
||||
# in that directory with the target upload.
|
||||
|
||||
# explicity set default build target
|
||||
all: posix_sitl_default
|
||||
all: px4fmu-v2_default
|
||||
|
||||
# Parsing
|
||||
# --------------------------------------------------------------------
|
||||
# assume 1st argument passed is the main target, the
|
||||
# rest are arguments to pass to the makefile generated
|
||||
# by cmake in the subdirectory
|
||||
FIRST_ARG := $(firstword $(MAKECMDGOALS))
|
||||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
j ?= 4
|
||||
|
||||
NINJA_BIN := ninja
|
||||
ifndef NO_NINJA_BUILD
|
||||
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
|
||||
|
||||
ifndef NINJA_BUILD
|
||||
NINJA_BIN := ninja-build
|
||||
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
|
||||
endif
|
||||
endif
|
||||
|
||||
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
|
||||
ifdef NINJA_BUILD
|
||||
PX4_CMAKE_GENERATOR := Ninja
|
||||
PX4_MAKE := $(NINJA_BIN)
|
||||
|
||||
ifdef VERBOSE
|
||||
PX4_MAKE_ARGS := -v
|
||||
else
|
||||
PX4_MAKE_ARGS :=
|
||||
endif
|
||||
PX4_CMAKE_GENERATOR ?= "Ninja"
|
||||
PX4_MAKE = ninja
|
||||
PX4_MAKE_ARGS =
|
||||
else
|
||||
ifdef SYSTEMROOT
|
||||
# Windows
|
||||
PX4_CMAKE_GENERATOR := "MSYS\ Makefiles"
|
||||
else
|
||||
PX4_CMAKE_GENERATOR := "Unix\ Makefiles"
|
||||
endif
|
||||
PX4_MAKE = $(MAKE)
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
endif
|
||||
|
||||
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
# check if replay env variable is set & set build dir accordingly
|
||||
ifdef replay
|
||||
BUILD_DIR_SUFFIX := _replay
|
||||
ifdef SYSTEMROOT
|
||||
# Windows
|
||||
PX4_CMAKE_GENERATOR ?= "MSYS Makefiles"
|
||||
else
|
||||
BUILD_DIR_SUFFIX :=
|
||||
PX4_CMAKE_GENERATOR ?= "Unix Makefiles"
|
||||
endif
|
||||
|
||||
# additional config parameters passed to cmake
|
||||
ifdef EXTERNAL_MODULES_LOCATION
|
||||
CMAKE_ARGS += -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
|
||||
endif
|
||||
|
||||
ifdef PX4_CMAKE_BUILD_TYPE
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=${PX4_CMAKE_BUILD_TYPE}
|
||||
PX4_MAKE = make
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
endif
|
||||
|
||||
# Functions
|
||||
# --------------------------------------------------------------------
|
||||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
+@$(eval PX4_CONFIG = $(1))
|
||||
+@$(eval BUILD_DIR = $(SRC_DIR)/build/$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
|
||||
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(SRC_DIR) -G"$(PX4_CMAKE_GENERATOR)" $(CMAKE_ARGS) -DCONFIG=$(PX4_CONFIG) || (rm -rf $(BUILD_DIR)); fi
|
||||
+@$(PX4_MAKE) -C $(BUILD_DIR) $(PX4_MAKE_ARGS) $(ARGS)
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
|
||||
+@Tools/check_submodules.sh
|
||||
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
COLOR_BLUE = \033[0;94m
|
||||
NO_COLOR = \033[m
|
||||
# create empty targets to avoid msgs for targets passed to cmake
|
||||
define cmake-targ
|
||||
$(1):
|
||||
@#
|
||||
.PHONY: $(1)
|
||||
endef
|
||||
|
||||
define colorecho
|
||||
+@echo -e '${COLOR_BLUE}${1} ${NO_COLOR}'
|
||||
@tput setaf 6
|
||||
@echo $1
|
||||
@tput sgr0
|
||||
endef
|
||||
|
||||
# Get a list of all config targets cmake/configs/*.cmake
|
||||
ALL_CONFIG_TARGETS := $(basename $(shell find "$(SRC_DIR)/cmake/configs" -maxdepth 1 ! -name '*_common*' ! -name '*_sdflight_*' -name '*.cmake' -print | sed -e 's:^.*/::' | sort))
|
||||
# Strip off leading nuttx_
|
||||
NUTTX_CONFIG_TARGETS := $(patsubst nuttx_%,%,$(filter nuttx_%,$(ALL_CONFIG_TARGETS)))
|
||||
|
||||
# ADD CONFIGS HERE
|
||||
# --------------------------------------------------------------------
|
||||
# Do not put any spaces between function arguments.
|
||||
|
||||
# All targets.
|
||||
$(ALL_CONFIG_TARGETS):
|
||||
px4fmu-v1_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v1_default)
|
||||
|
||||
px4fmu-v2_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_default)
|
||||
|
||||
px4fmu-v4_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v4_default)
|
||||
|
||||
px4-stm32f4discovery_default:
|
||||
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
|
||||
|
||||
px4fmu-v2_ekf2:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
|
||||
|
||||
mindpx-v2_default:
|
||||
$(call cmake-build,nuttx_mindpx-v2_default)
|
||||
|
||||
posix_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
# Abbreviated config targets.
|
||||
posix_sitl_lpe:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
# nuttx_ is left off by default; provide a rule to allow that.
|
||||
$(NUTTX_CONFIG_TARGETS):
|
||||
$(call cmake-build,nuttx_$@)
|
||||
posix_sitl_ekf2:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
all_nuttx_targets: $(NUTTX_CONFIG_TARGETS)
|
||||
posix_sitl_replay:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_broadcast:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
ros_sitl_default:
|
||||
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
|
||||
|
||||
qurt_eagle_travis:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
eagle_default: posix_eagle_default qurt_eagle_default
|
||||
|
||||
qurt_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
excelsior_default: posix_excelsior_default qurt_excelsior_default
|
||||
|
||||
posix_rpi2_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_rpi2_release:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
broadcast: posix_sitl_broadcast
|
||||
|
||||
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
|
||||
.PHONY: all posix broadcast all_nuttx_targets
|
||||
sitl_deprecation:
|
||||
@echo "Deprecated. Use 'make posix_sitl_default jmavsim' or"
|
||||
@echo "'make posix_sitl_default gazebo' if Gazebo is preferred."
|
||||
|
||||
# Multi- config targets.
|
||||
eagle_default: posix_eagle_default qurt_eagle_default
|
||||
eagle_rtps: posix_eagle_rtps qurt_eagle_default
|
||||
eagle_legacy_default: posix_eagle_legacy qurt_eagle_legacy
|
||||
excelsior_default: posix_excelsior_default qurt_excelsior_default
|
||||
excelsior_rtps: posix_excelsior_rtps qurt_excelsior_default
|
||||
excelsior_legacy_default: posix_excelsior_legacy qurt_excelsior_legacy
|
||||
|
||||
.PHONY: eagle_default eagle_rtps eagle_legacy_default
|
||||
.PHONY: excelsior_default excelsior_rtps excelsior_legacy_default
|
||||
run_sitl_quad: sitl_deprecation
|
||||
run_sitl_plane: sitl_deprecation
|
||||
run_sitl_ros: sitl_deprecation
|
||||
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
.PHONY: qgc_firmware px4fmu_firmware misc_qgc_extra_firmware alt_firmware check_rtps
|
||||
.PHONY: uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
|
||||
# QGroundControl flashable NuttX firmware
|
||||
qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware
|
||||
uavcan_firmware:
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
$(call colorecho,"Downloading and building Vector control (FOC) firmware for the S2740VC and PX4ESC 1.6")
|
||||
@(rm -rf vectorcontrol && git clone --quiet --depth 1 https://github.com/thiemar/vectorcontrol.git && cd vectorcontrol && BOARD=s2740vc_1_0 make --silent --no-print-directory && BOARD=px4esc_1_6 make --silent --no-print-directory && ../Tools/uavcan_copy.sh)
|
||||
endif
|
||||
|
||||
# px4fmu NuttX firmware
|
||||
px4fmu_firmware: \
|
||||
check_px4io-v2_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_px4fmu-v3_default \
|
||||
check_px4fmu-v4_default \
|
||||
check_px4fmu-v4pro_default \
|
||||
check_px4fmu-v5_default \
|
||||
sizes
|
||||
check: check_px4fmu-v1_default check_px4fmu-v2_default check_px4fmu-v4_default_and_uavcan check_mindpx-v2_default check_px4-stm32f4discovery_default check_posix_sitl_default check_unittest check_format
|
||||
|
||||
misc_qgc_extra_firmware: \
|
||||
check_aerocore2_default \
|
||||
check_aerofc-v1_default \
|
||||
check_auav-x21_default \
|
||||
check_crazyflie_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4fmu-v2_lpe \
|
||||
check_tap-v1_default \
|
||||
sizes
|
||||
|
||||
# Other NuttX firmware
|
||||
alt_firmware: \
|
||||
check_nxphlite-v3_default \
|
||||
check_px4-same70xplained-v1_default \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_px4cannode-v1_default \
|
||||
check_px4esc-v1_default \
|
||||
check_px4nucleoF767ZI-v1_default \
|
||||
check_s2740vc-v1_default \
|
||||
sizes
|
||||
|
||||
# builds with RTPS
|
||||
check_rtps: \
|
||||
check_px4fmu-v3_rtps \
|
||||
check_px4fmu-v4_rtps \
|
||||
check_px4fmu-v4pro_rtps \
|
||||
check_posix_sitl_rtps \
|
||||
sizes
|
||||
|
||||
.PHONY: sizes check quick_check check_rtps uorb_graphs
|
||||
|
||||
sizes:
|
||||
@-find build -name *.elf -type f | xargs size 2> /dev/null || :
|
||||
|
||||
# All default targets that don't require a special build environment
|
||||
check: check_posix_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
|
||||
|
||||
# quick_check builds a single nuttx and posix target, runs testing, and checks the style
|
||||
quick_check: check_posix_sitl_default check_px4fmu-v4pro_default tests check_format
|
||||
check_format:
|
||||
$(call colorecho,"Checking formatting with astyle")
|
||||
@./Tools/fix_code_style.sh
|
||||
@./Tools/check_code_style.sh
|
||||
|
||||
check_%:
|
||||
@echo
|
||||
$(call colorecho,'Building' $(subst check_,,$@))
|
||||
$(call colorecho,"Building" $(subst check_,,$@))
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@)
|
||||
@echo
|
||||
|
||||
uorb_graphs:
|
||||
@./Tools/uorb_graph/create_from_startupscript.sh
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --file Tools/uorb_graph/graph_full
|
||||
@$(MAKE) --no-print-directory px4fmu-v2_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4fmu-v4_default uorb_graph
|
||||
@$(MAKE) --no-print-directory posix_sitl_default uorb_graph
|
||||
check_px4fmu-v4_default: uavcan_firmware
|
||||
check_px4fmu-v4_default_and_uavcan: check_px4fmu-v4_default
|
||||
@echo
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
@echo "Cleaning up vectorcontrol firmware"
|
||||
@rm -rf vectorcontrol
|
||||
@rm -rf ROMFS/px4fmu_common/uavcan
|
||||
endif
|
||||
|
||||
unittest: posix_sitl_default
|
||||
@(cd unittests && cmake -G$(PX4_CMAKE_GENERATOR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest -j2 --output-on-failure)
|
||||
|
||||
.PHONY: coverity_scan
|
||||
|
||||
coverity_scan: posix_sitl_default
|
||||
|
||||
# Documentation
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata
|
||||
|
||||
parameters_metadata:
|
||||
@python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --markdown
|
||||
@python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --xml
|
||||
|
||||
airframe_metadata:
|
||||
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --markdown
|
||||
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --xml
|
||||
|
||||
module_documentation:
|
||||
@python $(SRC_DIR)/Tools/px_process_module_doc.py -v --markdown $(SRC_DIR)/modules --src-path $(SRC_DIR)/src
|
||||
|
||||
px4_metadata: parameters_metadata airframe_metadata module_documentation
|
||||
|
||||
# Astyle
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: check_format format
|
||||
|
||||
check_format:
|
||||
$(call colorecho,'Checking formatting with astyle')
|
||||
@$(SRC_DIR)/Tools/astyle/check_code_style_all.sh
|
||||
@cd $(SRC_DIR) && git diff --check
|
||||
|
||||
format:
|
||||
$(call colorecho,'Formatting with astyle')
|
||||
@$(SRC_DIR)/Tools/astyle/check_code_style_all.sh --fix
|
||||
|
||||
# Testing
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard rostest
|
||||
|
||||
tests:
|
||||
@$(MAKE) --no-print-directory posix_sitl_default test_results \
|
||||
ASAN_OPTIONS="color=always:check_initialization_order=1:detect_stack_use_after_return=1" \
|
||||
UBSAN_OPTIONS="color=always"
|
||||
|
||||
tests_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory posix_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@echo "Open $(SRC_DIR)/build/posix_sitl_default/coverage-html/index.html to see coverage"
|
||||
|
||||
rostest: posix_sitl_default
|
||||
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo
|
||||
|
||||
tests_mission: rostest
|
||||
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
|
||||
|
||||
tests_mission_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory posix_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol
|
||||
@$(MAKE) --no-print-directory posix_sitl_default generate_coverage
|
||||
|
||||
tests_offboard: rostest
|
||||
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
|
||||
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
|
||||
|
||||
# static analyzers (scan-build, clang-tidy, cppcheck)
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck
|
||||
|
||||
scan-build:
|
||||
@export CCC_CC=clang
|
||||
@export CCC_CXX=clang++
|
||||
@rm -rf $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||
@rm -rf $(SRC_DIR)/build/scan-build/report_latest
|
||||
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-scan-build && scan-build cmake $(SRC_DIR) -GNinja -DCONFIG=posix_sitl_default
|
||||
@scan-build -o $(SRC_DIR)/build/scan-build cmake --build $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||
@find $(SRC_DIR)/build/scan-build -maxdepth 1 -mindepth 1 -type d -exec cp -r "{}" $(SRC_DIR)/build/scan-build/report_latest \;
|
||||
|
||||
posix_sitl_default-clang:
|
||||
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-clang
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-clang && cmake $(SRC_DIR) $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=posix_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
@$(PX4_MAKE) -C $(SRC_DIR)/build/posix_sitl_default-clang
|
||||
|
||||
clang-tidy: posix_sitl_default-clang
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
|
||||
|
||||
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
|
||||
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
|
||||
clang-tidy-fix: posix_sitl_default-clang
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -fix -p .
|
||||
|
||||
# modified version of run-clang-tidy.py to return error codes and only output relevant results
|
||||
clang-tidy-quiet: posix_sitl_default-clang
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
|
||||
|
||||
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
|
||||
cppcheck: posix_sitl_default
|
||||
@mkdir -p $(SRC_DIR)/build/cppcheck
|
||||
@cppcheck -i$(SRC_DIR)/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project=$(SRC_DIR)/build/posix_sitl_default/compile_commands.json --xml-version=2 2> $(SRC_DIR)/build/cppcheck/cppcheck-result.xml > /dev/null
|
||||
@cppcheck-htmlreport --source-encoding=ascii --file=$(SRC_DIR)/build/cppcheck/cppcheck-result.xml --report-dir=$(SRC_DIR)/build/cppcheck --source-dir=$(SRC_DIR)/src/
|
||||
|
||||
# Cleanup
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||
package_firmware:
|
||||
@zip --junk-paths Firmware.zip `find . -name \*.px4`
|
||||
|
||||
clean:
|
||||
@rm -rf $(SRC_DIR)/build
|
||||
@rm -rf build_*/
|
||||
@(cd NuttX/nuttx && make clean)
|
||||
|
||||
submodulesclean:
|
||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||
@git submodule update --quiet --init --recursive --force || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule sync
|
||||
@git submodule deinit -f .
|
||||
@git submodule update --init --recursive --force
|
||||
|
||||
submodulesupdate:
|
||||
@git submodule update --quiet --init --recursive || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive
|
||||
distclean: submodulesclean
|
||||
@git clean -ff -x -d
|
||||
|
||||
gazeboclean:
|
||||
@rm -rf ~/.gazebo/*
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim replay \
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
distclean: gazeboclean
|
||||
@git submodule deinit -f .
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
|
||||
.PHONY: clean
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
|
||||
%:
|
||||
$(if $(filter $(FIRST_ARG),$@), \
|
||||
$(error "$@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
|
||||
CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
|
||||
|
||||
#help:
|
||||
# @echo
|
||||
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
|
||||
# @echo "build configurations."
|
||||
# @echo
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
|
||||
help:
|
||||
@echo "Usage: $(MAKE) <target>"
|
||||
@echo "Where <target> is one of:"
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
|
||||
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS) $(NUTTX_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
|
||||
@echo
|
||||
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
|
||||
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
|
||||
|
||||
# Print a list of all config targets.
|
||||
list_config_targets:
|
||||
@for targ in $(patsubst nuttx_%,[nuttx_]%,$(ALL_CONFIG_TARGETS)); do echo $$targ; done
|
||||
|
||||
Submodule
+1
Submodule NuttX added at f0f4bdc872
@@ -1,108 +1,35 @@
|
||||
# PX4 Pro Drone Autopilot
|
||||
## PX4 Pro Drone Autopilot ##
|
||||
|
||||
[](https://github.com/PX4/Firmware/releases) [](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware)
|
||||
[](https://travis-ci.org/PX4/Firmware) [](https://scan.coverity.com/projects/3966?tab=overview)
|
||||
|
||||
[](http://ci.px4.io:8080/blue/organizations/jenkins/Firmware/activity) [](https://scan.coverity.com/projects/3966?tab=overview)
|
||||
[](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
[](http://slack.px4.io)
|
||||
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the src/modules directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
|
||||
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
* Official Website: http://px4.io
|
||||
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
|
||||
* Supported airframes (more experimental are supported):
|
||||
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
|
||||
* [Fixed wing](http://px4.io/portfolio_category/plane/)
|
||||
* [VTOL](http://px4.io/portfolio_category/vtol/)
|
||||
* Releases
|
||||
* [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/Firmware/blob/master/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
|
||||
* [Multicopters](https://docs.px4.io/en/airframes/airframe_reference.html#copter)
|
||||
* [Fixed wing](https://docs.px4.io/en/airframes/airframe_reference.html#plane)
|
||||
* [VTOL](https://docs.px4.io/en/airframes/airframe_reference.html#vtol)
|
||||
* many more experimental types (Rovers, Blimps, Boats, Submarines, etc)
|
||||
* Releases: [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
### Users ###
|
||||
|
||||
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
|
||||
|
||||
## PX4 Users
|
||||
### Developers ###
|
||||
|
||||
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/en/#support) if you need help!
|
||||
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
|
||||
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [Developer guide](http://dev.px4.io)
|
||||
|
||||
|
||||
## PX4 Developers
|
||||
|
||||
This [Developer Guide](https://dev.px4.io/) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
|
||||
|
||||
Developers should read the [Guide for Contributions](https://dev.px4.io/en/contribute/).
|
||||
See the [forum and chat](https://dev.px4.io/en/#support) if you need help!
|
||||
|
||||
|
||||
### Weekly Dev Call
|
||||
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribute/#dev_call).
|
||||
|
||||
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers. All regular calls are listed in the [Dronecode calendar](https://www.dronecode.org/calendar/).
|
||||
|
||||
|
||||
## Maintenance Team
|
||||
|
||||
* Project: Founder - [Lorenz Meier](https://github.com/LorenzMeier), Architecture: [Daniel Agar](https://github.com/dagar)
|
||||
* [Dev Call](https://github.com/PX4/Firmware/labels/devcall) - [Ramon Roche](https://github.com/mrpollo)
|
||||
* Communication Architecture
|
||||
* [Beat Kueng](https://github.com/bkueng)
|
||||
* [Julian Oes](https://github.com/JulianOes)
|
||||
* UI / UX
|
||||
* [Donald Gagne](https://github.com/DonLakeFlyer)
|
||||
* [Gus Grubba](https://github.com/dogmaphobic)
|
||||
* [Multicopter Flight Control](https://github.com/PX4/Firmware/labels/multicopter)
|
||||
* [Dennis Mannhart](https://github.com/Stifael)
|
||||
* [Matthias Grob](https://github.com/MaEtUgR)
|
||||
* [VTOL Flight Control](https://github.com/PX4/Firmware/labels/vtol)
|
||||
* [Daniel Agar](https://github.com/dagar)
|
||||
* [Mathieu Bresciani](https://github.com/bresch)
|
||||
* [Sander Smeets](https://github.com/sanderux)
|
||||
* [Roman Bapst](https://github.com/tumbili)
|
||||
* [Andreas Antener](https://github.com/AndreasAntener)
|
||||
* [Fixed Wing Flight Control](https://github.com/PX4/Firmware/labels/fixedwing)
|
||||
* [Daniel Agar](https://github.com/dagar)
|
||||
* [Paul Riseborough](https://github.com/priseborough)
|
||||
* Racers - [Matthias Grob](https://github.com/MaEtUgR)
|
||||
* OS / drivers - [David Sidrane](https://github.com/davids5)
|
||||
* [UAVCAN](https://github.com/PX4/Firmware/labels/uavcan) / Industrial - [Pavel Kirienko](https://github.com/pavel-kirienko)
|
||||
* [State Estimation](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3A%22state+estimation%22) - [James Goppert](https://github.com/jgoppert), [Paul Riseborough](https://github.com/priseborough)
|
||||
* Vision based navigation
|
||||
* [Christoph Tobler](https://github.com/ChristophTobler)
|
||||
* [Mohammed Kabir](https://github.com/mhkabir)
|
||||
* Obstacle Avoidance - [Martina Rivizzigno](https://github.com/mrivi)
|
||||
* [Snapdragon](https://github.com/PX4/Firmware/labels/snapdragon)
|
||||
* [Christoph Tobler](https://github.com/ChristophTobler)
|
||||
* [Intel Aero](https://github.com/PX4/Firmware/labels/intel%20aero)
|
||||
* [Sugnan Prabhu](https://github.com/sugnanprabhu)
|
||||
* [José Roberto de Souza](https://github.com/zehortigoza)
|
||||
* [Raspberry Pi / Navio](https://github.com/PX4/Firmware/labels/raspberry_pi) - [Beat Kueng](https://github.com/bkueng)
|
||||
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
|
||||
* RTPS/ROS2 Interface - [Vicente Monge](https://github.com/vicenteeprosima)
|
||||
|
||||
See also [About Us](http://px4.io/about-us/#development_team) (px4.io) and the [contributors list](https://github.com/PX4/Firmware/graphs/contributors) (Github).
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
This repository contains code supporting these boards:
|
||||
* [Snapdragon Flight](https://docs.px4.io/en/flight_controller/snapdragon_flight.html)
|
||||
* [Intel Aero](https://docs.px4.io/en/flight_controller/intel_aero.html)
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/en/flight_controller/raspberry_pi_navio2.html)
|
||||
* [Parrot Bebop 2](https://dev.px4.io/en/advanced/parrot_bebop.html)
|
||||
* FMUv2.x
|
||||
* [Pixhawk](https://docs.px4.io/en/flight_controller/pixhawk.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/en/flight_controller/pixhawk_mini.html)
|
||||
* [Pixfalcon](https://docs.px4.io/en/flight_controller/pixfalcon.html)
|
||||
* FMUv3.x [Pixhawk 2](https://pixhawk.org/modules/pixhawk2)
|
||||
* FMUv4.x
|
||||
* [Pixracer](https://docs.px4.io/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/en/flight_controller/pixhawk3_pro.html)
|
||||
* FMUv5.x (ARM Cortex M7, future Pixhawk)
|
||||
* [STM32F4Discovery](http://www.st.com/en/evaluation-tools/stm32f4discovery.html) (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
* [Gumstix AeroCore](https://www.gumstix.com/aerocore-2/) (only v2)
|
||||
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
|
||||
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/en/flight_controller/crazyflie2.html)
|
||||
|
||||
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/en/flight_controller/).
|
||||
|
||||
## Project Roadmap
|
||||
|
||||
A high level project roadmap is available [here](https://www.dronecode.org/roadmap/).
|
||||
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
|
||||
* FMUv1.x
|
||||
* FMUv2.x ([Pixhawk](http://dev.px4.io/hardware-pixhawk.html), Pixhawk 2 and [Pixfalcon](http://dev.px4.io/hardware-pixfalcon.html))
|
||||
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
|
||||
* AeroCore (v1 and v2)
|
||||
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2018 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
message(STATUS "ROMFS: ${config_romfs_root}")
|
||||
|
||||
set(config_romfs_files_list)
|
||||
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
|
||||
set(romfs_temp_dir ${PX4_BINARY_DIR}/genromfs/${config_romfs_root})
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
# px4_add_romfs_files
|
||||
#
|
||||
# This function builds a list of files to be included in the ROMFS.
|
||||
#
|
||||
# Usage:
|
||||
# px4_add_romfs_files(<list of files in current directory to be added to the project>)
|
||||
#
|
||||
# Output:
|
||||
# list config_romfs_files_list populated with a list of ROMFS src files including their full file path.
|
||||
#
|
||||
# Example:
|
||||
# px4_add_module(
|
||||
# <ROMFS_file_1>
|
||||
# <ROMFS_file_2>
|
||||
# <ROMFS_file_3>
|
||||
# )
|
||||
#
|
||||
function(px4_add_romfs_files)
|
||||
foreach(arg IN LISTS ARGN)
|
||||
list(APPEND config_romfs_files_list
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${arg}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
set(config_romfs_files_list ${config_romfs_files_list} CACHE INTERNAL "ROMFS file list")
|
||||
endfunction()
|
||||
|
||||
# get list of all ROMFS files
|
||||
add_subdirectory(${romfs_src_dir})
|
||||
|
||||
# directory setup
|
||||
# copy all romfs files, process airframes, prune comments
|
||||
add_custom_command(OUTPUT ${romfs_temp_dir}/init.d/rcS ${romfs_temp_dir}/init.d/rc.autostart
|
||||
COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
-a ${romfs_temp_dir}/init.d
|
||||
-s ${romfs_temp_dir}/init.d/rc.autostart
|
||||
--board ${BOARD}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
|
||||
--folder ${romfs_temp_dir} --board ${BOARD}
|
||||
DEPENDS
|
||||
${config_romfs_files_list}
|
||||
${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
|
||||
${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root}/init.d/rcS
|
||||
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
)
|
||||
|
||||
set(romfs_dependencies)
|
||||
list(APPEND romfs_dependencies
|
||||
${romfs_temp_dir}/init.d/rcS
|
||||
${romfs_temp_dir}/init.d/rc.autostart
|
||||
)
|
||||
|
||||
# copy px4io binary if configured
|
||||
if (config_io_board)
|
||||
list(APPEND romfs_dependencies
|
||||
copy_px4io_bin
|
||||
${fw_io_bin}
|
||||
)
|
||||
endif()
|
||||
|
||||
# create romfs.img
|
||||
add_custom_command(OUTPUT romfs.img
|
||||
COMMAND ${CMAKE_COMMAND} -E remove -f romfs.img romfs.txt
|
||||
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_temp_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
|
||||
DEPENDS ${romfs_dependencies}
|
||||
)
|
||||
|
||||
# create nsh_romfsimg.c
|
||||
add_custom_command(OUTPUT nsh_romfsimg.c
|
||||
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
|
||||
COMMAND xxd -i romfs.img nsh_romfsimg.c
|
||||
COMMAND sed 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && mv nsh_romfsimg.c.tmp nsh_romfsimg.c
|
||||
DEPENDS romfs.img
|
||||
)
|
||||
|
||||
add_library(romfs STATIC nsh_romfsimg.c)
|
||||
add_dependencies(romfs prebuild_targets)
|
||||
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
||||
@@ -1,35 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2018 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(init.d)
|
||||
add_subdirectory(mixers)
|
||||
@@ -3,14 +3,11 @@
|
||||
# @name HILStar (XPlane)
|
||||
#
|
||||
# @type Simulation
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 aileron
|
||||
# @output MAIN2 elevator
|
||||
# @output MAIN3 rudder
|
||||
# @output MAIN4 throttle
|
||||
# @output MAIN5 flaps
|
||||
# @output MAIN6 gear
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
@@ -44,5 +41,5 @@ then
|
||||
param set RWTO_TKOFF 1
|
||||
fi
|
||||
|
||||
param set SYS_HITL 1
|
||||
set HIL yes
|
||||
set MIXER AERT
|
||||
|
||||
@@ -3,21 +3,8 @@
|
||||
# @name Team Blacksheep Discovery
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 feed-through of RC AUX1 channel
|
||||
# @output MAIN6 feed-through of RC AUX2 channel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @maintainer Anton Babushkin <anton@px4.io>, Simon Wilks <simon@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -3,19 +3,8 @@
|
||||
# @name 3DR Iris Quadrotor
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @maintainer Anton Babushkin <anton@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
@@ -36,8 +25,8 @@ then
|
||||
param set MC_YAWRATE_I 0.25
|
||||
param set MC_YAWRATE_D 0.0
|
||||
|
||||
param set BAT_V_DIV 12.27559
|
||||
param set BAT_A_PER_V 15.39103
|
||||
param set BAT_V_SCALING 0.00989
|
||||
param set BAT_C_SCALING 0.0124
|
||||
fi
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
@@ -3,21 +3,8 @@
|
||||
# @name Steadidrone QU4D
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 feed-through of RC AUX1 channel
|
||||
# @output MAIN6 feed-through of RC AUX2 channel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @maintainer Thomas Gubler <thomas@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -3,21 +3,8 @@
|
||||
# @name Team Blacksheep Discovery Endurance
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 feed-through of RC AUX1 channel
|
||||
# @output MAIN6 feed-through of RC AUX2 channel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
# @maintainer Simon Wilks <simon@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
@@ -40,10 +27,11 @@ then
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
|
||||
param set MPC_XY_FF 0.2
|
||||
param set MPC_XY_VEL_MAX 2
|
||||
param set PWM_MIN 1080
|
||||
fi
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MIN 1080
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name HobbyKing SK450 DeadCat modification
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Anton Matosov <anton.matosov@gmail.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.08
|
||||
param set MC_ROLLRATE_I 0.03
|
||||
param set MC_ROLLRATE_D 0.0015
|
||||
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.1
|
||||
param set MC_PITCHRATE_I 0.03
|
||||
param set MC_PITCHRATE_D 0.0015
|
||||
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.1
|
||||
param set MC_YAWRATE_I 0.07
|
||||
param set MC_YAWRATE_D 0.0
|
||||
fi
|
||||
|
||||
set MIXER sk450_deadcat
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
set PWM_AUX_OUT 1234
|
||||
# set PWM_AUX_MIN 900
|
||||
# set PWM_AUX_MAX 2100
|
||||
set PWM_AUX_RATE 100
|
||||
|
||||
gimbal start
|
||||
@@ -3,11 +3,12 @@
|
||||
# @name HIL Quadcopter X
|
||||
#
|
||||
# @type Simulation
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @maintainer Anton Babushkin <anton@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
param set SYS_HITL 1
|
||||
set MIXER quad_x
|
||||
|
||||
set HIL yes
|
||||
|
||||
+8
-2
@@ -3,12 +3,11 @@
|
||||
# @name 3DR DIY Quad
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
@@ -22,3 +21,10 @@ then
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
set PWM_MIN 1100
|
||||
set PWM_MAX 1950
|
||||
@@ -0,0 +1,14 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name HIL Quadcopter +
|
||||
#
|
||||
# @type Simulation
|
||||
#
|
||||
# @maintainer Anton Babushkin <anton@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_+
|
||||
|
||||
set HIL yes
|
||||
@@ -0,0 +1,14 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name HIL Rascal 110 (Flightgear)
|
||||
#
|
||||
# @type Simulation
|
||||
#
|
||||
# @maintainer Thomas Gubler <thomas@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
set HIL yes
|
||||
|
||||
set MIXER AERT
|
||||
@@ -0,0 +1,41 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name HIL Malolo 1 (Flightgear)
|
||||
#
|
||||
# @type Simulation
|
||||
#
|
||||
# @maintainer Thomas Gubler <thomas@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 12
|
||||
param set FW_AIRSPD_TRIM 25
|
||||
param set FW_AIRSPD_MAX 40
|
||||
param set FW_R_TC 0.3
|
||||
param set FW_P_TC 0.3
|
||||
param set FW_L1_DAMPING 0.74
|
||||
param set FW_L1_PERIOD 15
|
||||
param set FW_PR_FF 0.8
|
||||
param set FW_PR_I 0.05
|
||||
param set FW_PR_IMAX 0.2
|
||||
param set FW_PR_P 0.1
|
||||
param set FW_P_ROLLFF 0
|
||||
param set FW_RR_FF 0.6
|
||||
param set FW_RR_I 0.02
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.1
|
||||
param set FW_R_LIM 45
|
||||
param set FW_R_RMAX 0
|
||||
param set FW_YR_FF 0.0
|
||||
param set FW_YR_I 0
|
||||
param set FW_YR_IMAX 0.2
|
||||
param set FW_YR_P 0.0
|
||||
fi
|
||||
|
||||
set HIL yes
|
||||
|
||||
# Set the AERT mixer for HIL (even if the malolo is a flying wing)
|
||||
set MIXER AERT
|
||||
@@ -1,16 +1,15 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Hexarotor coaxial geometry
|
||||
# @name Generic Hexa coaxial geometry
|
||||
#
|
||||
# @type Hexarotor Coaxial
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 front right top, CW; angle:60; direction:CW
|
||||
# @output MAIN2 front right bottom, CCW; angle:60; direction:CCW
|
||||
# @output MAIN3 back top, CW; angle:180; direction:CW
|
||||
# @output MAIN4 back bottom, CCW; angle:180; direction:CCW
|
||||
# @output MAIN5 front left top, CW; angle:-60; direction:CW
|
||||
# @output MAIN6 front left bottom, CCW;angle:-60; direction:CCW
|
||||
# @output MAIN6 front left bottom, CCW;angle:-60; direction:CCW
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
|
||||
@@ -3,16 +3,6 @@
|
||||
# @name Generic 10" Octo coaxial geometry
|
||||
#
|
||||
# @type Octorotor Coaxial
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 motor 5
|
||||
# @output MAIN6 motor 6
|
||||
# @output MAIN7 motor 7
|
||||
# @output MAIN8 motor 8
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
@@ -3,16 +3,6 @@
|
||||
# @name Steadidrone MAVRIK
|
||||
#
|
||||
# @type Octo Coax Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 motor 5
|
||||
# @output MAIN6 motor 6
|
||||
# @output MAIN7 motor 7
|
||||
# @output MAIN8 motor 8
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
@@ -41,7 +31,7 @@ then
|
||||
|
||||
param set MPC_HOLD_MAX_XY 0.25
|
||||
param set MPC_THR_MIN 0.15
|
||||
param set MPC_Z_VEL_MAX_DN 2.0
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
|
||||
param set BAT_N_CELLS 4
|
||||
fi
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Quadplane VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output AUX1 Aileron 1
|
||||
# @output AUX2 Aileron 2
|
||||
# @output AUX3 Elevator
|
||||
# @output AUX4 Rudder
|
||||
# @output AUX5 Throttle
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@@ -3,12 +3,11 @@
|
||||
# @name Caipiroshka Duo Tailsitter
|
||||
#
|
||||
# @type VTOL Duo Tailsitter
|
||||
# @class VTOL
|
||||
#
|
||||
# @output MAIN1 motor right
|
||||
# @output MAIN2 motor left
|
||||
# @output MAIN5 elevon right
|
||||
# @output MAIN6 elevon left
|
||||
# @output MAIN1 motor left
|
||||
# @output MAIN2 motor right
|
||||
# @output MAIN5 elevon left
|
||||
# @output MAIN6 elevon right
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
@@ -38,7 +37,6 @@ then
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set MAV_TYPE 19
|
||||
param set VT_ELEV_MC_LOCK 0
|
||||
fi
|
||||
|
||||
set MIXER caipirinha_vtol
|
||||
|
||||
@@ -1,21 +1,10 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name BirdsEyeView Aerobotics FireFly6
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@uaventure.com>
|
||||
#
|
||||
# @output MAIN1 Front right motor bottom
|
||||
# @output MAIN2 Front right motor top
|
||||
# @output MAIN3 Back motor bottom
|
||||
# @output MAIN4 Back motor top
|
||||
# @output MAIN5 Front left motor bottom
|
||||
# @output MAIN6 Front left motor top
|
||||
# @output AUX1 Tilt servo
|
||||
# @output AUX2 Elevon 1
|
||||
# @output AUX3 Elevon 2
|
||||
# @output AUX4 Gear
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
@@ -23,16 +12,16 @@ sh /etc/init.d/rc.vtol_defaults
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.19
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.005
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 4.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# @name Quadrotor X Tailsitter
|
||||
#
|
||||
# @type VTOL Quad Tailsitter
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
@@ -3,21 +3,9 @@
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
# @type VTOL Quad Tailsitter
|
||||
# @class VTOL
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 4
|
||||
# @output MAIN4 motor 5
|
||||
# @output MAIN5 elevon left
|
||||
# @output MAIN6 elevon right
|
||||
# @output MAIN7 canard surface
|
||||
# @output MAIN8 rudder
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
# @board px4fmu-v2 exclude
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Fun Cub Quad VTOL
|
||||
# @name Fun Cub Quad VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output AUX1 Aileron 1
|
||||
# @output AUX2 Aileron 2
|
||||
# @output AUX3 Elevator
|
||||
# @output AUX4 Rudder
|
||||
# @output AUX5 Throttle
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
@@ -24,7 +13,7 @@ if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_TRANS_THR 0.75
|
||||
param set VT_ARSP_TRANS 12
|
||||
param set VT_ARSP_BLEND 6
|
||||
|
||||
@@ -44,8 +33,6 @@ then
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 40
|
||||
param set MC_YAWRAUTO_MAX 40
|
||||
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_PR_I 0.02
|
||||
@@ -62,7 +49,7 @@ then
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic quad delta VTOL
|
||||
# @name Generic quad delta VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output AUX1 Right elevon
|
||||
# @output AUX2 Left elevon
|
||||
# @output AUX3 Motor
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
@@ -22,37 +13,31 @@ if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.01
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.01
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.12
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 50
|
||||
param set MC_YAWRAUTO_MAX 20
|
||||
|
||||
param set MPC_XY_P 0.8
|
||||
param set MPC_XY_VEL_P 0.1
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# @name Generic AAVVT v-tail plane airframe with Quad VTOL.
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
@@ -14,7 +13,7 @@ if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
@@ -32,15 +31,13 @@ then
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 40
|
||||
param set MC_YAWRAUTO_MAX 40
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# @name QuadRanger
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
@@ -14,7 +13,7 @@ if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
@@ -35,11 +34,9 @@ then
|
||||
param set MC_YAWRATE_I 0.04
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRAUTO_MAX 40.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
param set MPC_TKO_SPEED 1.5
|
||||
param set MPC_LAND_SPEED 0.8
|
||||
|
||||
@@ -60,7 +57,7 @@ then
|
||||
param set VT_TYPE 2
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# @name Sparkle Tech Ranger VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
@@ -19,7 +18,7 @@ then
|
||||
param set VT_ARSP_TRANS 15.0
|
||||
param set VT_B_TRANS_DUR 4.0
|
||||
param set VT_TRANS_MIN_TM 5.0
|
||||
param set VT_F_TRANS_THR 0.6
|
||||
param set VT_TRANS_THR 0.6
|
||||
param set VT_TRANS_TIMEOUT 30.0
|
||||
|
||||
param set FW_AIRSPD_MAX 22.0
|
||||
@@ -46,7 +45,6 @@ then
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRATE_P 0.18
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRAUTO_MAX 40.0
|
||||
|
||||
param set MIS_TAKEOFF_ALT 2.5
|
||||
@@ -62,10 +60,13 @@ then
|
||||
param set MPC_TILTMAX_AIR 35.0
|
||||
param set MPC_TILTMAX_LND 20.0
|
||||
param set MPC_TKO_SPEED 1.0
|
||||
param set MPC_XY_FF 0.1
|
||||
param set MPC_XY_P 0.3
|
||||
param set MPC_XY_VEL_MAX 3.0
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_Z_FF 0.3
|
||||
param set MPC_Z_P 0.5
|
||||
param set MPC_Z_VEL_MAX 1.0
|
||||
param set MPC_Z_VEL_P 0.1
|
||||
|
||||
param set NAV_ACC_RAD 3.0
|
||||
@@ -76,7 +77,7 @@ then
|
||||
param set PWM_AUX_REV4 1
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name CruiseAder Claire
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Samay Siga <samay_s@icloud.com>
|
||||
#
|
||||
# @board px4fmu-v2 exclude
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 1
|
||||
param set VT_TILT_MC 0.08
|
||||
param set VT_TILT_TRANS 0.5
|
||||
param set VT_TILT_FW 0.9
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_FW_MOT_OFFID 13
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 1
|
||||
fi
|
||||
|
||||
set MIXER claire
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
set PWM_MAX 2000
|
||||
|
||||
set MIXER_AUX claire
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_RATE 123
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_AUX_DISARMED 1000
|
||||
|
||||
set MAV_TYPE 21
|
||||
@@ -1,83 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name E-flite Convergence
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
# @output MAIN1 Motor right
|
||||
# @output MAIN2 Motor left
|
||||
# @output MAIN3 Motor back
|
||||
# @output MAIN4 empty
|
||||
# @output MAIN5 Tilt servo right
|
||||
# @output MAIN6 Tilt servo left
|
||||
# @output MAIN7 Elevon right
|
||||
# @output MAIN8 Elevon left
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_MOT_COUNT 3
|
||||
param set VT_FW_MOT_OFFID 3
|
||||
param set VT_IDLE_PWM_MC 1200
|
||||
param set VT_TYPE 1
|
||||
|
||||
param set VT_B_TRANS_DUR 1.0
|
||||
param set VT_FW_DIFTHR_EN 1
|
||||
param set VT_FW_DIFTHR_SC 0.17
|
||||
param set VT_FW_PERM_STAB 0
|
||||
param set VT_F_TRANS_DUR 1.2
|
||||
param set VT_F_TR_OL_TM 4.0
|
||||
param set VT_TILT_FW 1.0
|
||||
param set VT_TILT_MC 0.0
|
||||
param set VT_TILT_TRANS 0.45
|
||||
param set VT_TRANS_MIN_TM 1.2
|
||||
param set VT_TRANS_P2_DUR 1.3
|
||||
|
||||
param set FW_L1_PERIOD 17
|
||||
param set FW_MAN_R_MAX 50.0
|
||||
param set FW_ACRO_X_MAX 270
|
||||
param set FW_ACRO_Y_MAX 270
|
||||
param set FW_ACRO_Z_MAX 180
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_PR_P 0.08
|
||||
param set FW_PSP_OFF 5.0
|
||||
param set FW_P_LIM_MAX 30
|
||||
param set FW_P_LIM_MIN -30
|
||||
param set FW_P_RMAX_NEG 60
|
||||
param set FW_P_RMAX_POS 60
|
||||
param set FW_RR_FF 0.33
|
||||
param set FW_RR_P 0.11
|
||||
param set FW_YR_FF 0.3
|
||||
param set FW_YR_P 0.05
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_YAWRATE_MAX 120
|
||||
param set MC_YAWRATE_P 0.27
|
||||
param set MC_YAW_FF 0.35
|
||||
param set MC_YAW_P 2.5
|
||||
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MPC_LAND_SPEED 1.2
|
||||
param set MPC_TKO_SPEED 2.5
|
||||
param set MPC_Z_VEL_MAX_UP 3.0
|
||||
|
||||
param set CBRK_AIRSPD_CHK 162128
|
||||
param set FW_ARSP_MODE 2
|
||||
|
||||
param set SENS_BOARD_ROT 8
|
||||
fi
|
||||
|
||||
set MIXER vtol_convergence
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MAV_TYPE 21
|
||||
@@ -1,124 +0,0 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name DeltaQuad
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 Right elevon
|
||||
# @output MAIN6 Left elevon
|
||||
# @output MAIN7 Pusher motor
|
||||
# @output MAIN8 Pusher reverse channel
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 1
|
||||
param set VT_DWN_PITCH_MAX 8
|
||||
param set VT_FW_QC_P 55
|
||||
param set VT_FW_QC_R 55
|
||||
param set VT_TRANS_MIN_TM 8
|
||||
param set VT_B_TRANS_DUR 5
|
||||
param set VT_WV_LND_EN 1
|
||||
param set VT_WV_LTR_EN 1
|
||||
param set VT_FWD_THRUST_SC 2
|
||||
param set VT_F_TRANS_DUR 1
|
||||
param set VT_IDLE_PWM_MC 1025
|
||||
|
||||
param set FW_ARSP_MODE 2
|
||||
param set FW_L1_PERIOD 25
|
||||
param set FW_PR_FF 0.7
|
||||
param set FW_PR_I 0.18
|
||||
param set FW_PR_P 0.15
|
||||
param set FW_P_TC 0.5
|
||||
param set FW_PSP_OFF 5
|
||||
param set FW_R_LIM 35
|
||||
param set FW_RR_FF 0.9
|
||||
param set FW_RR_I 0.08
|
||||
param set FW_RR_P 0.18
|
||||
param set FW_T_HRATE_FF 0.5
|
||||
param set FW_T_CLMB_MAX 3
|
||||
param set FW_T_SINK_MAX 3
|
||||
param set FW_T_SINK_MIN 1
|
||||
param set FW_T_VERT_ACC 6
|
||||
param set FW_THR_CRUISE 0.68
|
||||
param set FW_THR_SLEW_MAX 1
|
||||
param set FW_MAN_P_MAX 30
|
||||
param set FW_P_LIM_MAX 20
|
||||
param set FW_P_LIM_MIN -25
|
||||
param set FW_P_RMAX_NEG 45
|
||||
param set FW_P_RMAX_POS 45
|
||||
param set FW_R_RMAX 50
|
||||
|
||||
param set LNDMC_ALT_MAX 9999
|
||||
param set LNDMC_XY_VEL_MAX 1
|
||||
param set LNDMC_Z_VEL_MAX 0.7
|
||||
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.01
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_ROLLRATE_MAX 80
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_PITCHRATE_MAX 80
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 20
|
||||
param set MC_YAWRAUTO_MAX 20
|
||||
|
||||
param set MPC_XY_P 0.8
|
||||
param set MPC_XY_VEL_P 0.1
|
||||
param set MPC_XY_VEL_MAX 4
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
param set MPC_LAND_SPEED 1.5
|
||||
param set MPC_MAN_R_MAX 30
|
||||
param set MPC_TILTMAX_LND 35
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
param set MPC_Z_VEL_MAX_UP 1.5
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_HOLD_MAX_XY 0.5
|
||||
param set MPC_HOLD_MAX_Z 0.5
|
||||
|
||||
param set CBRK_AIRSPD_CHK 162128
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
|
||||
param set EKF2_GPS_POS_X -0.12
|
||||
param set EKF2_IMU_POS_X -0.12
|
||||
param set EKF2_TAU_VEL 0.5
|
||||
|
||||
param set SYS_COMPANION 57600
|
||||
fi
|
||||
|
||||
set MIXER deltaquad
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
param set PWM_MAIN_DIS5 1500
|
||||
param set PWM_MAIN_DIS6 1500
|
||||
param set PWM_MAIN_DIS7 900
|
||||
param set PWM_MAIN_DIS8 900
|
||||
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_OUT 12345
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@@ -3,12 +3,6 @@
|
||||
# @name Generic Tricopter Y+ Geometry
|
||||
#
|
||||
# @type Tricopter Y+
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 yaw servo
|
||||
#
|
||||
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
|
||||
#
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
# @name Generic Tricopter Y- Geometry
|
||||
#
|
||||
# @type Tricopter Y-
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 yaw servo
|
||||
#
|
||||
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
|
||||
#
|
||||
@@ -17,4 +11,6 @@ sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER tri_y_yaw-
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_OUT 1234
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Esky (Big) Lama v4
|
||||
# @name Coaxial Helicopter (such as Esky Lama v4 or Esky Big Lama)
|
||||
#
|
||||
# @type Coaxial Helicopter
|
||||
# @class Copter
|
||||
#
|
||||
#
|
||||
# @output MAIN1 Left swashplate servomotor, pitch axis
|
||||
# @output MAIN2 Right swashplate servomotor, roll axis
|
||||
# @output MAIN3 Upper rotor (CCW)
|
||||
@@ -13,11 +12,15 @@
|
||||
# @maintainer Emmanuel Roussel
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
set MIXER coax
|
||||
set VEHICLE_TYPE mc
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set PE_VELNE_NOISE 0.5
|
||||
param set PE_VELD_NOISE 0.35
|
||||
param set PE_POSNE_NOISE 0.5
|
||||
param set PE_POSD_NOISE 1.25
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
@@ -44,11 +47,19 @@ then
|
||||
param set MC_YAWRATE_FF 0
|
||||
fi
|
||||
|
||||
set MIXER coax
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 34
|
||||
set PWM_RATE 400
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_MAX p:PWM_MAX
|
||||
|
||||
# This is the gimbal pass mixer
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1500
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user