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 864068b99d97d59d9537147e8b84ea9165ea91e9.
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 485f0d037979be0ed0905c8ca7180676bac5a8ea.
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
730 changed files with 27842 additions and 44187 deletions

1
.ackrc
View File

@ -1 +0,0 @@
--ignore-dir=Documentation

10
.gitignore vendored
View File

@ -2,7 +2,6 @@
!ROMFS/*/*.d
!ROMFS/*/*/*.d
!ROMFS/*/*/*/*.d
*.px4log
*.dSYM
*.o
*.pyc
@ -64,12 +63,3 @@ CMakeLists.txt.user
GPATH
GRTAGS
GTAGS
*.config
*.creator
*.creator.user
*.files
*.includes
# uavcan firmware
ROMFS/px4fmu_common/uavcan/
vectorcontrol/

7
.gitmodules vendored
View File

@ -13,6 +13,9 @@
[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
@ -22,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
@ -35,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

View File

@ -8,10 +8,6 @@ matrix:
include:
- os: linux
sudo: false
env: GCC_VER=4.8
- os: linux
sudo: false
env: GCC_VER=4.9
- os: osx
osx_image: xcode7
sudo: true
@ -39,6 +35,7 @@ addons:
- ninja-build
- python-argparse
- python-empy
- python-serial
- s3cmd
- texinfo
- zlib1g-dev
@ -46,12 +43,10 @@ addons:
before_install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
pushd .
&& cd ~ && mkdir gcc && cd gcc
&& if [ "$GCC_VER" = "4.8" ]; then GCC_URL="https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2" ; fi
&& if [ "$GCC_VER" = "4.9" ]; then GCC_URL="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2" ; fi
&& wget -O gcc.tar.bz2 ${GCC_URL}
&& tar -jxf gcc.tar.bz2 --strip 1
&& exportline="export PATH=$HOME/gcc/bin:\$PATH"
&& 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
@ -68,7 +63,7 @@ before_install:
&& brew install cmake ninja
&& brew install genromfs
&& sudo easy_install pip
&& sudo pip install empy
&& sudo pip install pyserial empy
;
fi
@ -98,24 +93,37 @@ env:
script:
- 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
arm-none-eabi-gcc --version && make check VECTORCONTROL=1;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
make check_posix_sitl_default;
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
after_success:
- if [[ "${TRAVIS_OS_NAME}" = "linux" && "${GCC_VER}" = "4.8" ]]; then
make package_firmware
&& find . -name \*.px4 -exec cp "{}" . \;
&& find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
&& ./CI-Tools/s3cmd-put `find . -maxdepth 1 -mindepth 1 -type f -name '*_default.px4'` build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
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:" https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
&& echo "Binaries have been posted to:"
&& echo https://px4-travis.s3.amazonaws.com/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/Firmware.zip
;
fi
@ -129,7 +137,6 @@ deploy:
tags: true
all_branches: true
repo: PX4/Firmware
condition: $GCC_VER = 4.8
notifications:
webhooks:
@ -137,7 +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:
secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always

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.
#
@ -150,6 +150,16 @@ 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}")
# switch to ros CMake file if building ros
@ -183,11 +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()
#=============================================================================
# project definition
#
@ -238,12 +243,12 @@ px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
px4_add_git_submodule(TARGET git_gtest PATH "unittets/gtest")
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
px4_add_git_submodule(TARGET git_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 ${CMAKE_SOURCE_DIR}
@ -288,7 +293,6 @@ 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})
@ -320,29 +324,12 @@ 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()
#=============================================================================
# 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} ${CMAKE_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}")
@ -350,6 +337,7 @@ endforeach()
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()

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

View File

@ -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.

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
}
]
}

View File

@ -1,12 +0,0 @@
{
"board_id": 9,
"magic": "PX4FWv2",
"description": "Firmware for the MindPx-V2 board",
"image": "",
"build_time": 0,
"summary": "MindPx-v2",
"version": "2.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}

107
Makefile
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
@ -109,9 +109,9 @@ endif
# describe how to build a cmake config
define cmake-build
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(PWD)/build_$@); fi
+@Tools/check_submodules.sh
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
+@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
# create empty targets to avoid msgs for targets passed to cmake
@ -121,12 +121,6 @@ $(1):
.PHONY: $(1)
endef
define colorecho
@tput setaf 6
@echo $1
@tput sgr0
endef
# ADD CONFIGS HERE
# --------------------------------------------------------------------
# Do not put any spaces between function arguments.
@ -146,8 +140,8 @@ px4-stm32f4discovery_default:
px4fmu-v2_ekf2:
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
mindpx-v2_default:
$(call cmake-build,nuttx_mindpx-v2_default)
px4fmu-v2_lpe:
$(call cmake-build,nuttx_px4fmu-v2_lpe)
posix_sitl_default:
$(call cmake-build,$@)
@ -158,40 +152,24 @@ posix_sitl_lpe:
posix_sitl_ekf2:
$(call cmake-build,$@)
posix_sitl_replay:
$(call cmake-build,$@)
posix_sitl_broadcast:
$(call cmake-build,$@)
ros_sitl_default:
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
qurt_eagle_travis:
$(call cmake-build,$@)
qurt_eagle_release:
$(call cmake-build,$@)
posix_eagle_release:
$(call cmake-build,$@)
qurt_eagle_default:
$(call cmake-build,$@)
posix_eagle_default:
$(call cmake-build,$@)
eagle_default: posix_eagle_default qurt_eagle_default
qurt_eagle_legacy_driver_default:
$(call cmake-build,$@)
posix_eagle_legacy_driver_default:
$(call cmake-build,$@)
qurt_excelsior_default:
$(call cmake-build,$@)
posix_excelsior_default:
$(call cmake-build,$@)
excelsior_default: posix_excelsior_default qurt_excelsior_default
posix_rpi2_default:
$(call cmake-build,$@)
@ -200,8 +178,6 @@ posix_rpi2_release:
posix: posix_sitl_default
broadcast: posix_sitl_broadcast
sitl_deprecation:
@echo "Deprecated. Use 'make posix_sitl_default jmavsim' or"
@echo "'make posix_sitl_default gazebo' if Gazebo is preferred."
@ -212,67 +188,34 @@ run_sitl_ros: sitl_deprecation
# Other targets
# --------------------------------------------------------------------
.PHONY: uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
.NOTPARALLEL: uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
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: check_px4fmu-v1_default check_px4fmu-v2_default check_px4fmu-v4_default_and_uavcan check_mindpx-v2_default check_px4-stm32f4discovery_default check_posix_sitl_default check_unittest check_format
check_format:
$(call colorecho,"Checking formatting with astyle")
@./Tools/fix_code_style.sh
@./Tools/check_code_style.sh
check_%:
@echo
$(call colorecho,"Building" $(subst check_,,$@))
@$(MAKE) --no-print-directory $(subst check_,,$@)
@echo
check_px4fmu-v4_default: uavcan_firmware
check_px4fmu-v4_default_and_uavcan: check_px4fmu-v4_default
@echo
ifeq ($(VECTORCONTROL),1)
@echo "Cleaning up vectorcontrol firmware"
@rm -rf vectorcontrol
@rm -rf ROMFS/px4fmu_common/uavcan
endif
unittest: posix_sitl_default
@(cd unittests && cmake -G$(PX4_CMAKE_GENERATOR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest -j2 --output-on-failure)
package_firmware:
@zip --junk-paths Firmware.zip `find . -name \*.px4`
clean:
@rm -rf build_*/
@(cd NuttX/nuttx && make clean)
submodulesclean:
@git submodule sync
@git submodule deinit -f .
@git submodule update --init --recursive --force
distclean: submodulesclean
@git clean -ff -x -d
@(cd NuttX && git clean -d -f -x)
@(cd src/modules/uavcan/libuavcan && git clean -d -f -x)
@(git submodule sync)
# targets handled by cmake
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim replay \
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 gazebo_plane
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"

2
NuttX

@ -1 +1 @@
Subproject commit f0f4bdc872d324f64e9d93d6f8989d3c1dfa2633
Subproject commit 3009fb230ec8232c4c4fd7798fd70ea9632692ec

View File

