mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-14 01:20:04 +08:00
Compare commits
324 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 401af28b38 | |||
| 7ea41491e5 | |||
| 0db264bc79 | |||
| 415e42f5de | |||
| 0910cb3256 | |||
| e663b60c69 | |||
| be1db2ced5 | |||
| 4ab39725dd | |||
| c77a2acb93 | |||
| c0e88e262c | |||
| c0bc721778 | |||
| b26fc1f089 | |||
| 9fb29d3a38 | |||
| 5bd4495a78 | |||
| c7767dfe7e | |||
| 5a93e68918 | |||
| ab1bbb9ed8 | |||
| 4d7fe08069 | |||
| 5d588d98be | |||
| df5cb5472d | |||
| ecbcfe838b | |||
| ab71af6053 | |||
| 4952d05652 | |||
| 32626b57a4 | |||
| 47207b8fc8 | |||
| 5cf78cd450 | |||
| e0bbbd356f | |||
| 3d185e18e9 | |||
| eb36eac137 | |||
| 9eecca6a71 | |||
| 425169921c | |||
| ca2e9e7be1 | |||
| 72156d9cd6 | |||
| 71a3e3713c | |||
| 434ce85937 | |||
| 02030d9b36 | |||
| 0f3878a48a | |||
| af42f454f7 | |||
| 05b23a8b54 | |||
| 0d1872f223 | |||
| 5fb6c75a2a | |||
| f2e7d5ca77 | |||
| 2dab23ba04 | |||
| 960a233fe9 | |||
| ee71a0d761 | |||
| dd58dcfb91 | |||
| 67bba2065e | |||
| 4437727b97 | |||
| 30a86f4b79 | |||
| 0f78c28aca | |||
| 3e27189026 | |||
| 9f4e6e3208 | |||
| 1772cbe5e0 | |||
| a2758eadb6 | |||
| 181cbd383c | |||
| 2c786e21f4 | |||
| e1ce681960 | |||
| e21062c6db | |||
| 7d7333cdea | |||
| e9dd2aec48 | |||
| 365ef883e3 | |||
| c40c91bedc | |||
| 21b99b408c | |||
| 79e7059eaf | |||
| f99d052582 | |||
| 78f9bb79f1 | |||
| ed081ef60b | |||
| 47786c8585 | |||
| 3dc4411592 | |||
| 1742cce6f6 | |||
| 6e1bf506ad | |||
| 41abe9221e | |||
| d5c6fde5bc | |||
| 70e7f1bec6 | |||
| 07973bf87a | |||
| c341f94e5d | |||
| b97b3c68cb | |||
| c42b0e7201 | |||
| 4ab4f1edc7 | |||
| abf03c1c9d | |||
| 54677cd223 | |||
| 1d1ad3e9ed | |||
| 86ca7d8cfc | |||
| 5c1b84f16a | |||
| 8701e0ba78 | |||
| b274a3f6d1 | |||
| 9f009d0615 | |||
| 9197b85cfe | |||
| caf0121f95 | |||
| fb702b7c48 | |||
| 902b774091 | |||
| 9d7b3bbff1 | |||
| 7e7b21cbdc | |||
| b0333e3e95 | |||
| 77782bd254 | |||
| e1125ce9d3 | |||
| 2207986a1e | |||
| ecc53488dd | |||
| 4d36cb848f | |||
| a355bdeea3 | |||
| 88b2c6c78d | |||
| 0510d2cb56 | |||
| 8a9b27f8f3 | |||
| fe07079367 | |||
| b22c05a19d | |||
| 9674c611b3 | |||
| caab016425 | |||
| a8c49809fa | |||
| f22c574b87 | |||
| 4b659f1995 | |||
| 1cdb2d3209 | |||
| 83339a2de0 | |||
| dd883d2c9b | |||
| 36a8bcc12e | |||
| 41f36aa99f | |||
| 055a17f2e1 | |||
| 501ad87dd2 | |||
| c17466ffee | |||
| e12e029659 | |||
| d98024a300 | |||
| 0adb6d0104 | |||
| 44cf30e039 | |||
| 5bc2019fd5 | |||
| 1edd9d5a9a | |||
| 94aaa28d88 | |||
| bf1a510611 | |||
| 2f09808316 | |||
| 2b04f5acb9 | |||
| 4907bf3374 | |||
| 24116b2672 | |||
| 72dc4d3290 | |||
| 4b9a793c8f | |||
| 20c8c6a2fa | |||
| b2aa25448b | |||
| 857701daa1 | |||
| 268990f216 | |||
| 99f4487cc3 | |||
| 7d5a12f997 | |||
| cb52a7eeec | |||
| 2ce3ef1caa | |||
| e9865071fa | |||
| 30c620a426 | |||
| f01df766a9 | |||
| fc2b9a5031 | |||
| adad9271df | |||
| 2e9cec5b06 | |||
| 669f8bf098 | |||
| 7c8a2a1e18 | |||
| 302d848104 | |||
| bd6e4b9d9d | |||
| c0773c0157 | |||
| 11ed5169cc | |||
| 68329fe152 | |||
| f18afc47cb | |||
| 1b860f0b31 | |||
| e6155d64ae | |||
| a79c6be39b | |||
| 2be8d1a58a | |||
| 723f4bf3a1 | |||
| 9415a6f890 | |||
| 5227dbe26a | |||
| c343926b51 | |||
| 3fb54e66b2 | |||
| 0a5a5f4619 | |||
| ae2c46ac4c | |||
| 77f869680a | |||
| a8a9c9b8ec | |||
| 2794ff2dda | |||
| 6e0f96c095 | |||
| ba90ba14b0 | |||
| 0ed13a911e | |||
| 6f1e53c810 | |||
| 735c823b57 | |||
| c91df50d7e | |||
| 2d72c95eda | |||
| 55ce8c0c42 | |||
| bbe69fbe45 | |||
| 4ba7408ba0 | |||
| 3b2e82cd62 | |||
| 56e5c50703 | |||
| e50fdbe327 | |||
| dc11b8a7ef | |||
| ce43c79a5a | |||
| 276855acd2 | |||
| 61ff954d26 | |||
| 9264cec807 | |||
| 092b0d5dfb | |||
| 635d9ea760 | |||
| 28f5cb8fe6 | |||
| bdaaca3d78 | |||
| 3d971e214a | |||
| d39e313768 | |||
| eff94677a4 | |||
| 85b3de0b00 | |||
| 38fe768421 | |||
| 4f548f328a | |||
| a4018bcbc1 | |||
| 62763904f2 | |||
| fb3fade653 | |||
| 947aa183f6 | |||
| 5dc4ea8146 | |||
| 5d6f63af19 | |||
| 6e1f54e2ff | |||
| b4e69ccd4b | |||
| 1869b6ff97 | |||
| 76cb67ae35 | |||
| 7c52e8b96f | |||
| 2af066bc6a | |||
| ea1439c627 | |||
| 6c04ab970b | |||
| bd3d53902a | |||
| 68c9c4ae0f | |||
| 52951801c9 | |||
| 65299e7aaf | |||
| b5f3c2d30d | |||
| 98bec0e175 | |||
| e0405617ef | |||
| ee0aa7b37d | |||
| d9878493bd | |||
| c033ef959a | |||
| fe90e7882b | |||
| 05a73d2821 | |||
| ea7a1a92b5 | |||
| 09b5bdb1ee | |||
| 5a009ce4c8 | |||
| f17c5d8d55 | |||
| 64349c7a09 | |||
| c32d44d8b4 | |||
| 3c4141ff50 | |||
| 44f13006dd | |||
| bfb862763c | |||
| fbf42c8949 | |||
| 3847c826ec | |||
| e8e81650dc | |||
| 94bfad5057 | |||
| f41f60901d | |||
| c74d61c7ea | |||
| 511c663996 | |||
| 3cbf69cef5 | |||
| 5880cd64d6 | |||
| af6751c55f | |||
| a9b9a05307 | |||
| 3bb733018b | |||
| 4d41f1d6ce | |||
| bc6b640ceb | |||
| 03251d756b | |||
| 60599cb9e5 | |||
| 0ff72b16c5 | |||
| 496e7a1799 | |||
| 73394acc68 | |||
| d839717e4c | |||
| 73216e0497 | |||
| 490ef96471 | |||
| 623aeac18d | |||
| 2b99d42d8d | |||
| 5ef99d30ac | |||
| d9ee0792b8 | |||
| eb4a562948 | |||
| fd01d565fe | |||
| 36a556d107 | |||
| 8515326176 | |||
| 9d130653e1 | |||
| 7c3a67e374 | |||
| ac4e95df05 | |||
| 4e5fdebb13 | |||
| f36669723d | |||
| d3149153f6 | |||
| 45e4def3eb | |||
| 0af727192e | |||
| 49f7df5724 | |||
| 74543b2cd6 | |||
| 6e3749f904 | |||
| 7ed3fbb1bc | |||
| 40f9ed0507 | |||
| 2fb604e951 | |||
| 5a4472b418 | |||
| d84fcfffaf | |||
| 5b4b5de34c | |||
| 13606173ee | |||
| 7005b18a66 | |||
| 1871a61676 | |||
| 87add55620 | |||
| 72eda2d7c9 | |||
| 8520db884e | |||
| a2db2a3e53 | |||
| f7784bc7ac | |||
| 64b7072eaa | |||
| cda3b51bb4 | |||
| d71c629970 | |||
| 494bccb618 | |||
| 9e45768ec2 | |||
| a5835bfb4f | |||
| 32d298c4b6 | |||
| 4637cc1f07 | |||
| 9a1301dd96 | |||
| 1426779572 | |||
| e175ef5626 | |||
| ee2e3811d7 | |||
| b958928095 | |||
| 366eaf4146 | |||
| 2d50002973 | |||
| 02652af758 | |||
| 979cda1b10 | |||
| 49cef930af | |||
| f50af43088 | |||
| ed8645a83b | |||
| e72c672350 | |||
| 87982ca73f | |||
| 5228e5c8c7 | |||
| 19bc791fe9 | |||
| d291441468 | |||
| c919969ebd | |||
| 33fdfbf77a | |||
| 50aeb3924d | |||
| 763e2bb144 | |||
| ddad6d2019 | |||
| 07abac3ea4 | |||
| 08871e77c2 | |||
| b1035fe115 | |||
| 63ac712eab | |||
| 5ded6884ed | |||
| 19a5f9e73d | |||
| 32d062836e | |||
| 1781e3caf8 |
@@ -23,6 +23,7 @@ build_*/
|
||||
core
|
||||
cscope.out
|
||||
Firmware.sublime-workspace
|
||||
user.sublime*
|
||||
Images/*.bin
|
||||
Images/*.px4
|
||||
mavlink/include/mavlink/v0.9/
|
||||
|
||||
@@ -31,3 +31,9 @@
|
||||
[submodule "src/lib/DriverFramework"]
|
||||
path = src/lib/DriverFramework
|
||||
url = https://github.com/PX4/DriverFramework.git
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
[submodule "cmake/cmake_hexagon"]
|
||||
path = cmake/cmake_hexagon
|
||||
url = https://github.com/ATLFlight/cmake_hexagon
|
||||
|
||||
+11
-9
@@ -27,8 +27,8 @@ addons:
|
||||
- ccache
|
||||
- clang-3.5
|
||||
- cmake
|
||||
- g++-4.8
|
||||
- gcc-4.8
|
||||
- g++-4.9
|
||||
- gcc-4.9
|
||||
- genromfs
|
||||
- libc6-i386
|
||||
- libncurses5-dev
|
||||
@@ -55,7 +55,7 @@ before_install:
|
||||
&& mkdir -p ~/bin
|
||||
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
|
||||
&& astyle --version
|
||||
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
|
||||
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||
;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
brew tap PX4/homebrew-px4
|
||||
@@ -81,8 +81,6 @@ before_script:
|
||||
- ln -s /usr/bin/ccache ~/bin/clang
|
||||
- ln -s /usr/bin/ccache ~/bin/clang-3.4
|
||||
- ln -s /usr/bin/ccache ~/bin/clang-3.5
|
||||
- ln -s /usr/bin/ccache ~/bin/g++-4.8
|
||||
- ln -s /usr/bin/ccache ~/bin/gcc-4.8
|
||||
- export PATH=~/bin:$PATH
|
||||
|
||||
env:
|
||||
@@ -95,20 +93,23 @@ env:
|
||||
- PX4_AWS_BUCKET=px4-travis
|
||||
|
||||
script:
|
||||
- git submodule update --init --recursive
|
||||
- make check_format
|
||||
- arm-none-eabi-gcc --version
|
||||
- echo 'Building POSIX Firmware..' && make posix_sitl_default
|
||||
- echo 'Running Tests..' && make posix_sitl_default test
|
||||
- echo 'Running Unittests..' && cd unittests && ./run_tests.sh
|
||||
- cd ..
|
||||
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
|
||||
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
|
||||
# Only provide UAVCAN firmware binaries for Pixracer and Pixhawk 3
|
||||
- echo 'Building UAVCAN node firmware..' && git clone https://github.com/thiemar/vectorcontrol
|
||||
- cd vectorcontrol
|
||||
- BOARD=s2740vc_1_0 make && BOARD=px4esc_1_6 make
|
||||
- ../Tools/uavcan_copy.sh
|
||||
- cd ..
|
||||
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
|
||||
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
|
||||
- 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
|
||||
|
||||
after_success:
|
||||
@@ -116,8 +117,9 @@ after_success:
|
||||
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
|
||||
&& zip Firmware.zip px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4
|
||||
&& ./CI-Tools/s3cmd-put px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
|
||||
&& 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
|
||||
|
||||
@@ -245,6 +245,7 @@ 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")
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
|
||||
|
||||
### Edit and build the code
|
||||
|
||||
The [developer guide](http://px4.io/dev/start) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
|
||||
@@ -48,7 +48,7 @@ Download QGC from http://qgroundcontrol.org/downloads and install using the wind
|
||||
|
||||
## PX4
|
||||
|
||||
### Platfrom Requirements
|
||||
### Platform Requirements
|
||||
Linux or Eagle with a working IP interface (?? does this need further instructions?)
|
||||
|
||||
### Build Host Requirements
|
||||
|
||||
@@ -109,7 +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 git submodule update --init --recursive --force && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
||||
+git submodule init
|
||||
+Tools/check_submodules.sh
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule sync && git submodule init && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
||||
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
|
||||
endef
|
||||
|
||||
@@ -133,21 +135,24 @@ px4fmu-v2_default:
|
||||
px4fmu-v4_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v4_default)
|
||||
|
||||
px4fmu-v2_simple:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_simple)
|
||||
px4-stm32f4discovery_default:
|
||||
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
|
||||
|
||||
px4fmu-v2_ekf2:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
|
||||
|
||||
px4fmu-v2_lpe:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_lpe)
|
||||
|
||||
nuttx_sim_simple:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_lpe:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_ekf2:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
ros_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
@@ -160,6 +165,12 @@ qurt_eagle_release:
|
||||
posix_eagle_release:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
sitl_deprecation:
|
||||
@@ -184,7 +195,8 @@ clean:
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter \
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -9,33 +9,22 @@ This repository contains the [PX4 Flight Core](http://px4.io), with the main app
|
||||
* 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/platforms/multicopters/start)
|
||||
* [Fixed wing](http://px4.io/platforms/planes/start)
|
||||
* [VTOL](http://px4.io/platforms/vtol/start)
|
||||
* Binaries (always up-to-date from master):
|
||||
* [Downloads](http://px4.io/firmware/downloads)
|
||||
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
|
||||
* [Fixed wing](http://px4.io/portfolio_category/vtol/)
|
||||
* [VTOL](http://px4.io/portfolio_category/plane/)
|
||||
* Releases
|
||||
* [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
* Forum / Mailing list: [Google Groups](http://groups.google.com/group/px4users)
|
||||
|
||||
### Users ###
|
||||
|
||||
Please refer to the [user documentation](https://pixhawk.org/users/start) for flying drones with the PX4 flight stack.
|
||||
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
|
||||
|
||||
### Developers ###
|
||||
|
||||
Contributing guide:
|
||||
* [CONTRIBUTING.md](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [PX4 Contribution Guide](http://px4.io/dev/contributing)
|
||||
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
|
||||
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [Developer guide](http://dev.px4.io)
|
||||
|
||||
Software in the Loop guide:
|
||||
Use software in the loop [to get started with the codebase](https://pixhawk.org/dev/simulation/native_sitl).
|
||||
|
||||
Developer guide:
|
||||
http://dev.px4.io
|
||||
|
||||
Testing guide:
|
||||
http://px4.io/dev/unit_tests
|
||||
|
||||
This repository contains code supporting these boards:
|
||||
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
|
||||
@@ -44,8 +33,3 @@ This repository contains code supporting these boards:
|
||||
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
|
||||
* AeroCore (v1 and v2)
|
||||
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
|
||||
## NuttShell (NSH) ##
|
||||
|
||||
NSH usage documentation:
|
||||
http://px4.io/users/serial_connection
|
||||
|
||||
@@ -39,5 +39,7 @@ then
|
||||
param set FW_RR_P 0.3
|
||||
fi
|
||||
|
||||
param set RWTO_TKOFF 1
|
||||
|
||||
set HIL yes
|
||||
set MIXER AERT
|
||||
|
||||
@@ -12,11 +12,11 @@ sh /etc/init.d/rc.mc_defaults
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.08
|
||||
param set MC_ROLLRATE_P 0.14
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.16
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
|
||||
@@ -46,6 +46,6 @@ set PWM_AUX_MAX 2000
|
||||
set MAV_TYPE 21
|
||||
|
||||
param set VT_MOT_COUNT 6
|
||||
param set VT_FW_MOT_OFF 23
|
||||
param set VT_FW_MOT_OFFID 34
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Quadrotor X Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name QuadRanger
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.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_TRANS_THR 0.75
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.1
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.1
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 12345678
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Applied Aeronautics Albatross
|
||||
#
|
||||
# @type Standard Plane
|
||||
# @type Plane A-Tail
|
||||
#
|
||||
# @output MAIN1 aileron right
|
||||
# @output MAIN2 aileron left
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name 3DR Solo
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
# tuning
|
||||
param set MC_PITCHRATE_P 0.11
|
||||
param set MC_ROLLRATE_P 0.11
|
||||
param set MPC_MANTHR_MIN 0.08
|
||||
param set MPC_XY_VEL_MAX 3.0
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
|
||||
# INAV: higher GPS weights for better altitude control
|
||||
param set INAV_W_Z_BARO 0.3
|
||||
param set INAV_W_Z_GPS_P 0.8
|
||||
param set INAV_W_Z_GPS_V 0.8
|
||||
|
||||
# takeoff, land and RTL settings
|
||||
param set MIS_TAKEOFF_ALT 4.0
|
||||
param set COM_DISARM_LAND 1
|
||||
param set RTL_LAND_DELAY 1
|
||||
param set RTL_DESCEND_ALT 5.0
|
||||
param set RTL_RETURN_ALT 15.0
|
||||
param set MPC_TILTMAX_LND 8.0
|
||||
param set MPC_LAND_SPEED 0.4
|
||||
param set MPC_HOLD_MAX_Z 1.5
|
||||
param set MPC_TKO_JMPSPD 2.0
|
||||
param set MPC_TKO_SPEED 1.5
|
||||
|
||||
# setup
|
||||
# main board rotation: pitch 180
|
||||
param set SENS_BOARD_ROT 12
|
||||
# solo external mag rotation
|
||||
param set CAL_MAG0_ROT 30
|
||||
# no safety switch
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
# battery voltage not available yet
|
||||
param set CBRK_SUPPLY_CHK 894281
|
||||
|
||||
# RC configuration
|
||||
param set RC_MAP_MODE_SW 5
|
||||
param set RC_MAP_PITCH 2
|
||||
param set RC_MAP_ROLL 1
|
||||
param set RC_MAP_THROTTLE 3
|
||||
param set RC_MAP_YAW 4
|
||||
|
||||
param set RC1_DZ 10
|
||||
param set RC1_MAX 1988
|
||||
param set RC1_MIN 1003
|
||||
param set RC1_REV 1
|
||||
param set RC1_TRIM 1499
|
||||
param set RC2_DZ 10
|
||||
param set RC2_MAX 1987
|
||||
param set RC2_MIN 1023
|
||||
param set RC2_REV -1
|
||||
param set RC2_TRIM 1499
|
||||
param set RC3_DZ 10
|
||||
param set RC3_MAX 1877
|
||||
param set RC3_MIN 1023
|
||||
param set RC3_REV 1
|
||||
param set RC3_TRIM 1023
|
||||
param set RC4_DZ 10
|
||||
param set RC4_MAX 1998
|
||||
param set RC4_MIN 1012
|
||||
param set RC4_REV 1
|
||||
param set RC4_TRIM 1500
|
||||
param set RC5_DZ 10
|
||||
param set RC5_MAX 2000
|
||||
param set RC5_MIN 1000
|
||||
param set RC5_REV 1
|
||||
param set RC5_TRIM 1500
|
||||
fi
|
||||
|
||||
set MIXER solo
|
||||
|
||||
set PWM_OUT 1234
|
||||
set MIXER_AUX none
|
||||
|
||||
# enable high-speed link on telem 1
|
||||
set MAVLINK_F "-d /dev/ttyS1 -b 921600 -r 80000 -m onboard -x"
|
||||
@@ -17,7 +17,7 @@ else
|
||||
attitude_estimator_q start
|
||||
local_position_estimator start
|
||||
else
|
||||
ekf_att_pos_estimator start
|
||||
ekf2 start
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -60,9 +60,6 @@ unset FRC
|
||||
|
||||
if [ $MODE == autostart ]
|
||||
then
|
||||
# Try to get an USB console
|
||||
# REBOOTWORK this needs to start after the flight control loop
|
||||
nshterm /dev/ttyACM0 &
|
||||
|
||||
#
|
||||
# Start the ORB (first app to start)
|
||||
@@ -844,6 +841,15 @@ then
|
||||
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 "Exit from nsh"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Multirotor mixer for PX4FMU
|
||||
===========================
|
||||
|
||||
This file defines a single mixer for a quadrotor in the X configuration. All controls
|
||||
are mixed 100%.
|
||||
|
||||
R: 4x 10000 10000 10000 0
|
||||
@@ -0,0 +1,24 @@
|
||||
Mixer for standard vtol plane (SITL) with motor x configuration
|
||||
=========================================================
|
||||
|
||||
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration.
|
||||
The plane has two ailerons and one elevator. The ailerons and elevator are treated as elevons
|
||||
in order to make the standard vtol simulation compatible with the tailsitter simulation.
|
||||
|
||||
R: 4x 10000 10000 10000 0
|
||||
|
||||
# mixer for the elevons
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 5000 5000 0 -10000 10000
|
||||
S: 1 1 -5000 -5000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 5000 5000 0 -10000 10000
|
||||
S: 1 1 5000 5000 0 -10000 10000
|
||||
|
||||
# mixer for the pusher/puller throttle
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 3 0 20000 -10000 -10000 10000
|
||||
@@ -6,7 +6,7 @@ then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ $cmake_ver == *"2.8"* ]] || [[ $cmake_ver == *"2.9"* ]] || [[ $cmake_ver == *"3.0"* ]] || [[ $cmake_ver == *"3.1"* ]]
|
||||
if [[ $cmake_ver == *" 2.8"* ]] || [[ $cmake_ver == *" 2.9"* ]] || [[ $cmake_ver == *" 3.0"* ]] || [[ $cmake_ver == *" 3.1"* ]]
|
||||
then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ -n "$GIT_SUBMODULES_ARE_EVIL" ] && {
|
||||
# GIT_SUBMODULES_ARE_EVIL is set, meaning user doesn't want submodules
|
||||
echo "Skipping submodules. NUTTX_SRC is set to $NUTTX_SRC"
|
||||
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 {
|
||||
|
||||
if [ -d $1 ];
|
||||
then
|
||||
SUBMODULE_STATUS=$(git submodule summary "$1")
|
||||
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1" | grep "<")
|
||||
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 "New commits required:"
|
||||
echo -e "$SUBMODULE_STATUS"
|
||||
echo ""
|
||||
echo ""
|
||||
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 update --init --recursive\033[0m) *"
|
||||
echo -e " *******************************************************************************"
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e " Only for EXPERTS:"
|
||||
echo -e " $1 submodule is not in the recommended version."
|
||||
echo -e " Hit 'y' and <ENTER> to continue the build with this version. Hit <ENTER> to resolve manually."
|
||||
echo -e " Use \033[94mgit add $1 && git commit -m 'Updated $1'\033[0m to choose this version (careful!)"
|
||||
echo ""
|
||||
read user_cmd
|
||||
if [ "$user_cmd" == "y" ]
|
||||
then
|
||||
echo "Continuing build with manually overridden submodule.."
|
||||
else
|
||||
if [ "$user_cmd" == "u" ]
|
||||
then
|
||||
git submodule update --init --recursive
|
||||
echo "Submodule fixed, continuing build.."
|
||||
else
|
||||
echo "Build aborted."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
git submodule update --init --recursive;
|
||||
git submodule update;
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
check_git_submodule NuttX
|
||||
check_git_submodule Tools/gencpp
|
||||
check_git_submodule Tools/genmsg
|
||||
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/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
|
||||
|
||||
exit 0
|
||||
+1
-1
Submodule Tools/jMAVSim updated: 4267771753...0876a46d53
@@ -752,7 +752,7 @@ class MAVLink_gps_raw_int_message(MAVLink_message):
|
||||
'''
|
||||
The global position, as returned by the Global Positioning
|
||||
System (GPS). This is NOT the global position
|
||||
estimate of the sytem, but rather a RAW sensor value. See
|
||||
estimate of the system, but rather a RAW sensor value. See
|
||||
message GLOBAL_POSITION for the global position estimate.
|
||||
Coordinate frame is right-handed, Z-axis up (GPS frame).
|
||||
'''
|
||||
@@ -2812,7 +2812,7 @@ class MAVLink(object):
|
||||
'''
|
||||
The global position, as returned by the Global Positioning System
|
||||
(GPS). This is NOT the global position
|
||||
estimate of the sytem, but rather a RAW sensor value.
|
||||
estimate of the system, but rather a RAW sensor value.
|
||||
See message GLOBAL_POSITION for the global position
|
||||
estimate. Coordinate frame is right-handed, Z-axis up
|
||||
(GPS frame).
|
||||
@@ -2837,7 +2837,7 @@ class MAVLink(object):
|
||||
'''
|
||||
The global position, as returned by the Global Positioning System
|
||||
(GPS). This is NOT the global position
|
||||
estimate of the sytem, but rather a RAW sensor value.
|
||||
estimate of the system, but rather a RAW sensor value.
|
||||
See message GLOBAL_POSITION for the global position
|
||||
estimate. Coordinate frame is right-handed, Z-axis up
|
||||
(GPS frame).
|
||||
|
||||
@@ -28,29 +28,55 @@ class XMLOutput():
|
||||
xml_group = ET.SubElement(xml_parameters, "airframe_group")
|
||||
xml_group.attrib["name"] = group.GetName()
|
||||
if (group.GetName() == "Standard Plane"):
|
||||
xml_group.attrib["image"] = "AirframeStandardPlane.png"
|
||||
xml_group.attrib["image"] = "Plane"
|
||||
elif (group.GetName() == "Flying Wing"):
|
||||
xml_group.attrib["image"] = "AirframeFlyingWing.png"
|
||||
xml_group.attrib["image"] = "FlyingWing"
|
||||
elif (group.GetName() == "Quadrotor x"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorX.png"
|
||||
xml_group.attrib["image"] = "QuadRotorX"
|
||||
elif (group.GetName() == "Quadrotor +"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorPlus.png"
|
||||
xml_group.attrib["image"] = "QuadRotorPlus"
|
||||
elif (group.GetName() == "Hexarotor x"):
|
||||
xml_group.attrib["image"] = "AirframeHexaRotorX.png"
|
||||
xml_group.attrib["image"] = "HexaRotorX"
|
||||
elif (group.GetName() == "Hexarotor +"):
|
||||
xml_group.attrib["image"] = "AirframeHexaRotorPlus.png"
|
||||
xml_group.attrib["image"] = "HexaRotorPlus"
|
||||
elif (group.GetName() == "Octorotor +"):
|
||||
xml_group.attrib["image"] = "AirframeOctoRotorPlus.png"
|
||||
xml_group.attrib["image"] = "OctoRotorPlus"
|
||||
elif (group.GetName() == "Octorotor x"):
|
||||
xml_group.attrib["image"] = "AirframeOctoRotorX.png"
|
||||
xml_group.attrib["image"] = "OctoRotorX"
|
||||
elif (group.GetName() == "Octorotor Coaxial"):
|
||||
xml_group.attrib["image"] = "OctoRotorXCoaxial"
|
||||
elif (group.GetName() == "Quadrotor Wide"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
|
||||
xml_group.attrib["image"] = "QuadRotorWide"
|
||||
elif (group.GetName() == "Quadrotor H"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
|
||||
xml_group.attrib["image"] = "QuadRotorH"
|
||||
elif (group.GetName() == "Simulation"):
|
||||
xml_group.attrib["image"] = "AirframeSimulation.png"
|
||||
xml_group.attrib["image"] = "AirframeSimulation"
|
||||
elif (group.GetName() == "Plane A-Tail"):
|
||||
xml_group.attrib["image"] = "PlaneATail"
|
||||
elif (group.GetName() == "VTOL Duo Tailsitter"):
|
||||
xml_group.attrib["image"] = "VTOLDuoRotorTailSitter"
|
||||
elif (group.GetName() == "Standard VTOL"):
|
||||
xml_group.attrib["image"] = "VTOLPlane"
|
||||
elif (group.GetName() == "VTOL Quad Tailsitter"):
|
||||
xml_group.attrib["image"] = "VTOLQuadRotorTailSitter"
|
||||
elif (group.GetName() == "VTOLTiltRotor"):
|
||||
xml_group.attrib["image"] = "VTOLTiltRotor"
|
||||
elif (group.GetName() == "Coaxial Helicopter"):
|
||||
xml_group.attrib["image"] = "HelicopterCoaxial"
|
||||
elif (group.GetName() == "Hexarotor Coaxial"):
|
||||
xml_group.attrib["image"] = "Y6A"
|
||||
elif (group.GetName() == "Y6B"):
|
||||
xml_group.attrib["image"] = "Y6B"
|
||||
elif (group.GetName() == "Tricopter Y-"):
|
||||
xml_group.attrib["image"] = "YMinus"
|
||||
elif (group.GetName() == "Tricopter Y+"):
|
||||
xml_group.attrib["image"] = "YPlus"
|
||||
elif (group.GetName() == "Rover"):
|
||||
xml_group.attrib["image"] = "Rover"
|
||||
elif (group.GetName() == "Boat"):
|
||||
xml_group.attrib["image"] = "Boat"
|
||||
else:
|
||||
xml_group.attrib["image"] = ""
|
||||
xml_group.attrib["image"] = "AirframeUnknown"
|
||||
for param in group.GetParams():
|
||||
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
|
||||
xml_param = ET.SubElement(xml_group, "airframe")
|
||||
|
||||
@@ -107,7 +107,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"])
|
||||
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "reboot_required"])
|
||||
|
||||
# Order of parameter groups
|
||||
priority = {
|
||||
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: 03a749a3b3...57a54ab737
Vendored
+27
-2
@@ -37,17 +37,42 @@ Vagrant.configure(2) do |config|
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
# NFS should be faster: https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck
|
||||
config.vm.synced_folder ".", "/Firmware", type: "nfs"
|
||||
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
# Example for VirtualBox:
|
||||
#
|
||||
|
||||
# This is to configure the machine to be as fast as possible
|
||||
# Alternative: https://github.com/rdsubhas/vagrant-faster
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = false
|
||||
vb.customize ["modifyvm", :id, "--ioapic", "on"]
|
||||
vb.customize ["modifyvm", :id, "--cpus", "2"]
|
||||
#vb.customize ["modifyvm", :id, "--cpus", "2"]
|
||||
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
host = RbConfig::CONFIG['host_os']
|
||||
|
||||
# Give VM 1/4 system memory & access to all cpu cores on the host
|
||||
if host =~ /darwin/
|
||||
cpus = `sysctl -n hw.ncpu`.to_i
|
||||
# sysctl returns Bytes and we need to convert to MB
|
||||
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4
|
||||
elsif host =~ /linux/
|
||||
cpus = `nproc`.to_i
|
||||
# meminfo shows KB and we need to convert to MB
|
||||
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024 / 4
|
||||
else # sorry Windows folks, I can't help you
|
||||
cpus = 2
|
||||
mem = 1024
|
||||
end
|
||||
|
||||
v.customize ["modifyvm", :id, "--memory", mem]
|
||||
v.customize ["modifyvm", :id, "--cpus", cpus]
|
||||
end
|
||||
|
||||
# Since make and other tools freak out if they see timestamps
|
||||
# from the future and we share directories, tightly lock the host and guest clocks together (clock sync if more than 2 seconds off)
|
||||
@@ -57,7 +82,7 @@ Vagrant.configure(2) do |config|
|
||||
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
|
||||
|
||||
# Customize the amount of memory on the VM:
|
||||
vb.memory = "2048"
|
||||
#vb.memory = "2048"
|
||||
end
|
||||
#
|
||||
# View the documentation for the provider you are using for more
|
||||
|
||||
Submodule
+1
Submodule cmake/cmake_hexagon added at 829f22eff3
@@ -266,6 +266,10 @@ function(px4_add_module)
|
||||
|
||||
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
|
||||
|
||||
if(${OS} STREQUAL "qurt" )
|
||||
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
if(MAIN)
|
||||
set_target_properties(${MODULE} PROPERTIES
|
||||
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
drivers/stm32
|
||||
drivers/led
|
||||
drivers/boards/px4-stm32f4discovery
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/bl_update
|
||||
systemcmds/mixer
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/reboot
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/ver
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/controllib
|
||||
modules/uORB
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
#lib/mathlib/CMSIS
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/conversion
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
platforms/common
|
||||
platforms/nuttx/px4_layer
|
||||
|
||||
#
|
||||
# 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
|
||||
)
|
||||
|
||||
add_custom_target(sercon)
|
||||
set_target_properties(sercon PROPERTIES
|
||||
MAIN "sercon" STACK "2048")
|
||||
|
||||
add_custom_target(serdis)
|
||||
set_target_properties(serdis PROPERTIES
|
||||
MAIN "serdis" STACK "2048")
|
||||
@@ -27,16 +27,16 @@ set(config_module_list
|
||||
drivers/trone
|
||||
drivers/gps
|
||||
drivers/pwm_out_sim
|
||||
drivers/hott
|
||||
drivers/hott/hott_telemetry
|
||||
drivers/hott/hott_sensors
|
||||
#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/mkblctrl
|
||||
drivers/px4flow
|
||||
|
||||
#
|
||||
@@ -73,6 +73,7 @@ set(config_module_list
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -113,6 +114,7 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
|
||||
@@ -23,16 +23,16 @@ set(config_module_list
|
||||
drivers/l3gd20
|
||||
drivers/hmc5883
|
||||
drivers/ms5611
|
||||
drivers/mb12xx
|
||||
#drivers/mb12xx
|
||||
drivers/srf02
|
||||
drivers/sf0x
|
||||
drivers/ll40ls
|
||||
drivers/trone
|
||||
drivers/gps
|
||||
drivers/pwm_out_sim
|
||||
drivers/hott
|
||||
drivers/hott/hott_telemetry
|
||||
drivers/hott/hott_sensors
|
||||
#drivers/hott
|
||||
#drivers/hott/hott_telemetry
|
||||
#drivers/hott/hott_sensors
|
||||
drivers/blinkm
|
||||
drivers/airspeed
|
||||
drivers/ets_airspeed
|
||||
@@ -45,7 +45,7 @@ set(config_module_list
|
||||
drivers/gimbal
|
||||
drivers/pwm_input
|
||||
drivers/camera_trigger
|
||||
drivers/bst
|
||||
drivers/bst
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -123,6 +123,7 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
@@ -132,7 +133,7 @@ set(config_module_list
|
||||
#
|
||||
# OBC challenge
|
||||
#
|
||||
modules/bottle_drop
|
||||
#modules/bottle_drop
|
||||
|
||||
#
|
||||
# Rover apps
|
||||
|
||||
+60
-11
@@ -2,6 +2,8 @@ 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
|
||||
@@ -21,27 +23,29 @@ set(config_module_list
|
||||
drivers/l3gd20
|
||||
drivers/hmc5883
|
||||
drivers/ms5611
|
||||
drivers/mb12xx
|
||||
#drivers/mb12xx
|
||||
drivers/srf02
|
||||
drivers/sf0x
|
||||
drivers/ll40ls
|
||||
drivers/trone
|
||||
drivers/gps
|
||||
drivers/pwm_out_sim
|
||||
drivers/hott
|
||||
drivers/hott/hott_telemetry
|
||||
drivers/hott/hott_sensors
|
||||
#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/mkblctrl
|
||||
drivers/px4flow
|
||||
drivers/oreoled
|
||||
drivers/gimbal
|
||||
drivers/pwm_input
|
||||
drivers/camera_trigger
|
||||
drivers/bst
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -53,6 +57,7 @@ set(config_module_list
|
||||
systemcmds/pwm
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
@@ -60,6 +65,35 @@ set(config_module_list
|
||||
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/ekf2
|
||||
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
|
||||
#
|
||||
@@ -87,34 +121,47 @@ set(config_module_list
|
||||
lib/geo_lookup
|
||||
lib/conversion
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
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
|
||||
#examples/px4_simple_app
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/daemon
|
||||
examples/px4_daemon_app
|
||||
#examples/px4_daemon_app
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/debug_values
|
||||
examples/px4_mavlink_debug
|
||||
#examples/px4_mavlink_debug
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/example_fixedwing_control
|
||||
examples/fixedwing_control
|
||||
#examples/fixedwing_control
|
||||
|
||||
# Hardware test
|
||||
examples/hwtest
|
||||
#examples/hwtest
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
@@ -128,10 +175,12 @@ 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
|
||||
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
|
||||
)
|
||||
|
||||
add_custom_target(sercon)
|
||||
@@ -42,6 +42,7 @@ set(config_module_list
|
||||
drivers/gimbal
|
||||
drivers/pwm_input
|
||||
drivers/camera_trigger
|
||||
drivers/bst
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -80,6 +81,7 @@ set(config_module_list
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -121,6 +123,7 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
message(WARNING "this is a work in progress and doesn't build yet")
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#platforms/nuttx
|
||||
#platforms/nuttx/px4_layer
|
||||
platforms/common
|
||||
#drivers/led
|
||||
drivers/device
|
||||
#modules/systemlib
|
||||
#modules/uORB
|
||||
#examples/px4_simple_app
|
||||
#lib/mathlib/math/filter
|
||||
#lib/conversion
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
)
|
||||
@@ -35,11 +35,13 @@ set(config_module_list
|
||||
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/ecl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
|
||||
@@ -59,6 +59,7 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
examples/px4_simple_app
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
drivers/boards/sitl
|
||||
drivers/pwm_out_sim
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
platforms/posix/drivers/adcsim
|
||||
platforms/posix/drivers/gpssim
|
||||
platforms/posix/drivers/tonealrmsim
|
||||
platforms/posix/drivers/accelsim
|
||||
platforms/posix/drivers/airspeedsim
|
||||
platforms/posix/drivers/barosim
|
||||
platforms/posix/drivers/gyrosim
|
||||
platforms/posix/drivers/rgbledsim
|
||||
platforms/posix/drivers/ledsim
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/ekf2
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
modules/vtol_att_control
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control_multiplatform
|
||||
modules/mc_att_control_multiplatform
|
||||
modules/land_detector
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/commander
|
||||
modules/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
examples/px4_simple_app
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
serdis
|
||||
sercon
|
||||
)
|
||||
|
||||
set(config_sitl_rcS
|
||||
posix-configs/SITL/init/rcS_ekf2
|
||||
CACHE FILEPATH "init script for sitl"
|
||||
)
|
||||
|
||||
set(config_sitl_viewer
|
||||
jmavsim
|
||||
CACHE STRING "viewer for sitl"
|
||||
)
|
||||
set_property(CACHE config_sitl_viewer
|
||||
PROPERTY STRINGS "jmavsim;none")
|
||||
|
||||
set(config_sitl_debugger
|
||||
disable
|
||||
CACHE STRING "debugger for sitl"
|
||||
)
|
||||
set_property(CACHE config_sitl_debugger
|
||||
PROPERTY STRINGS "disable;gdb;lldb")
|
||||
|
||||
|
||||
|
||||
add_custom_target(sercon)
|
||||
set_target_properties(sercon PROPERTIES
|
||||
MAIN "sercon" STACK "2048")
|
||||
|
||||
add_custom_target(serdis)
|
||||
set_target_properties(serdis PROPERTIES
|
||||
MAIN "serdis" STACK "2048")
|
||||
@@ -0,0 +1,91 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
#if ("${HEXAGON_DRIVERS_ROOT}" #STREQUAL "")
|
||||
# message(FATAL_ERROR "HEXAGON_DRIVERS_ROOT is not set")
|
||||
#endif()
|
||||
|
||||
#if ("${EAGLE_DRIVERS_SRC}" STREQUAL "")
|
||||
# message(FATAL_ERROR "EAGLE_DRIVERS_SRC is not set")
|
||||
#endif()
|
||||
|
||||
#include_directories(${HEXAGON_DRIVERS_ROOT}/inc)
|
||||
|
||||
# For Actual flight we need to link against the driver dynamic libraries
|
||||
#set(target_libraries
|
||||
# -L${HEXAGON_DRIVERS_ROOT}/libs
|
||||
# The plan is to replace these with our drivers
|
||||
# mpu9x50
|
||||
# uart_esc
|
||||
# csr_gps
|
||||
# rc_receiver
|
||||
# )
|
||||
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
modules/sensors
|
||||
# The plan is to replace these with our drivers
|
||||
# $(EAGLE_DRIVERS_SRC)/mpu9x50
|
||||
# $(EAGLE_DRIVERS_SRC)/uart_esc
|
||||
# $(EAGLE_DRIVERS_SRC)/rc_receiver
|
||||
# $(EAGLE_DRIVERS_SRC)/csr_gps
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/param
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/controllib
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
#
|
||||
# QuRT port
|
||||
#
|
||||
platforms/common
|
||||
platforms/qurt/px4_layer
|
||||
platforms/posix/work_queue
|
||||
|
||||
#
|
||||
# sources for muorb over fastrpc
|
||||
#
|
||||
modules/muorb/adsp
|
||||
)
|
||||
@@ -1,6 +1,8 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
@@ -49,6 +50,7 @@ set(config_module_list
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
modules/controllib
|
||||
|
||||
#
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@@ -20,7 +20,8 @@ set(target_libraries
|
||||
)
|
||||
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
@@ -72,6 +73,7 @@ set(config_module_list
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
#
|
||||
# QuRT port
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@@ -3,7 +3,8 @@ include(qurt/px4_impl_qurt)
|
||||
# Run a full link with build stubs to make sure qurt target isn't broken
|
||||
set(QURT_ENABLE_STUBS "1")
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
@@ -54,6 +55,7 @@ set(config_module_list
|
||||
lib/ecl
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
|
||||
#
|
||||
# QuRT port
|
||||
|
||||
@@ -467,6 +467,14 @@ function(px4_os_add_flags)
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "px4-stm32f4discovery")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
-mthumb
|
||||
-march=armv7e-m
|
||||
-mfpu=fpv4-sp-d16
|
||||
-mfloat-abi=hard
|
||||
)
|
||||
elseif (${BOARD} STREQUAL "aerocore")
|
||||
set(cpu_flags
|
||||
-mcpu=cortex-m4
|
||||
|
||||
@@ -172,16 +172,13 @@ function(px4_os_add_flags)
|
||||
set(added_definitions
|
||||
-D__PX4_QURT
|
||||
-D__PX4_POSIX
|
||||
-D__DF_QURT
|
||||
-include ${PX4_INCLUDE_DIR}visibility.h
|
||||
)
|
||||
|
||||
# Add the toolchain specific flags
|
||||
set(added_cflags ${QURT_CMAKE_C_FLAGS})
|
||||
set(added_cxx_flags ${QURT_CMAKE_CXX_FLAGS})
|
||||
set(added_cflags -O0)
|
||||
set(added_cxx_flags -O0)
|
||||
|
||||
# FIXME @jgoppert - how to work around issues like this?
|
||||
# Without changing global variables?
|
||||
# Clear -rdynamic flag which fails for hexagon
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
@@ -1,254 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
include(common/px4_base)
|
||||
|
||||
if ("$ENV{HEXAGON_TOOLS_ROOT}" STREQUAL "")
|
||||
message(FATAL_ERROR
|
||||
"The HexagonTools version 7.2.10 must be installed and the environment variable HEXAGON_TOOLS_ROOT must be set"
|
||||
"(e.g. export HEXAGON_TOOLS_ROOT=/opt/HEXAGON_Tools/7.2.10/Tools)")
|
||||
else()
|
||||
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_TOOLS_ROOT})
|
||||
endif()
|
||||
|
||||
macro (list2string out in)
|
||||
set(list ${ARGV})
|
||||
list(REMOVE_ITEM list ${out})
|
||||
foreach(item ${list})
|
||||
set(${out} "${${out}} ${item}")
|
||||
endforeach()
|
||||
endmacro(list2string)
|
||||
|
||||
set(V_ARCH "v5")
|
||||
set(CROSSDEV "hexagon-")
|
||||
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/bin)
|
||||
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
|
||||
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/lib/iss)
|
||||
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/target/hexagon/lib/${V_ARCH}/G0)
|
||||
|
||||
# Use the HexagonTools compiler (7.2.10)
|
||||
set(CMAKE_C_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang)
|
||||
set(CMAKE_CXX_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang++)
|
||||
|
||||
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
|
||||
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld.qcld)
|
||||
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
|
||||
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
|
||||
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
|
||||
|
||||
list2string(HEXAGON_INCLUDE_DIRS
|
||||
-I${HEXAGON_TOOLS_ROOT}/target/hexagon/include
|
||||
)
|
||||
|
||||
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
|
||||
|
||||
#set(MAXOPTIMIZATION -O0)
|
||||
|
||||
# Base CPU flags for each of the supported architectures.
|
||||
#
|
||||
set(ARCHCPUFLAGS
|
||||
-m${V_ARCH}
|
||||
-G0
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-D_PID_T -D_UID_T -D_TIMER_T
|
||||
-Dnoreturn_function=
|
||||
-D_HAS_C9X
|
||||
-D__EXPORT=
|
||||
-Drestrict=
|
||||
-D_DEBUG
|
||||
-Wno-error=shadow
|
||||
)
|
||||
|
||||
# optimisation flags
|
||||
#
|
||||
set(ARCHOPTIMIZATION
|
||||
-O0
|
||||
-g
|
||||
-fno-strict-aliasing
|
||||
-fdata-sections
|
||||
-fno-zero-initialized-in-bss
|
||||
)
|
||||
|
||||
# Language-specific flags
|
||||
#
|
||||
set(ARCHCFLAGS
|
||||
-std=gnu99
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
set(ARCHCXXFLAGS
|
||||
-fno-exceptions
|
||||
-fno-rtti
|
||||
-std=c++11
|
||||
-fno-threadsafe-statics
|
||||
-DCONFIG_WCHAR_BUILTIN
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
|
||||
set(ARCHWARNINGS
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
-Wno-unused-variable
|
||||
-Wno-gnu-array-member-paren-init
|
||||
-Wno-cast-align
|
||||
-Wno-missing-braces
|
||||
-Wno-strict-aliasing
|
||||
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
|
||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
||||
)
|
||||
|
||||
# C-specific warnings
|
||||
#
|
||||
set(ARCHCWARNINGS
|
||||
${ARCHWARNINGS}
|
||||
-Wstrict-prototypes
|
||||
-Wnested-externs
|
||||
)
|
||||
|
||||
# C++-specific warnings
|
||||
#
|
||||
set(ARCHWARNINGSXX
|
||||
${ARCHWARNINGS}
|
||||
-Wno-missing-field-initializers
|
||||
)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
|
||||
|
||||
# Flags we pass to the C compiler
|
||||
#
|
||||
list2string(CFLAGS
|
||||
${ARCHCFLAGS}
|
||||
${ARCHCWARNINGS}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the C++ compiler
|
||||
#
|
||||
list2string(CXXFLAGS
|
||||
${ARCHCXXFLAGS}
|
||||
${ARCHWARNINGSXX}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHXXINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACXXFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the assembler
|
||||
#
|
||||
list2string(AFLAGS
|
||||
${CFLAGS}
|
||||
-D__ASSEMBLY__
|
||||
${EXTRADEFINES}
|
||||
${EXTRAAFLAGS}
|
||||
)
|
||||
|
||||
# Set cmake flags
|
||||
#
|
||||
list2string(CMAKE_C_FLAGS
|
||||
${CMAKE_C_FLAGS}
|
||||
${CFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
|
||||
|
||||
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
|
||||
|
||||
list2string(CMAKE_CXX_FLAGS
|
||||
${CMAKE_CXX_FLAGS}
|
||||
${CXXFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
|
||||
|
||||
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
|
||||
|
||||
# Flags we pass to the linker
|
||||
#
|
||||
list2string(CMAKE_EXE_LINKER_FLAGS
|
||||
-g
|
||||
-mv5
|
||||
-mG0lib
|
||||
-G0
|
||||
-fpic
|
||||
-shared
|
||||
-Wl,-Bsymbolic
|
||||
-Wl,--wrap=malloc
|
||||
-Wl,--wrap=calloc
|
||||
-Wl,--wrap=free
|
||||
-Wl,--wrap=realloc
|
||||
-Wl,--wrap=memalign
|
||||
-Wl,--wrap=__stack_chk_fail
|
||||
-lc
|
||||
${EXTRALDFLAGS}
|
||||
)
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
|
||||
|
||||
set(CMAKE_C_COMPILER_ID, "Clang")
|
||||
set(CMAKE_CXX_COMPILER_ID, "Clang")
|
||||
|
||||
# search for programs in the build host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# The Hexagon compiler doesn't support the -rdynamic flag and this is set
|
||||
# in the base cmake scripts. We have to redefine the __linux_compiler_gnu
|
||||
# macro for cmake 2.8 to work
|
||||
set(__LINUX_COMPILER_GNU 1)
|
||||
macro(__linux_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
|
||||
endmacro()
|
||||
|
||||
@@ -1,249 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
include(common/px4_base)
|
||||
|
||||
if(NOT HEXAGON_TOOLS_ROOT)
|
||||
set(HEXAGON_TOOLS_ROOT /opt/6.4.05)
|
||||
endif()
|
||||
|
||||
if(NOT HEXAGON_SDK_ROOT)
|
||||
set(HEXAGON_SDK_ROOT /opt/Hexagon_SDK)
|
||||
endif()
|
||||
|
||||
macro (list2string out in)
|
||||
set(list ${ARGV})
|
||||
list(REMOVE_ITEM list ${out})
|
||||
foreach(item ${list})
|
||||
set(${out} "${${out}} ${item}")
|
||||
endforeach()
|
||||
endmacro(list2string)
|
||||
|
||||
set(V_ARCH "v5")
|
||||
set(CROSSDEV "hexagon-")
|
||||
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/gnu/bin)
|
||||
set(HEXAGON_CLANG_BIN ${HEXAGON_TOOLS_ROOT}/qc/bin)
|
||||
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
|
||||
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/qc/lib/iss)
|
||||
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/dinkumware/lib/$(V_ARCH)/G0)
|
||||
set(QCTOOLSLIB ${HEXAGON_TOOLS_ROOT}/qc/lib/$(V_ARCH)/G0)
|
||||
|
||||
# Use the HexagonTools compiler (6.4.05)
|
||||
set(CMAKE_C_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang)
|
||||
set(CMAKE_CXX_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang++)
|
||||
|
||||
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
|
||||
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld)
|
||||
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
|
||||
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
|
||||
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
|
||||
|
||||
list2string(HEXAGON_INCLUDE_DIRS
|
||||
-I${HEXAGON_TOOLS_ROOT}/gnu/hexagon/include
|
||||
-I${HEXAGON_SDK_ROOT}/inc
|
||||
-I${HEXAGON_SDK_ROOT}/inc/stddef
|
||||
)
|
||||
|
||||
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
|
||||
|
||||
#set(MAXOPTIMIZATION -O0)
|
||||
|
||||
# Base CPU flags for each of the supported architectures.
|
||||
#
|
||||
set(ARCHCPUFLAGS
|
||||
-m${V_ARCH}
|
||||
-G0
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-D_PID_T -D_UID_T -D_TIMER_T
|
||||
-Dnoreturn_function=
|
||||
-D__EXPORT=
|
||||
-Drestrict=
|
||||
-D_DEBUG
|
||||
-Wno-error=shadow
|
||||
)
|
||||
|
||||
# optimisation flags
|
||||
#
|
||||
set(ARCHOPTIMIZATION
|
||||
-O0
|
||||
-g
|
||||
-fno-strict-aliasing
|
||||
-fdata-sections
|
||||
-fpic
|
||||
-fno-zero-initialized-in-bss
|
||||
)
|
||||
|
||||
# Language-specific flags
|
||||
#
|
||||
set(ARCHCFLAGS
|
||||
-std=gnu99
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
set(ARCHCXXFLAGS
|
||||
-fno-exceptions
|
||||
-fno-rtti
|
||||
-std=c++11
|
||||
-fno-threadsafe-statics
|
||||
-DCONFIG_WCHAR_BUILTIN
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
|
||||
set(ARCHWARNINGS
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
-Wno-unused-variable
|
||||
-Wno-gnu-array-member-paren-init
|
||||
-Wno-cast-align
|
||||
-Wno-missing-braces
|
||||
-Wno-strict-aliasing
|
||||
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
|
||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
||||
)
|
||||
|
||||
# C-specific warnings
|
||||
#
|
||||
set(ARCHCWARNINGS
|
||||
${ARCHWARNINGS}
|
||||
-Wstrict-prototypes
|
||||
-Wnested-externs
|
||||
)
|
||||
|
||||
# C++-specific warnings
|
||||
#
|
||||
set(ARCHWARNINGSXX
|
||||
${ARCHWARNINGS}
|
||||
-Wno-missing-field-initializers
|
||||
)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
|
||||
|
||||
# Flags we pass to the C compiler
|
||||
#
|
||||
list2string(CFLAGS
|
||||
${ARCHCFLAGS}
|
||||
${ARCHCWARNINGS}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the C++ compiler
|
||||
#
|
||||
list2string(CXXFLAGS
|
||||
${ARCHCXXFLAGS}
|
||||
${ARCHWARNINGSXX}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHXXINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACXXFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the assembler
|
||||
#
|
||||
list2string(AFLAGS
|
||||
${CFLAGS}
|
||||
-D__ASSEMBLY__
|
||||
${EXTRADEFINES}
|
||||
${EXTRAAFLAGS}
|
||||
)
|
||||
|
||||
# Set cmake flags
|
||||
#
|
||||
list2string(CMAKE_C_FLAGS
|
||||
${CMAKE_C_FLAGS}
|
||||
${CFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
|
||||
|
||||
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
|
||||
|
||||
list2string(CMAKE_CXX_FLAGS
|
||||
${CMAKE_CXX_FLAGS}
|
||||
${CXXFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
|
||||
|
||||
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
|
||||
|
||||
# Flags we pass to the linker
|
||||
#
|
||||
list2string(CMAKE_EXE_LINKER_FLAGS
|
||||
-g
|
||||
-mv5
|
||||
-mG0lib
|
||||
-G0
|
||||
-fpic
|
||||
-shared
|
||||
-Wl,-Bsymbolic
|
||||
-Wl,--wrap=malloc
|
||||
-Wl,--wrap=calloc
|
||||
-Wl,--wrap=free
|
||||
-Wl,--wrap=realloc
|
||||
-Wl,--wrap=memalign
|
||||
-Wl,--wrap=__stack_chk_fail
|
||||
-lc
|
||||
${EXTRALDFLAGS}
|
||||
)
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
|
||||
|
||||
set(CMAKE_C_COMPILER_ID, "Clang")
|
||||
set(CMAKE_CXX_COMPILER_ID, "Clang")
|
||||
|
||||
# search for programs in the build host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
Submodule mavlink/include/mavlink/v1.0 updated: db5cf66d1a...21d36c9e23
+7
-1
@@ -6,6 +6,12 @@ uint8 RC_INPUT_SOURCE_PX4IO_SBUS = 4
|
||||
uint8 RC_INPUT_SOURCE_PX4IO_ST24 = 5
|
||||
uint8 RC_INPUT_SOURCE_MAVLINK = 6
|
||||
uint8 RC_INPUT_SOURCE_QURT = 7
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_SPEKTRUM = 8
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_SBUS = 9
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_ST24 = 10
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_SUMD = 11
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_DSM = 12
|
||||
uint8 RC_INPUT_SOURCE_PX4IO_SUMD = 13
|
||||
|
||||
uint8 RC_INPUT_MAX_CHANNELS = 18 # Maximum number of R/C input channels in the system. S.Bus has up to 18 channels.
|
||||
|
||||
@@ -14,7 +20,7 @@ uint64 timestamp_last_signal # last valid reception time
|
||||
uint32 channel_count # number of channels actually being seen
|
||||
int32 rssi # receive signal strength indicator (RSSI): < 0: Undefined, 0: no signal, 100: full reception
|
||||
bool rc_failsafe # explicit failsafe flag: true on TX failure or TX out of range , false otherwise. Only the true state is reliable, as there are some (PPM) receivers on the market going into failsafe without telling us explicitly.
|
||||
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
|
||||
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usUally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
|
||||
uint16 rc_lost_frame_count # Number of lost RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
|
||||
uint16 rc_total_frame_count # Number of total RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
|
||||
uint16 rc_ppm_frame_length # Length of a single PPM frame. Zero for non-PPM systems
|
||||
|
||||
@@ -26,7 +26,7 @@ float32 z # throttle stick position 0..1
|
||||
# in general the value corresponds to the demanded throttle by the user,
|
||||
# if the input is used for setting the setpoint of a vertical position
|
||||
# controller any value > 0.5 means up and any value < 0.5 means down
|
||||
float32 r # yaw stick/twist positon, -1..1
|
||||
float32 r # yaw stick/twist position, -1..1
|
||||
# in general corresponds to the righthand rotation around the vertical
|
||||
# (downwards) axis of the vehicle
|
||||
float32 flaps # flap position
|
||||
|
||||
@@ -33,3 +33,4 @@ float32 a_y # acceleration y setpoint
|
||||
float32 a_z # acceleration z setpoint
|
||||
bool acceleration_valid # true if acceleration setpoint is valid/should be used
|
||||
bool acceleration_is_force # interprete acceleration as force
|
||||
float32 acceptance_radius # navigation acceptance_radius if we're doint waypoint navigation
|
||||
|
||||
@@ -6,6 +6,6 @@ bool[3] valid #true for RC-Param channels which are mapped to a param
|
||||
int32[3] param_index # corresponding param index, this field is ignored if set to -1, in this case param_id will be used
|
||||
char[51] param_id # MAP_NCHAN * (ID_LEN + 1) chars, corresponding param id, null terminated
|
||||
float32[3] scale # scale to map the RC input [-1, 1] to a parameter value
|
||||
float32[3] value0 # inital value around which the parameter value is changed
|
||||
float32[3] value0 # initial value around which the parameter value is changed
|
||||
float32[3] value_min # minimal parameter value
|
||||
float32[3] value_max # minimal parameter value
|
||||
|
||||
@@ -31,6 +31,7 @@ uint32 VEHICLE_CMD_DO_SET_SERVO = 183 # Set a servo to a desired PWM value. |S
|
||||
uint32 VEHICLE_CMD_DO_REPEAT_SERVO = 184 # Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Cycle count| Cycle time (seconds)| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_FLIGHTTERMINATION=185 # Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_CONTROL_VIDEO = 200 # Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds (decimal)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_DIGICAM_CONTROL=203
|
||||
uint32 VEHICLE_CMD_DO_MOUNT_CONFIGURE=204 # Mission command to configure a camera or antenna mount |Mount operation mode (see MAV_MOUNT_MODE enum)| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_MOUNT_CONTROL=205 # Mission command to control a camera or antenna mount |pitch or lat in degrees, depending on mount mode.| roll or lon in degrees depending on mount mode| yaw or alt (in meters) depending on mount mode| reserved| reserved| reserved| MAV_MOUNT_MODE enum value|
|
||||
uint32 VEHICLE_CMD_DO_SET_CAM_TRIGG_DIST=206 # Mission command to set CAM_TRIGG_DIST for this flight |Camera trigger distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty|
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
uint8 VEHICLE_RESULT_ACCEPTED = 0
|
||||
uint8 VEHICLE_RESULT_TEMPORARILY_REJECTED = 1
|
||||
uint8 VEHICLE_RESULT_DENIED = 2
|
||||
uint8 VEHICLE_RESULT_UNSUPPORTED = 3
|
||||
uint8 VEHICLE_RESULT_FAILED = 4
|
||||
|
||||
uint16 command
|
||||
uint8 result
|
||||
@@ -4,18 +4,18 @@
|
||||
# estimator, which will take more sources of information into account than just GPS,
|
||||
# e.g. control inputs of the vehicle in a Kalman-filter implementation.
|
||||
#
|
||||
uint64 timestamp # Time of this estimate, in microseconds since system start
|
||||
uint64 time_utc_usec # GPS UTC timestamp in microseconds
|
||||
float64 lat # Latitude in degrees
|
||||
float64 lon # Longitude in degrees
|
||||
float32 alt # Altitude AMSL in meters
|
||||
float32 vel_n # Ground north velocity, m/s
|
||||
float32 vel_e # Ground east velocity, m/s
|
||||
float32 vel_d # Ground downside velocity, m/s
|
||||
float32 yaw # Yaw in radians -PI..+PI.
|
||||
float32 eph # Standard deviation of position estimate horizontally
|
||||
float32 epv # Standard deviation of position vertically
|
||||
float32 terrain_alt # Terrain altitude in m, WGS84
|
||||
uint64 timestamp # Time of this estimate since system start, (microseconds)
|
||||
uint64 time_utc_usec # GPS UTC timestamp, (microseconds)
|
||||
float64 lat # Latitude, (degrees)
|
||||
float64 lon # Longitude, (degrees)
|
||||
float32 alt # Altitude AMSL, (meters)
|
||||
float32 vel_n # North velocity in NED earth-fixed frame, (metres/sec)
|
||||
float32 vel_e # East velocity in NED earth-fixed frame, (metres/sec)
|
||||
float32 vel_d # Down velocity in NED earth-fixed frame, (metres/sec)
|
||||
float32 yaw # Euler yaw angle relative to NED earth-fixed frame, -PI..+PI, (radians)
|
||||
float32 eph # Standard deviation of horizontal position error, (metres)
|
||||
float32 epv # Standard deviation of vertical position error, (metres)
|
||||
float32 terrain_alt # Terrain altitude WGS84, (metres)
|
||||
bool terrain_alt_valid # Terrain altitude estimate is valid
|
||||
bool dead_reckoning # True if this position is estimated through dead-reckoning
|
||||
float32 pressure_alt # Pressure altitude
|
||||
float32 pressure_alt # Pressure altitude AMSL, (metres)
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
# GPS position in WGS84 coordinates.
|
||||
uint64 timestamp_position # Timestamp for position information
|
||||
int32 lat # Latitude in 1E-7 degrees
|
||||
uint64 timestamp_position # Time of the position estimates since system start, (microseconds)
|
||||
int32 lat # Latitude in 1E-7 degrees
|
||||
int32 lon # Longitude in 1E-7 degrees
|
||||
int32 alt # Altitude in 1E-3 meters (millimeters) above MSL
|
||||
int32 alt_ellipsoid # Altitude in 1E-3 meters (millimeters) above Ellipsoid
|
||||
int32 alt # Altitude in 1E-3 meters above MSL, (millimetres)
|
||||
int32 alt_ellipsoid # Altitude in 1E-3 meters bove Ellipsoid, (millimetres)
|
||||
|
||||
uint64 timestamp_variance
|
||||
float32 s_variance_m_s # speed accuracy estimate m/s
|
||||
float32 c_variance_rad # course accuracy estimate rad
|
||||
uint64 timestamp_variance # Time of the accuracy estimates since system start, (microseconds)
|
||||
float32 s_variance_m_s # GPS speed accuracy estimate, (metres/sec)
|
||||
float32 c_variance_rad # GPS course accuracy estimate, (radians)
|
||||
uint8 fix_type # 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: RTCM code differential, 5: Real-Time Kinematic, float, 6: Real-Time Kinematic, fixed, 8: Extrapolated. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
|
||||
float32 eph # GPS HDOP horizontal dilution of position in m
|
||||
float32 epv # GPS VDOP horizontal dilution of position in m
|
||||
float32 eph # GPS horizontal position accuracy (metres)
|
||||
float32 epv # GPS vertical position accuracy (metres)
|
||||
|
||||
int32 noise_per_ms # GPS noise per millisecond
|
||||
int32 jamming_indicator # indicates jamming is occurring
|
||||
|
||||
uint64 timestamp_velocity # Timestamp for velocity informations
|
||||
float32 vel_m_s # GPS ground speed (m/s)
|
||||
float32 vel_n_m_s # GPS ground speed in m/s
|
||||
float32 vel_e_m_s # GPS ground speed in m/s
|
||||
float32 vel_d_m_s # GPS ground speed in m/s
|
||||
float32 cog_rad # Course over ground (NOT heading, but direction of movement) in rad, -PI..PI
|
||||
bool vel_ned_valid # Flag to indicate if NED speed is valid
|
||||
uint64 timestamp_velocity # Time of the velocity estimates since system start, (microseconds)
|
||||
float32 vel_m_s # GPS ground speed, (metres/sec)
|
||||
float32 vel_n_m_s # GPS North velocity, (metres/sec)
|
||||
float32 vel_e_m_s # GPS East velocity, (metres/sec)
|
||||
float32 vel_d_m_s # GPS Down velocity, (metres/sec)
|
||||
float32 cog_rad # Course over ground (NOT heading, but direction of movement), -PI..PI, (radians)
|
||||
bool vel_ned_valid # True if NED velocity is valid
|
||||
|
||||
uint64 timestamp_time # Timestamp for time information
|
||||
uint64 timestamp_time # Time of the UTC timestamp since system start, (microseconds)
|
||||
uint64 time_utc_usec # Timestamp (microseconds, UTC), this is the timestamp which comes from the gps module. It might be unavailable right after cold start, indicated by a value of 0
|
||||
|
||||
uint8 satellites_used # Number of satellites used
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
# Fused local position in NED.
|
||||
|
||||
uint64 timestamp # Time of this estimate, in microseconds since system start
|
||||
bool xy_valid # true if x and y are valid
|
||||
bool z_valid # true if z is valid
|
||||
bool v_xy_valid # true if vy and vy are valid
|
||||
bool v_z_valid # true if vz is valid
|
||||
uint64 timestamp # Time of this estimate since system start, (microseconds)
|
||||
bool xy_valid # true if x and y are valid
|
||||
bool z_valid # true if z is valid
|
||||
bool v_xy_valid # true if vy and vy are valid
|
||||
bool v_z_valid # true if vz is valid
|
||||
|
||||
# Position in local NED frame
|
||||
float32 x # X position in meters in NED earth-fixed frame
|
||||
float32 y # X position in meters in NED earth-fixed frame
|
||||
float32 z # Z position in meters in NED earth-fixed frame (negative altitude)
|
||||
float32 x # North position in NED earth-fixed frame, (metres)
|
||||
float32 y # East position in NED earth-fixed frame, (metres)
|
||||
float32 z # Down position (negative altitude) in NED earth-fixed frame, (metres)
|
||||
|
||||
# Velocity in NED frame
|
||||
float32 vx # Ground X Speed (Latitude), m/s in NED
|
||||
float32 vy # Ground Y Speed (Longitude), m/s in NED
|
||||
float32 vz # Ground Z Speed (Altitude), m/s in NED
|
||||
float32 vx # North velocity in NED earth-fixed frame, (metres/sec)
|
||||
float32 vy # East velocity in NED earth-fixed frame, (metres/sec)
|
||||
float32 vz # Down velocity in NED earth-fixed frame, (metres/sec)
|
||||
|
||||
# Heading
|
||||
float32 yaw
|
||||
float32 yaw # Euler yaw angle transforming the tangent plane relative to NED earth-fixed frame, -PI..+PI, (radians)
|
||||
|
||||
# Reference position in GPS / WGS84 frame
|
||||
bool xy_global # true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
|
||||
bool z_global # true if z is valid and has valid global reference (ref_alt)
|
||||
uint64 ref_timestamp # Time when reference position was set
|
||||
float64 ref_lat # Reference point latitude in degrees
|
||||
float64 ref_lon # Reference point longitude in degrees
|
||||
float32 ref_alt # Reference altitude AMSL in meters, MUST be set to current (not at reference point!) ground level
|
||||
# Position of reference point (local NED frame origin) in global (GPS / WGS84) frame
|
||||
bool xy_global # true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
|
||||
bool z_global # true if z is valid and has valid global reference (ref_alt)
|
||||
uint64 ref_timestamp # Time when reference position was set since system start, (microseconds)
|
||||
float64 ref_lat # Reference point latitude, (degrees)
|
||||
float64 ref_lon # Reference point longitude, (degrees)
|
||||
float32 ref_alt # Reference altitude AMSL, MUST be set to current (not at reference point!) ground level, (metres)
|
||||
|
||||
# Distance to surface
|
||||
float32 dist_bottom # Distance to bottom surface (ground)
|
||||
float32 dist_bottom_rate # Distance to bottom surface (ground) change rate
|
||||
uint64 surface_bottom_timestamp # Time when new bottom surface found
|
||||
bool dist_bottom_valid # true if distance to bottom surface is valid
|
||||
float32 eph
|
||||
float32 epv
|
||||
float32 dist_bottom # Distance from from bottom surface to ground, (metres)
|
||||
float32 dist_bottom_rate # Rate of change of distance from bottom surface to ground, (metres/sec)
|
||||
uint64 surface_bottom_timestamp # Time when new bottom surface found since system start, (microseconds)
|
||||
bool dist_bottom_valid # true if distance to bottom surface is valid
|
||||
float32 eph # Standard deviation of horizontal position error, (metres)
|
||||
float32 epv # Standard deviation of vertical position error, (metres)
|
||||
@@ -10,7 +10,8 @@ uint8 MAIN_STATE_OFFBOARD = 7
|
||||
uint8 MAIN_STATE_STAB = 8
|
||||
uint8 MAIN_STATE_RATTITUDE = 9
|
||||
uint8 MAIN_STATE_AUTO_TAKEOFF = 10
|
||||
uint8 MAIN_STATE_MAX = 11
|
||||
uint8 MAIN_STATE_AUTO_LAND = 11
|
||||
uint8 MAIN_STATE_MAX = 12
|
||||
|
||||
# If you change the order, add or remove arming_state_t states make sure to update the arrays
|
||||
# in state_machine_helper.cpp as well.
|
||||
@@ -104,6 +105,7 @@ uint16 counter # incremented by the writing thread everytime new data is store
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
uint8 main_state # main state machine
|
||||
uint8 main_state_prev # previous main state
|
||||
uint8 nav_state # set navigation state machine to specified value
|
||||
uint8 arming_state # current arming state
|
||||
uint8 hil_state # current hil state
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
#define GPIO_UART4_RX GPIO_UART4_RX_1
|
||||
#define GPIO_UART4_TX GPIO_UART4_TX_1
|
||||
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1 /* RC_INPUT */
|
||||
#define GPIO_USART6_TX GPIO_USART6_TX_1
|
||||
|
||||
#define GPIO_UART7_RX GPIO_UART7_RX_1
|
||||
@@ -257,9 +257,10 @@
|
||||
#define GPIO_SPI1_MOSI (GPIO_SPI1_MOSI_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI1_SCK (GPIO_SPI1_SCK_1|GPIO_SPEED_50MHz)
|
||||
|
||||
|
||||
#define GPIO_SPI2_MISO (GPIO_SPI2_MISO_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI2_MOSI (GPIO_SPI2_MOSI_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_2|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_1|GPIO_SPEED_50MHz)
|
||||
|
||||
/************************************************************************************
|
||||
* Public Data
|
||||
|
||||
@@ -552,7 +552,7 @@ CONFIG_UART7_SERIAL_CONSOLE=y
|
||||
# USART1 Configuration
|
||||
#
|
||||
CONFIG_USART1_RXBUFSIZE=600
|
||||
CONFIG_USART1_TXBUFSIZE=1100
|
||||
CONFIG_USART1_TXBUFSIZE=2000
|
||||
CONFIG_USART1_BAUD=115200
|
||||
CONFIG_USART1_BITS=8
|
||||
CONFIG_USART1_PARITY=0
|
||||
@@ -669,7 +669,7 @@ CONFIG_CDCACM_BULKIN_REQLEN=96
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=4000
|
||||
CONFIG_CDCACM_VENDORID=0x26ac
|
||||
CONFIG_CDCACM_PRODUCTID=0x0011
|
||||
CONFIG_CDCACM_PRODUCTID=0x0012
|
||||
CONFIG_CDCACM_VENDORSTR="3D Robotics"
|
||||
CONFIG_CDCACM_PRODUCTSTR="PX4 FMU v4.x"
|
||||
# CONFIG_USBMSC is not set
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
uorb start
|
||||
simulator start -s
|
||||
param load
|
||||
param set MAV_TYPE 2
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.35
|
||||
param set SYS_AUTOSTART 4010
|
||||
param set SYS_RESTART_TYPE 2
|
||||
dataman start
|
||||
param set CAL_GYRO0_ID 2293768
|
||||
param set CAL_ACC0_ID 1376264
|
||||
param set CAL_ACC1_ID 1310728
|
||||
param set CAL_MAG0_ID 196616
|
||||
param set CAL_GYRO0_XOFF 0.01
|
||||
param set CAL_ACC0_XOFF 0.01
|
||||
param set CAL_ACC0_YOFF -0.01
|
||||
param set CAL_ACC0_ZOFF 0.01
|
||||
param set CAL_ACC0_XSCALE 1.01
|
||||
param set CAL_ACC0_YSCALE 1.01
|
||||
param set CAL_ACC0_ZSCALE 1.01
|
||||
param set CAL_ACC1_XOFF 0.01
|
||||
param set CAL_MAG0_XOFF 0.01
|
||||
param set MPC_XY_P 0.4
|
||||
param set MPC_XY_VEL_P 0.2
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set SENS_BOARD_ROT 0
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
barosim start
|
||||
adcsim start
|
||||
gpssim start
|
||||
pwm_out_sim mode_pwm
|
||||
sleep 1
|
||||
sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 100 -e -t -a
|
||||
ekf2 start
|
||||
@@ -50,6 +50,7 @@ mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
uorb start
|
||||
simulator start -s
|
||||
param load
|
||||
param set MAV_TYPE 20
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
param set MC_YAW_P 2.0
|
||||
param set MC_YAWRATE_P 0.35
|
||||
param set VT_TYPE 2
|
||||
param set SYS_AUTOSTART 4010
|
||||
param set SYS_RESTART_TYPE 2
|
||||
dataman start
|
||||
param set CAL_GYRO0_ID 2293768
|
||||
param set CAL_ACC0_ID 1376264
|
||||
param set CAL_ACC1_ID 1310728
|
||||
param set CAL_MAG0_ID 196616
|
||||
param set CAL_GYRO0_XOFF 0.01
|
||||
param set CAL_ACC0_XOFF 0.01
|
||||
param set CAL_ACC0_YOFF -0.01
|
||||
param set CAL_ACC0_ZOFF 0.01
|
||||
param set CAL_ACC0_XSCALE 1.01
|
||||
param set CAL_ACC0_YSCALE 1.01
|
||||
param set CAL_ACC0_ZSCALE 1.01
|
||||
param set CAL_ACC1_XOFF 0.01
|
||||
param set CAL_MAG0_XOFF 0.01
|
||||
param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_FF 0.1
|
||||
param set MPC_Z_VEL_MAX 1.0
|
||||
param set SENS_BOARD_ROT 8
|
||||
param set COM_RC_IN_MODE 1
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
barosim start
|
||||
adcsim start
|
||||
gpssim start
|
||||
measairspeedsim start
|
||||
pwm_out_sim mode_pwm
|
||||
sleep 1
|
||||
sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
attitude_estimator_q start
|
||||
position_estimator_inav start
|
||||
vtol_att_control start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
fw_pos_control_l1 start
|
||||
fw_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/standard_vtol_sitl.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 200 -e -t -a
|
||||
@@ -27,6 +27,7 @@ param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_FF 0.1
|
||||
param set MPC_Z_VEL_MAX 1.0
|
||||
param set SENS_BOARD_ROT 8
|
||||
param set COM_RC_IN_MODE 1
|
||||
rgbledsim start
|
||||
@@ -52,6 +53,7 @@ fw_pos_control_l1 start
|
||||
fw_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x_vtol.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
@@ -61,4 +63,4 @@ mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 100 -e -t -a
|
||||
sdlog2 start -r 200 -e -t -a
|
||||
|
||||
@@ -32,6 +32,12 @@ param set COM_RC_IN_MODE 1
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
param set MIS_TAKEOFF_ALT 5.0
|
||||
param set MPC_HOLD_MAX_Z 2.0
|
||||
param set MPC_HOLD_XY_DZ 0.1
|
||||
param set MPC_HOLD_Z_DZ 0.1
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
param set MPC_Z_VEL_P 0.4
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
@@ -51,6 +57,7 @@ mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
@@ -59,5 +66,6 @@ mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink stream -r 20 -s MANUAL_CONTROL -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 100 -e -t -a
|
||||
|
||||
@@ -150,6 +150,7 @@ __BEGIN_DECLS
|
||||
#define GPIO_TIM3_CH2OUT GPIO_TIM3_CH2OUT_3
|
||||
#define GPIO_TIM3_CH3OUT GPIO_TIM3_CH3OUT_2
|
||||
#define GPIO_TIM3_CH4OUT GPIO_TIM3_CH4OUT_2
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 8
|
||||
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 8 /* use timer 8 for the HRT */
|
||||
|
||||
@@ -129,18 +129,6 @@ stm32_boardinitialize(void)
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
__EXPORT int matherr(struct __exception *e)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
__EXPORT int matherr(struct exception *e)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
__EXPORT int nsh_archinitialize(void)
|
||||
{
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ __BEGIN_DECLS
|
||||
#define GPIO_TIM2_CH2OUT GPIO_TIM2_CH2OUT_1
|
||||
#define GPIO_TIM2_CH3OUT GPIO_TIM2_CH3OUT_1
|
||||
#define GPIO_TIM2_CH4OUT GPIO_TIM2_CH4OUT_1
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 4
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
|
||||
@@ -115,6 +115,7 @@ __BEGIN_DECLS
|
||||
#define PX4_SPI_BUS_SENSORS 1
|
||||
#define PX4_SPI_BUS_RAMTRON 2
|
||||
#define PX4_SPI_BUS_EXT 4
|
||||
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_SENSORS
|
||||
|
||||
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
|
||||
#define PX4_SPIDEV_GYRO 1
|
||||
@@ -210,6 +211,7 @@ __BEGIN_DECLS
|
||||
#define GPIO_TIM1_CH4OUT GPIO_TIM1_CH4OUT_2
|
||||
#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2
|
||||
#define GPIO_TIM4_CH3OUT GPIO_TIM4_CH3OUT_2
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 6
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
|
||||
@@ -65,7 +65,7 @@ __BEGIN_DECLS
|
||||
//{0, GPIO_PERIPH_3V3_EN, 0}, Owned by the 8266 driver
|
||||
//{0, GPIO_SBUS_INV, 0}, https://github.com/PX4/Firmware/blob/master/src/modules/px4iofirmware/sbus.c
|
||||
//{GPIO_8266_GPIO0, 0, 0}, Owned by the 8266 driver
|
||||
//{0, GPIO_SPEKTRUM_POWER, 0}, Owned Spektum driver input to auto pilot
|
||||
//{0, GPIO_SPEKTRUM_PWR_EN, 0}, Owned Spektum driver input to auto pilot
|
||||
//{0, GPIO_8266_PD, 0}, Owned by the 8266 driver
|
||||
//{0, GPIO_8266_RST, 0}, Owned by the 8266 driver
|
||||
|
||||
@@ -73,7 +73,7 @@ __BEGIN_DECLS
|
||||
/* LEDs */
|
||||
|
||||
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN11)
|
||||
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
|
||||
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN1)
|
||||
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN3)
|
||||
|
||||
#define GPIO_LED_RED GPIO_LED1
|
||||
@@ -120,15 +120,24 @@ __BEGIN_DECLS
|
||||
|
||||
#define PX4_SPI_BUS_SENSORS 1
|
||||
#define PX4_SPI_BUS_RAMTRON 2
|
||||
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_RAMTRON
|
||||
|
||||
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
|
||||
#define PX4_SPIDEV_GYRO 1
|
||||
#define PX4_SPIDEV_ACCEL_MAG 2
|
||||
#define PX4_SPIDEV_BARO 3
|
||||
#define PX4_SPIDEV_MPU 4
|
||||
#define PX4_SPIDEV_HMC 5
|
||||
#define PX4_SPIDEV_ICM 6
|
||||
|
||||
/* onboard MS5611 and FRAM are both on bus SPI2
|
||||
* spi_dev_e:SPIDEV_FLASH has the value 2 and is used in the NuttX ramtron driver
|
||||
* use 3 for the barometer to differentiate
|
||||
*/
|
||||
#define PX4_SPIDEV_BARO 3
|
||||
#if (PX4_SPIDEV_BARO == SPIDEV_FLASH)
|
||||
#error PX4_SPIDEV_BARO must not be equal to SPIDEV_FLASH as they share the same bus
|
||||
#endif
|
||||
|
||||
/* I2C busses */
|
||||
#define PX4_I2C_BUS_EXPANSION 1
|
||||
#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION
|
||||
@@ -200,6 +209,7 @@ __BEGIN_DECLS
|
||||
#define GPIO_TIM1_CH4OUT GPIO_TIM1_CH4OUT_2
|
||||
#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2
|
||||
#define GPIO_TIM4_CH3OUT GPIO_TIM4_CH3OUT_2
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 6
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
@@ -214,7 +224,7 @@ __BEGIN_DECLS
|
||||
#define HRT_PPM_CHANNEL 3 /* use capture/compare channel 2 */
|
||||
#define GPIO_PPM_IN (GPIO_ALT|GPIO_AF2|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN0)
|
||||
|
||||
#define SBUS_SERIAL_PORT "/dev/ttyS4"
|
||||
#define RC_SERIAL_PORT "/dev/ttyS4"
|
||||
|
||||
/* PWM input driver. Use FMU AUX5 pins attached to timer4 channel 2 */
|
||||
#define PWMIN_TIMER 4
|
||||
@@ -223,15 +233,31 @@ __BEGIN_DECLS
|
||||
|
||||
#define GPIO_RSSI_IN (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN1)
|
||||
#define GPIO_LED_SAFETY (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3)
|
||||
#define GPIO_SAFETY_SWITCH_IN (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN4)
|
||||
#define GPIO_BTN_SAFETY (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN4)
|
||||
#define GPIO_PERIPH_3V3_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN5)
|
||||
#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
|
||||
/* for R07, this signal is active low */
|
||||
//#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
|
||||
//#define INVERT_RC_INPUT(_s) stm32_gpiowrite(GPIO_SBUS_INV, 1-_s);
|
||||
/* for R12, this signal is active high */
|
||||
#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN13)
|
||||
#define INVERT_RC_INPUT(_s) stm32_gpiowrite(GPIO_SBUS_INV, _s);
|
||||
|
||||
#define GPIO_8266_GPIO0 (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTE|GPIO_PIN2)
|
||||
#define GPIO_SPEKTRUM_POWER (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN4)
|
||||
#define GPIO_SPEKTRUM_PWR_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN4)
|
||||
#define GPIO_8266_PD (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN5)
|
||||
#define GPIO_8266_RST (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN6)
|
||||
|
||||
/* Power switch controls ******************************************************/
|
||||
|
||||
#define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (1-_s))
|
||||
//#define GPIO_USART1_RX_SPEKTRUM (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN7)
|
||||
#define SPEKTRUM_RX_AS_UART() stm32_configgpio(GPIO_USART1_RX)
|
||||
|
||||
// FMUv4 has a separate GPIO for serial RC output
|
||||
#define GPIO_RC_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN6)
|
||||
#define SPEKTRUM_RX_AS_GPIO() stm32_configgpio(GPIO_RC_OUT)
|
||||
#define SPEKTRUM_RX_HIGH(_s) stm32_gpiowrite(GPIO_RC_OUT, (_s))
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************************************/
|
||||
|
||||
@@ -230,9 +230,13 @@ __EXPORT int nsh_archinitialize(void)
|
||||
|
||||
stm32_configgpio(GPIO_SBUS_INV);
|
||||
stm32_configgpio(GPIO_8266_GPIO0);
|
||||
stm32_configgpio(GPIO_SPEKTRUM_POWER);
|
||||
stm32_configgpio(GPIO_SPEKTRUM_PWR_EN);
|
||||
stm32_configgpio(GPIO_8266_PD);
|
||||
stm32_configgpio(GPIO_8266_RST);
|
||||
#ifdef GPIO_RC_OUT
|
||||
stm32_configgpio(GPIO_RC_OUT); /* Serial RC output pin */
|
||||
stm32_gpiowrite(GPIO_RC_OUT, 1); /* set it high to pull RC input up */
|
||||
#endif
|
||||
|
||||
/* configure the high-resolution time/callout interface */
|
||||
hrt_init();
|
||||
@@ -284,7 +288,6 @@ __EXPORT int nsh_archinitialize(void)
|
||||
SPI_SETMODE(spi1, SPIDEV_MODE3);
|
||||
SPI_SELECT(spi1, PX4_SPIDEV_GYRO, false);
|
||||
SPI_SELECT(spi1, PX4_SPIDEV_HMC, false);
|
||||
SPI_SELECT(spi1, PX4_SPIDEV_BARO, false);
|
||||
SPI_SELECT(spi1, PX4_SPIDEV_MPU, false);
|
||||
up_udelay(20);
|
||||
|
||||
@@ -298,14 +301,16 @@ __EXPORT int nsh_archinitialize(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Default SPI2 to 37.5 MHz (40 MHz rounded to nearest valid divider, F4 max)
|
||||
* and de-assert the known chip selects. */
|
||||
/* Default SPI2 to 12MHz and de-assert the known chip selects.
|
||||
* MS5611 has max SPI clock speed of 20MHz
|
||||
*/
|
||||
|
||||
// XXX start with 10.4 MHz in FRAM usage and go up to 37.5 once validated
|
||||
// XXX start with 10.4 MHz and go up to 20 once validated
|
||||
SPI_SETFREQUENCY(spi2, 12 * 1000 * 1000);
|
||||
SPI_SETBITS(spi2, 8);
|
||||
SPI_SETMODE(spi2, SPIDEV_MODE3);
|
||||
SPI_SELECT(spi2, SPIDEV_FLASH, false);
|
||||
SPI_SELECT(spi2, PX4_SPIDEV_BARO, false);
|
||||
|
||||
#ifdef CONFIG_MMCSD
|
||||
/* First, get an instance of the SDIO interface */
|
||||
|
||||
@@ -151,8 +151,24 @@ __EXPORT uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devi
|
||||
#ifdef CONFIG_STM32_SPI2
|
||||
__EXPORT void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
{
|
||||
/* there can only be one device on this bus, so always select it */
|
||||
stm32_gpiowrite(GPIO_SPI_CS_FRAM, !selected);
|
||||
/* SPI select is active low, so write !selected to select the device */
|
||||
|
||||
switch (devid) {
|
||||
case SPIDEV_FLASH:
|
||||
/* Making sure the other peripherals are not selected */
|
||||
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
|
||||
stm32_gpiowrite(GPIO_SPI_CS_FRAM, !selected);
|
||||
break;
|
||||
|
||||
case PX4_SPIDEV_BARO:
|
||||
/* Making sure the other peripherals are not selected */
|
||||
stm32_gpiowrite(GPIO_SPI_CS_FRAM, 1);
|
||||
stm32_gpiowrite(GPIO_SPI_CS_MS5611, !selected);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
__EXPORT uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
||||
@@ -83,6 +83,13 @@
|
||||
#define GPIO_RELAY1_EN (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN12)
|
||||
#define GPIO_RELAY2_EN (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN11)
|
||||
|
||||
#define GPIO_SPEKTRUM_PWR_EN GPIO_RELAY1_EN
|
||||
#define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_RELAY1_EN, (_s))
|
||||
|
||||
#define SPEKTRUM_RX_HIGH(_s) stm32_gpiowrite(GPIO_USART1_RX_SPEKTRUM, (_s))
|
||||
#define SPEKTRUM_RX_AS_UART() stm32_configgpio(GPIO_USART1_RX)
|
||||
#define SPEKTRUM_RX_AS_GPIO() stm32_configgpio(GPIO_USART1_RX_SPEKTRUM)
|
||||
|
||||
/* Analog inputs ********************************************************************/
|
||||
|
||||
#define GPIO_ADC_VBATT (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN13)
|
||||
#define GPIO_LED4 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN11)
|
||||
|
||||
#define GPIO_USART1_RX_SPEKTRUM (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz | GPIO_OUTPUT_SET | GPIO_PORTA | GPIO_PIN10)
|
||||
#define GPIO_USART1_RX_SPEKTRUM (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN10)
|
||||
|
||||
/* Safety switch button *******************************************************/
|
||||
|
||||
@@ -88,6 +88,11 @@
|
||||
/* Power switch controls ******************************************************/
|
||||
|
||||
#define GPIO_SPEKTRUM_PWR_EN (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN13)
|
||||
#define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (_s))
|
||||
|
||||
#define SPEKTRUM_RX_HIGH(_s) stm32_gpiowrite(GPIO_USART1_RX_SPEKTRUM, (_s))
|
||||
#define SPEKTRUM_RX_AS_UART() stm32_configgpio(GPIO_USART1_RX)
|
||||
#define SPEKTRUM_RX_AS_GPIO() stm32_configgpio(GPIO_USART1_RX_SPEKTRUM)
|
||||
|
||||
#define GPIO_SERVO_FAULT_DETECT (GPIO_INPUT|GPIO_CNF_INPULLUP|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/**
|
||||
* @file camera_trigger.cpp
|
||||
*
|
||||
* External camera-IMU synchronisation and triggering via FMU auxillary pins.
|
||||
* External camera-IMU synchronisation and triggering via FMU auxiliary pins.
|
||||
*
|
||||
* @author Mohammed Kabir <mhkabir98@gmail.com>
|
||||
*/
|
||||
|
||||
@@ -79,6 +79,8 @@ PARAM_DEFINE_FLOAT(TRIG_ACT_TIME, 0.5f);
|
||||
*
|
||||
* 0 disables the trigger, 1 sets it to enabled on command, 2 always on
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 2
|
||||
* @group Camera trigger
|
||||
|
||||
@@ -56,7 +56,7 @@ pthread_mutex_t filemutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
extern "C" {
|
||||
|
||||
#define PX4_MAX_FD 200
|
||||
#define PX4_MAX_FD 300
|
||||
static device::file_t *filemap[PX4_MAX_FD] = {};
|
||||
|
||||
int px4_errno;
|
||||
@@ -124,7 +124,22 @@ extern "C" {
|
||||
ret = dev->open(filemap[i]);
|
||||
|
||||
} else {
|
||||
PX4_WARN("exceeded maximum number of file descriptors!");
|
||||
|
||||
const unsigned NAMELEN = 32;
|
||||
char thread_name[NAMELEN] = {};
|
||||
|
||||
#ifndef __PX4_QURT
|
||||
int nret = pthread_getname_np(pthread_self(), thread_name, NAMELEN);
|
||||
|
||||
if (nret || thread_name[0] == 0) {
|
||||
PX4_WARN("failed getting thread name");
|
||||
}
|
||||
|
||||
PX4_BACKTRACE();
|
||||
#endif
|
||||
|
||||
PX4_WARN("%s: exceeded maximum number of file descriptors, accessing %s",
|
||||
thread_name, path);
|
||||
ret = -ENOENT;
|
||||
}
|
||||
|
||||
@@ -245,12 +260,16 @@ extern "C" {
|
||||
|
||||
const unsigned NAMELEN = 32;
|
||||
char thread_name[NAMELEN] = {};
|
||||
|
||||
#ifndef __PX4_QURT
|
||||
int nret = pthread_getname_np(pthread_self(), thread_name, NAMELEN);
|
||||
|
||||
if (nret || thread_name[0] == 0) {
|
||||
PX4_WARN("failed getting thread name");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
PX4_DEBUG("Called px4_poll timeout = %d", timeout);
|
||||
px4_sem_init(&sem, 0, 0);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ __BEGIN_DECLS
|
||||
/**
|
||||
* Default value for a shutdown motor
|
||||
*/
|
||||
#define PWM_MOTOR_OFF 800
|
||||
#define PWM_MOTOR_OFF 900
|
||||
|
||||
/**
|
||||
* Default minimum PWM in us
|
||||
|
||||
@@ -55,11 +55,11 @@
|
||||
PARAM_DEFINE_INT32(GMB_USE_MNT, 0);
|
||||
|
||||
/**
|
||||
* Auxilary switch to set mount operation mode.
|
||||
* Auxiliary switch to set mount operation mode.
|
||||
*
|
||||
* Set to 0 to disable manual mode control.
|
||||
*
|
||||
* If set to an auxilary switch:
|
||||
* If set to an auxiliary switch:
|
||||
* Switch off means the gimbal is put into safe/locked position.
|
||||
* Switch on means the gimbal can move freely, and landing gear
|
||||
* will be retracted if applicable.
|
||||
|
||||
@@ -72,7 +72,7 @@ typedef struct {
|
||||
uint32_t msl_altitude; ///< MSL altitude in meters * 10^2
|
||||
uint32_t ground_speed; ///< velocity in m/s
|
||||
int32_t heading; ///< heading in degrees * 10^2
|
||||
uint8_t satellites; ///< number of sattelites used
|
||||
uint8_t satellites; ///< number of satellites used
|
||||
uint8_t fix_type; ///< fix type: XXX correct for that
|
||||
uint32_t date;
|
||||
uint32_t utc_time;
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
* @author Hannes Delago
|
||||
* (rework, add ubx7+ compatibility)
|
||||
*
|
||||
* @see http://www.u-blox.com/images/downloads/Product_Docs/u-blox6_ReceiverDescriptionProtocolSpec_%28GPS.G6-SW-10018%29.pdf
|
||||
* @see http://www.u-blox.com/images/downloads/Product_Docs/u-bloxM8_ReceiverDescriptionProtocolSpec_%28UBX-13003221%29_Public.pdf
|
||||
* @see https://www2.u-blox.com/images/downloads/Product_Docs/u-blox6-GPS-GLONASS-QZSS-V14_ReceiverDescriptionProtocolSpec_Public_(GPS.G6-SW-12013).pdf
|
||||
* @see https://www.u-blox.com/sites/default/files/products/documents/u-bloxM8_ReceiverDescrProtSpec_%28UBX-13003221%29_Public.pdf
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -182,7 +182,7 @@ hott_sensors_thread_main(int argc, char *argv[])
|
||||
|
||||
recv_data(uart, &buffer[0], &size, &id);
|
||||
|
||||
// Determine which moduel sent it and process accordingly.
|
||||
// Determine which module sent it and process accordingly.
|
||||
if (id == GAM_SENSOR_ID) {
|
||||
publish_gam_message(buffer);
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ build_gps_response(uint8_t *buffer, size_t *size)
|
||||
msg.altitude_L = (uint8_t)alt & 0xff;
|
||||
msg.altitude_H = (uint8_t)(alt >> 8) & 0xff;
|
||||
|
||||
/* Get any (and probably only ever one) _home_sub postion report */
|
||||
/* Get any (and probably only ever one) _home_sub position report */
|
||||
bool updated;
|
||||
orb_check(_home_sub, &updated);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ struct gps_module_msg {
|
||||
uint8_t resolution_L; /**< 48 = Low Byte m/s resolution 0.01m 48 = 30000 = 0.00m/s (1=0.01m/s) */
|
||||
uint8_t resolution_H; /**< 117 = High Byte m/s resolution 0.01m */
|
||||
uint8_t unknown1; /**< 120 = 0m/3s */
|
||||
uint8_t gps_num_sat; /**< GPS.Satellites (number of satelites) (1 byte) */
|
||||
uint8_t gps_num_sat; /**< GPS.Satellites (number of satellites) (1 byte) */
|
||||
uint8_t gps_fix_char; /**< GPS.FixChar. (GPS fix character. display, if DGPS, 2D oder 3D) (1 byte) */
|
||||
uint8_t home_direction; /**< HomeDirection (direction from starting point to Model position) (1 byte) */
|
||||
uint8_t angle_x_direction; /**< angle x-direction (1 byte) */
|
||||
|
||||
@@ -265,7 +265,7 @@ MS5611_I2C::_read_prom()
|
||||
|
||||
/* check if all bytes are zero */
|
||||
if (i == 0) {
|
||||
/* initalize to first byte read */
|
||||
/* initialize to first byte read */
|
||||
last_val = prom_buf[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -829,7 +829,7 @@ struct ms5611_bus_option {
|
||||
{ MS5611_BUS_SPI_EXTERNAL, "/dev/ms5611_spi_ext", &MS5611_spi_interface, PX4_SPI_BUS_EXT, NULL },
|
||||
#endif
|
||||
#ifdef PX4_SPIDEV_BARO
|
||||
{ MS5611_BUS_SPI_INTERNAL, "/dev/ms5611_spi_int", &MS5611_spi_interface, PX4_SPI_BUS_SENSORS, NULL },
|
||||
{ MS5611_BUS_SPI_INTERNAL, "/dev/ms5611_spi_int", &MS5611_spi_interface, PX4_SPI_BUS_BARO, NULL },
|
||||
#endif
|
||||
#ifdef PX4_I2C_BUS_ONBOARD
|
||||
{ MS5611_BUS_I2C_INTERNAL, "/dev/ms5611_int", &MS5611_i2c_interface, PX4_I2C_BUS_ONBOARD, NULL },
|
||||
|
||||
@@ -536,7 +536,7 @@ void PWMIN::print_info(void)
|
||||
|
||||
|
||||
/*
|
||||
* Handle the interupt, gathering pulse data
|
||||
* Handle the interrupt, gathering pulse data
|
||||
*/
|
||||
static int pwmin_tim_isr(int irq, void *context)
|
||||
{
|
||||
|
||||
@@ -502,8 +502,8 @@ PWMSim::task_main()
|
||||
PX4_ISFINITE(outputs.output[i]) &&
|
||||
outputs.output[i] >= -1.0f &&
|
||||
outputs.output[i] <= 1.0f) {
|
||||
/* scale for PWM output 900 - 2100us */
|
||||
outputs.output[i] = 1500 + (600 * outputs.output[i]);
|
||||
/* scale for PWM output 1000 - 2000us */
|
||||
outputs.output[i] = 1500 + (500 * outputs.output[i]);
|
||||
|
||||
} else {
|
||||
/*
|
||||
|
||||
+369
-95
@@ -90,12 +90,8 @@
|
||||
# include <systemlib/ppm_decode.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is the analog to FMU_INPUT_DROP_LIMIT_US on the IO side
|
||||
*/
|
||||
|
||||
#define CONTROL_INPUT_DROP_LIMIT_US 2000
|
||||
#define NAN_VALUE (0.0f/0.0f)
|
||||
#define SCHEDULE_INTERVAL 2000 /**< The schedule interval in usec (500 Hz) */
|
||||
#define NAN_VALUE (0.0f/0.0f) /**< NaN value for throttle lock mode */
|
||||
|
||||
class PX4FMU : public device::CDev
|
||||
{
|
||||
@@ -123,15 +119,28 @@ public:
|
||||
int set_i2c_bus_clock(unsigned bus, unsigned clock_hz);
|
||||
|
||||
private:
|
||||
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V1)
|
||||
static const unsigned _max_actuators = 4;
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || defined(CONFIG_ARCH_BOARD_PX4FMU_V4)
|
||||
static const unsigned _max_actuators = 6;
|
||||
#endif
|
||||
#if defined(CONFIG_ARCH_BOARD_AEROCORE)
|
||||
static const unsigned _max_actuators = 8;
|
||||
#endif
|
||||
enum RC_SCAN {
|
||||
RC_SCAN_PPM = 0,
|
||||
RC_SCAN_SBUS,
|
||||
RC_SCAN_DSM,
|
||||
RC_SCAN_SUMD,
|
||||
RC_SCAN_ST24
|
||||
};
|
||||
enum RC_SCAN _rc_scan_state = RC_SCAN_SBUS;
|
||||
|
||||
char const *RC_SCAN_STRING[5] = {
|
||||
"PPM",
|
||||
"SBUS",
|
||||
"DSM",
|
||||
"SUMD",
|
||||
"ST24"
|
||||
};
|
||||
|
||||
hrt_abstime _rc_scan_begin = 0;
|
||||
bool _rc_scan_locked = false;
|
||||
bool _report_lock = true;
|
||||
|
||||
static const unsigned _max_actuators = DIRECT_PWM_OUTPUT_CHANNELS;
|
||||
|
||||
Mode _mode;
|
||||
unsigned _pwm_default_rate;
|
||||
@@ -146,11 +155,11 @@ private:
|
||||
orb_advert_t _outputs_pub;
|
||||
unsigned _num_outputs;
|
||||
int _class_instance;
|
||||
int _sbus_fd;
|
||||
int _dsm_fd;
|
||||
int _rcs_fd;
|
||||
uint8_t _rcs_buf[SBUS_FRAME_SIZE];
|
||||
|
||||
volatile bool _initialized;
|
||||
bool _servo_armed;
|
||||
bool _throttle_armed;
|
||||
bool _pwm_on;
|
||||
|
||||
MixerGroup *_mixers;
|
||||
@@ -189,7 +198,7 @@ private:
|
||||
int set_pwm_rate(unsigned rate_map, unsigned default_rate, unsigned alt_rate);
|
||||
int pwm_ioctl(file *filp, int cmd, unsigned long arg);
|
||||
void update_pwm_rev_mask();
|
||||
void publish_pwm_outputs(uint16_t *values, size_t numvalues);
|
||||
void publish_pwm_outputs(uint16_t *values, size_t numvalues);
|
||||
|
||||
struct GPIOConfig {
|
||||
uint32_t input;
|
||||
@@ -211,6 +220,14 @@ private:
|
||||
/* do not allow to copy due to ptr data members */
|
||||
PX4FMU(const PX4FMU &);
|
||||
PX4FMU operator=(const PX4FMU &);
|
||||
void fill_rc_in(uint16_t raw_rc_count,
|
||||
uint16_t raw_rc_values[input_rc_s::RC_INPUT_MAX_CHANNELS],
|
||||
hrt_abstime now, bool frame_drop, bool failsafe,
|
||||
unsigned frame_drops, int rssi);
|
||||
void dsm_bind_ioctl(int dsmMode);
|
||||
void set_rc_scan_state(RC_SCAN _rc_scan_state);
|
||||
void rc_io_invert();
|
||||
void rc_io_invert(bool invert);
|
||||
};
|
||||
|
||||
const PX4FMU::GPIOConfig PX4FMU::_gpio_tab[] = {
|
||||
@@ -292,10 +309,9 @@ PX4FMU::PX4FMU() :
|
||||
_outputs_pub(nullptr),
|
||||
_num_outputs(0),
|
||||
_class_instance(0),
|
||||
_sbus_fd(-1),
|
||||
_dsm_fd(-1),
|
||||
_rcs_fd(-1),
|
||||
_initialized(false),
|
||||
_servo_armed(false),
|
||||
_throttle_armed(false),
|
||||
_pwm_on(false),
|
||||
_mixers(nullptr),
|
||||
_groups_required(0),
|
||||
@@ -321,11 +337,9 @@ PX4FMU::PX4FMU() :
|
||||
memset(_controls, 0, sizeof(_controls));
|
||||
memset(_poll_fds, 0, sizeof(_poll_fds));
|
||||
|
||||
#ifdef HRT_PPM_CHANNEL
|
||||
// rc input, published to ORB
|
||||
memset(&_rc_in, 0, sizeof(_rc_in));
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_PPM;
|
||||
#endif
|
||||
|
||||
#ifdef GPIO_SBUS_INV
|
||||
// this board has a GPIO to control SBUS inversion
|
||||
@@ -627,6 +641,56 @@ PX4FMU::cycle_trampoline(void *arg)
|
||||
dev->cycle();
|
||||
}
|
||||
|
||||
void PX4FMU::fill_rc_in(uint16_t raw_rc_count,
|
||||
uint16_t raw_rc_values[input_rc_s::RC_INPUT_MAX_CHANNELS],
|
||||
hrt_abstime now, bool frame_drop, bool failsafe,
|
||||
unsigned frame_drops, int rssi = -1)
|
||||
{
|
||||
// fill rc_in struct for publishing
|
||||
_rc_in.channel_count = raw_rc_count;
|
||||
|
||||
if (_rc_in.channel_count > input_rc_s::RC_INPUT_MAX_CHANNELS) {
|
||||
_rc_in.channel_count = input_rc_s::RC_INPUT_MAX_CHANNELS;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < _rc_in.channel_count; i++) {
|
||||
_rc_in.values[i] = raw_rc_values[i];
|
||||
}
|
||||
|
||||
_rc_in.timestamp_publication = now;
|
||||
_rc_in.timestamp_last_signal = _rc_in.timestamp_publication;
|
||||
_rc_in.rc_ppm_frame_length = 0;
|
||||
|
||||
if (rssi == -1) {
|
||||
_rc_in.rssi =
|
||||
(!frame_drop) ? RC_INPUT_RSSI_MAX : (RC_INPUT_RSSI_MAX / 2);
|
||||
}
|
||||
|
||||
_rc_in.rc_failsafe = failsafe;
|
||||
_rc_in.rc_lost = false;
|
||||
_rc_in.rc_lost_frame_count = frame_drops;
|
||||
_rc_in.rc_total_frame_count = 0;
|
||||
}
|
||||
|
||||
#ifdef RC_SERIAL_PORT
|
||||
void PX4FMU::set_rc_scan_state(RC_SCAN newState)
|
||||
{
|
||||
// warnx("RCscan: %s failed, trying %s", PX4FMU::RC_SCAN_STRING[_rc_scan_state], PX4FMU::RC_SCAN_STRING[newState]);
|
||||
_rc_scan_begin = 0;
|
||||
_rc_scan_state = newState;
|
||||
}
|
||||
|
||||
void PX4FMU::rc_io_invert(bool invert)
|
||||
{
|
||||
INVERT_RC_INPUT(invert);
|
||||
|
||||
if (!invert) {
|
||||
// set FMU_RC_OUTPUT high to pull RC_INPUT up
|
||||
stm32_gpiowrite(GPIO_RC_OUT, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
PX4FMU::cycle()
|
||||
{
|
||||
@@ -645,19 +709,18 @@ PX4FMU::cycle()
|
||||
|
||||
update_pwm_rev_mask();
|
||||
|
||||
#ifdef SBUS_SERIAL_PORT
|
||||
_sbus_fd = sbus_init(SBUS_SERIAL_PORT, true);
|
||||
#endif
|
||||
|
||||
#ifdef DSM_SERIAL_PORT
|
||||
// XXX rather than opening it we need to cycle between protocols until one is locked in
|
||||
//_dsm_fd = dsm_init(DSM_SERIAL_PORT);
|
||||
#ifdef RC_SERIAL_PORT
|
||||
// dsm_init sets some file static variables and returns a file descriptor
|
||||
_rcs_fd = dsm_init(RC_SERIAL_PORT);
|
||||
// assume SBUS input
|
||||
sbus_config(_rcs_fd, false);
|
||||
// disable CPPM input by mapping it away from the timer capture input
|
||||
stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK));
|
||||
#endif
|
||||
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
if (_groups_subscribed != _groups_required) {
|
||||
subscribe();
|
||||
_groups_subscribed = _groups_required;
|
||||
@@ -728,8 +791,8 @@ PX4FMU::cycle()
|
||||
//main_out_latency = hrt_absolute_time() - _controls[i].timestamp - 250;
|
||||
|
||||
/* do only correct within the current phase */
|
||||
if (abs(main_out_latency) > CONTROL_INPUT_DROP_LIMIT_US) {
|
||||
main_out_latency = CONTROL_INPUT_DROP_LIMIT_US;
|
||||
if (abs(main_out_latency) > SCHEDULE_INTERVAL) {
|
||||
main_out_latency = SCHEDULE_INTERVAL;
|
||||
}
|
||||
|
||||
if (main_out_latency < 250) {
|
||||
@@ -783,7 +846,7 @@ PX4FMU::cycle()
|
||||
uint16_t pwm_limited[_max_actuators];
|
||||
|
||||
/* the PWM limit call takes care of out of band errors, NaN and constrains */
|
||||
pwm_limit_calc(_servo_armed, arm_nothrottle(), num_outputs, _reverse_pwm_mask, _disarmed_pwm, _min_pwm, _max_pwm,
|
||||
pwm_limit_calc(_throttle_armed, arm_nothrottle(), num_outputs, _reverse_pwm_mask, _disarmed_pwm, _min_pwm, _max_pwm,
|
||||
outputs, pwm_limited, &_pwm_limit);
|
||||
|
||||
/* output to the servos */
|
||||
@@ -803,14 +866,10 @@ PX4FMU::cycle()
|
||||
orb_copy(ORB_ID(actuator_armed), _armed_sub, &_armed);
|
||||
|
||||
/* update the armed status and check that we're not locked down */
|
||||
bool set_armed = (_armed.armed || _armed.prearmed) && !_armed.lockdown;
|
||||
|
||||
if (_servo_armed != set_armed) {
|
||||
_servo_armed = set_armed;
|
||||
}
|
||||
_throttle_armed = _armed.armed && !_armed.lockdown;
|
||||
|
||||
/* update PWM status if armed or if disarmed PWM values are set */
|
||||
bool pwm_on = (set_armed || _num_disarmed_set > 0);
|
||||
bool pwm_on = (_armed.armed || _num_disarmed_set > 0);
|
||||
|
||||
if (_pwm_on != pwm_on) {
|
||||
_pwm_on = pwm_on;
|
||||
@@ -825,74 +884,237 @@ PX4FMU::cycle()
|
||||
orb_copy(ORB_ID(parameter_update), _param_sub, &pupdate);
|
||||
|
||||
update_pwm_rev_mask();
|
||||
|
||||
int32_t dsm_bind_val;
|
||||
param_t dsm_bind_param;
|
||||
|
||||
/* see if bind parameter has been set, and reset it to -1 */
|
||||
param_get(dsm_bind_param = param_find("RC_DSM_BIND"), &dsm_bind_val);
|
||||
|
||||
if (dsm_bind_val > -1) {
|
||||
dsm_bind_ioctl(dsm_bind_val);
|
||||
dsm_bind_val = -1;
|
||||
param_set(dsm_bind_param, &dsm_bind_val);
|
||||
}
|
||||
}
|
||||
|
||||
bool rc_updated = false;
|
||||
|
||||
#ifdef SBUS_SERIAL_PORT
|
||||
#ifdef RC_SERIAL_PORT
|
||||
// This block scans for a supported serial RC input and locks onto the first one found
|
||||
// Scan for 100 msec, then switch protocol
|
||||
constexpr hrt_abstime rc_scan_max = 100 * 1000;
|
||||
|
||||
bool sbus_failsafe, sbus_frame_drop;
|
||||
uint16_t raw_rc_values[input_rc_s::RC_INPUT_MAX_CHANNELS];
|
||||
uint16_t raw_rc_count;
|
||||
bool sbus_updated = sbus_input(_sbus_fd, &raw_rc_values[0], &raw_rc_count, &sbus_failsafe, &sbus_frame_drop,
|
||||
input_rc_s::RC_INPUT_MAX_CHANNELS);
|
||||
unsigned frame_drops;
|
||||
bool dsm_11_bit;
|
||||
|
||||
if (sbus_updated) {
|
||||
// we have a new PPM frame. Publish it.
|
||||
_rc_in.channel_count = raw_rc_count;
|
||||
|
||||
if (_rc_in.channel_count > input_rc_s::RC_INPUT_MAX_CHANNELS) {
|
||||
_rc_in.channel_count = input_rc_s::RC_INPUT_MAX_CHANNELS;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < _rc_in.channel_count; i++) {
|
||||
_rc_in.values[i] = raw_rc_values[i];
|
||||
}
|
||||
|
||||
_rc_in.timestamp_publication = hrt_absolute_time();
|
||||
_rc_in.timestamp_last_signal = _rc_in.timestamp_publication;
|
||||
|
||||
_rc_in.rc_ppm_frame_length = 0;
|
||||
_rc_in.rssi = (!sbus_frame_drop) ? RC_INPUT_RSSI_MAX : (RC_INPUT_RSSI_MAX / 2);
|
||||
_rc_in.rc_failsafe = sbus_failsafe;
|
||||
_rc_in.rc_lost = false;
|
||||
_rc_in.rc_lost_frame_count = sbus_dropped_frames();
|
||||
_rc_in.rc_total_frame_count = 0;
|
||||
|
||||
rc_updated = true;
|
||||
if (_report_lock && _rc_scan_locked) {
|
||||
_report_lock = false;
|
||||
warnx("RCscan: %s RC input locked", RC_SCAN_STRING[_rc_scan_state]);
|
||||
}
|
||||
|
||||
#endif
|
||||
// read all available data from the serial RC input UART
|
||||
hrt_abstime now = hrt_absolute_time();
|
||||
int newBytes = ::read(_rcs_fd, &_rcs_buf[0], SBUS_FRAME_SIZE);
|
||||
|
||||
switch (_rc_scan_state) {
|
||||
case RC_SCAN_SBUS:
|
||||
if (_rc_scan_begin == 0) {
|
||||
_rc_scan_begin = now;
|
||||
// Configure serial port for SBUS
|
||||
sbus_config(_rcs_fd, false);
|
||||
rc_io_invert(true);
|
||||
|
||||
} else if (_rc_scan_locked
|
||||
|| now - _rc_scan_begin < rc_scan_max) {
|
||||
|
||||
// parse new data
|
||||
if (newBytes > 0) {
|
||||
rc_updated = sbus_parse(now, &_rcs_buf[0], newBytes, &raw_rc_values[0], &raw_rc_count, &sbus_failsafe,
|
||||
&sbus_frame_drop, &frame_drops, input_rc_s::RC_INPUT_MAX_CHANNELS);
|
||||
|
||||
if (rc_updated) {
|
||||
// we have a new SBUS frame. Publish it.
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_SBUS;
|
||||
fill_rc_in(raw_rc_count, raw_rc_values, now,
|
||||
sbus_frame_drop, sbus_failsafe, frame_drops);
|
||||
_rc_scan_locked = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// Scan the next protocol
|
||||
set_rc_scan_state(RC_SCAN_DSM);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RC_SCAN_DSM:
|
||||
if (_rc_scan_begin == 0) {
|
||||
_rc_scan_begin = now;
|
||||
// // Configure serial port for DSM
|
||||
dsm_config(_rcs_fd);
|
||||
rc_io_invert(false);
|
||||
|
||||
} else if (_rc_scan_locked
|
||||
|| now - _rc_scan_begin < rc_scan_max) {
|
||||
|
||||
if (newBytes > 0) {
|
||||
// parse new data
|
||||
rc_updated = dsm_parse(now, &_rcs_buf[0], newBytes, &raw_rc_values[0], &raw_rc_count,
|
||||
&dsm_11_bit, &frame_drops, input_rc_s::RC_INPUT_MAX_CHANNELS);
|
||||
|
||||
if (rc_updated) {
|
||||
// we have a new DSM frame. Publish it.
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_DSM;
|
||||
fill_rc_in(raw_rc_count, raw_rc_values, now,
|
||||
false, false, frame_drops);
|
||||
_rc_scan_locked = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// Scan the next protocol
|
||||
set_rc_scan_state(RC_SCAN_ST24);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RC_SCAN_ST24:
|
||||
if (_rc_scan_begin == 0) {
|
||||
_rc_scan_begin = now;
|
||||
// // Configure serial port for DSM
|
||||
dsm_config(_rcs_fd);
|
||||
rc_io_invert(false);
|
||||
|
||||
} else if (_rc_scan_locked
|
||||
|| now - _rc_scan_begin < rc_scan_max) {
|
||||
|
||||
if (newBytes > 0) {
|
||||
// parse new data
|
||||
uint8_t st24_rssi, rx_count;
|
||||
|
||||
rc_updated = false;
|
||||
|
||||
for (unsigned i = 0; i < newBytes; i++) {
|
||||
/* set updated flag if one complete packet was parsed */
|
||||
st24_rssi = RC_INPUT_RSSI_MAX;
|
||||
rc_updated = (OK == st24_decode(_rcs_buf[i], &st24_rssi, &rx_count,
|
||||
&raw_rc_count, raw_rc_values, input_rc_s::RC_INPUT_MAX_CHANNELS));
|
||||
}
|
||||
|
||||
if (rc_updated) {
|
||||
// we have a new ST24 frame. Publish it.
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_ST24;
|
||||
fill_rc_in(raw_rc_count, raw_rc_values, now,
|
||||
false, false, frame_drops, st24_rssi);
|
||||
_rc_scan_locked = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// Scan the next protocol
|
||||
set_rc_scan_state(RC_SCAN_SUMD);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RC_SCAN_SUMD:
|
||||
if (_rc_scan_begin == 0) {
|
||||
_rc_scan_begin = now;
|
||||
// // Configure serial port for DSM
|
||||
dsm_config(_rcs_fd);
|
||||
rc_io_invert(false);
|
||||
|
||||
} else if (_rc_scan_locked
|
||||
|| now - _rc_scan_begin < rc_scan_max) {
|
||||
|
||||
if (newBytes > 0) {
|
||||
// parse new data
|
||||
uint8_t sumd_rssi, rx_count;
|
||||
|
||||
rc_updated = false;
|
||||
|
||||
for (unsigned i = 0; i < newBytes; i++) {
|
||||
/* set updated flag if one complete packet was parsed */
|
||||
sumd_rssi = RC_INPUT_RSSI_MAX;
|
||||
rc_updated = (OK == sumd_decode(_rcs_buf[i], &sumd_rssi, &rx_count,
|
||||
&raw_rc_count, raw_rc_values, input_rc_s::RC_INPUT_MAX_CHANNELS));
|
||||
}
|
||||
|
||||
if (rc_updated) {
|
||||
// we have a new SUMD frame. Publish it.
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_SUMD;
|
||||
fill_rc_in(raw_rc_count, raw_rc_values, now,
|
||||
false, false, frame_drops, sumd_rssi);
|
||||
_rc_scan_locked = true;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// Scan the next protocol
|
||||
set_rc_scan_state(RC_SCAN_SUMD);
|
||||
}
|
||||
|
||||
set_rc_scan_state(RC_SCAN_PPM);
|
||||
break;
|
||||
|
||||
case RC_SCAN_PPM:
|
||||
// skip PPM if it's not supported
|
||||
#ifdef HRT_PPM_CHANNEL
|
||||
if (_rc_scan_begin == 0) {
|
||||
_rc_scan_begin = now;
|
||||
// Configure timer input pin for CPPM
|
||||
stm32_configgpio(GPIO_PPM_IN);
|
||||
rc_io_invert(false);
|
||||
|
||||
} else if (_rc_scan_locked
|
||||
|| now - _rc_scan_begin < rc_scan_max) {
|
||||
|
||||
// see if we have new PPM input data
|
||||
if ((ppm_last_valid_decode != _rc_in.timestamp_last_signal)
|
||||
&& ppm_decoded_channels > 3) {
|
||||
// we have a new PPM frame. Publish it.
|
||||
rc_updated = true;
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_PPM;
|
||||
fill_rc_in(ppm_decoded_channels, ppm_buffer, now,
|
||||
false, false, 0);
|
||||
_rc_scan_locked = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
// disable CPPM input by mapping it away from the timer capture input
|
||||
stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK));
|
||||
// Scan the next protocol
|
||||
set_rc_scan_state(RC_SCAN_SBUS);
|
||||
}
|
||||
|
||||
#else // skip PPM if it's not supported
|
||||
set_rc_scan_state(RC_SCAN_SBUS);
|
||||
|
||||
#endif // HRT_PPM_CHANNEL
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
#else // RC_SERIAL_PORT not defined
|
||||
#ifdef HRT_PPM_CHANNEL
|
||||
|
||||
// see if we have new PPM input data
|
||||
if ((ppm_last_valid_decode != _rc_in.timestamp_last_signal) &&
|
||||
ppm_decoded_channels > 3) {
|
||||
if ((ppm_last_valid_decode != _rc_in.timestamp_last_signal)
|
||||
&& ppm_decoded_channels > 3) {
|
||||
// we have a new PPM frame. Publish it.
|
||||
_rc_in.channel_count = ppm_decoded_channels;
|
||||
|
||||
if (_rc_in.channel_count > input_rc_s::RC_INPUT_MAX_CHANNELS) {
|
||||
_rc_in.channel_count = input_rc_s::RC_INPUT_MAX_CHANNELS;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < _rc_in.channel_count; i++) {
|
||||
_rc_in.values[i] = ppm_buffer[i];
|
||||
}
|
||||
|
||||
_rc_in.timestamp_publication = ppm_last_valid_decode;
|
||||
_rc_in.timestamp_last_signal = ppm_last_valid_decode;
|
||||
|
||||
_rc_in.rc_ppm_frame_length = ppm_frame_length;
|
||||
_rc_in.rssi = RC_INPUT_RSSI_MAX;
|
||||
_rc_in.rc_failsafe = false;
|
||||
_rc_in.rc_lost = false;
|
||||
_rc_in.rc_lost_frame_count = 0;
|
||||
_rc_in.rc_total_frame_count = 0;
|
||||
|
||||
rc_updated = true;
|
||||
fill_rc_in(ppm_decoded_channels, ppm_buffer, hrt_absolute_time(),
|
||||
false, false, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // HRT_PPM_CHANNEL
|
||||
#endif // RC_SERIAL_PORT
|
||||
|
||||
if (rc_updated) {
|
||||
/* lazily advertise on first publication */
|
||||
@@ -905,7 +1127,7 @@ PX4FMU::cycle()
|
||||
}
|
||||
|
||||
work_queue(HPWORK, &_work, (worker_t)&PX4FMU::cycle_trampoline, this,
|
||||
USEC2TICK(CONTROL_INPUT_DROP_LIMIT_US - main_out_latency));
|
||||
USEC2TICK(SCHEDULE_INTERVAL - main_out_latency));
|
||||
}
|
||||
|
||||
void PX4FMU::work_stop()
|
||||
@@ -1381,6 +1603,38 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef RC_SERIAL_PORT
|
||||
|
||||
case DSM_BIND_START:
|
||||
/* only allow DSM2, DSM-X and DSM-X with more than 7 channels */
|
||||
warnx("fmu pwm_ioctl: DSM_BIND_START, arg: %lu", arg);
|
||||
|
||||
if (arg == DSM2_BIND_PULSES ||
|
||||
arg == DSMX_BIND_PULSES ||
|
||||
arg == DSMX8_BIND_PULSES) {
|
||||
|
||||
dsm_bind(DSM_CMD_BIND_POWER_DOWN, 0);
|
||||
usleep(500000);
|
||||
|
||||
dsm_bind(DSM_CMD_BIND_SET_RX_OUT, 0);
|
||||
|
||||
dsm_bind(DSM_CMD_BIND_POWER_UP, 0);
|
||||
usleep(72000);
|
||||
|
||||
dsm_bind(DSM_CMD_BIND_SEND_PULSES, arg);
|
||||
usleep(50000);
|
||||
|
||||
dsm_bind(DSM_CMD_BIND_REINIT_UART, 0);
|
||||
|
||||
ret = OK;
|
||||
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MIXERIOCRESET:
|
||||
if (_mixers != nullptr) {
|
||||
delete _mixers;
|
||||
@@ -1683,9 +1937,9 @@ PX4FMU::peripheral_reset(int ms)
|
||||
|
||||
stm32_gpiowrite(GPIO_PERIPH_3V3_EN, 0);
|
||||
|
||||
bool last = stm32_gpioread(GPIO_SPEKTRUM_POWER);
|
||||
bool last = stm32_gpioread(GPIO_SPEKTRUM_PWR_EN);
|
||||
/* Keep Spektum on to discharge rail*/
|
||||
stm32_gpiowrite(GPIO_SPEKTRUM_POWER, 1);
|
||||
stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, 1);
|
||||
|
||||
/* wait for the peripheral rail to reach GND */
|
||||
usleep(ms * 1000);
|
||||
@@ -1694,7 +1948,7 @@ PX4FMU::peripheral_reset(int ms)
|
||||
/* re-enable power */
|
||||
|
||||
/* switch the peripheral rail back on */
|
||||
stm32_gpiowrite(GPIO_SPEKTRUM_POWER, last);
|
||||
stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, last);
|
||||
stm32_gpiowrite(GPIO_PERIPH_3V3_EN, 1);
|
||||
#endif
|
||||
}
|
||||
@@ -1849,6 +2103,26 @@ PX4FMU::gpio_ioctl(struct file *filp, int cmd, unsigned long arg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
PX4FMU::dsm_bind_ioctl(int dsmMode)
|
||||
{
|
||||
if (!_armed.armed) {
|
||||
// mavlink_log_info(_mavlink_fd, "[FMU] binding DSM%s RX", (dsmMode == 0) ? "2" : ((dsmMode == 1) ? "-X" : "-X8"));
|
||||
warnx("[FMU] binding DSM%s RX", (dsmMode == 0) ? "2" : ((dsmMode == 1) ? "-X" : "-X8"));
|
||||
int ret = ioctl(nullptr, DSM_BIND_START,
|
||||
(dsmMode == 0) ? DSM2_BIND_PULSES : ((dsmMode == 1) ? DSMX_BIND_PULSES : DSMX8_BIND_PULSES));
|
||||
|
||||
if (ret) {
|
||||
// mavlink_log_critical(_mavlink_fd, "binding failed.");
|
||||
warnx("binding failed.");
|
||||
}
|
||||
|
||||
} else {
|
||||
// mavlink_log_info(_mavlink_fd, "[FMU] system armed, bind request rejected");
|
||||
warnx("[FMU] system armed, bind request rejected");
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@@ -2242,7 +2516,7 @@ fmu_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "info")) {
|
||||
#ifdef SBUS_SERIAL_PORT
|
||||
#ifdef RC_SERIAL_PORT
|
||||
warnx("frame drops: %u", sbus_dropped_frames());
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -58,6 +60,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV1, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -69,6 +73,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV2, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -80,6 +86,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV3, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -91,6 +99,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV4, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -102,6 +112,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV5, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -58,6 +60,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV1, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -69,6 +73,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV2, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -80,6 +86,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV3, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -91,6 +99,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV4, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -102,6 +112,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV5, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -113,6 +125,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV6, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
@@ -124,6 +138,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV7, 0);
|
||||
*
|
||||
* Set to 1 to invert the channel, 0 for default direction.
|
||||
*
|
||||
* @reboot_required true
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @group PWM Outputs
|
||||
|
||||
@@ -599,7 +599,7 @@ error:
|
||||
#endif /* HRT_PPM_CHANNEL */
|
||||
|
||||
/**
|
||||
* Handle the compare interupt by calling the callout dispatcher
|
||||
* Handle the compare interrupt by calling the callout dispatcher
|
||||
* and then re-scheduling the next deadline.
|
||||
*/
|
||||
static int
|
||||
@@ -750,7 +750,7 @@ hrt_store_absolute_time(volatile hrt_abstime *now)
|
||||
}
|
||||
|
||||
/**
|
||||
* Initalise the high-resolution timing module.
|
||||
* Initialise the high-resolution timing module.
|
||||
*/
|
||||
void
|
||||
hrt_init(void)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
px4_add_module(
|
||||
MODULE examples__hwtest
|
||||
MAIN ex_hwtest
|
||||
STACK 2000
|
||||
SRCS
|
||||
hwtest.c
|
||||
DEPENDS
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
px4_add_module(
|
||||
MODULE examples__matlab_csv_serial
|
||||
MAIN matlab_csv_serial
|
||||
STACK 2000
|
||||
SRCS
|
||||
matlab_csv_serial.c
|
||||
DEPENDS
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
px4_add_module(
|
||||
MODULE examples__px4_simple_app
|
||||
MAIN px4_simple_app
|
||||
STACK 2000
|
||||
SRCS
|
||||
px4_simple_app.c
|
||||
DEPENDS
|
||||
|
||||
@@ -51,7 +51,7 @@ if(NOT ${BOARD} STREQUAL "sim")
|
||||
)
|
||||
if (config_io_board)
|
||||
add_dependencies(romfs fw_io)
|
||||
endif()
|
||||
endif()
|
||||
set(fw_file
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${OS}-${BOARD}-${LABEL}.px4)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user