Compare commits

..

93 Commits

Author SHA1 Message Date
Lorenz Meier f5efe0afb0 Merge branch 'beta' into stable 2016-02-21 01:37:36 +01:00
Lorenz Meier 73751922de Harmonize Pixracer and Pixhawk OSD API 2016-02-19 21:42:45 +01:00
Lorenz Meier 08fbfd8ab4 More autostart items for serial link 2016-02-19 20:36:36 +01:00
tumbili 1c03d3bfe5 Merge remote-tracking branch 'origin/master' into beta 2016-02-19 14:41:46 +01:00
Lorenz Meier 37ae05df05 Merge branch 'master' into beta 2016-02-19 09:00:41 +01:00
Lorenz Meier 6d372e7d02 Merge branch 'master' into beta 2016-02-18 19:02:45 +01:00
Lorenz Meier cc79299375 Merge branch 'master' into stable 2016-01-27 14:08:53 +01:00
Lorenz Meier 1e7cfae683 Merge branch 'master' into beta 2016-01-27 14:08:33 +01:00
Lorenz Meier cb14e8589d Sensors: Fix FMUv4 voltage 2016-01-18 10:23:23 +01:00
Lorenz Meier 3fd4f11f65 Merge branch 'master' into stable 2016-01-16 12:08:23 +01:00
Lorenz Meier 44792eb2fe Merge branch 'master' into beta 2016-01-16 12:08:04 +01:00
Lorenz Meier f37865e5b4 Merge branch 'master' of github.com:PX4/Firmware into beta 2016-01-16 11:18:08 +01:00
Lorenz Meier 44e229656c Merge branch 'master' of github.com:PX4/Firmware into stable 2016-01-16 11:17:46 +01:00
Lorenz Meier f62a2ccfc3 Merge branch 'master' into beta 2016-01-10 16:19:40 +01:00
Lorenz Meier c4a3387a39 Merge branch 'master' into stable 2016-01-10 16:19:23 +01:00
Lorenz Meier d4fb8c2a89 Merge branch 'master' into stable 2016-01-09 11:55:27 +01:00
Lorenz Meier b15757d6d5 Merge branch 'master' into beta 2016-01-09 11:35:03 +01:00
Lorenz Meier f40243890e Merge branch 'master' of github.com:PX4/Firmware into beta 2015-12-24 09:11:36 +01:00
Lorenz Meier 92f7f0d2c2 Merged master 2015-12-24 09:11:13 +01:00
Lorenz Meier 585e1c93e8 Merge branch 'master' into beta 2015-12-18 16:28:36 +00:00
Lorenz Meier 10430d430c Merge branch 'master' into beta 2015-11-17 13:04:49 +01:00
Lorenz Meier 5e57553615 Merged master to beta 2015-11-06 10:58:59 +01:00
Lorenz Meier 424f4a9066 Set climbout altitude to 10 meters by default 2015-10-23 11:17:55 +02:00
Lorenz Meier 30df075244 Revert "MAVLink: Add named value float to output"
This reverts commit 864068b99d.
2015-10-23 11:17:10 +02:00
Lorenz Meier f6ddf53865 EKF: Fixed high CPU load 2015-10-10 22:19:19 +02:00
Lorenz Meier ada07e2206 Commander: Only indicate green led if home position is valid 2015-10-07 15:13:32 +02:00
Lorenz Meier 365b3680a1 Merge branch 'master' into beta 2015-10-06 10:25:25 +02:00
Lorenz Meier 864068b99d MAVLink: Add named value float to output 2015-10-03 10:08:08 +02:00
Lorenz Meier c6462b07ad Revert "fix handling of mavlink mode argument"
This reverts commit 485f0d0379.
2015-09-24 18:14:42 +02:00
tumbili 485f0d0379 fix handling of mavlink mode argument 2015-09-23 12:23:39 +02:00
tumbili 27725534a3 fix handling of mavlink mode argument 2015-09-23 12:23:23 +02:00
Lorenz Meier 8580ac0155 Merge branch 'beta' into stable 2015-08-30 22:43:19 +02:00
Lorenz Meier de6d3a13de Merge branch 'beta' into stable 2015-08-28 22:03:22 +02:00
Lorenz Meier e7a87710bc Merge branch 'beta' into stable 2015-08-26 12:36:02 +02:00
Lorenz Meier 5282dc04b5 Merge branch 'beta' into stable 2015-08-26 09:33:46 +02:00
Lorenz Meier b26d15c979 Merge branch 'beta' into stable 2015-08-24 10:13:35 +02:00
Lorenz Meier 401d35677f Merge branch 'beta' into stable 2015-08-23 14:07:12 +02:00
Lorenz Meier b8517eb428 Merge branch 'beta' into stable 2015-08-23 00:32:42 +02:00
Lorenz Meier 630740d54f Merge branch 'beta' into stable 2015-08-19 16:30:08 +02:00
Lorenz Meier 8531cde567 Merge branch 'beta' into stable 2015-08-14 14:29:28 +02:00
Lorenz Meier c0316f3db1 Merge branch 'beta' into stable 2015-08-11 13:43:43 +02:00
Lorenz Meier 71e743009a Merge branch 'beta' into stable 2015-08-11 10:51:43 +02:00
Lorenz Meier b2ff9e37c4 Merge branch 'beta' into stable 2015-08-08 23:50:35 +02:00
Lorenz Meier bd2551d5f7 Merge branch 'beta' into stable 2015-08-08 11:32:10 +02:00
Lorenz Meier 7df8610cbd Merge branch 'beta' into stable 2015-08-07 17:46:57 +02:00
Lorenz Meier 24c98ef14e Merge branch 'beta' into stable 2015-08-07 15:49:30 +02:00
Lorenz Meier 5e6aebc8fa Merge branch 'beta' into stable 2015-08-06 22:09:46 +02:00
Lorenz Meier 1dbbe90e06 Merge branch 'beta' into stable 2015-08-06 10:07:02 +02:00
Lorenz Meier f890dee5aa Merge branch 'beta' into stable 2015-08-04 23:27:05 +02:00
Lorenz Meier 1418b45942 Merge branch 'beta' into stable 2015-08-04 11:58:47 +02:00
Lorenz Meier e66aab8e3a Merge branch 'beta' into stable 2015-08-04 10:57:09 +02:00
Lorenz Meier 9c7970bd7d Merge branch 'beta' into stable 2015-08-02 01:25:33 +02:00
Lorenz Meier d18491b76e Merge branch 'beta' into stable 2015-08-01 17:34:20 +02:00
Lorenz Meier 40a7c5a55d Merge branch 'beta' into stable 2015-08-01 17:16:30 +02:00
Lorenz Meier 57ac8c19ff Merge branch 'beta' into stable 2015-08-01 12:48:20 +02:00
Lorenz Meier acc1aeb571 Merge branch 'beta' into stable 2015-08-01 09:34:17 +02:00
Lorenz Meier 814a6fadc6 Merge branch 'beta' into stable 2015-08-01 09:26:23 +02:00
Lorenz Meier 041b0d379a Merge branch 'beta' into stable 2015-07-29 21:23:29 +02:00
Lorenz Meier 7c058b21ac Add airframe icons 2015-07-29 00:03:41 +02:00
Lorenz Meier e7d45575ad Airframe Configs: Add version field 2015-07-28 23:59:19 +02:00
Lorenz Meier 0255f881c6 Merge branch 'beta' into stable 2015-07-28 23:45:55 +02:00
Lorenz Meier bed182f6ab Merge branch 'beta' into stable 2015-07-22 17:17:13 +02:00
Lorenz Meier 78be95ebc1 Merge branch 'beta' into stable 2015-07-22 12:57:22 +02:00
Lorenz Meier 341d00e806 Merge branch 'beta' into stable 2015-07-22 12:51:00 +02:00
Lorenz Meier fe3ae3c79b Merge branch 'beta' into stable 2015-07-22 10:04:21 +02:00
Lorenz Meier 8fc749f19b Merge branch 'beta' into stable 2015-07-22 09:03:07 +02:00
Lorenz Meier 1e6d911ab9 Merge branch 'beta' into stable 2015-07-14 19:20:19 +02:00
Lorenz Meier 364d323ddf Merge branch 'release_v1.0.0' into stable 2015-07-04 17:27:12 +02:00
Lorenz Meier 47358a446f uMerge branch 'release_v1.0.0' into stable 2015-07-03 00:25:40 +02:00
Lorenz Meier a494b45078 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-07-02 01:00:41 +02:00
Lorenz Meier 7dfcfd5f2b Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-30 07:10:45 +02:00
Lorenz Meier e11fbbf312 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-30 07:01:38 +02:00
Lorenz Meier 65f8b81fda Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-25 22:45:08 +02:00
Lorenz Meier 13c993dda4 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-25 21:20:38 +02:00
Lorenz Meier 61f98262cf Merge branch 'release_v1.0.0' into stable 2015-06-24 21:46:44 +02:00
Lorenz Meier 5ace8d993d Merge branch 'release_v1.0.0' into stable 2015-06-13 00:20:10 +02:00
Lorenz Meier a8e5084897 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-11 09:03:26 +02:00
Lorenz Meier 7eebb22a9c Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-05-28 17:41:54 -07:00
Lorenz Meier 3bdbb6eacf Merge branch 'release_v1.0.0' into stable 2015-05-24 20:11:13 +02:00
Lorenz Meier 20a829e691 Merge branch 'master' into stable 2015-05-18 23:18:52 +02:00
Lorenz Meier 045a598a97 Merge branch 'master' of github.com:PX4/Firmware into stable 2015-05-18 11:03:34 +02:00
Lorenz Meier d188f8012f Merge branch 'master' into stable 2015-05-13 15:46:54 +02:00
Lorenz Meier 4635827f01 Merge branch 'master' into stable 2015-05-13 15:34:56 +02:00
Lorenz Meier 162b7b87e9 Merge branch 'master' into stable 2015-05-13 15:19:34 +02:00
Lorenz Meier acf01c5e88 Merge branch 'master' into stable 2015-05-12 11:27:17 +02:00
Lorenz Meier f892492a17 Merge branch 'master' into stable 2015-05-06 19:39:41 +02:00
Lorenz Meier 2a68adfd35 Merge branch 'master' into stable 2015-05-04 13:04:10 +02:00
Lorenz Meier f56efaf149 Merge branch 'master' into stable 2015-04-27 22:33:32 +02:00
Lorenz Meier 8595c734e6 Merge branch 'master' into stable 2015-04-25 12:54:46 +02:00
Lorenz Meier 0b50c6c003 Merge branch 'master' into stable 2015-04-22 20:45:19 +02:00
Lorenz Meier 9e143e3d4c Merge branch 'master' into stable 2015-03-10 17:42:32 +01:00
Lorenz Meier 965e0e5226 Merge branch 'master' of github.com:PX4/Firmware into stable 2015-03-09 23:47:53 +01:00
Lorenz Meier e55f1bc66d Fix IO update when safety can not be set to on. From @zottgrammes
Conflicts:
	ROMFS/px4fmu_common/init.d/rcS