@ -1,17 +1,17 @@
## PX4 Pro Drone Autopilot ##
## PX4 Flight Core and PX4 Middleware ##
[![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 (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/)
* [Fixed wing](http://px4.io/portfolio_category/vtol/)
* [VTOL](http://px4.io/portfolio_category/plane/)
* Releases
* [Downloads](https://github.com/PX4/Firmware/releases)

View File

@ -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

View File

@ -14,8 +14,7 @@ then
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 25
param set FW_AIRSPD_MAX 40
param set FW_R_TC 0.3
param set FW_P_TC 0.3
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.8

View File

@ -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

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

View File

@ -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

View File

@ -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

View File

@ -43,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
@ -58,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

View File

@ -31,10 +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 VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
fi
set MIXER vtol_quad_x
@ -46,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

View File

@ -31,10 +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 VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
fi
set MIXER vtol_quad_x
@ -46,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

View File

@ -36,25 +36,10 @@ then
param set MC_YAWRATE_FF 0.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
@ -66,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

View File

@ -1,88 +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_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

View File

@ -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

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

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

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

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

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

View File

@ -14,8 +14,7 @@ then
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 16
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

View File

@ -15,22 +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_ROLLRATE_MAX 360.0
param set MC_PITCHRATE_MAX 360.0
param set MC_YAWRATE_MAX 200.0
fi

View File

@ -1,6 +1,6 @@
#!nsh
#
# @name Generic 250 Racer
# @name generic_250
#
# @type Quadrotor x
#
@ -15,31 +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.24
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0065
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 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

View File

@ -1,23 +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_ROLLRATE_P 0.05
param set MC_ROLLRATE_D 0.001
param set MC_PITCHRATE_P 0.05
param set MC_PITCHRATE_D 0.001
param set BAT_N_CELLS 6
fi

View File

@ -7,10 +7,9 @@ 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
param set PE_VELNE_NOISE 0.3

View File

@ -103,12 +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 [ $MIXER_AUX != none -a $AUX_MODE != none ]
then
#
@ -198,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

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

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

View File

@ -4,31 +4,23 @@
# att & pos estimator, att & pos control.
#
#---------------------------------------
# Estimator group selction
#
# INAV
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
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
# LPE
if param compare SYS_MC_EST_GROUP 1
then
attitude_estimator_q start
local_position_estimator start
fi
# EKF
if param compare SYS_MC_EST_GROUP 2
then
ekf2 start
fi
#---------------------------------------
if mc_att_control start
then
else

View File

@ -15,8 +15,20 @@ then
param set PWM_DISARMED 900
param set PWM_MIN 1075
param set PWM_MAX 1950
fi
param set RTL_LAND_DELAY 0
# 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)
@ -33,17 +45,3 @@ set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
# 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

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
@ -9,11 +9,6 @@ then
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
@ -35,11 +30,6 @@ then
then
fi
# External I2C bus
if lis3mdl -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 4 start
then
@ -74,10 +64,6 @@ then
then
fi
if meas_airspeed start -b 2
then
fi
else
# FMUv2
if mpu6000 start
@ -92,92 +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
# 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
# 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
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

View File

@ -3,33 +3,10 @@
# Standard apps for vtol:
# att & pos estimator, att & pos control.
#
#
#---------------------------------------
# Estimator group selction
#
# INAV
if param compare SYS_MC_EST_GROUP 0
then
attitude_estimator_q start
position_estimator_inav start
fi
# LPE
if param compare SYS_MC_EST_GROUP 1
then
attitude_estimator_q start
local_position_estimator start
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

View File

@ -23,27 +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
# 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 PWM_DISARMED 900
set PWM_MIN 1000
set PWM_MAX 2000

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
@ -47,7 +50,6 @@ 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 "[i] Executing script: $FRC"
@ -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,18 +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
fi
#
# Set default values
#
@ -137,8 +129,22 @@ then
set MAVLINK_F default
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
@ -148,26 +154,13 @@ then
if ver hwcmp PX4FMU_V4
then
set USE_IO no
fi
if ver hwcmp MINDPX_V2
then
set USE_IO no
else
set USE_IO yes
fi
else
set USE_IO no
fi
# should set to 0.8 for mindpx-v2 borad.
if param compare INAV_LIDAR_ERR 0.5
then
if ver hwcmp MINDPX_V2
then
param set INAV_LIDAR_ERR 0.8
param save
fi
fi
#
# Set parameters and env variables for selected AUTOSTART
#
@ -189,10 +182,9 @@ then
#
# Override parameters from user configuration file
#
set FCONFIG /fs/microsd/etc/config.txt
if [ -f $FCONFIG ]
then
echo "[i] Custom: $FCONFIG"
echo "[i] Custom config: $FCONFIG"
sh $FCONFIG
fi
unset FCONFIG
@ -227,6 +219,8 @@ then
set IO_PRESENT yes
else
echo "PX4IO Trying to update" >> $LOG_FILE
tone_alarm MLL32CP8MB
if px4io start
@ -251,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
@ -263,6 +257,7 @@ then
if [ $IO_PRESENT == no ]
then
echo "[i] ERROR: PX4IO not found"
echo "ERROR: PX4IO not found" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@ -285,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
@ -301,15 +297,13 @@ then
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
@ -321,14 +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
commander start
#
# Start primary output
@ -361,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
@ -370,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
@ -402,7 +406,9 @@ then
if mkblctrl $MKBLCTRL_ARG
then
echo "[i] MK started"
else
echo "[i] ERROR: MK start failed"
echo "ERROR: MK start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
@ -414,8 +420,10 @@ then
then
if pwm_out_sim mode_port2_pwm8
then
echo "[i] PWM SIM output started"
else
echo "PWM SIM start failed" >> $LOG_FILE
echo "[i] ERROR: PWM SIM output start failed"
echo "ERROR: PWM SIM output start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
@ -429,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
@ -440,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
@ -493,10 +505,6 @@ 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 /dev/ttyS2
fi
if param compare SYS_COMPANION 921600
then
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 80000 -x
@ -517,10 +525,6 @@ then
then
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
fi
if param compare SYS_COMPANION 1921600
then
mavlink start -d /dev/ttyS2 -b 921600 -r 20000
fi
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1
@ -536,107 +540,15 @@ then
fi
fi
# Transitional support: Disable safety on all Pixracer boards
if ver hwcmp PX4FMU_V4
then
if param set CBRK_IO_SAFETY 22027
then
fi
fi
#
# Starting stuff according to UAVCAN_ENABLE value
# UAVCAN
#
if param greater UAVCAN_ENABLE 0
then
if uavcan start
then
else
tone_alarm $TUNE_ERR
fi
fi
if param greater UAVCAN_ENABLE 1
then
if uavcan start fw
then
else
tone_alarm $TUNE_ERR
fi
fi
#
# Optional drivers
#
# 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
# sf0x lidar sensor
if param compare SENS_EN_SF0X 1
then
sf0x start
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
if ver hwcmp MINDPX_V2
then
#mindxp also need flow
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
sh /etc/init.d/rc.uavcan
#
# Logging
#
if [ -d /fs/microsd ]
then
if ver hwcmp PX4FMU_V1
then
if sdlog2 start -r 30 -a -b 2 -t
then
fi
else
# 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 20 -t
then
fi
else
if sdlog2 start -r 100 -a -b 12 -t
then
fi
fi
fi
fi
sh /etc/init.d/rc.logging
#
# Start up ARDrone Motor interface
@ -651,7 +563,7 @@ then
#
if [ $VEHICLE_TYPE == fw ]
then
echo "FIXED WING"
echo "[i] FIXED WING"
if [ $MIXER == none ]
then
@ -671,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
#
@ -679,7 +594,7 @@ then
#
if [ $VEHICLE_TYPE == mc ]
then
echo "MULTICOPTER"
echo "[i] MULTICOPTER"
if [ $MIXER == none ]
then
@ -736,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
#
@ -744,11 +662,11 @@ then
#
if [ $VEHICLE_TYPE == vtol ]
then
echo "VTOL"
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 ]
@ -781,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
#
@ -796,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
@ -856,6 +740,7 @@ then
if [ $VEHICLE_TYPE == none ]
then
echo "[i] No autostart ID found"
fi
# Start any custom addons
@ -870,6 +755,7 @@ then
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
echo "[i] No microSD card found"
# Play SOS
tone_alarm error
fi
@ -884,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

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

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

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

0
ROMFS/px4fmu_common/mixers/FX79.main.mix Normal file → Executable file
View File

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

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

0
ROMFS/px4fmu_common/mixers/Viper.main.mix Normal file → Executable file
View File

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

View File

@ -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

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

View File

@ -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

View File

@ -1,26 +0,0 @@
Mixer for SITL plane, using the VTOL airframe for now
=========================================================
Z:
Z:
Z:
Z:
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 5000 5000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 5000 5000 0 -10000 10000
S: 0 1 5000 5000 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

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

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

View File

@ -1,25 +0,0 @@
Multirotor mixer for TEST
===========================
This file defines a single mixer for a quadrotor with a wide configuration. All controls are mixed 100%.
R: 4w 10000 10000 10000 0
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

@ -6,13 +6,21 @@ are mixed 100%.
R: 4v 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

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

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

View File

@ -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

View File

@ -1,296 +0,0 @@
#!/usr/bin/env python
################################################################################################
# @File MissionCheck.py
# Automated mission loading, execution and monitoring
# for Continuous Integration
#
# @author Sander Smeets <sander@droneslab.com>
#
# Code partly based on DroneKit (c) Copyright 2015-2016, 3D Robotics.
################################################################################################
################################################################################################
# Settings
################################################################################################
connection_string = '127.0.0.1:14540'
import_mission_filename = 'VTOLmission.txt'
max_execution_time = 250
alt_acceptance_radius = 10
################################################################################################
# Init
################################################################################################
# Import DroneKit-Python
from dronekit import connect, Command
from pymavlink import mavutil
import time, sys, argparse
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--connect", help="connection string")
parser.add_argument("-f", "--filename", help="mission filename")
parser.add_argument("-t", "--timeout", help="execution timeout", type=float)
parser.add_argument("-a", "--altrad", help="altitude acceptance radius", type=float)
args = parser.parse_args()
if args.connect:
connection_string = args.connect
if args.filename:
import_mission_filename = args.filename
if args.timeout:
max_execution_time = args.timeout
if args.altrad:
alt_acceptance_radius = args.altrad
mission_failed = False
MAV_MODE_AUTO = 4
# start time counter
start_time = time.time()
elapsed_time = time.time() - start_time
# Connect to the Vehicle
print "Connecting"
vehicle = connect(connection_string, wait_ready=True)
while not vehicle.system_status.state == "STANDBY" or vehicle.gps_0.fix_type < 3:
if time.time() - start_time > 20:
print "FAILED: SITL did not reach standby with GPS fix within 20 seconds"
sys.exit(98)
print "Waiting for vehicle to initialise... %s " % vehicle.system_status.state
time.sleep(1)
# Display basic vehicle state
print " Type: %s" % vehicle._vehicle_type
print " Armed?: %s" % vehicle.armed
print " System status: %s" % vehicle.system_status.state
print " GPS: %s" % vehicle.gps_0
print " Alt: %s" % vehicle.location.global_relative_frame.alt
################################################################################################
# Functions
################################################################################################
def readmission(aFileName):
"""
Load a mission from a file into a list. The mission definition is in the Waypoint file
format (http://qgroundcontrol.org/mavlink/waypoint_protocol#waypoint_file_format).
This function is used by upload_mission().
"""
cmds = vehicle.commands
missionlist=[]
with open(aFileName) as f:
for i, line in enumerate(f):
if i==0:
if not line.startswith('QGC WPL 110'):
raise Exception('File is not supported WP version')
else:
linearray=line.split('\t')
ln_index=int(linearray[0])
ln_currentwp=int(linearray[1])
ln_frame=int(linearray[2])
ln_command=int(linearray[3])
ln_param1=float(linearray[4])
ln_param2=float(linearray[5])
ln_param3=float(linearray[6])
ln_param4=float(linearray[7])
ln_param5=float(linearray[8])
ln_param6=float(linearray[9])
ln_param7=float(linearray[10])
ln_autocontinue=int(linearray[11].strip())
cmd = Command( 0, 0, 0, ln_frame, ln_command, ln_currentwp, ln_autocontinue, ln_param1, ln_param2, ln_param3, ln_param4, ln_param5, ln_param6, ln_param7)
missionlist.append(cmd)
return missionlist
def upload_mission(aFileName):
"""
Upload a mission from a file.
"""
#Read mission from file
missionlist = readmission(aFileName)
#Clear existing mission from vehicle
cmds = vehicle.commands
cmds.clear()
#Add new mission to vehicle
for command in missionlist:
cmds.add(command)
print ' Uploaded mission with %s items' % len(missionlist)
vehicle.commands.upload()
return missionlist
def download_mission():
"""
Downloads the current mission and returns it in a list.
It is used in save_mission() to get the file information to save.
"""
print " Download mission from vehicle"
missionlist=[]
cmds = vehicle.commands
cmds.download()
cmds.wait_ready()
for cmd in cmds:
missionlist.append(cmd)
return missionlist
def save_mission(aFileName):
"""
Save a mission in the Waypoint file format
(http://qgroundcontrol.org/mavlink/waypoint_protocol#waypoint_file_format).
"""
print "\nSave mission from Vehicle to file: %s" % export_mission_filename
#Download mission from vehicle
missionlist = download_mission()
#Add file-format information
output='QGC WPL 110\n'
#Add home location as 0th waypoint
home = vehicle.home_location
output+="%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (0,1,0,16,0,0,0,0,home.lat,home.lon,home.alt,1)
#Add commands
for cmd in missionlist:
commandline="%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" % (cmd.seq,cmd.current,cmd.frame,cmd.command,cmd.param1,cmd.param2,cmd.param3,cmd.param4,cmd.x,cmd.y,cmd.z,cmd.autocontinue)
output+=commandline
with open(aFileName, 'w') as file_:
print " Write mission to file"
file_.write(output)
def printfile(aFileName):
"""
Print a mission file to demonstrate "round trip"
"""
print "\nMission file: %s" % aFileName
with open(aFileName) as f:
for line in f:
print ' %s' % line.strip()
################################################################################################
# Listeners
################################################################################################
current_sequence = -1
current_sequence_changed = False
current_landed_state = -1
home_position_set = False
#Create a message listener for mission sequence number
@vehicle.on_message('MISSION_CURRENT')
def listener(self, name, mission_current):
global current_sequence, current_sequence_changed
if (current_sequence <> mission_current.seq):
current_sequence = mission_current.seq;
current_sequence_changed = True
print 'current mission sequence: %s' % mission_current.seq
#Create a message listener for mission sequence number
@vehicle.on_message('EXTENDED_SYS_STATE')
def listener(self, name, extended_sys_state):
global current_landed_state
if (current_landed_state <> extended_sys_state.landed_state):
current_landed_state = extended_sys_state.landed_state;
#Create a message listener for home position fix
@vehicle.on_message('HOME_POSITION')
def listener(self, name, home_position):
global home_position_set
home_position_set = True
################################################################################################
# Start mission test
################################################################################################
while not home_position_set:
if time.time() - start_time > 30:
print "FAILED: getting home position 30 seconds"
sys.exit(98)
print "Waiting for home position..."
time.sleep(1)
#Upload mission from file
missionlist = upload_mission(import_mission_filename)
time.sleep(2)
# set mission mode the hard way
vehicle._master.mav.command_long_send(vehicle._master.target_system, vehicle._master.target_component,
mavutil.mavlink.MAV_CMD_DO_SET_MODE, 0,
MAV_MODE_AUTO,
0, 0, 0, 0, 0, 0)
time.sleep(1)
# Arm vehicle
vehicle.armed = True
while not vehicle.system_status.state == "ACTIVE":
if time.time() - start_time > 30:
print "FAILED: vehicle did not arm within 30 seconds"
sys.exit(98)
print "Waiting for vehicle to arm..."
time.sleep(1)
# Wait for completion of mission items
while (current_sequence < len(missionlist)-1 and elapsed_time < max_execution_time):
time.sleep(.2)
if current_sequence > 0 and current_sequence_changed:
if missionlist[current_sequence-1].z - alt_acceptance_radius > vehicle.location.global_relative_frame.alt or missionlist[current_sequence-1].z + alt_acceptance_radius < vehicle.location.global_relative_frame.alt:
print "waypoint %s out of bounds altitude %s gps altitude: %s" % (current_sequence, missionlist[current_sequence-1].z, vehicle.location.global_relative_frame.alt)
mission_failed = True
current_sequence_changed = False
elapsed_time = time.time() - start_time
if elapsed_time < max_execution_time:
print "Mission items have been executed"
# wait for the vehicle to have landed
while (current_landed_state != 1 and elapsed_time < max_execution_time):
time.sleep(1)
elapsed_time = time.time() - start_time
if elapsed_time < max_execution_time:
print "Vehicle has landed"
# Disarm vehicle
vehicle.armed = False
# count elapsed time
elapsed_time = time.time() - start_time
# Close vehicle object before exiting script
vehicle.close()
time.sleep(2)
# Validate time constraint
if elapsed_time <= max_execution_time and not mission_failed:
print "Mission succesful time elapsed %s" % elapsed_time
sys.exit(0)
if elapsed_time > max_execution_time:
print "Mission FAILED to execute within %s seconds" % max_execution_time
sys.exit(99)
if mission_failed:
print "Mission FAILED out of bounds"
sys.exit(100)
print "Mission FAILED something strange happened"
sys.exit(101)

View File

@ -1,9 +0,0 @@
QGC WPL 110
0 1 0 16 0 0 0 0 47.3979949951 8.54559612274 25.0 1
1 0 2 3000 4.0 0.0 0.0 0.0 47.3980331421 8.54578971863 25.0 1
2 0 3 16 0.0 0.0 -0.0 0.0 47.399269104 8.54557228088 25.0 1
3 0 3 16 0.0 0.0 -0.0 0.0 47.3992652893 8.54230213165 25.0 1
4 0 3 16 0.0 0.0 -0.0 0.0 47.3974761963 8.54239082336 25.0 1
5 0 3 16 0.0 0.0 -0.0 0.0 47.3976669312 8.54509449005 25.0 1
6 0 2 3000 3.0 0.0 0.0 0.0 47.3977851868 8.54526233673 25.0 1
7 0 3 21 25.0 0.0 -0.0 0.0 47.3979797363 8.54460906982 25.0 1

View File

@ -1,25 +0,0 @@
#!/bin/bash
if [[ "$#" < 2 ]]; then
echo "usage: adb_upload.sh SRC1 [SRC2 ...] DEST"
exit
fi
echo "Wait for device..."
adb wait-for-device
echo "Uploading..."
# Get last argument
for last; do true; done
# Go through source files and push them one by one.
i=0
for arg
do
if [[ $((i+1)) == "$#" ]]; then
break
fi
# echo "Pushing $arg to $last"
adb push $arg $last
((i+=1))
done

View File

@ -29,11 +29,12 @@ for fn in $(find src/examples \
src/modules/local_position_estimator \
src/modules/unit_test \
src/modules/systemlib \
src/lib/controllib \
src/modules/controllib \
-path './Build' -prune -o \
-path './mavlink' -prune -o \
-path './NuttX' -prune -o \
-path './src/lib/eigen' -prune -o \
-path './src/lib/mathlib/CMSIS' -prune -o \
-path './src/modules/uavcan/libuavcan' -prune -o \
-path './src/modules/attitude_estimator_ekf/codegen' -prune -o \
-path './src/modules/ekf_att_pos_estimator' -prune -o \

View File

@ -6,18 +6,24 @@
exit 0
}
if [ -f src/modules/uavcan/libuavcan/CMakeLists.txt ]
then
echo "Git submodule config valid."
else
git submodule update --init --recursive
fi
GITSTATUS=$(git status)
function check_git_submodule {
# The .git exists in a submodule if init and update have been done.
if [ -f $1"/.git" ] || [ -d $1"/.git" ];
then
if [ -d $1 ];
then
SUBMODULE_STATUS=$(git submodule summary "$1")
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
if ! [[ -z "$STATUSRETVAL" ]];
then
if [ -z "$STATUSRETVAL" ]; then
echo "Checked $1 submodule, correct version found"
else
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
echo ""
echo -e "Different commits:"
@ -27,8 +33,7 @@ then
echo -e " *******************************************************************************"
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
echo -e " * (performs \033[94mgit submodule sync --recursive\033[0m *"
echo -e " * and \033[94mgit submodule update --init --recursive\033[0m ) *"
echo -e " * (performs \033[94mgit submodule update --init --recursive\033[0m) *"
echo -e " *******************************************************************************"
echo ""
echo ""
@ -44,7 +49,6 @@ then
else
if [ "$user_cmd" == "u" ]
then
git submodule sync --recursive
git submodule update --init --recursive
echo "Submodule fixed, continuing build.."
else
@ -54,10 +58,7 @@ then
fi
fi
else
echo "REINITIALIZING GIT SUBMODULES"
echo "no git repo found in $1/.git"
git submodule sync --recursive;
git submodule update --init --recursive $1;
git submodule update --init --recursive;
fi
}
@ -69,14 +70,12 @@ check_git_submodule Tools/jMAVSim
check_git_submodule Tools/sitl_gazebo
check_git_submodule cmake/cmake_hexagon
check_git_submodule mavlink/include/mavlink/v1.0
check_git_submodule src/lib/DriverFramework
check_git_submodule src/lib/DriverFramework/cmake/cmake_hexagon
check_git_submodule src/lib/DriverFramework/cmake_hexagon
check_git_submodule src/lib/DriverFramework/dspal
check_git_submodule src/lib/dspal
check_git_submodule src/lib/ecl
check_git_submodule src/lib/matrix
check_git_submodule src/modules/uavcan/libuavcan
check_git_submodule unittests/googletest
check_git_submodule src/drivers/gps/devices
exit 0
exit 0

View File

@ -9,10 +9,6 @@ if [ "$ASTYLE_VER" != "$ASTYLE_VER_REQUIRED" ]; then
exit 1
fi
if [[ $# -eq 0 ]] ; then
exit 0
fi
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
astyle \
--options=$DIR/astylerc \

View File

@ -106,7 +106,6 @@ print("""
* Tool for listening to topics when running flight stack on linux.
*/
#include <drivers/drv_hrt.h>
#include <px4_middleware.h>
#include <px4_app.h>
#include <px4_config.h>
@ -126,14 +125,6 @@ print("""
#define PRId64 "lld"
#endif
static bool check_timeout(const hrt_abstime& time) {
if (hrt_elapsed_time(&time) > 2*1000*1000) {
printf("Waited for 2 seconds without a message. Giving up.\\n");
return true;
}
return false;
}
""")
for m in messages:
print("#include <uORB/topics/%s.h>" % m)
@ -164,14 +155,12 @@ for index,m in enumerate(messages[1:]):
print("\t\tmemset(&container, 0, sizeof(container));")
print("\t\tbool updated;")
print("\t\tunsigned i = 0;")
print("\t\thrt_abstime start_time = hrt_absolute_time();")
print("\t\twhile(i < num_msgs) {")
print("\t\t\torb_check(sub,&updated);")
print("\t\t\tif (i == 0) { updated = true; } else { usleep(500); }")
print("\t\t\tif (updated) {")
print("\t\t\tstart_time = hrt_absolute_time();")
print("\t\t\ti++;")
print("\t\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
print("\t\t\tif (updated) {")
print("\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
print("\t\t\torb_copy(ID,sub,&container);")
for item in message_elements[index+1]:
if item[0] == "float":
@ -214,10 +203,6 @@ for index,m in enumerate(messages[1:]):
print("\t\t\tprintf(\"%s: %%u\\n\",(unsigned)container.%s);" % (item[1], item[1]))
elif item[0] == "bool":
print("\t\t\tprintf(\"%s: %%s\\n\",container.%s ? \"True\" : \"False\");" % (item[1], item[1]))
print("\t\t\t} else {")
print("\t\t\t\tif (check_timeout(start_time)) {")
print("\t\t\t\t\tbreak;")
print("\t\t\t\t}")
print("\t\t\t}")
print("\t\t}")
print("\t} else {")

@ -1 +1 @@
Subproject commit 9155c8f955e05c969bcd932b705b98d98845f228
Subproject commit 218ffbb8cf584fa2d02dbbc1215ce85bc25a9f57

View File

@ -22,10 +22,6 @@ class XMLOutput():
xml_parameters = ET.Element("airframes")
xml_version = ET.SubElement(xml_parameters, "version")
xml_version.text = "1"
xml_version = ET.SubElement(xml_parameters, "airframe_version_major")
xml_version.text = "1"
xml_version = ET.SubElement(xml_parameters, "airframe_version_minor")
xml_version.text = "1"
last_param_name = ""
board_specific_param_set = False
for group in groups:

View File

@ -133,7 +133,7 @@ class SourceParser(object):
re_remove_dots = re.compile(r'\.+$')
re_remove_carriage_return = re.compile('\n+')
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "increment", "reboot_required", "value", "boolean"])
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "reboot_required", "value"])
# Order of parameter groups
priority = {
@ -144,7 +144,7 @@ class SourceParser(object):
def __init__(self):
self.param_groups = {}
def Parse(self, scope, contents):
def Parse(self, contents):
"""
Incrementally parse program contents and append all found parameters
to the list.
@ -241,7 +241,6 @@ class SourceParser(object):
if defval != "" and self.re_is_a_number.match(defval):
defval = self.re_cut_type_specifier.sub('', defval)
param = Parameter(name, tp, defval)
param.SetField("scope", scope)
param.SetField("short_desc", name)
# If comment was found before the parameter declaration,
# inject its data into the newly created parameter.

View File

@ -33,8 +33,6 @@ class SourceScanner(object):
Scans provided file and passes its contents to the parser using
parser.Parse method.
"""
prefix = ".." + os.path.sep + "src" + os.path.sep
scope = re.sub(prefix, '', os.path.dirname(os.path.relpath(path)))
with codecs.open(path, 'r', 'utf-8') as f:
try:
contents = f.read()
@ -42,4 +40,4 @@ class SourceScanner(object):
contents = ''
print('Failed reading file: %s, skipping content.' % path)
pass
return parser.Parse(scope, contents)
return parser.Parse(contents)

View File

@ -22,10 +22,6 @@ class XMLOutput():
xml_parameters = ET.Element("parameters")
xml_version = ET.SubElement(xml_parameters, "version")
xml_version.text = "3"
xml_version = ET.SubElement(xml_parameters, "parameter_version_major")
xml_version.text = "1"
xml_version = ET.SubElement(xml_parameters, "parameter_version_minor")
xml_version.text = "9"
importtree = ET.parse(inject_xml_file_name)
injectgroups = importtree.getroot().findall("group")
for igroup in injectgroups:

View File

@ -1,95 +1,12 @@
#!/usr/bin/env python
import xml.etree.ElementTree as ET
import os
import re
import codecs
class Scope(object):
"""
Single parameter group
"""
re_deep_lines = re.compile(r'.*\/.*\/')
def __init__(self, ):
self.scope = set()
def __str__(self):
return self.scope.__str__()
def Add(self, scope):
"""
Add Scope to set
"""
self.scope.add(scope)
def Has(self, scope):
"""
Check for existance
"""
if len(self.scope) == 0:
return True
# Anything in the form xxxxx/yyyyy/zzzzz....
# is treated as xxxxx/yyyyy
while (self.re_deep_lines.match(scope)):
scope = os.path.dirname(scope)
return scope in self.scope
class CMakeParser(object):
"""
Parses provided data and stores all found paths in scope.
"""
re_split_lines = re.compile(r'[\r\n]+')
re_comment = re.compile(r'^\#')
re_start = re.compile(r'set\s*\(\s*config_module_list')
re_end = re.compile(r'\)\s*')
def Parse(self, scope, contents):
"""
Incrementally parse cmake file contents and append all found path scope
to scope.
"""
# This code is essentially a comment-parsing grammar. "state"
# represents parser state. It contains human-readable state
# names.
state = None
for line in self.re_split_lines.split(contents):
line = line.strip()
# Ignore empty lines
if line == "":
continue
if self.re_comment.match(line):
continue
elif self.re_start.match(line):
state = "gather"
continue
elif state is not None and state == "gather":
if self.re_end.match(line):
return True
scope.Add(line)
return False
if len(os.sys.argv) < 2:
if len(os.sys.argv) != 2:
print("Error in %s" % os.sys.argv[0])
print("Usage: %s <parameters.xml> [cmake-file-scoping] " % os.sys.argv[0])
print("Usage: %s <parameters.xml>" % os.sys.argv[0])
raise SystemExit
scope = Scope()
if len(os.sys.argv) == 3:
with codecs.open(os.sys.argv[2], 'r', 'utf-8') as f:
try:
contents = f.read()
f.close()
parser = CMakeParser()
parser.Parse(scope, contents)
except:
contents = ''
print('Failed reading file: %s, skipping scoping.' % os.sys.argv[2])
pass
fp_header = open("px4_parameters.h", "w")
fp_src = open("px4_parameters.c", "w")
@ -113,19 +30,14 @@ end_name = ""
for group in root:
if group.tag == "group" and "no_code_generation" not in group.attrib:
section = """
header += """
/*****************************************************************
* %s
****************************************************************/""" % group.attrib["name"]
for param in group:
scope_ = param.find('scope').text
if not scope.Has(scope_):
continue
if not start_name:
start_name = param.attrib["name"]
end_name = param.attrib["name"]
header += section
section =""
header += """
const struct param_info_s __param__%s;""" % param.attrib["name"]
header += """
@ -151,14 +63,12 @@ struct px4_parameters_t px4_parameters = {
i=0
for group in root:
if group.tag == "group" and "no_code_generation" not in group.attrib:
section = """
src += """
/*****************************************************************
* %s
****************************************************************/""" % group.attrib["name"]
for param in group:
scope_ = param.find('scope').text
if not scope.Has(scope_):
continue
if not start_name:
start_name = param.attrib["name"]
end_name = param.attrib["name"]
@ -168,8 +78,6 @@ for group in root:
elif (param.attrib["type"] == "INT32"):
val_str = ".val.i = "
i+=1
src += section
section =""
src += """
{
"%s",
@ -189,5 +97,4 @@ __END_DECLS
fp_header.write(header)
fp_src.write(src)
fp_header.close()
fp_src.close()

View File

@ -108,7 +108,6 @@ if args.parameter_xml != None:
bytes = f.read()
desc['parameter_xml_size'] = len(bytes)
desc['parameter_xml'] = base64.b64encode(zlib.compress(bytes,9)).decode('utf-8')
desc['mav_autopilot'] = 12 # 12 = MAV_AUTOPILOT_PX4
if args.airframe_xml != None:
f = open(args.airframe_xml, "rb")
bytes = f.read()

View File

@ -71,7 +71,6 @@ def main():
const="",
metavar="BOARD",
help="Board to create airframes xml for")
parser.add_argument("-v", "--verbose", help="verbose output")
args = parser.parse_args()
# Check for valid command
@ -85,7 +84,7 @@ def main():
parser = srcparser.SourceParser()
# Scan directories, and parse the files
if args.verbose: print("Scanning source path " + args.airframes_path)
print("Scanning source path " + args.airframes_path)
if not scanner.ScanDir(args.airframes_path, parser):
sys.exit(1)
# We can't validate yet
@ -95,16 +94,16 @@ def main():
# Output to XML file
if args.xml:
if args.verbose: print("Creating XML file " + args.xml)
print("Creating XML file " + args.xml)
out = xmlout.XMLOutput(param_groups, args.board)
out.Save(args.xml)
if args.start_script:
if args.verbose: print("Creating start script " + args.start_script)
print("Creating start script " + args.start_script)
out = rcout.RCOutput(param_groups, args.board)
out.Save(args.start_script)
if (args.verbose): print("All done!")
print("All done!")
if __name__ == "__main__":

View File

@ -107,7 +107,6 @@ def main():
metavar="SUMMARY",
default="Automagically updated parameter documentation from code.",
help="DokuWiki page edit summary")
parser.add_argument("-v", "--verbose", help="verbose output")
args = parser.parse_args()
# Check for valid command
@ -121,7 +120,7 @@ def main():
parser = srcparser.SourceParser()
# Scan directories, and parse the files
if (args.verbose): print("Scanning source path " + args.src_path)
print("Scanning source path " + args.src_path)
if not scanner.ScanDir(args.src_path, parser):
sys.exit(1)
if not parser.Validate():
@ -130,7 +129,7 @@ def main():
# Output to XML file
if args.xml:
if args.verbose: print("Creating XML file " + args.xml)
print("Creating XML file " + args.xml)
out = xmlout.XMLOutput(param_groups, args.board, os.path.join(args.src_path, args.inject_xml))
out.Save(args.xml)
@ -148,7 +147,7 @@ def main():
else:
print("Error: You need to specify DokuWiki XML-RPC username and password!")
#print("All done!")
print("All done!")
if __name__ == "__main__":

View File

@ -53,7 +53,7 @@ def main():
help="ROMFS scratch folder.")
args = parser.parse_args()
#print("Pruning ROMFS files.")
print("Pruning ROMFS files.")
# go through
for (root, dirs, files) in os.walk(args.folder):

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
make px4fmu-v2_default
cp build_px4fmu-v2_default/parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
cp build_px4fmu-v2_default/airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml

View File

@ -1,187 +0,0 @@
#!/usr/bin/env python
#
# __geotagging__
# Tag the images recorded during a flight with geo location extracted from
# a PX4 log file.
#
# This file accepts *.jpg format images and reads position information
# from a *.px4log file
#
# Example Syntax:
# python geotagging.py --logfile=log001.px4log --input=images/
# --output=imagesWithTag/
#
# Author: Andreas Bircher, Wingtra, http://wingtra.com, in 2016
#
import glob
import os
import pyexiv2
import fractions
from PIL import Image
from PIL.ExifTags import TAGS
import sys
from shutil import copyfile
from optparse import OptionParser
from numpy import genfromtxt
import shutil
import csv
class TriggerList( object ):
def __init__( self ):
self.CAMT_seq = []
self.CAMT_timestamp = []
self.GPOS_Lat = []
self.GPOS_Lon = []
self.GPOS_Alt = []
class ImageList( object ):
def __init__( self ):
self.jpg = []
self.raw = []
def to_degree(value, loc):
if value < 0:
loc_value = loc[0]
elif value > 0:
loc_value = loc[1]
else:
loc_value = ""
absolute_value = abs(value)
deg = int(absolute_value)
t1 = (absolute_value-deg)*60
min = int(t1)
sec = round((t1 - min)* 60, 5)
return (deg, min, sec, loc_value)
def SetGpsLocation(file_name, lat, lng, alt):
"""
Adding GPS tag
"""
lat_deg = to_degree(lat, ["S", "N"])
lng_deg = to_degree(lng, ["W", "E"])
exiv_lat = (pyexiv2.Rational(lat_deg[0] * 60 + lat_deg[1], 60), pyexiv2.Rational(lat_deg[2] * 100, 6000), pyexiv2.Rational(0, 1))
exiv_lng = (pyexiv2.Rational(lng_deg[0] * 60 + lng_deg[1], 60), pyexiv2.Rational(lng_deg[2] * 100, 6000), pyexiv2.Rational(0, 1))
exiv_image = pyexiv2.ImageMetadata(file_name)
exiv_image.read()
exiv_image["Exif.GPSInfo.GPSLatitude"] = exiv_lat
exiv_image["Exif.GPSInfo.GPSLatitudeRef"] = lat_deg[3]
exiv_image["Exif.GPSInfo.GPSLongitude"] = exiv_lng
exiv_image["Exif.GPSInfo.GPSLongitudeRef"] = lng_deg[3]
exiv_image["Exif.GPSInfo.GPSAltitude"] = pyexiv2.Rational(alt, 1)
exiv_image["Exif.GPSInfo.GPSAltitudeRef"] = '0'
exiv_image["Exif.Image.GPSTag"] = 654
exiv_image["Exif.GPSInfo.GPSMapDatum"] = "WGS-84"
exiv_image["Exif.GPSInfo.GPSVersionID"] = '2 0 0 0'
exiv_image.write(True)
def LoadPX4log(px4_log_file):
"""
load px4 log file and extract trigger locations
"""
os.system('python sdlog2_dump.py ' + px4_log_file + ' -f log.csv')
f = open('log.csv', 'rb')
reader = csv.reader(f)
headers = reader.next()
line = {}
for h in headers:
line[h] = []
for row in reader:
for h, v in zip(headers, row):
line[h].append(v)
trigger_list = TriggerList()
for seq in range(0, len(line['CAMT_seq']) - 1):
if line['CAMT_seq'][seq] != line['CAMT_seq'][seq + 1]:
trigger_list.CAMT_seq.append(line['CAMT_seq'][seq + 1])
trigger_list.CAMT_timestamp.append(line['CAMT_timestamp'][seq + 1])
trigger_list.GPOS_Lat.append(line['GPOS_Lat'][seq + 1])
trigger_list.GPOS_Lon.append(line['GPOS_Lon'][seq + 1])
trigger_list.GPOS_Alt.append(line['GPOS_Alt'][seq + 1])
return trigger_list
def LoadImageList(input_folder):
"""
load the image list
"""
image_list = ImageList()
for jpg_image in glob.glob(input_folder + "/*.jpg"):
image_list.jpg.append(jpg_image)
for jpg_image in glob.glob(input_folder + "/*.JPG"):
image_list.jpg.append(jpg_image)
for raw_image in glob.glob(input_folder + "/*.RC"):
image_list.raw.append(raw_image)
if len(image_list.jpg) != len(image_list.raw) and len(image_list.jpg) * len(image_list.raw) != 0:
print("Unequal number of jpg and raw images")
if len(image_list.jpg) == 0 and len(image_list.raw) == 0:
print("No images found")
image_list.jpg = sorted(image_list.jpg)
image_list.raw = sorted(image_list.raw)
return image_list
def FilterTrigger(trigger_list, image_list):
"""
filter triggers to allow exact matching with recorded images
"""
if len(image_list.jpg) != len(trigger_list.CAMT_seq) and len(image_list.raw) != len(trigger_list.CAMT_seq):
# filter trigger list to match the number of pics
print("No trigger filter implemented yet.")
return trigger_list
def TagImages(trigger_list, image_list, output_folder):
"""
load px4 log file and extract trigger locations
"""
for image in range(len(image_list.jpg)):
base_path, filename = os.path.split(image_list.jpg[image])
copyfile(image_list.jpg[image], output_folder + "/" + filename)
SetGpsLocation(output_folder + "/" + filename, float(trigger_list.GPOS_Lat[image]), float(trigger_list.GPOS_Lon[image]), float(trigger_list.GPOS_Alt[image]))
for image in range(len(image_list.raw)):
base_path, filename = os.path.split(image_list.raw[image])
copyfile(image_list.raw[image], output_folder + "/" + filename)
SetGpsLocation(output_folder + "/" + filename, float(trigger_list.GPOS_Lat[image]), float(trigger_list.GPOS_Lon[image]), float(trigger_list.GPOS_Alt[image]))
def main():
"""
Main method
"""
parser = OptionParser()
parser.add_option("-l", "--logfile", dest = "LogFile",
help = "PX4 log file containing recorded positions",
metavar = "string")
parser.add_option("-i", "--input", dest = "InputFolder",
help = "Input folder containing untagged images in alphabetical order",
type = "string")
parser.add_option("-o", "--output", dest = "OutputFolder",
help = "Output folder to contain tagged images",
type = "string")
(options, args) = parser.parse_args()
if not options.LogFile:
print "please type python " \
"geotagging.py --logfile=[filename] --intput=[folder] [--output=[folder]]"
elif not options.InputFolder:
print "please type python " \
"geotagging.py --logfile=[filename] --intput=[folder] [--output=[folder]]s"
else:
trigger_list = LoadPX4log(options.LogFile)
image_list = LoadImageList(options.InputFolder)
if not options.OutputFolder:
options.OutputFolder = "imagesWithTag"
if not os.path.exists(options.OutputFolder):
os.makedirs(options.OutputFolder)
trigger_list = FilterTrigger(trigger_list, image_list)
TagImages(trigger_list, image_list, options.OutputFolder)
if __name__ == "__main__":
main()

View File

@ -48,7 +48,6 @@ class SDLog2Parser:
"i": ("i", None),
"I": ("I", None),
"f": ("f", None),
"d": ("d", None),
"n": ("4s", None),
"N": ("16s", None),
"Z": ("64s", None),

@ -1 +1 @@
Subproject commit 9353834b2f89d08beaa055fc97321e1871bc2b3a
Subproject commit b28258f1ac0d66eddb2c8682b8bad3586c6c855e

View File

@ -14,10 +14,6 @@ echo program: $program
echo model: $model
echo build_path: $build_path
mkdir -p $build_path/src/firmware/posix/rootfs/fs/microsd
mkdir -p $build_path/src/firmware/posix/rootfs/eeprom
touch $build_path/src/firmware/posix/rootfs/eeprom/parameters
if [ "$chroot" == "1" ]
then
chroot_enabled=-c
@ -33,7 +29,7 @@ then
model="iris"
fi
if [ "$#" -lt 5 ]
if [ "$#" != 5 ]
then
echo usage: sitl_run.sh rc_script debugger program model build_path
echo ""
@ -52,7 +48,6 @@ fi
set -e
cd $build_path/..
cp Tools/posix_lldbinit $build_path/src/firmware/posix/.lldbinit
cp Tools/posix.gdbinit $build_path/src/firmware/posix/.gdbinit
@ -61,11 +56,9 @@ SIM_PID=0
if [ "$program" == "jmavsim" ] && [ "$no_sim" == "" ]
then
cd Tools/jMAVSim
ant create_run_jar copy_res
cd out/production
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560 &
ant
java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp 127.0.0.1:14560 &
SIM_PID=`echo $!`
cd ../..
elif [ "$program" == "gazebo" ] && [ "$no_sim" == "" ]
then
if [ -x "$(command -v gazebo)" ]
@ -81,7 +74,6 @@ then
cd Tools/sitl_gazebo/Build
cmake -Wno-dev ..
make -j4
make sdf
gzserver --verbose ../worlds/${model}.world &
SIM_PID=`echo $!`
gzclient --verbose &
@ -90,24 +82,11 @@ then
echo "You need to have gazebo simulator installed!"
exit 1
fi
elif [ "$program" == "replay" ] && [ "$no_sim" == "" ]
then
echo "Replaying logfile: $logfile"
# This is not a simulator, but a log file to replay
# Check if we need to creat a param file to allow user to change parameters
if ! [ -f "${build_path}/src/firmware/posix/rootfs/replay_params.txt" ]
then
touch ${build_path}/src/firmware/posix/rootfs/replay_params.txt
fi
fi
cd $build_path/src/firmware/posix
if [ "$logfile" != "" ]
then
cp $logfile rootfs/replay.px4log
fi
mkdir -p rootfs/fs/microsd
mkdir -p rootfs/eeprom
touch rootfs/eeprom/parameters
# Do not exit on failure now from here on because we want the complete cleanup
set +e

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
EXEDIR=`pwd`
BASEDIR=$(dirname $0)

@ -1 +1 @@
Subproject commit 77d487dc076a8519f81a335a5e4a2040799790de
Subproject commit 829f22eff345c934ca8939b2385768ca5e33794c

View File

@ -90,7 +90,7 @@ include(CMakeParseArguments)
# endfunction()
#
# test(NAME "hello" LIST a b c)
#
#
# OUTPUT:
# name: hello
# list: a b c
@ -138,11 +138,15 @@ function(px4_add_git_submodule)
string(REPLACE "/" "_" NAME ${PATH})
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git submodule update --init --recursive ${PATH}
COMMAND touch ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
DEPENDS ${CMAKE_SOURCE_DIR}/.gitmodules
)
add_custom_target(${TARGET}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# This is NOT a good approach as it overwrites checked out branches
# behind the back of a developer
#COMMAND git submodule update --recursive ${PATH}
DEPENDS ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
)
endfunction()
@ -225,9 +229,7 @@ endfunction()
# Usage:
# px4_add_module(MODULE <string>
# [ MAIN <string> ]
# [ STACK <string> ] !!!!!DEPRECATED, USE STACK_MAIN INSTEAD!!!!!!!!!
# [ STACK_MAIN <string> ]
# [ STACK_MAX <string> ]
# [ STACK <string> ]
# [ COMPILE_FLAGS <list> ]
# [ INCLUDES <list> ]
# [ DEPENDS <string> ]
@ -236,9 +238,7 @@ endfunction()
# Input:
# MODULE : unique name of module
# MAIN : entry point, if not given, assumed to be library
# STACK : deprecated use stack main instead
# STACK_MAIN : size of stack for main function
# STACK_MAX : maximum stack size of any frame
# STACK : size of stack
# COMPILE_FLAGS : compile flags
# LINK_FLAGS : link flags
# SRCS : source files
@ -252,7 +252,7 @@ endfunction()
# px4_add_module(MODULE test
# SRCS
# file.cpp
# STACK_MAIN 1024
# STACK 1024
# DEPENDS
# git_nuttx
# )
@ -261,43 +261,15 @@ function(px4_add_module)
px4_parse_function_args(
NAME px4_add_module
ONE_VALUE MODULE MAIN STACK STACK_MAIN STACK_MAX PRIORITY
ONE_VALUE MODULE MAIN STACK PRIORITY
MULTI_VALUE COMPILE_FLAGS LINK_FLAGS SRCS INCLUDES DEPENDS
REQUIRED MODULE
ARGN ${ARGN})
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
# set defaults if not set
set(MAIN_DEFAULT MAIN-NOTFOUND)
set(STACK_MAIN_DEFAULT 1024)
set(PRIORITY_DEFAULT SCHED_PRIORITY_DEFAULT)
# default stack max to stack main
if(NOT STACK_MAIN AND STACK)
set(STACK_MAIN ${STACK})
message(AUTHOR_WARNING "STACK deprecated, USE STACK_MAIN instead!!!!!!!!!!!!")
endif()
foreach(property MAIN STACK_MAIN PRIORITY)
if(NOT ${property})
set(${property} ${${property}_DEFAULT})
endif()
set_target_properties(${MODULE} PROPERTIES ${property}
${${property}})
endforeach()
# default stack max to stack main
if(NOT STACK_MAX)
set(STACK_MAX ${STACK_MAIN})
endif()
set_target_properties(${MODULE} PROPERTIES STACK_MAX
${STACK_MAX})
if(${OS} STREQUAL "qurt" )
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
elseif(${OS} STREQUAL "nuttx" )
list(APPEND COMPILE_FLAGS -Wframe-larger-than=${STACK_MAX})
endif()
if(MAIN)
@ -322,8 +294,8 @@ function(px4_add_module)
# store module properties in target
# COMPILE_FLAGS and LINK_FLAGS are passed to compiler/linker by cmake
# STACK_MAIN, MAIN, PRIORITY are PX4 specific
foreach (prop COMPILE_FLAGS LINK_FLAGS STACK_MAIN MAIN PRIORITY)
# STACK, MAIN, PRIORITY are PX4 specific
foreach (prop COMPILE_FLAGS LINK_FLAGS STACK MAIN PRIORITY)
if (${prop})
set_target_properties(${MODULE} PROPERTIES ${prop} ${${prop}})
endif()
@ -377,11 +349,11 @@ function(px4_generate_messages)
list(APPEND msg_files_out ${msg_out_path}/${msg}.h)
endforeach()
add_custom_command(OUTPUT ${msg_files_out}
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${PYTHON_EXECUTABLE}
Tools/px_generate_uorb_topic_headers.py
${QUIET}
-d msg
-o ${msg_out_path}
-o ${msg_out_path}
-e msg/templates/uorb
-t ${CMAKE_BINARY_DIR}/topics_temporary
DEPENDS ${DEPENDS} ${MSG_FILES}
@ -398,11 +370,11 @@ function(px4_generate_messages)
list(APPEND msg_multi_files_out ${msg_multi_out_path}/px4_${msg}.h)
endforeach()
add_custom_command(OUTPUT ${msg_multi_files_out}
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${PYTHON_EXECUTABLE}
Tools/px_generate_uorb_topic_headers.py
${QUIET}
-d msg
-o ${msg_multi_out_path}
-o ${msg_multi_out_path}
-e msg/templates/px4/uorb
-t ${CMAKE_BINARY_DIR}/multi_topics_temporary/${OS}
-p "px4_"
@ -471,26 +443,6 @@ function(px4_add_upload)
)
endfunction()
function(px4_add_adb_push)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
#=============================================================================
#
# px4_add_common_flags
@ -540,10 +492,9 @@ function(px4_add_common_flags)
set(warnings
-Wall
-Werror
-Wextra
-Wpacked
-Wno-sign-compare
-Wshadow
-Wextra
#-Wshadow # very verbose due to eigen
-Wfloat-equal
-Wpointer-arith
-Wmissing-declarations
@ -563,11 +514,14 @@ function(px4_add_common_flags)
# but generates too many false positives
)
if (${OS} STREQUAL "nuttx")
list(APPEND warnings -Wframe-larger-than=1024)
endif()
if (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")
# QuRT 6.4.X compiler identifies as Clang but does not support this option
if (NOT ${OS} STREQUAL "qurt")
list(APPEND warnings
-Qunused-arguments
-Wno-unused-const-variable
-Wno-varargs
)
@ -596,16 +550,12 @@ function(px4_add_common_flags)
else()
set(max_optimization -Os)
if ("${OS}" STREQUAL "qurt")
set(PIC_FLAG -fPIC)
endif()
set(optimization_flags
-fno-strict-aliasing
-fomit-frame-pointer
-funsafe-math-optimizations
-ffunction-sections
-fdata-sections
${PIC_FLAG}
)
endif()
@ -650,15 +600,6 @@ function(px4_add_common_flags)
-D__CUSTOM_FILE_IO__
)
if (NOT (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*"))
# -fcheck-new is a no-op for Clang in general
# and has no effect, but can generate a compile
# error for some OS
list(APPEND cxx_compile_flags
-fcheck-new
)
endif()
set(visibility_flags
-fvisibility=hidden
-include visibility.h
@ -712,11 +653,14 @@ function(px4_add_common_flags)
-DCONFIG_ARCH_BOARD_${board_config}
)
if (NOT (APPLE AND (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")))
set(added_exe_linker_flags
if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")
set(added_exe_link_flags
-Wl,--warn-common
-Wl,--gc-sections
#,--print-gc-sections
)
else()
set(added_exe_link_flags
-Wl,--warn-common
)
endif()
@ -741,7 +685,7 @@ endfunction()
# Input:
# dirname : path to module dir
#
# Output:
# Output:
# newname : module name
#
# Example:
@ -772,23 +716,16 @@ endfunction()
function(px4_create_git_hash_header)
px4_parse_function_args(
NAME px4_create_git_hash_header
ONE_VALUE HEADER
REQUIRED HEADER
ONE_VALUE HEADER
REQUIRED HEADER
ARGN ${ARGN})
execute_process(
COMMAND git describe --tags
OUTPUT_VARIABLE git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
#message(STATUS "GIT_TAG = ${git_tag}")
execute_process(
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE git_desc
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
#message(STATUS "GIT_DESC = ${git_desc}")
message(STATUS "GIT_DESC = ${git_desc}")
set(git_desc_short)
string(SUBSTRING ${git_desc} 1 16 git_desc_short)
configure_file(${CMAKE_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
@ -837,23 +774,22 @@ endfunction()
# Generates a source file with all parameters.
#
# Usage:
# px4_generate_parameters_source(OUT <list-source-files> XML <param-xml-file> [SCOPE <cmake file for scoping>])
# px4_generate_parameters_source(OUT <list-source-files> XML <param-xml-file>)
#
# Input:
# XML : the parameters.xml file
# SCOPE : the cmake file used to limit scope of the paramaters
# DEPS : target dependencies
# XML : the parameters.xml file
# DEPS : target dependencies
#
# Output:
# OUT : the generated source files
#
# Example:
# px4_generate_parameters_source(OUT param_files XML parameters.xml SCOPE ${OS}_${BOARD}_${LABEL}.cmake )
# px4_generate_parameters_source(OUT param_files XML parameters.xml)
#
function(px4_generate_parameters_source)
px4_parse_function_args(
NAME px4_generate_parameters_source
ONE_VALUE OUT XML SCOPE DEPS
ONE_VALUE OUT XML DEPS
REQUIRED OUT XML
ARGN ${ARGN})
set(generated_files
@ -861,12 +797,9 @@ function(px4_generate_parameters_source)
${CMAKE_CURRENT_BINARY_DIR}/px4_parameters.c)
set_source_files_properties(${generated_files}
PROPERTIES GENERATED TRUE)
if ("${config_generate_parameters_scope}" STREQUAL "ALL")
set(SCOPE "")
endif()
add_custom_command(OUTPUT ${generated_files}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_generate_params.py ${XML} ${SCOPE}
DEPENDS ${XML} ${DEPS} ${SCOPE}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_generate_params.py ${XML}
DEPENDS ${XML} ${DEPS}
)
set(${OUT} ${generated_files} PARENT_SCOPE)
endfunction()

View File

@ -1,199 +0,0 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_uavcan_num_ifaces 2)
set(config_module_list
#
# Board support modules
#
drivers/device
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/led
drivers/px4fmu
#drivers/px4io
drivers/test_ppm
drivers/boards/mindpx-v2
#drivers/rgbled
drivers/rgbled_pwm
#drivers/mpu6000
#drivers/mpu6050
drivers/mpu6500
#drivers/mpu9250
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
#drivers/mb12xx
#drivers/srf02
drivers/srf02_i2c
drivers/hc_sr04
#drivers/sf0x
#drivers/ll40ls
#drivers/trone
drivers/gps
drivers/pwm_out_sim
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/meas_airspeed
drivers/frsky_telemetry
modules/sensors
#drivers/mkblctrl
drivers/px4flow
#drivers/oreoled
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
#
# System commands
#
systemcmds/bl_update
systemcmds/mixer
systemcmds/param
systemcmds/perf
systemcmds/pwm
systemcmds/esc_calib
systemcmds/reboot
#systemcmds/topic_listener
systemcmds/top
systemcmds/config
systemcmds/nshterm
systemcmds/mtd
systemcmds/dumpfile
systemcmds/ver
#
# General system control
#
modules/commander
modules/navigator
modules/mavlink
modules/gpio_led
modules/uavcan
modules/land_detector
#
# Estimation modules (EKF/ SO3 / other filters)
#
# Too high RAM usage due to static allocations
# modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
#
# Vehicle Control
#
# modules/segway # XXX Needs GCC 4.7 fix
modules/fw_pos_control_l1
modules/fw_att_control
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control
#
# Logging
#
modules/sdlog2
#
# Library modules
#
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/dataman
#
# Libraries
#
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/ecl
lib/external_lgpl
lib/geo
lib/geo_lookup
lib/conversion
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
#
#modules/bottle_drop
#
# Rover apps
#
examples/rover_steering_control
#
# Demo apps
#
#examples/math_demo
# Tutorial code from
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug
# Tutorial code from
# https://px4.io/dev/example_fixedwing_control
#examples/fixedwing_control
# Hardware test
#examples/hwtest
)
set(config_extra_builtin_cmds
serdis
sercon
)
set(config_io_board
px4io-v2
)
set(config_extra_libs
uavcan
uavcan_stm32_driver
)
set(config_io_extra_libs
)
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon" STACK_MAIN "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis" STACK_MAIN "2048")

View File

@ -30,20 +30,19 @@ set(config_module_list
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
#
# Libraries
#
#lib/mathlib/CMSIS
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/ecl
lib/external_lgpl
lib/geo
lib/conversion
lib/DriverFramework/framework
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
@ -81,12 +80,8 @@ set(config_extra_builtin_cmds
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon"
STACK_MAIN "2048")
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis"
STACK_MAIN "2048")
MAIN "serdis" STACK "2048")

View File

@ -36,8 +36,7 @@ set(config_module_list
drivers/meas_airspeed
drivers/frsky_telemetry
modules/sensors
drivers/camera_trigger
drivers/mkblctrl
#drivers/mkblctrl
drivers/px4flow
#
@ -97,13 +96,14 @@ set(config_module_list
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
modules/dataman
#
# Libraries
#
lib/controllib
#lib/mathlib/CMSIS
lib/mathlib
lib/mathlib/math/filter
lib/ecl
@ -115,7 +115,6 @@ set(config_module_list
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
@ -166,19 +165,17 @@ set(config_io_board
)
set(config_extra_libs
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM4lf_math.a
)
set(config_io_extra_libs
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
)
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon"
STACK_MAIN "2048")
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis"
STACK_MAIN "2048")
MAIN "serdis" STACK "2048")

View File

@ -41,14 +41,11 @@ set(config_module_list
modules/sensors
#drivers/mkblctrl
drivers/px4flow
#drivers/oreoled
drivers/oreoled
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
drivers/lis3mdl
drivers/bmi160
#
# System commands
@ -81,10 +78,11 @@ set(config_module_list
#
# Estimation modules (EKF/ SO3 / other filters)
#
# Too high RAM usage due to static allocations
# modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/local_position_estimator
#
# Vehicle Control
@ -107,13 +105,14 @@ set(config_module_list
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
modules/dataman
#
# Libraries
#
lib/controllib
#lib/mathlib/CMSIS
lib/mathlib
lib/mathlib/math/filter
lib/ecl
@ -125,7 +124,6 @@ set(config_module_list
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
@ -140,7 +138,7 @@ set(config_module_list
#
# Rover apps
#
#examples/rover_steering_control
examples/rover_steering_control
#
# Demo apps
@ -176,19 +174,19 @@ set(config_io_board
)
set(config_extra_libs
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM4lf_math.a
uavcan
uavcan_stm32_driver
)
set(config_io_extra_libs
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
)
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon" STACK_MAIN "2048")
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis" STACK_MAIN "2048")
MAIN "serdis" STACK "2048")

View File

@ -105,13 +105,14 @@ set(config_module_list
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
modules/dataman
#
# Libraries
#
lib/controllib
#lib/mathlib/CMSIS
lib/mathlib
lib/mathlib/math/filter
lib/ecl
@ -123,7 +124,6 @@ set(config_module_list
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
@ -174,19 +174,19 @@ set(config_io_board
)
set(config_extra_libs
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM4lf_math.a
uavcan
uavcan_stm32_driver
)
set(config_io_extra_libs
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
)
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon" STACK_MAIN "2048")
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis" STACK_MAIN "2048")
MAIN "serdis" STACK "2048")

View File

@ -0,0 +1,5 @@
include(cmake/configs/nuttx_px4fmu-v2_default.cmake)
list(APPEND config_module_list
modules/local_position_estimator
)

View File

@ -43,8 +43,6 @@ set(config_module_list
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
drivers/lis3mdl
#
# System commands
@ -106,13 +104,14 @@ set(config_module_list
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
modules/dataman
#
# Libraries
#
lib/controllib
#lib/mathlib/CMSIS
lib/mathlib
lib/mathlib/math/filter
lib/rc
@ -125,7 +124,6 @@ set(config_module_list
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
@ -172,21 +170,19 @@ set(config_extra_builtin_cmds
)
set(config_extra_libs
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM4lf_math.a
uavcan
uavcan_stm32_driver
)
set(config_io_extra_libs
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
)
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon"
STACK_MAIN "2048")
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis"
STACK_MAIN "2048")
MAIN "serdis" STACK "2048")

View File

@ -1,17 +1,50 @@
# The Eagle board is the first generation Snapdragon Flight board by Qualcomm.
#
# This cmake config builds for POSIX, so the part of the flight stack running
# on the Linux side of the Snapdragon.
include(configs/posix_sdflight_default)
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_module_list
drivers/device
drivers/blinkm
drivers/pwm_out_sim
drivers/rgbled
drivers/led
drivers/boards/sitl
set(CONFIG_SHMEM "1")
systemcmds/param
systemcmds/mixer
systemcmds/ver
modules/mavlink
modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/mc_pos_control
modules/mc_att_control
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/sensors
modules/dataman
modules/sdlog2
modules/simulator
modules/commander
modules/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/geo
lib/geo_lookup
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)
# This definition allows to differentiate if this just the usual POSIX build
# or if it is for the Snapdragon.
add_definitions(
-D__PX4_POSIX_EAGLE
)

View File

@ -1,7 +1,5 @@
include(posix/px4_impl_posix)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
# Use build stubs unless explicitly set not to
if("${DSPAL_STUBS_ENABLE}" STREQUAL "")
set(DSPAL_STUBS_ENABLE "1")
@ -9,8 +7,6 @@ endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(config_generate_parameters_scope ALL)
set(config_module_list
drivers/device
drivers/boards/sitl
@ -35,7 +31,6 @@ set(config_module_list
lib/geo
lib/geo_lookup
lib/conversion
lib/DriverFramework/framework
platforms/common
platforms/posix/px4_layer

View File

@ -1,66 +0,0 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
set(CONFIG_SHMEM "1")
# This definition allows to differentiate if this just the usual POSIX build
# or if it is for the Snapdragon.
add_definitions(
-D__PX4_POSIX_EAGLE
-D__USING_SNAPDRAGON_LEGACY_DRIVER
)
set(config_module_list
drivers/device
drivers/blinkm
drivers/pwm_out_sim
drivers/rgbled
drivers/led
drivers/boards/sitl
drivers/qshell/posix
systemcmds/param
systemcmds/mixer
systemcmds/ver
systemcmds/topic_listener
modules/mavlink
modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/mc_pos_control
modules/mc_att_control
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/muorb/krait
modules/sensors
modules/dataman
modules/sdlog2
modules/simulator
modules/commander
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/geo
lib/geo_lookup
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)

View File

@ -1,18 +1,12 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
set(CMAKE_TOOLCHAIN_FILE cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(config_module_list
drivers/device
modules/uORB
lib/DriverFramework/framework
platforms/posix/px4_layer
platforms/posix/work_queue

View File

@ -0,0 +1,44 @@
include(posix/px4_impl_posix)
# Use build stubs unless explicitly set not to
if("${DSPAL_STUBS_ENABLE}" STREQUAL "")
set(DSPAL_STUBS_ENABLE "1")
endif()
if ("${QRL_SDK_DIR}" STREQUAL "")
set(QRL_SDK_DIR /opt/qrlsdk)
endif()
set(CMAKE_PROGRAM_PATH
"${QRL_SDK_DIR}/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin"
${CMAKE_PROGRAM_PATH}
)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(config_module_list
drivers/device
systemcmds/param
systemcmds/ver
modules/mavlink
modules/param
modules/systemlib
modules/uORB
modules/dataman
lib/mathlib
lib/mathlib/math/filter
lib/geo
lib/geo_lookup
lib/conversion
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
modules/muorb/krait
)

View File

@ -1,10 +0,0 @@
# Excelsior is the code name of a board currently in development.
#
# This cmake config builds for POSIX, so the part of the flight stack running
# on the Linux side of the Snapdragon.
include(configs/posix_sdflight_default)
# This definition allows to differentiate the specific board.
add_definitions(
-D__PX4_POSIX_EXCELSIOR
)

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