2015-03-09 20:19:35 +01:00
1446 changed files with 49441 additions and 128542 deletions
-1
View File
@@ -1 +0,0 @@
--ignore-dir=Documentation
-18
View File
@@ -2,10 +2,8 @@
!ROMFS/*/*.d
!ROMFS/*/*/*.d
!ROMFS/*/*/*/*.d
*.px4log
*.dSYM
*.o
*.gch
*.pyc
*~
.*.swp
@@ -65,19 +63,3 @@ CMakeLists.txt.user
GPATH
GRTAGS
GTAGS
*.creator
*.creator.user
*.files
*.includes
# uavcan firmware
ROMFS/px4fmu_common/uavcan/
vectorcontrol/
# CLion ignores
.idea
# gcov code coverage
coverage-html/
coverage.info
+6 -10
View File
@@ -1,21 +1,21 @@
[submodule "mavlink/include/mavlink/v1.0"]
path = mavlink/include/mavlink/v1.0
url = https://github.com/mavlink/c_library_v1.git
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
url = git://github.com/mavlink/c_library.git
[submodule "NuttX"]
path = NuttX
url = https://github.com/PX4/NuttX.git
url = git://github.com/PX4/NuttX.git
[submodule "src/modules/uavcan/libuavcan"]
path = src/modules/uavcan/libuavcan
url = https://github.com/UAVCAN/libuavcan.git
url = git://github.com/UAVCAN/libuavcan.git
[submodule "Tools/genmsg"]
path = Tools/genmsg
url = https://github.com/ros/genmsg.git
[submodule "Tools/gencpp"]
path = Tools/gencpp
url = https://github.com/ros/gencpp.git
[submodule "src/lib/dspal"]
path = src/lib/dspal
url = https://github.com/ATLFlight/dspal.git
[submodule "Tools/jMAVSim"]
path = Tools/jMAVSim
url = https://github.com/PX4/jMAVSim.git
@@ -25,7 +25,6 @@
[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
@@ -38,6 +37,3 @@
[submodule "cmake/cmake_hexagon"]
path = cmake/cmake_hexagon
url = https://github.com/ATLFlight/cmake_hexagon
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/GpsDrivers.git
+100 -90
View File
@@ -3,124 +3,140 @@
language: cpp
git:
depth: 1000
matrix:
fast_finish: true
include:
- os: linux
sudo: required
env: GCC_VER=4.9 DOCKER_REPO="px4io/px4-dev-base:2016-10-20"
services:
- docker
sudo: false
- os: osx
osx_image: xcode7
sudo: true
osx_image: xcode8
env: CCACHE_CPP2=1
cache:
ccache: true
pip: true
directories:
- $HOME/.pip/cache/
- $HOME/Library/Caches/pip
- $HOME/.ccache
addons:
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
- python-serial
- s3cmd
- texinfo
- zlib1g-dev
before_install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cd ${TRAVIS_BUILD_DIR}
&& git fetch --unshallow && git fetch --all --tags
&& docker pull ${DOCKER_REPO}
pushd .
&& cd ~
&& wget https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
&& tar -jxf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
&& exportline="export PATH=$HOME/gcc-arm-none-eabi-4_8-2014q3/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
sudo -H easy_install pip
&& sudo -H pip install empy
&& wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache
&& sudo mv ccache /usr/local/bin
&& chmod +x /usr/local/bin/ccache
&& mkdir -p ~/bin
&& sudo ln -s /usr/local/bin/ccache ~/bin/c++
&& sudo ln -s /usr/local/bin/ccache ~/bin/cc
&& sudo ln -s /usr/local/bin/ccache ~/bin/clang
&& sudo ln -s /usr/local/bin/ccache ~/bin/clang++
&& sudo ln -s /usr/local/bin/ccache ~/bin/g++
&& sudo ln -s /usr/local/bin/ccache ~/bin/gcc
&& export PATH=~/bin:$PATH
&& wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ninja
&& sudo mv ninja /usr/local/bin
&& chmod +x /usr/local/bin/ninja
brew tap PX4/homebrew-px4
&& brew update; brew update
&& brew install cmake ninja
&& brew install genromfs
&& sudo easy_install pip
&& sudo pip install pyserial 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
- GIT_SUBMODULES_ARE_EVIL=1
script:
- ccache -M 1GB; ccache -z
- git submodule update --quiet --init --recursive
- echo 'Building POSIX Firmware..' && make posix_sitl_default
- echo 'Running Tests..' && make posix_sitl_default test
- echo 'Running Unittests..' && cd unittests && ./run_tests.sh
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -e CI=true -e GIT_SUBMODULES_ARE_EVIL=1 -w=`pwd` --user=$UID -it ${DOCKER_REPO} /bin/bash -c "make check_qgc_firmware VECTORCONTROL=0";
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
make tests;
cd ${TRAVIS_BUILD_DIR}
&& make check_format
&& arm-none-eabi-gcc --version
&& echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
&& echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
&& echo 'Building UAVCAN node firmware..' && (git clone https://github.com/thiemar/vectorcontrol && cd vectorcontrol && BOARD=s2740vc_1_0 make -s && BOARD=px4esc_1_6 make -s && ../Tools/uavcan_copy.sh)
&& echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
&& echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
&& echo 'Running Tests..' && make px4fmu-v2_default test
;
fi
- ccache -s
after_success:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
make package_firmware && mkdir s3deploy-archive && cp Firmware.zip s3deploy-archive/
&& find . -type f -name 'nuttx-*-default.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
&& mkdir s3deploy-branch && mv *_default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml s3deploy-branch/;
fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "$GCC_VER" == "4.9" ]]; then
export PX4_S3_DEPLOY=1;
cp build_px4fmu-v1_default/src/firmware/nuttx/nuttx-px4fmu-v1-default.px4 px4fmu-v1_default.px4
&& cp build_px4fmu-v2_default/src/firmware/nuttx/nuttx-px4fmu-v2-default.px4 px4fmu-v2_default.px4
&& cp build_px4fmu-v4_default/src/firmware/nuttx/nuttx-px4fmu-v4-default.px4 px4fmu-v4_default.px4
&& cp build_px4-stm32f4discovery_default/src/firmware/nuttx/nuttx-px4-stm32f4discovery-default.px4 px4-stm32f4discovery-default.px4
&& zip Firmware.zip px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 px4-stm32f4discovery-default.px4
&& ./CI-Tools/s3cmd-put px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 px4-stm32f4discovery-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:"
&& echo https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
;
fi
deploy:
# deploy *.px4 to S3 px4-travis/Firmware/$TRAVIS_BRANCH
- provider: s3
access_key_id: $PX4_AWS_KEY
secret_access_key:
secure: $PX4_AWS_SECRET
bucket: px4-travis
local_dir: s3deploy-branch
upload-dir: Firmware/$TRAVIS_BRANCH
acl: public_read
skip_cleanup: true
on:
all_branches: true
condition: $PX4_S3_DEPLOY = 1
# deploy Firmware.zip to S3 px4-travis/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID
- provider: s3
access_key_id: $PX4_AWS_KEY
secret_access_key:
secure: $PX4_AWS_SECRET
bucket: px4-travis
local_dir: s3deploy-archive
upload-dir: archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID
acl: public_read
skip_cleanup: true
on:
all_branches: true
condition: $PX4_S3_DEPLOY = 1
# on tags deploy Firmware.zip to Github releases
- 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.9
provider: releases
api_key:
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
file: "Firmware.zip"
skip_cleanup: true
on:
tags: true
all_branches: true
repo: PX4/Firmware
notifications:
webhooks:
@@ -128,9 +144,3 @@ notifications:
- 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:
rooms:
- secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
on_pull_requests: false
on_success: never # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always
+37 -145
View File
@@ -85,7 +85,7 @@
# * If a target from add_custom_* is set in a function, explicitly pass it
# as an output argument so that the target name is clear to the user.
#
# * Avoid use of global variables in functions. Functions in a nested
# * Avoid use of global variables in functions. Functions in a nested
# scope may use global variables, but this makes it difficult to
# resuse functions.
#
@@ -121,14 +121,6 @@
# 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}")
execute_process(
COMMAND Tools/check_submodules.sh
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
# Use clang
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
@@ -140,13 +132,12 @@ execute_process(
set(CMAKE_BUILD_TYPE "" CACHE STRING "build type")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS ";Debug;Release;RelWithDebInfo;MinSizeRel")
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
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")
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
#=============================================================================
# configuration
@@ -159,24 +150,24 @@ list(GET config_args 1 BOARD)
list(GET config_args 2 LABEL)
set(target_name "${OS}-${BOARD}-${LABEL}")
if("${OS}" STREQUAL "posix")
if (APPLE)
set(DF_TARGET darwin)
else()
set(DF_TARGET linux)
endif()
else()
set(DF_TARGET ${OS})
endif()
message(STATUS "${target_name}")
# Define GNU standard installation directories
include(GNUInstallDirs)
# 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
# Add support for external project building
include(ExternalProject)
# Setup install paths
if(NOT CMAKE_INSTALL_PREFIX)
if (${OS} STREQUAL "posix")
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
endif()
endif()
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
message(STATUS "cmake module path: ${CMAKE_MODULE_PATH}")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(config_module "configs/${CONFIG}")
include(${config_module})
@@ -202,14 +193,6 @@ foreach(conf ${px4_required_config})
endif()
endforeach()
# List the DriverFramework drivers
if(DEFINED config_df_driver_list)
message("DF Drivers: ${config_df_driver_list}")
endif()
# force static lib build
set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# project definition
#
@@ -224,28 +207,14 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
endif()
set(version_major 1)
set(version_minor 5)
set(version_patch 0)
set(version_minor 0)
set(version_patch 1)
set(version "${version_major}.${version_minor}.${version_patch}")
set(package-contact "px4users@googlegroups.com")
#=============================================================================
# find programs and packages
# programs
#
# 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()
else()
message(STATUS "catkin DISABLED")
endif()
find_package(PythonInterp REQUIRED)
#=============================================================================
@@ -253,11 +222,6 @@ find_package(PythonInterp REQUIRED)
#
enable_testing()
#=============================================================================
# generate compile command database
#
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#=============================================================================
# check required toolchain variables
#
@@ -276,18 +240,18 @@ endforeach()
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 "unittests/gtest")
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_dspal PATH "src/lib/dspal")
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")
add_custom_target(submodule_clean
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git submodule deinit -f .
COMMAND rm -rf .git/modules/*
)
@@ -297,12 +261,12 @@ add_custom_target(submodule_clean
#
add_custom_target(check_format
COMMAND Tools/check_code_style.sh
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(config
COMMAND cmake-gui .
WORKING_DIRECTORY ${PX4_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
#=============================================================================
@@ -319,29 +283,27 @@ 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 "${exe_linker_flags}" GLUE " ")
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags};${optimization_flags}" GLUE " ")
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags};${optimization_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})
#=============================================================================
# source code generation
#
add_subdirectory(msg)
file(GLOB_RECURSE msg_files msg/*.msg)
px4_generate_messages(TARGET msg_gen
MSG_FILES ${msg_files}
OS ${OS}
DEPENDS git_genmsg git_gencpp prebuild_targets
DEPENDS git_genmsg git_gencpp
)
px4_generate_parameters_xml(OUT parameters.xml BOARD ${BOARD})
px4_generate_airframes_xml(OUT airframes.xml BOARD ${BOARD})
@@ -352,7 +314,7 @@ add_custom_target(xml_gen
# 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
@@ -362,57 +324,20 @@ include_directories(${ep_base}/Install/include)
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/lib)
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include)
#=============================================================================
# DriverFramework Drivers
#
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()
#=============================================================================
# external modules
#
if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
message(STATUS "External modules: ${EXTERNAL_MODULES_LOCATION}")
add_subdirectory("${EXTERNAL_MODULES_LOCATION}/src" external_modules_src)
set(config_module_list_external_expanded)
foreach(external_module ${config_module_list_external})
list(APPEND config_module_list_external_expanded
${EXTERNAL_MODULES_LOCATION}/src/${external_module})
endforeach()
set(config_module_list
${config_module_list}
${config_module_list_external_expanded}
)
endif()
#=============================================================================
# subdirectories
#
set(module_libraries)
foreach(module ${config_module_list})
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} ${PX4_BINARY_DIR}/${EXT_MODULE_PREFIX})
else()
add_subdirectory(src/${module})
endif()
add_subdirectory(src/${module})
px4_mangle_name(${module} mangled_name)
list(APPEND module_libraries ${mangled_name})
#message(STATUS "adding module: ${module}")
endforeach()
# Keep track of external shared libs required for modules
set(module_external_libraries "${module_external_libraries}" CACHE INTERNAL "module_external_libraries")
add_subdirectory(src/firmware/${OS})
add_subdirectory(src/lib/DriverFramework/framework/src)
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
if (NOT "${OS}" STREQUAL "nuttx")
endif()
@@ -421,55 +346,22 @@ if (config_io_board)
add_subdirectory(src/modules/px4iofirmware)
endif()
#=============================================================================
# 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()
#=============================================================================
# generate git version
#
px4_create_git_hash_header(HEADER ${PX4_BINARY_DIR}/build_git_version.h)
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
#=============================================================================
# packaging
#
# Important to having packaging at end of cmake file.
#
execute_process(
COMMAND git describe --always --tags
OUTPUT_VARIABLE git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
set(CPACK_PACKAGE_VERSION ${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(short-description "The px4 autopilot.")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${short-description})
set(CPACK_PACKAGE_CONTACT ${package_contact})
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${version}")
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
set(CPACK_SET_DESTDIR "OFF")
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
list (APPEND CPACK_GENERATOR "DEB")
endif()
endif()
set(CPACK_SOURCE_GENERATOR "ZIP")
include(CPack)
endif() # ros alternative endif
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
+2 -1
View File
@@ -599,7 +599,8 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = ../src/modules/attitude_estimator_ekf/codegen
EXCLUDE = ../src/lib/mathlib/CMSIS \
../src/modules/attitude_estimator_ekf/codegen
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
@@ -9,7 +9,7 @@ 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:
Then to generate the html, run the following code while you are in the qgroundcontrol/doc directory:
$doxygen Doxyfile
The html file index.html should be in doc/html unless you changed the output directory.
+2 -2
View File
@@ -66,8 +66,8 @@ Linux or Eagle with a working IP interface (?? does this need further instructio
> adb shell
# bash
root@linaro-developer:/# cd ???
root@linaro-developer:/# ./px4
App name: px4
root@linaro-developer:/# ./mainapp
App name: mainapp
Enter a command and its args:
uorb start
muorb start
-7
View File
@@ -70,13 +70,6 @@
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["make posix"],
"shell": true
},
{
"name": "MindPX_V2: make and upload",
"working_dir": "${project_path}",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["make upload mindpx-v2_default -j8"],
"shell": true
}
]
}
-12
View File
@@ -1,12 +0,0 @@
{
"board_id": 65,
"magic": "PX4FWv1",
"description": "Firmware for the Intel Aero FC board",
"image": "",
"build_time": 0,
"summary": "AEROFCv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
-12
View File
@@ -1,12 +0,0 @@
{
"board_id": 33,
"magic": "PX4FWv1",
"description": "Firmware for the AUAV X2.1 board",
"image": "",
"build_time": 0,
"summary": "AUAV X2.1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
-12
View File
@@ -1,12 +0,0 @@
{
"board_id": 12,
"magic": "Crazyflie",
"description": "Firmware for the Crazyflie 2.0",
"image": "",
"build_time": 0,
"summary": "CRAZYFLIE",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
-12
View File
@@ -1,12 +0,0 @@
{
"board_id": 88,
"magic": "MindPX",
"description": "Firmware for the MindPXFMUv2 board",
"image": "",
"build_time": 0,
"summary": "MindPXFMUv2",
"version": "2.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
-12
View File
@@ -1,12 +0,0 @@
{
"board_id": 9,
"magic": "PX4FWv1",
"description": "Firmware for the PX4FMUv3 board",
"image": "",
"build_time": 0,
"summary": "PX4FMUv3",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
-12
View File
@@ -1,12 +0,0 @@
{
"board_id": 64,
"magic": "PX4FWv1",
"description": "Firmware for the TAPv1 board",
"image": "",
"build_time": 0,
"summary": "TAPv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
+86 -187
View File
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2015 - 2016 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
@@ -42,7 +42,7 @@ 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 16.04, install or upgrade via:)
$(warning On Ubuntu, install or upgrade via:)
$(warning )
$(warning 3rd party PPA:)
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
@@ -50,11 +50,11 @@ ifneq ($(CMAKE_VER),0)
$(warning sudo apt-get install cmake)
$(warning )
$(warning Official website:)
$(warning wget https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.sh)
$(warning chmod +x cmake-3.4.3-Linux-x86_64.sh)
$(warning sudo mkdir /opt/cmake-3.4.3)
$(warning sudo ./cmake-3.4.3-Linux-x86_64.sh --prefix=/opt/cmake-3.4.3 --exclude-subdir)
$(warning export PATH=/opt/cmake-3.4.3/bin:$$PATH)
$(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
@@ -77,20 +77,17 @@ endif
# 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
ifndef NO_NINJA_BUILD
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
endif
ifdef NINJA_BUILD
PX4_CMAKE_GENERATOR ?= "Ninja"
PX4_MAKE = ninja
@@ -103,222 +100,124 @@ ifdef SYSTEMROOT
else
PX4_CMAKE_GENERATOR ?= "Unix Makefiles"
endif
PX4_MAKE = $(MAKE)
PX4_MAKE = make
PX4_MAKE_ARGS = -j$(j) --no-print-directory
endif
# check if replay env variable is set & set build dir accordingly
ifdef replay
BUILD_DIR_SUFFIX := _replay
else
BUILD_DIR_SUFFIX :=
endif
# additional config parameters passed to cmake
CMAKE_ARGS :=
ifdef EXTERNAL_MODULES_LOCATION
CMAKE_ARGS := -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
endif
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(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 .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) $(CMAKE_ARGS) || (cd .. && rm -rf $(BUILD_DIR)); fi
+@echo "PX4 CONFIG: $(BUILD_DIR)"
+@$(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 git submodule sync && git submodule update --init --recursive && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
+Tools/check_submodules.sh
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
endef
define cmake-build-other
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(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 $(2) -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(BUILD_DIR)); fi
+@$(PX4_MAKE) -C "$(BUILD_DIR)" $(PX4_MAKE_ARGS) $(ARGS)
# create empty targets to avoid msgs for targets passed to cmake
define cmake-targ
$(1):
@#
.PHONY: $(1)
endef
define colorecho
@tput setaf 6
@echo $1
@tput sgr0
endef
# Get a list of all config targets.
ALL_CONFIG_TARGETS := $(basename $(shell find "$(SRC_DIR)/cmake/configs" ! -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)
px4fmu-v2_lpe:
$(call cmake-build,nuttx_px4fmu-v2_lpe)
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_$@)
all_nuttx_targets: $(NUTTX_CONFIG_TARGETS)
posix: posix_sitl_default
broadcast: posix_sitl_broadcast
# Multi- config targets.
eagle_default: posix_eagle_default qurt_eagle_default
eagle_legacy_default: posix_eagle_legacy_driver_default qurt_eagle_legacy_driver_default
excelsior_default: posix_excelsior_default qurt_excelsior_default
# Deprecated config targets.
posix_sitl_ekf2:
$(call cmake-build,$@)
ros_sitl_default:
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
_sitl_deprecation:
qurt_eagle_travis:
$(call cmake-build,$@)
qurt_eagle_release:
$(call cmake-build,$@)
posix_eagle_release:
$(call cmake-build,$@)
qurt_eagle_default:
$(call cmake-build,$@)
posix_eagle_default:
$(call cmake-build,$@)
posix_rpi2_default:
$(call cmake-build,$@)
posix_rpi2_release:
$(call cmake-build,$@)
posix: posix_sitl_default
sitl_deprecation:
@echo "Deprecated. Use 'make posix_sitl_default jmavsim' or"
@echo "'make posix_sitl_default gazebo' if Gazebo is preferred."
run_sitl_quad: _sitl_deprecation
run_sitl_plane: _sitl_deprecation
run_sitl_ros: _sitl_deprecation
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all posix broadcast eagle_default eagle_legacy_default excelsior_default run_sitl_quad run_sitl_plane run_sitl_ros all_nuttx_targets
run_sitl_quad: sitl_deprecation
run_sitl_plane: sitl_deprecation
run_sitl_ros: sitl_deprecation
# Other targets
# --------------------------------------------------------------------
.PHONY: uavcan_firmware check check_format format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
.NOTPARALLEL:
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: checks_defaults checks_bootloaders checks_tests checks_alts checks_uavcan checks_sitls checks_last quick_check tests 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
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
# All default targets that don't require a special build environment (currently built on semaphore-ci)
check: check_px4fmu-v1_default \
check_px4fmu-v2_default \
check_px4fmu-v2_test \
check_px4fmu-v4_default_and_uavcan \
check_mindpx-v2_default \
check_posix_sitl_default \
check_tap-v1_default \
check_aerofc-v1_default \
check_px4-stm32f4discovery_default \
check_crazyflie_default \
check_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-v4_default check_tests check_format
check_format:
$(call colorecho,"Checking formatting with astyle")
@./Tools/check_code_style_all.sh
@git diff --check
format:
$(call colorecho,"Formatting with astyle")
@./Tools/check_code_style_all.sh --fix
check_%:
@echo
$(call colorecho,"Building" $(subst check_,,$@))
@$(MAKE) --no-print-directory $(subst check_,,$@)
@echo
unittest: posix_sitl_default
$(call cmake-build-other,unittest, ../unittests)
@(cd build_unittest && ctest -j2 --output-on-failure)
run_tests_posix: posix_sitl_default
@(cd build_posix_sitl_default/ && ctest -V)
tests: check_unittest run_tests_posix
tests_coverage:
@(PX4_CODE_COVERAGE=1 CCACHE_DISABLE=1 ${MAKE} tests)
@(lcov --directory . --capture --quiet --output-file coverage.info)
@(lcov --remove coverage.info '/usr/*' --quiet --output-file coverage.info)
#@(lcov --list coverage.info)
@(genhtml coverage.info --quiet --output-directory coverage-html)
# QGroundControl flashable firmware (currently built by travis-ci)
qgc_firmware: \
check_px4fmu-v1_default \
check_px4fmu-v2_default \
check_px4fmu-v3_default \
check_px4fmu-v4_default_and_uavcan \
check_mindpx-v2_default \
check_tap-v1_default \
check_format
package_firmware:
@zip --junk-paths Firmware.zip `find . -name \*.px4`
@./Tools/check_code_style.sh
clean:
@rm -rf build_*/
-@$(MAKE) -C NuttX/nuttx clean
@(cd NuttX && git clean -d -f -x)
@(cd src/modules/uavcan/libuavcan && git clean -d -f -x)
@(git submodule sync)
submodulesclean:
@git submodule sync --recursive
@git submodule deinit -f .
@git submodule update --init --recursive --force
distclean: submodulesclean clean
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea"
# 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."),@#)
# 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 \
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
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
.PHONY: clean
CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
# Future:
#$(CONFIGS):
## @cd Build/$@ && cmake ../.. -DCONFIG=$@
# @cd Build/$@ && make
#
#clean-all:
# @rm -rf Build/*
#
#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
+1 -1
Submodule NuttX updated: af5d2b058c...3009fb230e
+14 -44
View File
@@ -1,65 +1,35 @@
## PX4 Pro Drone Autopilot ##
## PX4 Flight Core and PX4 Middleware ##
[![Releases](https://img.shields.io/github/release/PX4/Firmware.svg)](https://github.com/PX4/Firmware/releases) [![DOI](https://zenodo.org/badge/22634/PX4/Firmware.svg)](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware) [![Build Status](https://travis-ci.org/PX4/Firmware.svg?branch=master)](https://travis-ci.org/PX4/Firmware) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Build Status](https://travis-ci.org/PX4/Firmware.svg?branch=master)](https://travis-ci.org/PX4/Firmware) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
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 contains the [PX4 Flight Core](http://px4.io), with the main applications located in the src/modules directory. It also contains the PX4 Drone Platform, which contains drivers and middleware to run drones.
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes (more experimental types than listed here are supported):
* 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)
* [Fixed wing](http://px4.io/portfolio_category/vtol/)
* [VTOL](http://px4.io/portfolio_category/plane/)
* Releases
* [Downloads](https://github.com/PX4/Firmware/releases)
### Users ###
Please refer to the [user documentation](http://px4.io/user-guide/) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
### Developers ###
* [Developer Forum](http://discuss.px4.io)
* [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)
## Maintenance Team
* Project / Founder - [Lorenz Meier](http://github.com/LorenzMeier)
* Dev Call - [Mark Whitehorn](http://github.com/kd0aij), [Ramon Roche](http://github.com/mrpollo)
* Communication Architecture - [Beat Kueng](http://github.com/bkueng), [Julian Oes](http://github.com/JulianOes)
* UI / UX - [Gus Grubba](http://github.com/dogmaphobic)
* Multicopter Flight Control - [Dennis Mannhart](http://github.com/Stifael), [Matthias Grob](http://github.com/MaEtUgR)
* VTOL Flight Control - [Roman Bapst](http://github.com/tumbili), [Andreas Antener](http://github.com/AndreasAntener), [Sander Smeets](http://github.com/sanderux)
* Fixed Wing Flight Control - [Daniel Agar](http://github.com/dagar), [Paul Riseborough](http://github.com/priseborough)
* Racers - [Mark Whitehorn](http://github.com/kd0aij)
* OS / drivers - [David Sidrane](http://github.com/david_s5)
* UAVCAN / Industrial - [Pavel Kirienko](http://github.com/pavel-kirienko)
* State Estimation - [James Goppert](http://github.com/jgoppert), [Paul Riseborough](http://github.com/priseborough)
* VIO - Christoph Tobler
* Obstacle Avoidance - [Vilhjalmur Vilhjalmsson](http://github.com/vilhjalmur89)
* Snapdragon - [Mark Charlebois](http://github.com/mcharleb)
* Intel Aero - [Lucas de Marchi](http://github.com/lucasdemarchi), [Simone Guscetti](http://github.com/simonegu)
* Raspberry Pi / Navio - [Beat Kueng](http://github.com/bkueng)
* Parrot Bebop - [Michael Schaeuble](http://github.com/eyeam3)
## Supported Hardware
This repository contains code supporting these boards:
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
* Intel Aero
* Raspberry PI with Navio 2
* [Parrot Bebop](http://dev.px4.io/starting-building.html#parrot-bebop)
* FMUv1.x
* FMUv2.x ([Pixhawk](http://dev.px4.io/hardware-pixhawk.html) and [Pixfalcon](http://dev.px4.io/hardware-pixfalcon.html))
* FMUv3.x ([Pixhawk 2](http://dev.px4.io/hardware-pixhawk.html))
* FMUv4.x (Pixhawk 3 Pro and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
* FMUv5.x (ARM Cortex M7, future Pixhawk)
* 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)
* MindPX V2.8 [Tutorial] (http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
* MindRacer V1.2 [Tutorial] (http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
## Project Milestones
The PX4 software and Pixhawk hardware (which has been designed for it) has been created in 2011 by Lorenz Meier.
@@ -20,8 +20,7 @@ then
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 14
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
+2 -2
View File
@@ -25,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
@@ -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
+8 -1
View File
@@ -7,7 +7,7 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/4001_quad_x
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
@@ -21,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
-26
View File
@@ -1,26 +0,0 @@
#!nsh
#
# @name H4 680mm with Z1 Tiny2 Gimbal
#
# @type Quadrotor x
#
# @maintainer Leon Mueller <thedevleon>
#
sh /etc/init.d/4002_quad_x_mount
# The Z1 Tiny2 can handle up to 400Hz
# and works with min 1020us, middle 1520us, max 2020us
# see http://www.zhiyun-tech.com/uploadfile/datedown/instruction/Tiny2_English_instructionV1.03.pdf
# under Gimbal Connection Instruction
set PWM_AUX_RATE 400
set PWM_AUX_DISARMED 1520
set PWM_AUX_MIN 1020
set PWM_AUX_MAX 2020
# Start FrSky telemetry on SERIAL4 (ttyS6, designated "SERIAL4/5" on the case)
frsky_telemetry start -d /dev/ttyS6
# GPIO LED
gpio_led start -p 6
@@ -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,40 @@
#!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_ATT_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
@@ -33,12 +33,13 @@ then
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set VT_MOT_COUNT 2
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set MAV_TYPE 19
fi
set MIXER caipirinha_vtol
set PWM_OUT 1234
set PWM_OUT 12
set PWM_MAX 2000
set PWM_RATE 400
param set VT_MOT_COUNT 2
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
+5 -5
View File
@@ -31,11 +31,6 @@ then
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 6
param set VT_FW_MOT_OFFID 34
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
fi
set MIXER firefly6
@@ -45,3 +40,8 @@ set PWM_RATE 400
set MIXER_AUX firefly6
set MAV_TYPE 21
param set VT_MOT_COUNT 6
param set VT_FW_MOT_OFFID 34
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
@@ -9,17 +9,13 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
fi
set MIXER quad_x_vtol
set PWM_OUT 1234
set PWM_MAX 2000
set PWM_RATE 400
set MAV_TYPE 20
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
@@ -9,17 +9,13 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
fi
set MIXER quad_+_vtol
set PWM_OUT 1234
set PWM_MAX 2000
set PWM_RATE 400
set MAV_TYPE 20
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
@@ -1,17 +1,10 @@
#!nsh
#
# @name Fun Cub Quad VTOL
# @name Fun Cub Quad VTOL.
#
# @type Standard VTOL
#
# @maintainer Simon Wilks <simon@uaventure.com>
# @output MAIN1 Front right motor: CCW
# @output MAIN2 Back left motor: CCW
# @output MAIN3 Front left motor: CW
# @output MAIN4 Back right motor: CW
# @output AUX1 Aileron 1
# @output AUX2 Aileron 2
# @output AUX3 Elevator
# @output AUX4 Rudder
# @output AUX5 Throttle
#
sh /etc/init.d/rc.vtol_defaults
@@ -40,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
@@ -52,10 +43,6 @@ then
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.05
param set FW_THR_CRUISE 0.75
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
fi
set MIXER vtol_quad_x
@@ -67,3 +54,7 @@ set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
@@ -1,15 +1,10 @@
#!nsh
#
# @name Generic quad delta VTOL
# @name Generic quad delta VTOL.
#
# @type Standard VTOL
#
# @maintainer Simon Wilks <simon@uaventure.com>
# @output MAIN1 Front right motor: CCW
# @output MAIN2 Back left motor: CCW
# @output MAIN3 Front left motor: CW
# @output MAIN4 Back right motor: CW
# @output AUX1 Right elevon
# @output AUX2 Left elevon
# @output AUX3 Motor
#
sh /etc/init.d/rc.vtol_defaults
@@ -20,32 +15,22 @@ then
param set VT_MOT_COUNT 4
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 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_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 vtol_quad_x
@@ -57,3 +42,7 @@ set PWM_ACHDIS 3
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
@@ -31,12 +31,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 VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
fi
set MIXER vtol_quad_x
@@ -48,3 +42,7 @@ set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
+5 -18
View File
@@ -34,29 +34,12 @@ 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 1.5
param set MPC_TKO_SPEED 1.5
param set MPC_LAND_SPEED 0.8
param set FW_THR_CRUISE 65.0
param set FW_PR_P 0.08
param set FW_PR_FF 0.5
param set FW_RR_P 0.05
param set FW_RR_FF 0.6
param set MIS_YAW_TMT 10
param set VT_ARSP_TRANS 15.0
param set VT_ARSP_BLEND 8.0
param set VT_ARSP_BLEND 10.0
param set VT_B_TRANS_DUR 4.0
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
fi
set MIXER vtol_quad_x
@@ -68,3 +51,7 @@ set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
@@ -1,89 +0,0 @@
#!nsh
#
# @name Sparkle Tech Ranger VTOL
#
# @type Standard VTOL
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
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_IDLE_PWM_MC 1180
param set MAV_TYPE 22
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_TRANS_THR 0.6
param set VT_TRANS_TIMEOUT 30.0
param set FW_AIRSPD_MAX 22.0
param set FW_AIRSPD_MIN 14.0
param set FW_AIRSPD_TRIM 16.0
param set FW_L1_PERIOD 25.0
param set FW_PR_P 0.060
param set FW_P_RMAX_NEG 40.0
param set FW_P_RMAX_POS 40.0
param set FW_RR_FF 0.4
param set FW_RR_P 0.04
param set FW_R_RMAX 40.0
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_MAX 60.0
param set MC_PITCHRATE_P 0.21
param set MC_PITCH_P 4.0
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_MAX 60.0
param set MC_ROLLRATE_P 0.24
param set MC_ROLL_P 4.0
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
param set MIS_YAW_TMT 20.0
param set MPC_ACC_HOR_MAX 1.0
param set MPC_HOLD_MAX_XY 0.5
param set MPC_HOLD_MAX_Z 0.5
param set MPC_LAND_SPEED 1.0
param set MPC_MANTHR_MIN 0.05
param set MPC_MAN_Y_MAX 120.0
param set MPC_THR_MIN 0.07
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
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set PWM_AUX_REV3 1
param set PWM_AUX_REV4 1
fi
set MIXER vtol_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
-37
View File
@@ -1,37 +0,0 @@
#!nsh
#
# @name CruiseAder Claire
#
# @type VTOL Tiltrotor
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
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
+9 -3
View File
@@ -1,6 +1,6 @@
#!nsh
#
# @name Esky (Big) Lama v4
# @name Coaxial Helicopter (such as Esky Lama v4 or Esky Big Lama)
#
# @type Coaxial Helicopter
#
@@ -12,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
@@ -43,6 +47,7 @@ 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
@@ -57,3 +62,4 @@ set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
@@ -1,50 +0,0 @@
#!nsh
#
# @name Blade 130X
#
# @type Helicopter
#
# @maintainer Bart Slinger <bartslinger@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
# Configure as helicopter (number 4 defined in commander_helper.cpp)
set MAV_TYPE 4
set MIXER heli_120deg
set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 5.0
param set MC_ROLLRATE_P 0.0
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0
param set MC_ROLLRATE_FF 0.15
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.0
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.0
param set MC_PITCHRATE_FF 0.15
param set MC_YAW_P 3.0
param set MC_YAWRATE_P 0.1
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.0
param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set ATT_BIAS_MAX 0.0
param set CBRK_IO_SAFETY 22027
fi
@@ -1,12 +0,0 @@
#!nsh
#
# @name Passthrough mode for Snapdragon
#
# @type custom
#
# @maintainer Julian Oes <julian@oes.ch>
#
# This startup can be used on Pixhawk/Pixfalcon/Pixracer for the
# passthrough of RC input and PWM output.
set VEHICLE_TYPE passthrough
+1 -2
View File
@@ -24,8 +24,7 @@ then
param set FW_AIRSPD_MAX 15
param set FW_AIRSPD_MIN 10
param set FW_AIRSPD_TRIM 13
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
+1 -2
View File
@@ -24,8 +24,7 @@ then
param set FW_AIRSPD_MIN 13
param set FW_AIRSPD_TRIM 15
param set FW_AIRSPD_MAX 25
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.75
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.2
+1 -2
View File
@@ -24,8 +24,7 @@ then
param set FW_AIRSPD_MIN 15
param set FW_AIRSPD_TRIM 20
param set FW_AIRSPD_MAX 40
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
+1 -2
View File
@@ -25,8 +25,7 @@ then
param set FW_AIRSPD_MAX 15
param set FW_AIRSPD_MIN 10
param set FW_AIRSPD_TRIM 13
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
-55
View File
@@ -1,55 +0,0 @@
#!nsh
#
# @name Sparkle Tech Pigeon
#
# @url http://www.sparkletech.hk/
#
# @type Flying Wing
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
then
param set FW_AIRSPD_MIN 15
param set FW_AIRSPD_TRIM 20
param set FW_AIRSPD_MAX 27
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.75
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.35
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.05
param set FW_P_LIM_MAX 45
param set FW_P_LIM_MIN -45
param set FW_P_ROLLFF 1
param set FW_P_TC 0.3
param set FW_RR_FF 0.3
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.03
param set FW_R_LIM 40
param set FW_R_RMAX 50
param set FW_R_TC 0.3
# Bottom of bay and nominal zero-pitch attitude differ
# the payload bay is pitched up about 7 degrees
param set SENS_BOARD_Y_OFF 11.9
param set FW_L1_PERIOD 20.0
fi
set MIXER phantom
# Provide ESC a constant 1000 us pulse
set PWM_OUT 4
set PWM_DISARMED 1000
+13 -27
View File
@@ -11,44 +11,30 @@ sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 12.5
param set FW_AIRSPD_TRIM 16.5
param set LNDFW_AIRSPD_MAX 6
param set LNDFW_VELI_MAX 4
param set LNDFW_VEL_XY_MAX 3
param set LNDFW_VEL_Z_MAX 5
param set FW_R_TC 0.4
param set FW_P_TC 0.4
param set FW_THR_CRUISE 0.55
param set FW_L1_DAMPING 0.75
param set FW_L1_PERIOD 15
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 16
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
param set FW_LND_FLALT 8
param set FW_LND_FLALT 5
param set FW_LND_HHDIST 15
param set FW_LND_HVIRT 13
param set FW_LND_TLALT 10
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_P_LIM_MAX 20
param set FW_P_LIM_MIN -30
param set FW_R_LIM 45
param set FW_PR_FF 0.45
param set FW_PR_FF 0.35
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.005
param set FW_RR_FF 0.45
param set FW_PR_P 0.08
param set FW_RR_FF 0.6
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.013
param set FW_P_RMAX_NEG 70
param set FW_P_RMAX_POS 70
param set FW_R_RMAX 70
param set FW_RR_P 0.04
param set SYS_COMPANION 157600
param set PWM_MAIN_REV0 1
param set PWM_MAIN_REV1 1
param set PWM_MAIN_REV2 1
param set PWM_DISARMED 0
param set PWM_MIN 900
param set PWM_MAX 2100
param set MIS_TAKEOFF_ALT 50
param set NAV_LOITER_RAD 30
fi
set PWM_DISARMED p:PWM_DISARMED
-36
View File
@@ -1,36 +0,0 @@
#!nsh
#
# @name Lumenier QAV-R (raceblade) 5" arms
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer James Goppert <james.goppert@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.16
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.15
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_TPA_BREAK 0.7
param set MC_TPA_SLOPE 1.0
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
fi
@@ -1,21 +0,0 @@
#!nsh
#
# @name Generic Quadrotor X config with mount (e.g. gimbal)
#
# @type Quadrotor x
#
#
# @maintainer Leon Mueller <thedevleon>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
set MIXER_AUX mount
set PWM_AUX_OUT 123456
set PWM_AUX_RATE 50
# Start mount driver
vmount start
+1 -1
View File
@@ -29,7 +29,7 @@ then
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.8
param set BAT_V_DIV 34.32838
param set BAT_V_SCALING 0.00838095238
fi
set OUTPUT_MODE ardrone
+14 -22
View File
@@ -4,15 +4,9 @@
#
# @type Quadrotor x
#
# @output MAIN1 motor1 (front right: CCW)
# @output MAIN2 motor2 (back left: CCW)
# @output MAIN3 motor3 (front left: CW)
# @output MAIN4 motor4 (back right: CW)
#
# @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 Mark Whitehorn <kd0aij@gmail.com>
#
@@ -21,24 +15,22 @@ sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.0
param set MC_ROLLRATE_P 0.14
param set MC_ROLLRATE_I 0.23
param set MC_ROLLRATE_D 0.0025
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.05
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.002
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.235
param set MC_PITCHRATE_I 0.17
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
param set MC_YAWRATE_P 0.3
param set MC_YAWRATE_I 0.2
param set MC_PITCHRATE_P 0.08
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set PWM_MIN 1075
param set PWM_MIN 980
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set CBRK_IO_SAFETY 22027
param set ATT_BIAS_MAX 0.0
param set MC_TPA_BREAK 0.5
param set MC_TPA_SLOPE 1.0
param set MC_ROLLRATE_MAX 360.0
param set MC_PITCHRATE_MAX 360.0
param set MC_YAWRATE_MAX 200.0
fi
-35
View File
@@ -1,35 +0,0 @@
#!nsh
#
# @name Parrot Bebop Frame
#
# @type Quadrotor x
#
# @maintainer Michael Schaeuble
#
sh /etc/init.d/rc.mc_defaults
#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
then
# Set all params here, then disable autoconfig
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.109999999403953552
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0006
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.000799999
param set MC_YAW_P 1.049999
param set MC_YAWRATE_P 0.05
param set MC_YAWRATE_I 0.001
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.7
fi
set OUTPUT_MODE bebop
set USE_IO no
set MIXER bebop
+1 -1
View File
@@ -79,7 +79,7 @@ then
param set RC5_TRIM 1500
fi
set MIXER quad_x
set MIXER solo
set PWM_OUT 1234
set MIXER_AUX none
+13 -30
View File
@@ -1,18 +1,12 @@
#!nsh
#
# @name Generic 250 Racer
# @name generic_250
#
# @type Quadrotor x
#
# @output MAIN1 motor1 (front right: CCW)
# @output MAIN2 motor2 (back left: CCW)
# @output MAIN3 motor3 (front left: CW)
# @output MAIN4 motor4 (back right: CW)
#
# @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 Mark Whitehorn <kd0aij@gmail.com>
#
@@ -21,34 +15,23 @@ sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.19
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.0055
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0055
param set MC_YAW_P 4.0
param set MC_ROLLRATE_D 0.005
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.005
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set MC_TPA_BREAK 0.5
param set MC_TPA_SLOPE 1.0
param set PWM_MIN 1075
param set PWM_MIN 980
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set MC_ROLLRATE_MAX 360.0
param set MC_PITCHRATE_MAX 360.0
param set MC_YAWRATE_MAX 200.0
param set ATT_BIAS_MAX 0.0
param set CBRK_IO_SAFETY 22027
fi
@@ -1,31 +0,0 @@
#!nsh
#
# @name DJI Matrice 100
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer James Goppert <james.goppert@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.05
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.001
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.05
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.001
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set BAT_N_CELLS 6
param set PWM_MIN 1200
fi
-43
View File
@@ -1,43 +0,0 @@
#!nsh
#
# @name Intel Aero RTF
#
# @type Quadrotor x
sh /etc/init.d/rc.mc_defaults
#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
then
# Set all params here, then disable autoconfig
param set MC_ROLL_P 8.0000
param set MC_ROLLRATE_P 0.1300
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.0012
param set MC_ROLLRATE_MAX 360
param set MC_PITCH_P 8.0000
param set MC_PITCHRATE_P 0.1300
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.0012
param set MC_PITCHRATE_MAX 360
param set MC_YAW_P 4.0
param set MC_YAWRATE_P 0.119999997317790985
param set MC_YAWRATE_I 0.050000000745058060
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MPC_XY_CRUISE 8
param set SYS_LOGGER 1
fi
tap_esc start -d /dev/ttyS0 -n 4
usleep 300000
set OUTPUT_MODE tap_esc
set MIXER quad_x
set USE_IO no
param set SYS_COMPANION 1500000
set MAVLINK_COMPANION_DEVICE /dev/ttyS1
-42
View File
@@ -1,42 +0,0 @@
#!nsh
#
# @name Crazyflie 2.0
#
# @type Quadrotor x
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set COM_RC_IN_MODE 2
param set BAT_N_CELLS 1
param set BAT_CAPACITY 240
param set BAT_SOURCE 1
param set PWM_DISARMED 0
param set PWM_MIN 0
param set PWM_MAX 255
param set SYS_COMPANION 20
param set MC_PITCHRATE_D 0.0015
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_P 0.045
param set MC_PITCH_P 6.5
param set MC_ROLLRATE_D 0.0015
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_P 0.045
param set MC_ROLL_P 6.5
param set MC_YAW_P 3.0
param set CBRK_SUPPLY_CHK 894281
param set CBRK_USB_CHK 197848
fi
set PWM_MIN none
set PWM_MAX none
set PWM_DISARMED none
# Will run the motors at 328.125 kHz (recommended)
set PWM_RATE 3921
@@ -4,7 +4,7 @@
# att & pos estimator, rover steering control
#
ekf2 start
ekf_att_pos_estimator start
# disabled the start of steering control app due to use of offboard mode only
# rover_steering_control start
+1 -1
View File
@@ -6,7 +6,7 @@
#
# Start the attitude and position estimator
#
ekf2 start
ekf_att_pos_estimator start
#
# Start attitude controller
+8 -9
View File
@@ -7,16 +7,15 @@ then
#
# Default parameters for FW
#
param set RTL_RETURN_ALT 100
param set RTL_DESCEND_ALT 100
param set RTL_LAND_DELAY -1
param set NAV_LAND_ALT 90
param set NAV_RTL_ALT 100
param set NAV_RTL_LAND_T -1
param set NAV_ACC_RAD 50
# FW uses L1 distance for acceptance radius
# set a smaller NAV_ACC_RAD for vertical acceptance distance
param set NAV_ACC_RAD 10
param set MIS_LTRMIN_ALT 25
param set MIS_TAKEOFF_ALT 25
param set PE_VELNE_NOISE 0.3
param set PE_VELD_NOISE 0.35
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.0
fi
# This is the gimbal pass mixer
+9 -54
View File
@@ -43,17 +43,12 @@ then
set OUTPUT_DEV /dev/uavcan/esc
fi
if [ $OUTPUT_MODE == tap_esc ]
then
set OUTPUT_DEV /dev/tap_esc
fi
if mixer load $OUTPUT_DEV $MIXER_FILE
then
echo "INFO [init] Mixer: $MIXER_FILE on $OUTPUT_DEV"
echo "[i] Mixer: $MIXER_FILE on $OUTPUT_DEV"
else
echo "ERROR [init] Error loading mixer: $MIXER_FILE"
echo "ERROR:[init] Could not load mixer: $MIXER_FILE" >> $LOG_FILE
echo "[i] Error loading mixer: $MIXER_FILE"
echo "ERROR: Could not load mixer: $MIXER_FILE" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@@ -61,8 +56,8 @@ then
else
if [ $MIXER != skip ]
then
echo "ERROR [init] Mixer not defined"
echo "ERROR [init] Mixer not defined" >> $LOG_FILE
echo "[i] Mixer not defined"
echo "ERROR: Mixer not defined" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@@ -108,22 +103,6 @@ then
set MIXER_AUX none
fi
#MindPX has not aux mixer
if ver hwcmp MINDPX_V2
then
set MIXER_AUX none
fi
if ver hwcmp CRAZYFLIE
then
set MIXER_AUX none
fi
if ver hwcmp AEROFC_V1
then
set MIXER_AUX none
fi
if [ $MIXER_AUX != none -a $AUX_MODE != none ]
then
#
@@ -148,25 +127,14 @@ then
then
if fmu mode_$AUX_MODE
then
# Append aux mixer to main device
if [ $OUTPUT_MODE == hil ]
then
if mixer append $OUTPUT_DEV $MIXER_AUX_FILE
then
echo "INFO [init] Mixer: $MIXER_AUX_FILE appended to $OUTPUT_DEV"
else
echo "ERROR [init] Error appending mixer: $MIXER_AUX_FILE"
echo "ERROR [init] Could not append mixer: $MIXER_AUX_FILE" >> $LOG_FILE
fi
fi
if [ -e $OUTPUT_AUX_DEV -a $OUTPUT_MODE != hil ]
if [ -e $OUTPUT_AUX_DEV ]
then
if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE
then
echo "INFO [init] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
else
echo "ERROR [init] Error loading mixer: $MIXER_AUX_FILE"
echo "ERROR [init] Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
echo "[i] Error loading mixer: $MIXER_AUX_FILE"
echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
fi
else
set PWM_AUX_OUT none
@@ -224,18 +192,5 @@ then
fi
fi
unset PWM_OUT
unset PWM_RATE
unset PWM_ACHDIS
unset PWM_MIN
unset PWM_MAX
unset PWM_AUX_OUT
unset PWM_AUX_RATE
unset PWM_AUX_DISARMED
unset PWM_AUX_MIN
unset PWM_AUX_MAX
unset FAILSAFE_AUX
unset FAILSAFE
unset OUTPUT_DEV
unset OUTPUT_AUX_DEV
+2
View File
@@ -18,4 +18,6 @@ fi
if px4io limit $PX4IO_LIMIT
then
else
echo "[i] Set PX4IO update rate to $PX4IO_LIMIT Hz failed!"
fi
+18
View File
@@ -0,0 +1,18 @@
#!nsh
#
# Initialize logging services.
#
if [ -d /fs/microsd ]
then
if ver hwcmp PX4FMU_V1
then
if sdlog2 start -r 40 -a -b 3 -t
then
fi
else
if sdlog2 start -r 100 -a -b 12 -t
then
fi
fi
fi
+19 -24
View File
@@ -4,41 +4,36 @@
# att & pos estimator, att & pos control.
#
#---------------------------------------
# Estimator group selction
#
# INAV (deprecated)
if param compare SYS_MC_EST_GROUP 0
# The system is defaulting to INAV_ENABLED = 1
# but users can alternatively try the EKF-based
# filter by setting INAV_ENABLED = 0
if param compare INAV_ENABLED 1
then
echo "ERROR [init] Estimator INAV deprecated. Using LPE"
param set SYS_MC_EST_GROUP 1
param save
fi
# LPE
if param compare SYS_MC_EST_GROUP 1
then
# Try to start LPE. If it fails, start EKF2 as a default
# Unfortunately we do not build it on px4fmu-v2 duo to a limited flash.
if attitude_estimator_q start
attitude_estimator_q start
position_estimator_inav start
else
if param compare LPE_ENABLED 1
then
attitude_estimator_q start
local_position_estimator start
else
ekf2 start
fi
fi
# EKF
if param compare SYS_MC_EST_GROUP 2
if mc_att_control start
then
ekf2 start
else
# try the multiplatform version
mc_att_control_m start
fi
#---------------------------------------
mc_att_control start
mc_pos_control start
if mc_pos_control start
then
else
# try the multiplatform version
mc_pos_control_m start
fi
#
# Start Land Detector
+21 -9
View File
@@ -4,19 +4,36 @@ 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
param set PWM_DISARMED 900
param set PWM_MIN 1075
param set PWM_MAX 1950
param set PWM_RATE 400
param set RTL_LAND_DELAY 0
fi
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1000
then
param set PWM_MIN 1075
fi
if param compare PWM_MAX 2000
then
param set PWM_MAX 1950
fi
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
fi
# set environment variables (!= parameters)
set PWM_RATE 400
# tell the mixer to use parameters for these instead
set PWM_RATE p:PWM_RATE
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
@@ -28,8 +45,3 @@ set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
fi
+47 -213
View File
@@ -1,6 +1,6 @@
#!nsh
#
# Standard startup script for PX4FMU v1, v2, v3, v4 onboard sensor drivers.
# Standard startup script for PX4FMU v1, v2, v3 onboard sensor drivers.
#
if ver hwcmp PX4FMU_V1
@@ -8,47 +8,14 @@ then
if ms5611 start
then
fi
else
if ver hwcmp AEROFC_V1
if ms5611 -s start
then
# Aero FC uses separate driver
else
if ver hwcmp CRAZYFLIE
then
# Crazyflie uses separate driver
else
# Configure all I2C buses to 100 KHz as they
# are all external or slow
fmu i2c 1 100000
fmu i2c 2 100000
fi
fi
if ver hwcmp PX4FMU_V4
then
# We know there are sketchy boards out there
# as chinese companies produce Pixracers without
# fully understanding the critical parts of the
# schematic and BOM, leading to sensor brownouts
# on boot. Original Pixracers following the
# open hardware design do not require this.
fmu sensor_reset 50
fi
# External SPI
if ms5611 -S start
then
fi
# Internal SPI
if ms5611 -s start
then
fi
# Blacksheep telemetry
if bst start
then
fi
# Blacksheep telemetry
if bst start
then
fi
fi
@@ -56,29 +23,6 @@ if adc start
then
fi
if ver hwcmp AUAV_X21
then
# I2C bus
if hmc5883 -C -T start
then
fi
# I2C bus
if lis3mdl start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
fi
if ver hwcmp PX4FMU_V2
then
# External I2C bus
@@ -86,40 +30,21 @@ then
then
fi
# External I2C bus
if lis3mdl -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 4 start
then
fi
# Internal SPI bus ICM-20608-G
if mpu6000 -T 20608 start
then
fi
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
if mpu6000 -X -R 4 start
then
set BOARD_FMUV3 true
else
# Check for Pixhawk 2.1 board
if mpu9250 -S -R 4 start
then
set BOARD_FMUV3 true
else
set BOARD_FMUV3 false
fi
set BOARD_FMUV3 false
fi
if [ $BOARD_FMUV3 == true ]
then
# sensor heating is available, but we disable it for now
param set SENS_EN_THERMAL 0
# external L3GD20H is rotated 180 degrees yaw
if l3gd20 -X -R 4 start
then
@@ -133,30 +58,18 @@ then
# internal MPU6000 is rotated 180 deg roll, 270 deg yaw
if mpu6000 -R 14 start
then
else
if mpu9250 -R 14 start
then
fi
fi
if hmc5883 -C -T -S -R 8 start
then
fi
if meas_airspeed start -b 2
then
fi
else
# FMUv2
if mpu6000 start
then
fi
if mpu9250 start
then
fi
if l3gd20 start
then
fi
@@ -165,140 +78,61 @@ then
then
fi
fi
fi
if ver hwcmp PX4FMU_V4
then
# External I2C bus
if hmc5883 -C -T -X start
else
if ver hwcmp PX4FMU_V4
then
fi
# External I2C bus
if hmc5883 -C -T -X start
then
fi
if lis3mdl -R 2 start
then
fi
# Internal SPI bus is rotated 90 deg yaw
if hmc5883 -C -T -S -R 2 start
then
fi
# Internal SPI bus is rotated 90 deg yaw
if hmc5883 -C -T -S -R 2 start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Start either MPU9250 or BMI160. They are both connected to the same SPI bus and use the same
# chip select pin. There are different boards with either one of them and the WHO_AM_I register
# will prevent the incorrect driver from a successful initialization.
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
# Internal SPI bus BMI160
if bmi160 start
then
fi
fi
if ver hwcmp PX4FMU_V1
then
# FMUv1
if mpu6000 start
then
fi
if l3gd20 start
then
fi
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
else
# Use only external as primary
if param compare SENS_EXT_MAG 1
# FMUv1
if mpu6000 start
then
if hmc5883 -C -X start
fi
if l3gd20 start
then
fi
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
# Use only external as primary
if param compare SENS_EXT_MAG 1
then
if hmc5883 -C -X start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
then
fi
fi
fi
fi
fi
if ver hwcmp MINDPX_V2
then
# External I2C bus
if hmc5883 -C -T -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 8 start
then
fi
if mpu6500 -R 8 start
then
fi
if lsm303d -R 10 start
then
fi
if l3gd20 -R 14 start
then
fi
fi
if ver hwcmp CRAZYFLIE
then
# Onboard I2C
if mpu9250 -R 12 start
then
fi
# I2C bypass of mpu
if lps25h start
then
fi
fi
if ver hwcmp AEROFC_V1
then
if ms5611 start
then
fi
if mpu6500 -R 14 start
then
fi
# Internal compass
if hmc5883 -I -R 4 start
then
fi
# Possible external compasses
if hmc5883 -X start
then
fi
if ist8310 -C -b 1 -R 8 start
then
fi
fi
if meas_airspeed start
then
else
@@ -311,7 +145,7 @@ else
fi
fi
if sf1xx start
if sf10a start
then
fi
+29
View File
@@ -0,0 +1,29 @@
#!nsh
#
# UAVCAN initialization script.
#
#
# Starting stuff according to UAVCAN_ENABLE value
#
if param greater UAVCAN_ENABLE 0
then
if uavcan start
then
echo "[i] UAVCAN started"
else
echo "[i] ERROR: Could not start UAVCAN"
tone_alarm $TUNE_ERR
fi
fi
if param greater UAVCAN_ENABLE 1
then
if uavcan start fw
then
echo "[i] UAVCAN servers started"
else
echo "[i] ERROR: Could not start UAVCAN servers"
tone_alarm $TUNE_ERR
fi
fi
+9
View File
@@ -0,0 +1,9 @@
#!nsh
#
# USB MAVLink start
#
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
# Exit shell to make it available to MAVLink
exit
+3 -33
View File
@@ -3,40 +3,10 @@
# Standard apps for vtol:
# att & pos estimator, att & pos control.
#
#
#---------------------------------------
# Estimator group selction
#
# INAV (deprecated)
if param compare SYS_MC_EST_GROUP 0
then
echo "ERROR [init] Estimator INAV deprecated. Using LPE"
param set SYS_MC_EST_GROUP 1
param save
fi
# LPE
if param compare SYS_MC_EST_GROUP 1
then
# Try to start LPE. If it fails, start EKF2 as a default
# Unfortunately we do not build it on px4fmu-v2 duo to a limited flash.
if attitude_estimator_q start
then
local_position_estimator start
else
ekf2 start
fi
fi
# EKF
if param compare SYS_MC_EST_GROUP 2
then
ekf2 start
fi
#---------------------------------------
attitude_estimator_q start
#ekf_att_pos_estimator start
position_estimator_inav start
vtol_att_control start
mc_att_control start
+9 -13
View File
@@ -8,6 +8,12 @@ then
param set MC_PITCH_P 6.0
param set MC_YAW_P 4
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.3
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.25
param set PE_ABIAS_PNOISE 0.0001
#
# Default parameters for mission and position handling
#
@@ -17,18 +23,8 @@ then
param set MPC_Z_VEL_MAX 1.5
param set MPC_XY_VEL_MAX 4.0
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2.0
param set RTL_LAND_DELAY 0
fi
# set environment variables (!= parameters)
set PWM_RATE 400
# tell the mixer to use parameters for these instead
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
fi
set PWM_DISARMED 900
set PWM_MIN 1000
set PWM_MAX 2000
+152 -337
View File
@@ -15,6 +15,8 @@ sercon
#
set MODE autostart
set FRC /fs/microsd/etc/rc.txt
set FCONFIG /fs/microsd/etc/config.txt
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
set LOG_FILE /fs/microsd/bootlog.txt
@@ -24,6 +26,7 @@ set LOG_FILE /fs/microsd/bootlog.txt
# REBOOTWORK this needs to start after the flight control loop
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "[i] microSD mounted: /fs/microsd"
# Start playing the startup tune
tone_alarm start
else
@@ -32,9 +35,9 @@ else
then
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "INFO [init] MicroSD card formatted"
echo "[i] microSD card formatted"
else
echo "ERROR [init] Format failed"
echo "[i] format failed"
tone_alarm MNBG
set LOG_FILE /dev/null
fi
@@ -47,10 +50,9 @@ fi
# Look for an init script on the microSD card.
# Disable autostart if the script found.
#
set FRC /fs/microsd/etc/rc.txt
if [ -f $FRC ]
then
echo "INFO [init] Executing script: $FRC"
echo "[i] Executing script: $FRC"
sh $FRC
set MODE custom
fi
@@ -76,7 +78,9 @@ then
param select $PARAM_FILE
if param load
then
echo "[param] Loaded: $PARAM_FILE"
else
echo "[param] FAILED loading $PARAM_FILE"
if param reset
then
fi
@@ -99,28 +103,6 @@ then
#then
#fi
#
# Set AUTOCNF flag to use it in AUTOSTART scripts
#
if param compare SYS_AUTOCONFIG 1
then
# Wipe out params except RC*
param reset_nostart RC*
set AUTOCNF yes
else
set AUTOCNF no
#
# Release 1.4.0 transitional support:
# set to old default if unconfigured.
# this preserves the previous behaviour
#
if param compare BAT_N_CELLS 0
then
param set BAT_N_CELLS 3
fi
fi
#
# Set default values
#
@@ -145,11 +127,24 @@ then
set FMU_MODE pwm
set AUX_MODE pwm
set MAVLINK_F default
set MAVLINK_COMPANION_DEVICE /dev/ttyS2
set EXIT_ON_END no
set MAV_TYPE none
set LOAD_DAPPS yes
set GPS yes
set GPS_FAKE no
set FAILSAFE none
set USE_IO yes
#
# Set AUTOCNF flag to use it in AUTOSTART scripts
#
if param compare SYS_AUTOCONFIG 1
then
# Wipe out params except RC*
param reset_nostart RC*
set AUTOCNF yes
else
set AUTOCNF no
fi
#
# Set USE_IO flag
@@ -159,49 +154,19 @@ then
if ver hwcmp PX4FMU_V4
then
set USE_IO no
fi
if ver hwcmp MINDPX_V2
then
set USE_IO no
fi
if ver hwcmp CRAZYFLIE
then
set USE_IO no
if param compare SYS_AUTOSTART 0
then
param set SYS_AUTOSTART 4900
set AUTOCNF yes
fi
fi
if ver hwcmp AEROFC_V1
then
set USE_IO no
else
set USE_IO yes
fi
else
set USE_IO no
fi
if ver hwcmp AEROFC_V1
then
if param compare SYS_AUTOSTART 0
then
set AUTOCNF yes
fi
# We don't allow changing AUTOSTART as it doesn't work in
# other configurations
param set SYS_AUTOSTART 4070
fi
#
# Set parameters and env variables for selected AUTOSTART
#
if param compare SYS_AUTOSTART 0
then
echo "[i] No autostart"
else
sh /etc/init.d/rc.autostart
fi
@@ -214,18 +179,12 @@ then
set MIXER_AUX none
fi
if ver hwcmp AEROFC_V1
then
set MIXER_AUX none
fi
#
# Override parameters from user configuration file
#
set FCONFIG /fs/microsd/etc/config.txt
if [ -f $FCONFIG ]
then
echo "Custom: $FCONFIG"
echo "[i] Custom config: $FCONFIG"
sh $FCONFIG
fi
unset FCONFIG
@@ -236,6 +195,7 @@ then
if [ $AUTOCNF == yes ]
then
param set SYS_AUTOCONFIG 0
param save
fi
unset AUTOCNF
@@ -255,10 +215,12 @@ then
if px4io checkcrc ${IO_FILE}
then
echo "[init] PX4IO CRC OK" >> $LOG_FILE
echo "PX4IO CRC OK" >> $LOG_FILE
set IO_PRESENT yes
else
echo "PX4IO Trying to update" >> $LOG_FILE
tone_alarm MLL32CP8MB
if px4io start
@@ -283,11 +245,11 @@ then
set IO_PRESENT yes
else
echo "PX4IO update failed" >> $LOG_FILE
echo "ERROR: PX4IO update failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
else
echo "PX4IO update failed" >> $LOG_FILE
echo "ERROR: PX4IO update failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@@ -295,7 +257,8 @@ then
if [ $IO_PRESENT == no ]
then
echo "PX4IO not found" >> $LOG_FILE
echo "[i] ERROR: PX4IO not found"
echo "ERROR: PX4IO not found" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@@ -317,6 +280,7 @@ then
then
# Need IO for output but it not present, disable output
set OUTPUT_MODE none
echo "[i] ERROR: PX4IO not found, disabling output"
# Avoid using ttyS0 for MAVLink on FMUv1
if ver hwcmp PX4FMU_V1
@@ -330,23 +294,16 @@ then
set FMU_MODE gpio_serial
fi
if [ $OUTPUT_MODE == tap_esc ]
then
set FMU_MODE rcin
fi
if [ $HIL == yes ]
then
set OUTPUT_MODE hil
set GPS no
if ver hwcmp PX4FMU_V1
then
set FMU_MODE serial
fi
unset HIL
else
unset HIL
gps start
fi
unset HIL
# waypoint storage
# REBOOTWORK this needs to start in parallel
@@ -358,19 +315,22 @@ then
# Sensors System (start before Commander so Preflight checks are properly run)
#
sh /etc/init.d/rc.sensors
if [ $GPS == yes ]
then
if [ $GPS_FAKE == yes ]
then
echo "[i] Faking GPS"
gps start -f
else
gps start
fi
fi
unset GPS
unset GPS_FAKE
# Needs to be this early for in-air-restarts
if [ $OUTPUT_MODE == hil ]
then
commander start -hil
else
commander start
fi
#
# Start CPU load monitor
#
load_mon start
commander start
#
# Start primary output
@@ -385,20 +345,6 @@ then
set OUTPUT_MODE uavcan_esc
fi
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1
then
set FMU_MODE pwm4
set AUX_MODE pwm4
fi
if param greater TRIG_MODE 0
then
set FMU_MODE pwm4
set AUX_MODE pwm4
camera_trigger start
fi
# If OUTPUT_MODE == none then something is wrong with setup and we shouldn't try to enable output
if [ $OUTPUT_MODE != none ]
then
@@ -406,8 +352,8 @@ then
then
if param compare UAVCAN_ENABLE 0
then
echo "OVERRIDING UAVCAN_ENABLE = 3" >> $LOG_FILE
param set UAVCAN_ENABLE 3
echo "[i] OVERRIDING UAVCAN_ENABLE = 1"
param set UAVCAN_ENABLE 1
fi
fi
@@ -417,7 +363,7 @@ then
then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
echo "ERROR: PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@@ -426,8 +372,10 @@ then
then
if fmu mode_$FMU_MODE
then
echo "[i] FMU mode_$FMU_MODE started"
else
echo "FMU start failed" >> $LOG_FILE
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
echo "ERROR: FMU start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@@ -458,8 +406,10 @@ then
if mkblctrl $MKBLCTRL_ARG
then
echo "[i] MK started"
else
echo "MK start failed" >> $LOG_FILE
echo "[i] ERROR: MK start failed"
echo "ERROR: MK start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
unset MKBLCTRL_ARG
@@ -468,9 +418,12 @@ then
if [ $OUTPUT_MODE == hil ]
then
if pwm_out_sim mode_pwm16
if pwm_out_sim mode_port2_pwm8
then
echo "[i] PWM SIM output started"
else
echo "[i] ERROR: PWM SIM output start failed"
echo "ERROR: PWM SIM output start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@@ -484,9 +437,11 @@ then
then
if px4io start
then
echo "[i] PX4IO started"
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
echo "[i] ERROR: PX4IO start failed"
echo "ERROR: PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@@ -495,8 +450,10 @@ then
then
if fmu mode_$FMU_MODE
then
echo "[i] FMU mode_$FMU_MODE started"
else
echo "FMU mode_$FMU_MODE start failed" >> $LOG_FILE
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
echo "ERROR: FMU mode_$FMU_MODE start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@@ -534,25 +491,10 @@ then
# Start MAVLink on Wifi (ESP8266 port)
mavlink start -r 20000 -m config -b 921600 -d /dev/ttyS0
fi
if ver hwcmp AEROFC_V1
then
set MAVLINK_F "-r 1200 -d /dev/ttyS4"
fi
fi
if ver hwcmp CRAZYFLIE
then
# Avoid using either of the two available serials
set MAVLINK_F none
fi
fi
if [ "x$MAVLINK_F" == xnone ]
then
else
mavlink start $MAVLINK_F
fi
mavlink start $MAVLINK_F
unset MAVLINK_F
#
@@ -563,177 +505,50 @@ then
else
# XXX We need a better way for runtime eval of shell variables,
# but this works for now
if param compare SYS_COMPANION 10
then
frsky_telemetry start -d $MAVLINK_COMPANION_DEVICE
fi
if param compare SYS_COMPANION 20
then
syslink start
mavlink start -d /dev/bridge0 -b 57600 -m osd -r 40000
fi
if param compare SYS_COMPANION 921600
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 921600 -m onboard -r 80000 -x
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 80000 -x
fi
if param compare SYS_COMPANION 57600
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 57600 -m onboard -r 5000 -x
mavlink start -d /dev/ttyS2 -b 57600 -m onboard -r 5000 -x
fi
if param compare SYS_COMPANION 157600
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 57600 -m osd -r 1000
mavlink start -d /dev/ttyS2 -b 57600 -m osd -r 1000
fi
if param compare SYS_COMPANION 257600
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 57600 -m magic -r 5000 -x
fi
if param compare SYS_COMPANION 319200
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 19200 -r 1000
fi
if param compare SYS_COMPANION 338400
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 38400 -r 1000
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
fi
if param compare SYS_COMPANION 357600
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 57600 -r 1000
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
fi
if param compare SYS_COMPANION 1921600
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 921600 -r 20000
set AUX_MODE pwm4
fi
if param compare SYS_COMPANION 1500000
if param greater TRIG_MODE 0
then
mavlink start -d $MAVLINK_COMPANION_DEVICE -b 1500000 -m onboard -r 100000 -x
fi
fi
unset MAVLINK_COMPANION_DEVICE
#
# Starting stuff according to UAVCAN_ENABLE value
#
if param greater UAVCAN_ENABLE 0
then
if uavcan start fw
then
else
tone_alarm $TUNE_ERR
# Get FMU driver out of the way
set MIXER_AUX none
set AUX_MODE none
camera_trigger start
fi
fi
#
# Optional drivers
# UAVCAN
#
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
then
if pwm_input start
then
if ll40ls start pwm
then
fi
fi
fi
# lightware serial lidar sensor
if param compare SENS_EN_SF0X 0
then
else
sf0x start
fi
# lightware i2c lidar sensor
if param compare SENS_EN_SF1XX 0
then
else
sf1xx start
fi
# mb12xx sonar sensor
if param compare SENS_EN_MB12XX 1
then
mb12xx start
fi
# teraranger one tof sensor
if param compare SENS_EN_TRONE 1
then
trone start
fi
if ver hwcmp PX4FMU_V4
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp MINDPX_V2
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp PX4FMU_V2
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp PX4FMU_V4
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp MINDPX_V2
then
px4flow start &
fi
# Start MAVLink
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
sh /etc/init.d/rc.uavcan
#
# Logging
#
if ver hwcmp PX4FMU_V1
then
if sdlog2 start -r 30 -a -b 2 -t
then
fi
else
if param compare SYS_LOGGER 0
then
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
then
if sdlog2 start -r 500 -e -b 18 -t
then
fi
else
if sdlog2 start -r 100 -a -b 9 -t
then
fi
fi
else
set LOGGER_ARGS ""
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if logger start -b 12 -t $LOGGER_ARGS
then
fi
unset LOGGER_ARGS
fi
fi
sh /etc/init.d/rc.logging
#
# Start up ARDrone Motor interface
@@ -748,6 +563,8 @@ then
#
if [ $VEHICLE_TYPE == fw ]
then
echo "[i] FIXED WING"
if [ $MIXER == none ]
then
# Set default mixer for fixed wing if not defined
@@ -766,7 +583,10 @@ then
sh /etc/init.d/rc.interface
# Start standard fixedwing apps
sh /etc/init.d/rc.fw_apps
if [ $LOAD_DAPPS == yes ]
then
sh /etc/init.d/rc.fw_apps
fi
fi
#
@@ -774,6 +594,8 @@ then
#
if [ $VEHICLE_TYPE == mc ]
then
echo "[i] MULTICOPTER"
if [ $MIXER == none ]
then
echo "Mixer undefined"
@@ -814,10 +636,6 @@ then
then
set MAV_TYPE 14
fi
if [ $MIXER == coax ]
then
set MAV_TYPE 3
fi
fi
# Still no MAV_TYPE found
@@ -833,7 +651,10 @@ then
sh /etc/init.d/rc.interface
# Start standard multicopter apps
sh /etc/init.d/rc.mc_apps
if [ $LOAD_DAPPS == yes ]
then
sh /etc/init.d/rc.mc_apps
fi
fi
#
@@ -841,9 +662,11 @@ then
#
if [ $VEHICLE_TYPE == vtol ]
then
echo "[init] Vehicle type: VTOL"
if [ $MIXER == none ]
then
echo "VTOL mixer undefined"
echo "Default mixer for vtol not defined"
fi
if [ $MAV_TYPE == none ]
@@ -876,7 +699,10 @@ then
sh /etc/init.d/rc.interface
# Start standard vtol apps
sh /etc/init.d/rc.vtol_apps
if [ $LOAD_DAPPS == yes ]
then
sh /etc/init.d/rc.vtol_apps
fi
fi
#
@@ -891,51 +717,14 @@ then
sh /etc/init.d/rc.interface
# Start standard rover apps
sh /etc/init.d/rc.axialracing_ax10_apps
if [ $LOAD_DAPPS == yes ]
then
sh /etc/init.d/rc.axialracing_ax10_apps
fi
param set MAV_TYPE 10
fi
#
# For snapdragon, we need a passthrough mode
# Do not run any mavlink instances since we need the serial port for
# communication with Snapdragon.
#
if [ $VEHICLE_TYPE == passthrough ]
then
mavlink stop-all
commander stop
# Stop multicopter attitude controller if it is running, the controls come
# from Snapdragon.
if mc_att_control stop
then
fi
# Start snapdragon interface on serial port.
if ver hwcmp PX4FMU_V2
then
# On Pixfalcon use the standard telemetry port (Telem 1).
snapdragon_rc_pwm start -d /dev/ttyS1
px4io start
fi
if ver hwcmp PX4FMU_V4
then
# On Pixracer use Telem 2 port (TL2).
snapdragon_rc_pwm start -d /dev/ttyS2
fmu mode_pwm4
fi
pwm failsafe -c 1234 -p 900
pwm disarmed -c 1234 -p 900
# Arm straightaway.
pwm arm
# Use 400 Hz PWM on all channels.
pwm rate -a -r 400
fi
unset MIXER
unset MAV_TYPE
unset OUTPUT_MODE
@@ -950,30 +739,25 @@ then
#
if [ $VEHICLE_TYPE == none ]
then
echo "No autostart ID found"
echo "[i] No autostart ID found"
fi
# Start any custom addons
set FEXTRAS /fs/microsd/etc/extras.txt
if [ -f $FEXTRAS ]
then
echo "Addons script: $FEXTRAS"
echo "[i] Addons script: $FEXTRAS"
sh $FEXTRAS
fi
unset FEXTRAS
if ver hwcmp CRAZYFLIE
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
# CF2 shouldn't have an sd card
else
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
# Play SOS
tone_alarm error
fi
echo "[i] No microSD card found"
# Play SOS
tone_alarm error
fi
# End of autostart
@@ -986,9 +770,40 @@ unset TUNE_ERR
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
mavlink boot_complete
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
then
if pwm_input start
then
if ll40ls start pwm
then
fi
fi
fi
if ver hwcmp PX4FMU_V4
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp PX4FMU_V2
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
# Start USB shell if no microSD present, MAVLink else
if [ $LOG_FILE == /dev/null ]
then
# Try to get an USB console
nshterm /dev/ttyACM0 &
else
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
if [ $EXIT_ON_END == yes ]
then
echo "NSH exit"
echo "Exit from nsh"
exit
fi
unset EXIT_ON_END
Binary file not shown.
+21
View File
@@ -62,3 +62,24 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / flaps / payload mixer for last four channels,
using the payload control group
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 1 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 3 10000 10000 0 -10000 10000
+20
View File
@@ -58,3 +58,23 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / flaps / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+20
View File
@@ -62,3 +62,23 @@ endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
Gimbal / flaps / payload mixer for last four channels,
using the payload control group
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 1 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 3 10000 10000 0 -10000 10000
View File
+19
View File
@@ -49,3 +49,22 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / flaps / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+20
View File
@@ -51,3 +51,23 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
View File
+19
View File
@@ -47,3 +47,22 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / flaps / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
@@ -1,7 +0,0 @@
Multirotor mixer for Parrot Bebop
=================================
This file defines a single mixer for a quadrotor in the x configuration. All controls
are mixed 100%.
R: 4x 10000 10000 -10000 0
@@ -3,21 +3,17 @@ Caipirinha tailsitter mixer
This file defines a mixer for the TBS Caipirinha tailsitter edition. This vehicle
has two motors in total, one attached to each wing. It also has two elevons which
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
are located in the slipstream of the propellers.
Motor mixer
------------
Channel 1 connects to the right (starboard) motor.
Channel 2 connects to the left (port) motor.
When standing in front of the vehicle the first motor should be on the left side
while the second motor should be on the right side.
R: 2- 10000 10000 10000 0
Zero mixer (2x)
---------------
Channels 3,4 are unused.
Z:
@@ -25,15 +21,13 @@ Z:
Elevons mixer
--------------
Channel 5 connects to the right (starboard) elevon.
Channel 6 connects to the left (port) elevon.
M: 2
O: 7500 7500 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
M: 2
O: 7500 7500 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
-31
View File
@@ -1,31 +0,0 @@
# mixer for the CruiseAder Claire tilt mechansim servo and elevons
=======================================================================
Tilt mechanism servo mixer
---------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 10000 10000 0 -10000 10000
Elevon mixers
-------------
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 1 7500 7500 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 1 -7500 -7500 0 -10000 10000
@@ -1,7 +0,0 @@
# CruiseAder Claire Main Multirotor mixer for PX4FMU
#
#===========================
R: 4x 10000 10000 10000 0
+21
View File
@@ -47,3 +47,24 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / flaps / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
@@ -1,54 +0,0 @@
Helicopter 120 degree Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
Blade 130x helicopter has longer servo arms left and right. The front servo arm is shorter.
Therefore it is not required to use the 0.866 factor.
==================================================
Output 0 - Left Servo Mixer
-----------------
Left Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) + Aileron (Roll - 0)
M: 3
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
Output 1 - Front Servo Mixer
----------------
Rear Servo = Collective (Thrust - 3) + Elevator (Pitch - 1)
M: 2
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
Output 2 - Right Servo Mixer
----------------
Right Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) - Aileron (Roll - 0)
M: 3
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
Output 3 - Tail Servo Mixer
----------------
Tail Servo = Yaw (control index = 2)
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
Output 4 - Motor speed mixer
-----------------
This would be the motor speed control output from governor power demand- not sure what index to use here?
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
@@ -1,4 +1,3 @@
# Hexa X
R: 6x 10000 10000 10000 0
-27
View File
@@ -1,27 +0,0 @@
# Mount Mixer (e.g. Gimbal, servo-controlled gimbal, etc...)
# pitch
M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000
# roll
M: 1
O: 10000 10000 0 -10000 10000
S: 2 1 10000 10000 0 -10000 10000
# yaw
M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 10000 10000 0 -10000 10000
# mode
M: 1
O: 10000 10000 0 -10000 10000
S: 2 3 10000 10000 0 -10000 10000
# retracts
M: 1
O: 10000 10000 0 -10000 10000
S: 2 4 10000 10000 0 -10000 10000
@@ -1,27 +0,0 @@
# Roll channel for mount
M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000
# Pitch channel for mount
M: 1
O: 10000 10000 0 -10000 10000
S: 2 1 10000 10000 0 -10000 10000
# Yaw channel for mount
M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 10000 10000 0 -10000 10000
# mixer for left leg
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 0 20000 -10000 -10000 10000
# mixer for right leg
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 0 20000 -10000 -10000 10000
@@ -46,3 +46,22 @@ range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Gimbal / flaps / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+12 -3
View File
@@ -6,13 +6,22 @@ are mixed 100%.
R: 4+ 10000 10000 10000 0
Gimbal / payload mixer for last two channels
Gimbal / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+11 -3
View File
@@ -6,13 +6,21 @@ are mixed 100%.
R: 4h 10000 10000 10000 0
Gimbal / payload mixer for last two channels
Gimbal / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
@@ -1,9 +1,10 @@
Multirotor mixer for TEST
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor with a wide configuration. All controls are mixed 100%.
This file defines a single mixer for a quadrotor in the V configuration. All controls
are mixed 100%.
R: 4w 10000 10000 10000 0
R: 4v 10000 10000 10000 0
Gimbal / payload mixer for last four channels
-----------------------------------------------------
+11 -3
View File
@@ -5,13 +5,21 @@ This file defines a single mixer for a quadrotor with a wide configuration. All
R: 4w 10000 10000 10000 0
Gimbal / payload mixer for last two channels
Gimbal / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+21 -2
View File
@@ -1,7 +1,26 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the X configuration. All controls
are mixed 100%.
R: 4x 10000 10000 10000 0
Gimbal / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
@@ -6,21 +6,13 @@ are mixed 100%.
R: 4x 10000 10000 10000 0
Z:
# left elevon
#mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 5000 5000 0 -10000 10000
# right elevon
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 -5000 -5000 0 -10000 10000
# mixer for the virtual elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
@@ -5,17 +5,21 @@ This file defines a single mixer for a quadrotor in SK450 DeadCat configuration.
R: 4dc 10000 10000 10000 0
Gimbal / payload mixer for last three channels
Gimbal / payload mixer for last four channels
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 3 7 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+7
View File
@@ -0,0 +1,7 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the X configuration. All controls
are mixed 100%.
R: 4x 10000 10000 10000 0
@@ -1,26 +1,24 @@
Mixer for standard vtol plane (SITL) with motor x configuration
=========================================================
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration. The plane has two ailerons and one elevator.
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration.
The plane has two ailerons and one elevator. The ailerons and elevator are treated as elevons
in order to make the standard vtol simulation compatible with the tailsitter simulation.
R: 4x 10000 10000 10000 0
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 -5000 -5000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 5000 5000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 1 3 0 20000 -10000 -10000 10000
# mixer for the left aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
# mixer for the right aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
# mixer for the elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
@@ -19,13 +19,13 @@ input is inverted between the two servos.
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -8000 -8000 0 -10000 10000
S: 1 1 8000 8000 0 -10000 10000
S: 1 0 -6000 -6000 0 -10000 10000
S: 1 1 6500 6500 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -8000 -8000 0 -10000 10000
S: 1 1 -8000 -8000 0 -10000 10000
S: 1 0 -6000 -6000 0 -10000 10000
S: 1 1 -6500 -6500 0 -10000 10000
Motor speed mixer
-----------------
-201
View File
@@ -1,201 +0,0 @@
#!nsh
#
# Standard startup script for PX4FMU v1, v2, v3, v4 onboard sensor drivers.
#
if ver hwcmp PX4FMU_V1
then
if ms5611 start
then
fi
else
# Configure all I2C buses to 100 KHz as they
# are all external or slow
fmu i2c 1 100000
fmu i2c 2 100000
if ms5611 -s start
then
fi
# Blacksheep telemetry
if bst start
then
fi
fi
if adc start
then
fi
if ver hwcmp PX4FMU_V2
then
# External I2C bus
if hmc5883 -C -T -X start
then
fi
# External I2C bus
if lis3mdl -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 4 start
then
fi
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -X -R 4 start
then
set BOARD_FMUV3 true
else
set BOARD_FMUV3 false
fi
if [ $BOARD_FMUV3 == true ]
then
# external L3GD20H is rotated 180 degrees yaw
if l3gd20 -X -R 4 start
then
fi
# external LSM303D is rotated 270 degrees yaw
if lsm303d -X -R 6 start
then
fi
# internal MPU6000 is rotated 180 deg roll, 270 deg yaw
if mpu6000 -R 14 start
then
fi
if hmc5883 -C -T -S -R 8 start
then
fi
if meas_airspeed start -b 2
then
fi
else
# FMUv2
if mpu6000 start
then
fi
if l3gd20 start
then
fi
if lsm303d start
then
fi
fi
fi
if ver hwcmp PX4FMU_V4
then
# External I2C bus
if hmc5883 -C -T -X start
then
fi
if lis3mdl -R 2 start
then
fi
# Internal SPI bus is rotated 90 deg yaw
if hmc5883 -C -T -S -R 2 start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
fi
if ver hwcmp PX4FMU_V1
then
# FMUv1
if mpu6000 start
then
fi
if l3gd20 start
then
fi
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
then
fi
else
# Use only external as primary
if param compare SENS_EXT_MAG 1
then
if hmc5883 -C -X start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
then
fi
fi
fi
fi
if ver hwcmp MINDPX_V2
then
if mpu6500 start
then
fi
if lsm303d start
then
fi
if l3gd20 start
then
fi
# External I2C bus
if hmc5883 -C -T -X start
then
fi
if lis3mdl -R 2 start
then
fi
fi
if meas_airspeed start
then
else
if ets_airspeed start
then
else
if ets_airspeed start -b 1
then
fi
fi
fi
if sf1xx start
then
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
if sensors start
then
fi
+112 -10
View File
@@ -38,11 +38,6 @@ fi
# Start a minimal system
#
#
# Start the ORB (first app to start)
#
uorb start
#
# Load parameters
#
@@ -109,24 +104,131 @@ then
tests mount
fi
sh /etc/init.d/rc.sensors
ver all
#
# Run unit tests at board boot, reporting failure as needed.
# Add new unit tests using the same pattern as below.
#
if mavlink_tests
then
else
set unit_test_failure 1
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
fi
if commander_tests
then
else
set unit_test_failure 1
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
fi
if uorb test
then
else
set unit_test_failure 1
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
fi
# Start all sensors on all boards
ms5611 start
adc start
if mpu6000 -X start
then
fi
if mpu6000 start
then
fi
if l3gd20 -X start
then
fi
if l3gd20 start
then
fi
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -I start
then
fi
else
# Use only external as primary
if param compare SENS_EXT_MAG 1
then
if hmc5883 -X start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
then
fi
fi
fi
if ver hwcmp PX4FMU_V2
then
if lsm303d -X start
then
fi
if lsm303d start
then
fi
if ms5611 -X start
then
fi
fi
if meas_airspeed start
then
else
if ets_airspeed start
then
else
if ets_airspeed start -b 1
then
fi
fi
fi
if sensors start
then
fi
# Check for flow sensor
if px4flow start
then
fi
if ll40ls start
then
fi
if tests all
then
else
set unit_test_failure 1
set unit_test_failure_list "${unit_test_failure_list} system_tests"
fi
if [ $unit_test_failure == 0 ]
then
echo
echo "All Unit Tests PASSED"
rgbled rgb 20 255 20
else
echo
echo "Some Unit Tests FAILED"
echo "Some Unit Tests FAILED:${unit_test_failure_list}"
rgbled rgb 255 20 20
fi
ver all
free
@@ -1,38 +0,0 @@
Mixer for SITL plane
=========================================================
Z:
Z:
# mixer for the rudder
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
# mixer for the flaps
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
# mixer for the left aileron
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 -4000 -4000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
# mixer for the right aileron
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 4000 4000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
# mixer for the elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000

Some files were not shown because too many files have changed in this diff Show More