mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-05 12:30:05 +08:00
Compare commits
610 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a5e2a3085 | |||
| 8ecada3f81 | |||
| a19a6be05e | |||
| e322359b27 | |||
| da0813b842 | |||
| 3bfedfff19 | |||
| 0bf7c39356 | |||
| f129b86d1b | |||
| 0ca63fa379 | |||
| 2bd15f1698 | |||
| f250911776 | |||
| f4f0892b25 | |||
| 0a27d14f6c | |||
| 039d5528dd | |||
| 29eac9b7cb | |||
| 513900fb16 | |||
| 03f7ee9b12 | |||
| 1b5edcabec | |||
| 5b811facab | |||
| a7c7a46be8 | |||
| fcab80bfee | |||
| 9f5adb2356 | |||
| b9e9f62bee | |||
| acea2f98d5 | |||
| 9c170f7fae | |||
| 847cf684db | |||
| a9a0759d91 | |||
| 58f6835b19 | |||
| 98eeb25e45 | |||
| e1805dfe0c | |||
| 3b5feafef4 | |||
| 04083cff3d | |||
| a548b5bd5e | |||
| 5e4e896dad | |||
| 69bb602291 | |||
| 01f6d713b4 | |||
| f24ca14122 | |||
| 5f3332e429 | |||
| 0acf0b3c69 | |||
| 8d491077ce | |||
| 4a6b845ef6 | |||
| c87f9a1f8a | |||
| b24eded7a0 | |||
| be4819e8b1 | |||
| de4ae58019 | |||
| c916ee7357 | |||
| 6898e2dcf4 | |||
| a6fd718530 | |||
| f68a6eb42c | |||
| 49930d64ad | |||
| cdd45a7b2d | |||
| 750b40f962 | |||
| a6e46a7e6f | |||
| 953984dd48 | |||
| a2865cd5c1 | |||
| 8e47f612fd | |||
| 7a29cf0f13 | |||
| 4cb073a48b | |||
| a381c6cea5 | |||
| 6b1bcef644 | |||
| 11cc17b63a | |||
| a88c3c2dbe | |||
| 5b4f016357 | |||
| 9186a95b00 | |||
| 51defb9de2 | |||
| 9079b54001 | |||
| 9c9f22fd40 | |||
| 93ada40bf9 | |||
| 4827f0d931 | |||
| f8020a4063 | |||
| c95c13985c | |||
| 00bffeaf72 | |||
| 1dea9433b7 | |||
| 67b2f68abd | |||
| ec5b2adfc0 | |||
| a39124a10d | |||
| 7a6ff4742d | |||
| ff58d31348 | |||
| cd574c523b | |||
| cdf9864428 | |||
| 2d61eddebf | |||
| 832e1003c2 | |||
| bb0b7f2632 | |||
| 7cea813d55 | |||
| ec15130a80 | |||
| 3f027023cf | |||
| fb7f0747ca | |||
| 9ec9210a08 | |||
| ac9a81c0c7 | |||
| 354b31e1b1 | |||
| 44207a3a5c | |||
| 40d6a4e5fc | |||
| 7c57696752 | |||
| f56e951f00 | |||
| b2719cf439 | |||
| ba7d35d9d0 | |||
| 294c05d607 | |||
| 224b20b3e4 | |||
| d9267a4db5 | |||
| 1be3c0fe48 | |||
| 1f55e23827 | |||
| d8fbd8a6f6 | |||
| 0eb22823a6 | |||
| d0ffb1acb8 | |||
| dc3bd31e59 | |||
| 9fedda43c6 | |||
| cefc00af39 | |||
| 97e6a57501 | |||
| c64b0d4573 | |||
| f5310ca51e | |||
| 5125fc3a81 | |||
| 605f731ac4 | |||
| 76d6ffd445 | |||
| e709048fb8 | |||
| 0fb0f17ccb | |||
| 78d357cb0c | |||
| febe75bb12 | |||
| 8ef493c82d | |||
| b51ec04938 | |||
| 64e5e565c2 | |||
| 5ec7de3a5a | |||
| f9df60919e | |||
| ed0aad61d2 | |||
| 66db577c7d | |||
| c02214f745 | |||
| 93ef7ea4f6 | |||
| 44c222f6b7 | |||
| 8a7fd9c889 | |||
| 131a1613af | |||
| 6b97a9ece8 | |||
| b0d05c19bc | |||
| 6608c98192 | |||
| 53b1bbd49f | |||
| 50f4a603e8 | |||
| 17e28ceeb1 | |||
| e5ba214f34 | |||
| da943b0007 | |||
| a651f3dae5 | |||
| b198638a6c | |||
| e19b373347 | |||
| ff4f27b05e | |||
| f8ff667dde | |||
| eea102f63d | |||
| 1880d1f6fd | |||
| 5e00155e03 | |||
| 6f9665d718 | |||
| 7524474c7b | |||
| de5bf60b07 | |||
| f06e6f0ce1 | |||
| fb1fd205bd | |||
| f07a4f2f93 | |||
| fc2d2c6ce0 | |||
| b226f7d13d | |||
| d35814ed99 | |||
| 25cff52019 | |||
| 0e3d660ccd | |||
| 078e79f294 | |||
| 034772056a | |||
| 069dd01cb0 | |||
| 659ac8faf2 | |||
| 43d734ef43 | |||
| 392c32d316 | |||
| 79b3766544 | |||
| 5b1273e334 | |||
| bdf064fd8f | |||
| 69976caca9 | |||
| ec620ecc14 | |||
| cc15785091 | |||
| bea416e117 | |||
| 30a3311fe6 | |||
| 02e3f28d87 | |||
| 6ac0eabb5a | |||
| a7946aa771 | |||
| 201b5e36fa | |||
| 64109daff8 | |||
| f79adacc9b | |||
| ae5527fac7 | |||
| eb7970bee2 | |||
| 8f4ca16bae | |||
| 144b0a179a | |||
| 3e176fa91f | |||
| d5a7aaa09d | |||
| 969940e98a | |||
| a7ae7907f7 | |||
| 69d0a78c54 | |||
| 9833ef13fb | |||
| 08f0cc1b24 | |||
| b54ec99d22 | |||
| 28080f04b0 | |||
| 99cf6758d2 | |||
| 4e54bed051 | |||
| b0b7832048 | |||
| c170657dff | |||
| d030444733 | |||
| c6e7307ee1 | |||
| a7b31e9fca | |||
| 76095ebba5 | |||
| 67ea3d6ec6 | |||
| c6250657eb | |||
| d9422e0296 | |||
| 292b35d06d | |||
| 8c9b272545 | |||
| 95a7057768 | |||
| 977eb2de17 | |||
| 4a0d7808a5 | |||
| aa961c8d28 | |||
| 9dd050b393 | |||
| 0354ada5d3 | |||
| ba9e9397aa | |||
| 1e9fae8301 | |||
| 8032787faa | |||
| 4d4f8d25c2 | |||
| c838469db9 | |||
| 4da0ddb8cb | |||
| e134a683e0 | |||
| aebe4db52a | |||
| 5198fc39e8 | |||
| 49f9607289 | |||
| 001a2c01f0 | |||
| 1b2043b929 | |||
| fe69be05ca | |||
| b4bed73282 | |||
| ef343dc452 | |||
| 7398164fcc | |||
| c2e2645c82 | |||
| 9e0ab5d266 | |||
| 2ce8056b8f | |||
| ac50510c78 | |||
| 26d81418fa | |||
| 37b4955f07 | |||
| 57c1138d28 | |||
| 2e127a4737 | |||
| fc4d5ddb67 | |||
| e5431543d8 | |||
| 8bccd69e6c | |||
| 0d26bccbbc | |||
| a80223bc81 | |||
| 04b491c365 | |||
| 8f37e02c59 | |||
| 55c7ffbe62 | |||
| afa3429bdb | |||
| aa355d86d0 | |||
| c19ac3425f | |||
| 86e470b1c2 | |||
| af1e20a1d0 | |||
| 0b3cd3d008 | |||
| b8c22718af | |||
| 6f8f8279b7 | |||
| dea4c55897 | |||
| 7a44ee7429 | |||
| b412980f90 | |||
| 120ff6ea15 | |||
| 2b370417e8 | |||
| 9d489b9b0f | |||
| 6dfb80ddd1 | |||
| 73d70fa7e8 | |||
| ff5a481c34 | |||
| c3974446bd | |||
| 959c9e3817 | |||
| 8b510270a9 | |||
| 7a0d43586f | |||
| 6fa446b465 | |||
| 7be5ae9b93 | |||
| 0dc36d149e | |||
| 24622131c9 | |||
| 38acd15ec6 | |||
| f397d40f09 | |||
| 26feb018d9 | |||
| a2d78eaa50 | |||
| d34edfd435 | |||
| 45bb1786b6 | |||
| 224fbbc26b | |||
| d4262bce2a | |||
| c08eec0a23 | |||
| a25bbdd12d | |||
| e8aae9c7ab | |||
| acdcb14d79 | |||
| 0ad0602560 | |||
| af06737e7e | |||
| d9718d0d98 | |||
| 250aab66ed | |||
| 723b501186 | |||
| 64c3b330ee | |||
| ea138cfd38 | |||
| 8845070d89 | |||
| 7c6d24d6b0 | |||
| 2c6a8c0ce6 | |||
| e6bfe4348c | |||
| c4da55e40f | |||
| 655b605431 | |||
| 1d3669714b | |||
| 7f3a95508e | |||
| cd7c955067 | |||
| a9930c2173 | |||
| bd96afa00b | |||
| 623fe7ca2c | |||
| 4f8d16cc4d | |||
| c13247e14f | |||
| 2d037d1a1c | |||
| df803fc4b9 | |||
| 971e97745f | |||
| 0ddd7a408c | |||
| 908f7eb47f | |||
| 1719d9a957 | |||
| 5cf8081a98 | |||
| 3f6f030fc4 | |||
| f38b1bf160 | |||
| 9c1a02d673 | |||
| 76c2c9a46d | |||
| 8bc550b619 | |||
| 034bbdf988 | |||
| a94654e8d4 | |||
| 6b8ab4611b | |||
| aef78b8aeb | |||
| 47ed8c1a3c | |||
| 9d0c5469a0 | |||
| f600b7fb37 | |||
| c6f25591f7 | |||
| e7ed07cf3c | |||
| 62a152227a | |||
| 49e1c99dee | |||
| 7c5d10d57c | |||
| 07d1d78a43 | |||
| 34150ba688 | |||
| 3a72e9b494 | |||
| c1cdef7e63 | |||
| 556851a511 | |||
| 5be1f3a856 | |||
| 84761a9b8e | |||
| e7add076b5 | |||
| 1db1a364c1 | |||
| d8bcd77290 | |||
| 2dad43549d | |||
| 47d2cb8134 | |||
| 490cd95cb2 | |||
| fe60a43bba | |||
| f71b68a487 | |||
| 1551d93a53 | |||
| 4495eafbf4 | |||
| 9570d66d9d | |||
| 45cc79fbf7 | |||
| 1b77ec7f82 | |||
| 7badf645b3 | |||
| 4267b20c9a | |||
| 3c22c1c525 | |||
| 87e5499ad2 | |||
| c626f5b001 | |||
| 761d02d433 | |||
| 5da9e7e653 | |||
| 0afcfd9fab | |||
| 464e2f14c1 | |||
| 1ecdb0f6fb | |||
| 206d5a7afc | |||
| b0b2cfaa65 | |||
| 7cf8b3ea1b | |||
| 2487dbfc92 | |||
| f58596bbcd | |||
| 3d1713f79e | |||
| 4e26c7fcd4 | |||
| be92040fe9 | |||
| 56e887c6c7 | |||
| 1775435ee5 | |||
| 84800dfd87 | |||
| acb2e52389 | |||
| 55750a0e7c | |||
| 0a597d0d62 | |||
| c6aa1b1efb | |||
| 6eccfe3d14 | |||
| c67907ffb2 | |||
| 9027ff4372 | |||
| e185352f56 | |||
| bcaa990220 | |||
| 1bd4dca266 | |||
| 529460d573 | |||
| 02ba3317e9 | |||
| fd0f52bebd | |||
| fee5e87d87 | |||
| 567e10eb66 | |||
| f5a1569f49 | |||
| 6ddffb71ea | |||
| 1e155776fd | |||
| 83cc9ef496 | |||
| 71db04c02c | |||
| 7d2d15643d | |||
| ec991ab1a8 | |||
| 7f65e01d07 | |||
| f6f47e3362 | |||
| a268845f1d | |||
| bf6dff3e99 | |||
| 8e3720ca9a | |||
| 59296e0a49 | |||
| bb79d14cb1 | |||
| 38b4278998 | |||
| 42e04d4c11 | |||
| 55f023b771 | |||
| f5c90a2d64 | |||
| 94f3c50f83 | |||
| f3ee22b22c | |||
| 55c879a0ab | |||
| 7633797190 | |||
| 41b127d405 | |||
| 65e079f8cd | |||
| 69f702fb6a | |||
| 237bdfdb61 | |||
| 06fec2bce0 | |||
| 91142f0c20 | |||
| b2a223eaab | |||
| b8b05b1b4b | |||
| ee33f21303 | |||
| 6a07d61671 | |||
| 97bcea292e | |||
| c57bc26d5b | |||
| 9c32792017 | |||
| cf667dedb8 | |||
| d082060429 | |||
| 4b8152465d | |||
| 0f30bfa0ac | |||
| 408f299dbb | |||
| 197b37fc17 | |||
| fcf7e8b78c | |||
| fc51f81bf5 | |||
| 501544520f | |||
| fe2b80ffb8 | |||
| 9da2eac3d3 | |||
| d9ced9730b | |||
| ec6c53eb60 | |||
| da1e63eaf3 | |||
| d3a9930b50 | |||
| a0beef3204 | |||
| 693703de1e | |||
| cfa491467e | |||
| d7f0808316 | |||
| 4f0573d612 | |||
| 6e7c605279 | |||
| 093eece29b | |||
| 797d0f24d6 | |||
| d5dcbf01d0 | |||
| 04f301619f | |||
| dde96dd4d7 | |||
| 7d42a648f0 | |||
| 9a02dbdd66 | |||
| 4ce658ab99 | |||
| 3de7fbb0a9 | |||
| 1edf03767a | |||
| eabc43d78c | |||
| 7d4c4c0401 | |||
| 69c1ce1714 | |||
| 8f5cb4084d | |||
| 4edc0d9ea9 | |||
| 63bd2cebf9 | |||
| 768e5ab66f | |||
| c7e7026f47 | |||
| 4e50f271d6 | |||
| 26596dbe15 | |||
| f40afac448 | |||
| dae12f1238 | |||
| 7055d3c929 | |||
| 3dade23e39 | |||
| 8b5a325644 | |||
| 04f38b9197 | |||
| d0d2664efa | |||
| dd22445768 | |||
| e9f257c15f | |||
| 84015e5c01 | |||
| 72263eaa97 | |||
| 9dbbe8cd8d | |||
| e5e523aa9e | |||
| fb4d72df86 | |||
| 90ce04654d | |||
| 02b6d25414 | |||
| 89294317a1 | |||
| 8a77fec9c8 | |||
| db858a853a | |||
| 1b483bcc2a | |||
| f07c93651f | |||
| 56cc9bd377 | |||
| dcdeefd5ea | |||
| 9a0e962cbf | |||
| 728de5f87b | |||
| 672042e051 | |||
| 4e0129275d | |||
| eb29b33620 | |||
| 76387b1693 | |||
| 3aa2297497 | |||
| 5f2c2f8392 | |||
| 3829871612 | |||
| 920d2ef1e8 | |||
| 3a8d242576 | |||
| e186821692 | |||
| b1d8c46bb2 | |||
| 0ee801df20 | |||
| 119fa8ed1b | |||
| 0042c8ed12 | |||
| e43751c219 | |||
| e08e8fa24f | |||
| be3348d770 | |||
| 439ccc99ce | |||
| d6cf441bac | |||
| a54a51a9d5 | |||
| 80ef893d23 | |||
| be3f0ac175 | |||
| ceea55a640 | |||
| deecd4b918 | |||
| 6f49f861d6 | |||
| 3bda6e0883 | |||
| 18b6815eec | |||
| 27cd3af7fb | |||
| a4c7fe50a7 | |||
| e064cb645e | |||
| 7d66435546 | |||
| 503966165b | |||
| 7c7d94e3dc | |||
| 058bc139fe | |||
| ae859ea7fd | |||
| 29d6c95ec4 | |||
| 637396359d | |||
| 13a819730d | |||
| ea4896813c | |||
| 07557bc362 | |||
| 24022e4634 | |||
| ae6d1c50d7 | |||
| 88800b9e36 | |||
| 1a992c2d02 | |||
| 7f9ab9b7cb | |||
| a8bbbcbff5 | |||
| 22e3ce7d7a | |||
| adfe946f72 | |||
| 27fc739f7d | |||
| 27f6b60169 | |||
| 97fd951d4a | |||
| 51298c1eb1 | |||
| 05b7dd0046 | |||
| 701d177e23 | |||
| d804f5727e | |||
| d85e7732b4 | |||
| 008354f935 | |||
| 12165ba5a4 | |||
| dc8b9d1da8 | |||
| 39d388051a | |||
| 2bc74fd5d9 | |||
| 848e87ff76 | |||
| 875dbb92e5 | |||
| 770c6b3bd1 | |||
| be391b4fe5 | |||
| eae726e345 | |||
| 5fb1de906c | |||
| a700b02f77 | |||
| 8b41ddd224 | |||
| f204a145c7 | |||
| a40e1ea269 | |||
| 623ef6d67c | |||
| d89937502c | |||
| db5212a209 | |||
| 89661b2d9a | |||
| 080a136e50 | |||
| 54b3995175 | |||
| a69393b191 | |||
| 352d099249 | |||
| 30b6f9ff6c | |||
| afbdec1742 | |||
| b965554bdd | |||
| 43d76f5e17 | |||
| 3451e901a5 | |||
| a94a409f5f | |||
| 888b517d62 | |||
| 939f04c80d | |||
| e5ce9809c5 | |||
| 01305da7e7 | |||
| 7ec37d5ffd | |||
| 535cea4e77 | |||
| 749b598af1 | |||
| 5ee865a6eb | |||
| c7c786d567 | |||
| f6845df21f | |||
| c8d888cdc1 | |||
| 91cc52f60e | |||
| e00101e5ab | |||
| 871c112699 | |||
| 194b48b50a | |||
| 8e130c878c | |||
| 845b4c032c | |||
| ec519a33b3 | |||
| c5d53c4ee6 | |||
| 731f633d3e | |||
| 0fbf12a021 | |||
| 331456f831 | |||
| fc636b61b0 | |||
| b471d94069 | |||
| a1a1a515db | |||
| 91f1ac5c88 | |||
| 72d296fe65 | |||
| 6ebb2079e0 | |||
| 1a66155d8a | |||
| 05f1da8c4a | |||
| af0c42d3d7 | |||
| 42a9d5651f | |||
| 77c61260df | |||
| d3068b4337 | |||
| 0aabe9b3bb | |||
| d7daab9620 | |||
| 7d64aa8057 | |||
| 3179b12dd3 | |||
| 163ad19957 | |||
| 4480e4206d | |||
| 4b8c7201b7 | |||
| af9a7a39f2 | |||
| e8c34fa30e | |||
| 2c6b7a008f | |||
| 7f1632d65b | |||
| 6ef2e4c9b2 |
@@ -38,3 +38,6 @@
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/GpsDrivers.git
|
||||
[submodule "mavlink/include/mavlink/v2.0"]
|
||||
path = mavlink/include/mavlink/v2.0
|
||||
url = git://github.com/mavlink/c_library.git
|
||||
|
||||
@@ -44,6 +44,7 @@ addons:
|
||||
- zlib1g-dev
|
||||
|
||||
before_install:
|
||||
- cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
pushd .
|
||||
&& cd ~ && mkdir gcc && cd gcc
|
||||
|
||||
+5
-2
@@ -295,11 +295,11 @@ add_definitions(${definitions})
|
||||
#=============================================================================
|
||||
# source code generation
|
||||
#
|
||||
file(GLOB_RECURSE msg_files msg/*.msg)
|
||||
add_subdirectory(msg)
|
||||
px4_generate_messages(TARGET msg_gen
|
||||
MSG_FILES ${msg_files}
|
||||
OS ${OS}
|
||||
DEPENDS git_genmsg git_gencpp
|
||||
DEPENDS git_genmsg git_gencpp prebuild_targets
|
||||
)
|
||||
px4_generate_parameters_xml(OUT parameters.xml BOARD ${BOARD})
|
||||
px4_generate_airframes_xml(OUT airframes.xml BOARD ${BOARD})
|
||||
@@ -348,6 +348,9 @@ foreach(module ${config_module_list})
|
||||
#message(STATUS "adding module: ${module}")
|
||||
endforeach()
|
||||
|
||||
# Keep track of external shared libs required for modules
|
||||
set(module_external_libraries "${module_external_libraries}" CACHE INTERNAL "module_external_libraries")
|
||||
|
||||
add_subdirectory(src/firmware/${OS})
|
||||
|
||||
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"board_id": 9,
|
||||
"magic": "PX4FWv2",
|
||||
"description": "Firmware for the MindPx-V2 board",
|
||||
"board_id": 88,
|
||||
"magic": "MindPX",
|
||||
"description": "Firmware for the MindPXFMUv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "MindPx-v2",
|
||||
"summary": "MindPXFMUv2",
|
||||
"version": "2.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
|
||||
@@ -114,6 +114,12 @@ define cmake-build
|
||||
+@(echo "PX4 CONFIG: $@" && cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
define cmake-build-other
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake $(2) -G$(PX4_CMAKE_GENERATOR) || (cd .. && rm -rf $(PWD)/build_$@); fi
|
||||
+@(cd $(PWD)/build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
# create empty targets to avoid msgs for targets passed to cmake
|
||||
define cmake-targ
|
||||
$(1):
|
||||
@@ -136,6 +142,9 @@ px4fmu-v1_default:
|
||||
|
||||
px4fmu-v2_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_default)
|
||||
|
||||
px4fmu-v2_test:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_test)
|
||||
|
||||
px4fmu-v4_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v4_default)
|
||||
@@ -152,10 +161,7 @@ mindpx-v2_default:
|
||||
posix_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_lpe:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_ekf2:
|
||||
posix_sitl_test:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_replay:
|
||||
@@ -177,6 +183,7 @@ posix_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
eagle_default: posix_eagle_default qurt_eagle_default
|
||||
eagle_legacy_default: posix_eagle_legacy_driver_default qurt_eagle_legacy_driver_default
|
||||
|
||||
qurt_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
@@ -198,6 +205,9 @@ posix_rpi2_default:
|
||||
posix_rpi2_release:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_bebop_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
broadcast: posix_sitl_broadcast
|
||||
@@ -213,8 +223,14 @@ run_sitl_ros: sitl_deprecation
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
.PHONY: uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests package_firmware clean submodulesclean distclean
|
||||
|
||||
gazebo_build:
|
||||
@mkdir -p build_gazebo
|
||||
@if [ ! -e $(PWD)/build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) $(PWD)/Tools/sitl_gazebo; fi
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
|
||||
|
||||
uavcan_firmware:
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
@@ -222,12 +238,38 @@ ifeq ($(VECTORCONTROL),1)
|
||||
@(rm -rf vectorcontrol && git clone --quiet --depth 1 https://github.com/thiemar/vectorcontrol.git && cd vectorcontrol && BOARD=s2740vc_1_0 make --silent --no-print-directory && BOARD=px4esc_1_6 make --silent --no-print-directory && ../Tools/uavcan_copy.sh)
|
||||
endif
|
||||
|
||||
check: check_px4fmu-v1_default check_px4fmu-v2_default check_px4fmu-v4_default_and_uavcan check_mindpx-v2_default check_px4-stm32f4discovery_default check_posix_sitl_default check_unittest check_format
|
||||
checks_defaults: \
|
||||
check_px4fmu-v1_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4-stm32f4discovery_default \
|
||||
|
||||
checks_bootloaders: \
|
||||
|
||||
|
||||
checks_tests: \
|
||||
check_px4fmu-v2_test
|
||||
|
||||
checks_alts: \
|
||||
check_px4fmu-v2_ekf2 \
|
||||
|
||||
checks_uavcan: \
|
||||
check_px4fmu-v4_default_and_uavcan
|
||||
|
||||
checks_sitls: \
|
||||
check_posix_sitl_default \
|
||||
check_posix_sitl_test \
|
||||
|
||||
checks_last: \
|
||||
check_unittest \
|
||||
check_format \
|
||||
|
||||
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_sitls checks_last
|
||||
|
||||
check_format:
|
||||
$(call colorecho,"Checking formatting with astyle")
|
||||
@./Tools/fix_code_style.sh
|
||||
@./Tools/check_code_style.sh
|
||||
@./Tools/check_code_style_all.sh
|
||||
|
||||
check_%:
|
||||
@echo
|
||||
@@ -244,8 +286,15 @@ ifeq ($(VECTORCONTROL),1)
|
||||
@rm -rf ROMFS/px4fmu_common/uavcan
|
||||
endif
|
||||
|
||||
unittest: posix_sitl_default
|
||||
@(cd unittests && cmake -G$(PX4_CMAKE_GENERATOR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest -j2 --output-on-failure)
|
||||
unittest: posix_sitl_test
|
||||
@export CC=clang
|
||||
@export CXX=clang++
|
||||
@export ASAN_OPTIONS=symbolize=1
|
||||
$(call cmake-build-other,unittest, ../unittests)
|
||||
@(cd build_unittest && ctest -j2 --output-on-failure)
|
||||
|
||||
test_onboard_sitl:
|
||||
@HEADLESS=1 make posix_sitl_test gazebo_iris
|
||||
|
||||
package_firmware:
|
||||
@zip --junk-paths Firmware.zip `find . -name \*.px4`
|
||||
@@ -255,18 +304,18 @@ clean:
|
||||
@(cd NuttX/nuttx && make clean)
|
||||
|
||||
submodulesclean:
|
||||
@git submodule sync
|
||||
@git submodule sync --recursive
|
||||
@git submodule deinit -f .
|
||||
@git submodule update --init --recursive --force
|
||||
|
||||
distclean: submodulesclean
|
||||
@git clean -ff -x -d
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject"
|
||||
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim replay \
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane gazebo_solo
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -25,8 +25,8 @@ then
|
||||
param set MC_YAWRATE_I 0.25
|
||||
param set MC_YAWRATE_D 0.0
|
||||
|
||||
param set BAT_V_SCALING 0.00989
|
||||
param set BAT_C_SCALING 0.0124
|
||||
param set BAT_V_DIV 12.27559
|
||||
param set BAT_A_PER_V 15.39103
|
||||
fi
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Coaxial Helicopter (such as Esky Lama v4 or Esky Big Lama)
|
||||
# @name Esky (Big) Lama v4
|
||||
#
|
||||
# @type Coaxial Helicopter
|
||||
#
|
||||
@@ -12,7 +12,8 @@
|
||||
# @maintainer Emmanuel Roussel
|
||||
#
|
||||
|
||||
set VEHICLE_TYPE mc
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
set MIXER coax
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
@@ -47,7 +48,6 @@ then
|
||||
param set MC_YAWRATE_FF 0
|
||||
fi
|
||||
|
||||
set MIXER coax
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 34
|
||||
set PWM_RATE 400
|
||||
@@ -62,4 +62,3 @@ set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1500
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ then
|
||||
|
||||
if mixer load $OUTPUT_DEV $MIXER_FILE
|
||||
then
|
||||
echo "[i] Mixer: $MIXER_FILE on $OUTPUT_DEV"
|
||||
echo "INFO [init] Mixer: $MIXER_FILE on $OUTPUT_DEV"
|
||||
else
|
||||
echo "[i] Error loading mixer: $MIXER_FILE"
|
||||
echo "ERROR: Could not load mixer: $MIXER_FILE" >> $LOG_FILE
|
||||
echo "ERROR [init] Error loading mixer: $MIXER_FILE"
|
||||
echo "ERROR:[init] Could not load mixer: $MIXER_FILE" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
@@ -56,8 +56,8 @@ then
|
||||
else
|
||||
if [ $MIXER != skip ]
|
||||
then
|
||||
echo "[i] Mixer not defined"
|
||||
echo "ERROR: Mixer not defined" >> $LOG_FILE
|
||||
echo "ERROR [init] Mixer not defined"
|
||||
echo "ERROR [init] Mixer not defined" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -137,10 +137,10 @@ then
|
||||
then
|
||||
if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE
|
||||
then
|
||||
echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
|
||||
echo "INFO [init] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
|
||||
else
|
||||
echo "[i] Error loading mixer: $MIXER_AUX_FILE"
|
||||
echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
|
||||
echo "ERROR [init] Error loading mixer: $MIXER_AUX_FILE"
|
||||
echo "ERROR [init] Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
|
||||
fi
|
||||
else
|
||||
set PWM_AUX_OUT none
|
||||
|
||||
@@ -32,9 +32,9 @@ else
|
||||
then
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "[i] microSD card formatted"
|
||||
echo "INFO [init] MicroSD card formatted"
|
||||
else
|
||||
echo "[i] format failed"
|
||||
echo "ERROR [init] Format failed"
|
||||
tone_alarm MNBG
|
||||
set LOG_FILE /dev/null
|
||||
fi
|
||||
@@ -50,7 +50,7 @@ fi
|
||||
set FRC /fs/microsd/etc/rc.txt
|
||||
if [ -f $FRC ]
|
||||
then
|
||||
echo "[i] Executing script: $FRC"
|
||||
echo "INFO [init] Executing script: $FRC"
|
||||
sh $FRC
|
||||
set MODE custom
|
||||
fi
|
||||
@@ -173,7 +173,7 @@ then
|
||||
#
|
||||
if param compare SYS_AUTOSTART 0
|
||||
then
|
||||
echo "[i] No autostart"
|
||||
echo "INFO [init] No autostart"
|
||||
else
|
||||
sh /etc/init.d/rc.autostart
|
||||
fi
|
||||
@@ -192,7 +192,7 @@ then
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
if [ -f $FCONFIG ]
|
||||
then
|
||||
echo "[i] Custom: $FCONFIG"
|
||||
echo "INFO [init] Custom: $FCONFIG"
|
||||
sh $FCONFIG
|
||||
fi
|
||||
unset FCONFIG
|
||||
@@ -223,7 +223,7 @@ then
|
||||
|
||||
if px4io checkcrc ${IO_FILE}
|
||||
then
|
||||
echo "PX4IO CRC OK" >> $LOG_FILE
|
||||
echo "INFO [init] PX4IO CRC OK" >> $LOG_FILE
|
||||
|
||||
set IO_PRESENT yes
|
||||
else
|
||||
@@ -246,16 +246,16 @@ then
|
||||
usleep 500000
|
||||
if px4io checkcrc $IO_FILE
|
||||
then
|
||||
echo "PX4IO CRC OK after updating" >> $LOG_FILE
|
||||
echo "INFO [init] PX4IO CRC OK after updating" >> $LOG_FILE
|
||||
tone_alarm MLL8CDE
|
||||
|
||||
set IO_PRESENT yes
|
||||
else
|
||||
echo "PX4IO update failed" >> $LOG_FILE
|
||||
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
else
|
||||
echo "PX4IO update failed" >> $LOG_FILE
|
||||
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -263,7 +263,7 @@ then
|
||||
|
||||
if [ $IO_PRESENT == no ]
|
||||
then
|
||||
echo "ERROR: PX4IO not found" >> $LOG_FILE
|
||||
echo "ERROR [init] PX4IO not found" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -330,6 +330,11 @@ then
|
||||
commander start
|
||||
fi
|
||||
|
||||
#
|
||||
# Start CPU load monitor
|
||||
#
|
||||
load_mon start
|
||||
|
||||
#
|
||||
# Start primary output
|
||||
#
|
||||
@@ -350,7 +355,7 @@ then
|
||||
then
|
||||
if param compare UAVCAN_ENABLE 0
|
||||
then
|
||||
echo "[i] OVERRIDING UAVCAN_ENABLE = 1"
|
||||
echo "INFO [init] OVERRIDING UAVCAN_ENABLE = 1" >> $LOG_FILE
|
||||
param set UAVCAN_ENABLE 1
|
||||
fi
|
||||
fi
|
||||
@@ -361,7 +366,7 @@ then
|
||||
then
|
||||
sh /etc/init.d/rc.io
|
||||
else
|
||||
echo "PX4IO start failed" >> $LOG_FILE
|
||||
echo "INFO [init] PX4IO start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -371,7 +376,7 @@ then
|
||||
if fmu mode_$FMU_MODE
|
||||
then
|
||||
else
|
||||
echo "FMU start failed" >> $LOG_FILE
|
||||
echo "ERR [init] FMU start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
@@ -403,7 +408,7 @@ then
|
||||
if mkblctrl $MKBLCTRL_ARG
|
||||
then
|
||||
else
|
||||
echo "ERROR: MK start failed" >> $LOG_FILE
|
||||
echo "ERROR [init] MK start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
unset MKBLCTRL_ARG
|
||||
@@ -415,7 +420,7 @@ then
|
||||
if pwm_out_sim mode_port2_pwm8
|
||||
then
|
||||
else
|
||||
echo "PWM SIM start failed" >> $LOG_FILE
|
||||
echo "ERROR [init] PWM SIM start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -431,7 +436,7 @@ then
|
||||
then
|
||||
sh /etc/init.d/rc.io
|
||||
else
|
||||
echo "PX4IO start failed" >> $LOG_FILE
|
||||
echo "ERROR [init] PX4IO start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
fi
|
||||
@@ -441,7 +446,7 @@ then
|
||||
if fmu mode_$FMU_MODE
|
||||
then
|
||||
else
|
||||
echo "FMU mode_$FMU_MODE start failed" >> $LOG_FILE
|
||||
echo "ERROR [init] FMU mode_$FMU_MODE start failed" >> $LOG_FILE
|
||||
tone_alarm $TUNE_ERR
|
||||
fi
|
||||
|
||||
@@ -536,14 +541,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Transitional support: Disable safety on all Pixracer boards
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
if param set CBRK_IO_SAFETY 22027
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Starting stuff according to UAVCAN_ENABLE value
|
||||
#
|
||||
@@ -612,26 +609,36 @@ then
|
||||
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
if [ -d /fs/microsd ]
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
if ver hwcmp PX4FMU_V1
|
||||
if sdlog2 start -r 30 -a -b 2 -t
|
||||
then
|
||||
if sdlog2 start -r 30 -a -b 2 -t
|
||||
fi
|
||||
else
|
||||
# check if we should increase logging rate for ekf2 replay message logging
|
||||
if param greater EKF2_REC_RPL 0
|
||||
then
|
||||
if param compare SYS_LOGGER 0
|
||||
then
|
||||
fi
|
||||
else
|
||||
# check if we should increase logging rate for ekf2 replay message logging
|
||||
if param greater EKF2_REC_RPL 0
|
||||
then
|
||||
if sdlog2 start -r 500 -e -b 20 -t
|
||||
if sdlog2 start -r 500 -e -b 18 -t
|
||||
then
|
||||
fi
|
||||
else
|
||||
if sdlog2 start -r 100 -a -b 12 -t
|
||||
if logger start -r 500
|
||||
then
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if param compare SYS_LOGGER 0
|
||||
then
|
||||
if sdlog2 start -r 100 -a -b 9 -t
|
||||
then
|
||||
fi
|
||||
else
|
||||
if logger start -b 12
|
||||
then
|
||||
fi
|
||||
fi
|
||||
@@ -651,7 +658,7 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == fw ]
|
||||
then
|
||||
echo "FIXED WING"
|
||||
echo "INFO [init] Fixedwing"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
@@ -679,11 +686,11 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == mc ]
|
||||
then
|
||||
echo "MULTICOPTER"
|
||||
echo "INFO [init] Multicopter"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
echo "Mixer undefined"
|
||||
echo "INFO [init] Mixer undefined"
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
@@ -721,12 +728,16 @@ then
|
||||
then
|
||||
set MAV_TYPE 14
|
||||
fi
|
||||
if [ $MIXER == coax ]
|
||||
then
|
||||
set MAV_TYPE 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Still no MAV_TYPE found
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
echo "Unknown MAV_TYPE"
|
||||
echo "WARN [init] Unknown MAV_TYPE"
|
||||
param set MAV_TYPE 2
|
||||
else
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
@@ -744,11 +755,11 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == vtol ]
|
||||
then
|
||||
echo "VTOL"
|
||||
echo "INFO [init] VTOL"
|
||||
|
||||
if [ $MIXER == none ]
|
||||
then
|
||||
echo "VTOL mixer undefined"
|
||||
echo "WARN [init] VTOL mixer undefined"
|
||||
fi
|
||||
|
||||
if [ $MAV_TYPE == none ]
|
||||
@@ -771,7 +782,7 @@ then
|
||||
# Still no MAV_TYPE found
|
||||
if [ $MAV_TYPE == none ]
|
||||
then
|
||||
echo "Unknown MAV_TYPE"
|
||||
echo "WARN [init] Unknown MAV_TYPE"
|
||||
param set MAV_TYPE 19
|
||||
else
|
||||
param set MAV_TYPE $MAV_TYPE
|
||||
@@ -855,14 +866,14 @@ then
|
||||
#
|
||||
if [ $VEHICLE_TYPE == none ]
|
||||
then
|
||||
echo "[i] No autostart ID found"
|
||||
echo "WARN [init] No autostart ID found"
|
||||
fi
|
||||
|
||||
# Start any custom addons
|
||||
set FEXTRAS /fs/microsd/etc/extras.txt
|
||||
if [ -f $FEXTRAS ]
|
||||
then
|
||||
echo "[i] Addons script: $FEXTRAS"
|
||||
echo "INFO [init] Addons script: $FEXTRAS"
|
||||
sh $FEXTRAS
|
||||
fi
|
||||
unset FEXTRAS
|
||||
@@ -886,7 +897,7 @@ mavlink boot_complete
|
||||
|
||||
if [ $EXIT_ON_END == yes ]
|
||||
then
|
||||
echo "NSH EXIT"
|
||||
echo "INFO [init] NSH exit"
|
||||
exit
|
||||
fi
|
||||
unset EXIT_ON_END
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
#!nsh
|
||||
#
|
||||
# Standard startup script for PX4FMU v1, v2, v3, v4 onboard sensor drivers.
|
||||
#
|
||||
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
if ms5611 start
|
||||
then
|
||||
fi
|
||||
else
|
||||
# Configure all I2C buses to 100 KHz as they
|
||||
# are all external or slow
|
||||
fmu i2c 1 100000
|
||||
fmu i2c 2 100000
|
||||
|
||||
if ms5611 -s start
|
||||
then
|
||||
fi
|
||||
|
||||
# Blacksheep telemetry
|
||||
if bst start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if adc start
|
||||
then
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
# External I2C bus
|
||||
if hmc5883 -C -T -X start
|
||||
then
|
||||
fi
|
||||
|
||||
# External I2C bus
|
||||
if lis3mdl -X start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal I2C bus
|
||||
if hmc5883 -C -T -I -R 4 start
|
||||
then
|
||||
fi
|
||||
|
||||
# external MPU6K is rotated 180 degrees yaw
|
||||
if mpu6000 -X -R 4 start
|
||||
then
|
||||
set BOARD_FMUV3 true
|
||||
else
|
||||
set BOARD_FMUV3 false
|
||||
fi
|
||||
|
||||
if [ $BOARD_FMUV3 == true ]
|
||||
then
|
||||
# external L3GD20H is rotated 180 degrees yaw
|
||||
if l3gd20 -X -R 4 start
|
||||
then
|
||||
fi
|
||||
|
||||
# external LSM303D is rotated 270 degrees yaw
|
||||
if lsm303d -X -R 6 start
|
||||
then
|
||||
fi
|
||||
|
||||
# internal MPU6000 is rotated 180 deg roll, 270 deg yaw
|
||||
if mpu6000 -R 14 start
|
||||
then
|
||||
fi
|
||||
|
||||
if hmc5883 -C -T -S -R 8 start
|
||||
then
|
||||
fi
|
||||
|
||||
if meas_airspeed start -b 2
|
||||
then
|
||||
fi
|
||||
|
||||
else
|
||||
# FMUv2
|
||||
if mpu6000 start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 start
|
||||
then
|
||||
fi
|
||||
|
||||
if lsm303d start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
# External I2C bus
|
||||
if hmc5883 -C -T -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if lis3mdl -R 2 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus is rotated 90 deg yaw
|
||||
if hmc5883 -C -T -S -R 2 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
|
||||
if mpu6000 -R 2 -T 20608 start
|
||||
then
|
||||
fi
|
||||
|
||||
# Internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||
if mpu9250 -R 2 start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
# FMUv1
|
||||
if mpu6000 start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 start
|
||||
then
|
||||
fi
|
||||
|
||||
# MAG selection
|
||||
if param compare SENS_EXT_MAG 2
|
||||
then
|
||||
if hmc5883 -C -I start
|
||||
then
|
||||
fi
|
||||
else
|
||||
# Use only external as primary
|
||||
if param compare SENS_EXT_MAG 1
|
||||
then
|
||||
if hmc5883 -C -X start
|
||||
then
|
||||
fi
|
||||
else
|
||||
# auto-detect the primary, prefer external
|
||||
if hmc5883 start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp MINDPX_V2
|
||||
then
|
||||
if mpu6500 start
|
||||
then
|
||||
fi
|
||||
|
||||
if lsm303d start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 start
|
||||
then
|
||||
fi
|
||||
|
||||
# External I2C bus
|
||||
if hmc5883 -C -T -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if lis3mdl -R 2 start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if meas_airspeed start
|
||||
then
|
||||
else
|
||||
if ets_airspeed start
|
||||
then
|
||||
else
|
||||
if ets_airspeed start -b 1
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if sf10a start
|
||||
then
|
||||
fi
|
||||
|
||||
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
|
||||
usleep 20000
|
||||
if sensors start
|
||||
then
|
||||
fi
|
||||
@@ -38,6 +38,11 @@ fi
|
||||
# Start a minimal system
|
||||
#
|
||||
|
||||
#
|
||||
# Start the ORB (first app to start)
|
||||
#
|
||||
uorb start
|
||||
|
||||
#
|
||||
# Load parameters
|
||||
#
|
||||
@@ -104,103 +109,7 @@ then
|
||||
tests mount
|
||||
fi
|
||||
|
||||
#
|
||||
# Run unit tests at board boot, reporting failure as needed.
|
||||
# Add new unit tests using the same pattern as below.
|
||||
#
|
||||
|
||||
if mavlink_tests
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
|
||||
fi
|
||||
|
||||
if commander_tests
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
|
||||
fi
|
||||
|
||||
if uorb test
|
||||
then
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
|
||||
fi
|
||||
|
||||
# Start all sensors on all boards
|
||||
ms5611 start
|
||||
adc start
|
||||
|
||||
if mpu6000 -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if mpu6000 start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if l3gd20 start
|
||||
then
|
||||
fi
|
||||
|
||||
# MAG selection
|
||||
if param compare SENS_EXT_MAG 2
|
||||
then
|
||||
if hmc5883 -I start
|
||||
then
|
||||
fi
|
||||
else
|
||||
# Use only external as primary
|
||||
if param compare SENS_EXT_MAG 1
|
||||
then
|
||||
if hmc5883 -X start
|
||||
then
|
||||
fi
|
||||
else
|
||||
# auto-detect the primary, prefer external
|
||||
if hmc5883 start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
if lsm303d -X start
|
||||
then
|
||||
fi
|
||||
|
||||
if lsm303d start
|
||||
then
|
||||
fi
|
||||
|
||||
if ms5611 -X start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
||||
if meas_airspeed start
|
||||
then
|
||||
else
|
||||
if ets_airspeed start
|
||||
then
|
||||
else
|
||||
if ets_airspeed start -b 1
|
||||
then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if sensors start
|
||||
then
|
||||
fi
|
||||
sh /etc/init.d/rc.sensors
|
||||
|
||||
# Check for flow sensor
|
||||
if px4flow start
|
||||
@@ -211,6 +120,60 @@ if ll40ls start
|
||||
then
|
||||
fi
|
||||
|
||||
#
|
||||
# Run unit tests at board boot, reporting failure as needed.
|
||||
# Add new unit tests using the same pattern as below.
|
||||
#
|
||||
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[mavlink_tests] STARTING TEST"
|
||||
if mavlink_tests
|
||||
then
|
||||
echo "[mavlink_tests] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
|
||||
echo "[mavlink_tests] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[commander_tests] STARTING TEST"
|
||||
if commander_tests
|
||||
then
|
||||
echo "[commander_tests] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} commander_tests"
|
||||
echo "[commander_tests] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[controllib_test] STARTING TEST"
|
||||
if controllib_test
|
||||
then
|
||||
echo "[controllib_test] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} controllib_tests"
|
||||
echo "[controllib_test] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "[uorb_tests] STARTING TEST"
|
||||
if uorb_tests
|
||||
then
|
||||
echo "[uorb_tests] PASS"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} uorb_tests"
|
||||
echo "[uorb_tests] FAILED"
|
||||
fi
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
|
||||
if tests all
|
||||
then
|
||||
else
|
||||
|
||||
@@ -23,3 +23,7 @@ do
|
||||
adb push $arg $last
|
||||
((i+=1))
|
||||
done
|
||||
|
||||
# Make sure they are synced to the file system
|
||||
echo "Syncing FS..."
|
||||
adb shell sync
|
||||
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
ip=192.168.42.1
|
||||
port=9050
|
||||
|
||||
echo "Connecting to bebop: $ip:$port"
|
||||
|
||||
# adb returns also 0 as exit status if the connection fails
|
||||
adb_return=$(adb connect $ip:$port)
|
||||
adb_status=$(echo $adb_return | cut -f 1 -d " ")
|
||||
|
||||
if [[ $adb_status == "unable" ]]; then
|
||||
|
||||
echo ""
|
||||
echo "Connection with Parrot Bebop could not be established:"
|
||||
echo " Make sure you are connected with the Bebop's WiFi and"
|
||||
echo " enable access to the board by pressing the power button 4 times."
|
||||
echo ""
|
||||
exit 50
|
||||
|
||||
fi
|
||||
|
||||
echo "Connection successfully established"
|
||||
|
||||
sleep 1
|
||||
|
||||
adb shell mount -o remount,rw /
|
||||
|
||||
../Tools/adb_upload.sh $@
|
||||
|
||||
echo "Disconnecting from bebop"
|
||||
adb disconnect
|
||||
+13
-67
@@ -1,70 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
failed=0
|
||||
for fn in $(find src/examples \
|
||||
src/systemcmds \
|
||||
src/include \
|
||||
src/drivers \
|
||||
src/platforms \
|
||||
src/firmware \
|
||||
src/lib/launchdetection \
|
||||
src/lib/geo \
|
||||
src/lib/geo_lookup \
|
||||
src/lib/conversion \
|
||||
src/lib/rc \
|
||||
src/lib/version \
|
||||
src/modules/attitude_estimator_q \
|
||||
src/modules/fw_att_control \
|
||||
src/modules/gpio_led \
|
||||
src/modules/land_detector \
|
||||
src/modules/muorb \
|
||||
src/modules/px4iofirmware \
|
||||
src/modules/param \
|
||||
src/modules/sensors \
|
||||
src/modules/simulator \
|
||||
src/modules/uORB \
|
||||
src/modules/bottle_drop \
|
||||
src/modules/dataman \
|
||||
src/modules/segway \
|
||||
src/modules/local_position_estimator \
|
||||
src/modules/unit_test \
|
||||
src/modules/systemlib \
|
||||
src/lib/controllib \
|
||||
-path './Build' -prune -o \
|
||||
-path './mavlink' -prune -o \
|
||||
-path './NuttX' -prune -o \
|
||||
-path './src/lib/eigen' -prune -o \
|
||||
-path './src/modules/uavcan/libuavcan' -prune -o \
|
||||
-path './src/modules/attitude_estimator_ekf/codegen' -prune -o \
|
||||
-path './src/modules/ekf_att_pos_estimator' -prune -o \
|
||||
-path './src/modules/sdlog2' -prune -o \
|
||||
-path './src/modules/uORB' -prune -o \
|
||||
-path './src/modules/vtol_att_control' -prune -o \
|
||||
-path './unittests/build' -prune -o \
|
||||
-path './unittests/gtest' -prune -o \
|
||||
-name '*.c' -o -name '*.cpp' -o -name '*.hpp' -o -name '*.h' \
|
||||
-not -name '*generated*' \
|
||||
-not -name '*uthash.h' \
|
||||
-not -name '*utstring.h' \
|
||||
-not -name '*utlist.h' \
|
||||
-not -name '*utarray.h' \
|
||||
-type f); do
|
||||
if [ -f "$fn" ];
|
||||
then
|
||||
./Tools/fix_code_style.sh --quiet < $fn > $fn.pretty
|
||||
diffsize=$(diff -y --suppress-common-lines $fn $fn.pretty | wc -l)
|
||||
rm -f $fn.pretty
|
||||
if [ $diffsize -ne 0 ]; then
|
||||
failed=1
|
||||
echo $fn 'bad formatting, please run "./Tools/fix_code_style.sh' $fn'"'
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $failed -eq 0 ]; then
|
||||
echo "Format checks passed"
|
||||
exit 0
|
||||
else
|
||||
echo "Format checks failed"
|
||||
exit 1
|
||||
file=$1
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
if [ -f "$file" ];
|
||||
then
|
||||
${DIR}/fix_code_style.sh --dry-run $file | grep --quiet Formatted
|
||||
if [[ $? -eq 0 ]]
|
||||
then
|
||||
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
failed=0
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
find \
|
||||
src/drivers \
|
||||
src/examples \
|
||||
src/firmware \
|
||||
src/include \
|
||||
src/lib/controllib \
|
||||
src/lib/conversion \
|
||||
src/lib/geo \
|
||||
src/lib/geo_lookup \
|
||||
src/lib/launchdetection \
|
||||
src/lib/rc \
|
||||
src/lib/tailsitter_recovery \
|
||||
src/lib/terrain_estimation \
|
||||
src/lib/version \
|
||||
src/modules/attitude_estimator_q \
|
||||
src/modules/bottle_drop \
|
||||
src/modules/controllib_test \
|
||||
src/modules/dataman \
|
||||
src/modules/fw_att_control \
|
||||
src/modules/gpio_led \
|
||||
src/modules/land_detector \
|
||||
src/modules/local_position_estimator \
|
||||
src/modules/logger \
|
||||
src/modules/mavlink/mavlink_tests \
|
||||
src/modules/muorb \
|
||||
src/modules/param \
|
||||
src/modules/px4iofirmware \
|
||||
src/modules/segway \
|
||||
src/modules/sensors \
|
||||
src/modules/simulator \
|
||||
src/modules/systemlib \
|
||||
src/modules/unit_test \
|
||||
src/modules/uORB \
|
||||
src/modules/vtol_att_control \
|
||||
src/platforms \
|
||||
src/systemcmds \
|
||||
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) \
|
||||
-not -name '*generated.h' \
|
||||
-not -name '*uthash.h' \
|
||||
-not -name '*utstring.h' \
|
||||
-not -name '*utlist.h' \
|
||||
-not -name '*utarray.h' \
|
||||
-print0 | xargs -0 -n 1 -P 8 -I % ${DIR}/check_code_style.sh %
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Format checks passed"
|
||||
exit 0
|
||||
fi
|
||||
@@ -69,6 +69,7 @@ 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 mavlink/include/mavlink/v2.0
|
||||
check_git_submodule src/lib/DriverFramework
|
||||
check_git_submodule src/lib/DriverFramework/cmake/cmake_hexagon
|
||||
check_git_submodule src/lib/DriverFramework/dspal
|
||||
|
||||
@@ -173,6 +173,7 @@ for index,m in enumerate(messages[1:]):
|
||||
print("\t\t\ti++;")
|
||||
print("\t\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
|
||||
print("\t\t\torb_copy(ID,sub,&container);")
|
||||
print("\t\t\tprintf(\"timestamp: %\" PRIu64 \"\\n\", container.timestamp);")
|
||||
for item in message_elements[index+1]:
|
||||
if item[0] == "float":
|
||||
print("\t\t\tprintf(\"%s: %%8.4f\\n\",(double)container.%s);" % (item[1], item[1]))
|
||||
|
||||
+1
-1
Submodule Tools/jMAVSim updated: 9155c8f955...39cee41574
@@ -284,6 +284,9 @@ class SourceParser(object):
|
||||
for group in self.GetParamGroups():
|
||||
for param in group.GetParams():
|
||||
name = param.GetName()
|
||||
if len(name) > 16:
|
||||
sys.stderr.write("Parameter Name {0} is too long (Limit is 16)\n".format(name))
|
||||
return False
|
||||
board = param.GetFieldValue("board")
|
||||
# Check for duplicates
|
||||
name_plus_board = name + "+" + board
|
||||
|
||||
@@ -33,8 +33,9 @@ class SourceScanner(object):
|
||||
Scans provided file and passes its contents to the parser using
|
||||
parser.Parse method.
|
||||
"""
|
||||
prefix = ".." + os.path.sep + "src" + os.path.sep
|
||||
scope = re.sub(prefix, '', os.path.dirname(os.path.relpath(path)))
|
||||
prefix = "^.*" + os.path.sep + "src" + os.path.sep
|
||||
scope = re.sub(prefix.replace("\\", "/"), "", os.path.dirname(os.path.relpath(path)).replace("\\", "/"))
|
||||
|
||||
with codecs.open(path, 'r', 'utf-8') as f:
|
||||
try:
|
||||
contents = f.read()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
#############################################################################
|
||||
#
|
||||
# Copyright (C) 2013-2015 PX4 Development Team. All rights reserved.
|
||||
# Copyright (C) 2013-2016 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -33,8 +33,8 @@
|
||||
#############################################################################
|
||||
|
||||
"""
|
||||
px_generate_uorb_topic_headers.py
|
||||
Generates c/cpp header files for uorb topics from .msg (ROS syntax)
|
||||
px_generate_uorb_topics.py
|
||||
Generates c/cpp header/source files for uorb topics from .msg (ROS syntax)
|
||||
message files
|
||||
"""
|
||||
from __future__ import print_function
|
||||
@@ -49,6 +49,7 @@ sys.path.append(px4_tools_dir + "/genmsg/src")
|
||||
sys.path.append(px4_tools_dir + "/gencpp/src")
|
||||
|
||||
try:
|
||||
import em
|
||||
import genmsg.template_tools
|
||||
except ImportError as e:
|
||||
print("python import error: ", e)
|
||||
@@ -68,35 +69,99 @@ On Windows please run:
|
||||
''')
|
||||
exit(1)
|
||||
|
||||
__author__ = "Thomas Gubler"
|
||||
__copyright__ = "Copyright (C) 2013-2014 PX4 Development Team."
|
||||
__author__ = "Sergey Belash, Thomas Gubler, Beat Kueng"
|
||||
__copyright__ = "Copyright (C) 2013-2016 PX4 Development Team."
|
||||
__license__ = "BSD"
|
||||
__email__ = "thomasgubler@gmail.com"
|
||||
|
||||
|
||||
msg_template_map = {'msg.h.template': '@NAME@.h'}
|
||||
srv_template_map = {}
|
||||
incl_default = ['std_msgs:./msg/std_msgs']
|
||||
package = 'px4'
|
||||
TEMPLATE_FILE = ['msg.h.template', 'msg.cpp.template']
|
||||
TOPICS_LIST_TEMPLATE_FILE = 'uORBTopics.cpp.template'
|
||||
OUTPUT_FILE_EXT = ['.h', '.cpp']
|
||||
INCL_DEFAULT = ['std_msgs:./msg/std_msgs']
|
||||
PACKAGE = 'px4'
|
||||
TOPICS_TOKEN = '# TOPICS '
|
||||
|
||||
|
||||
def convert_file(filename, outputdir, templatedir, includepath):
|
||||
def get_multi_topics(filename):
|
||||
"""
|
||||
Converts a single .msg file to a uorb header
|
||||
Get TOPICS names from a "# TOPICS" line
|
||||
"""
|
||||
#print("Generating headers from {0}".format(filename))
|
||||
genmsg.template_tools.generate_from_file(filename,
|
||||
package,
|
||||
outputdir,
|
||||
templatedir,
|
||||
includepath,
|
||||
msg_template_map,
|
||||
srv_template_map)
|
||||
ofile = open(filename, 'r')
|
||||
text = ofile.read()
|
||||
result = []
|
||||
for each_line in text.split('\n'):
|
||||
if each_line.startswith (TOPICS_TOKEN):
|
||||
topic_names_str = each_line.strip()
|
||||
topic_names_str = topic_names_str.replace(TOPICS_TOKEN, "")
|
||||
result.extend(topic_names_str.split(" "))
|
||||
ofile.close()
|
||||
return result
|
||||
|
||||
def get_msgs_list(msgdir):
|
||||
"""
|
||||
Makes list of msg files in the given directory
|
||||
"""
|
||||
return [fn for fn in os.listdir(msgdir) if fn.endswith(".msg")]
|
||||
|
||||
|
||||
def convert_dir(inputdir, outputdir, templatedir):
|
||||
def generate_output_from_file(format_idx, filename, outputdir, templatedir, includepath):
|
||||
"""
|
||||
Converts all .msg files in inputdir to uORB header files
|
||||
Converts a single .msg file to an uorb header/source file
|
||||
"""
|
||||
msg_context = genmsg.msg_loader.MsgContext.create_default()
|
||||
full_type_name = genmsg.gentools.compute_full_type_name(PACKAGE, os.path.basename(filename))
|
||||
spec = genmsg.msg_loader.load_msg_from_file(msg_context, filename, full_type_name)
|
||||
topics = get_multi_topics(filename)
|
||||
if includepath:
|
||||
search_path = genmsg.command_line.includepath_to_dict(includepath)
|
||||
else:
|
||||
search_path = {}
|
||||
genmsg.msg_loader.load_depends(msg_context, spec, search_path)
|
||||
md5sum = genmsg.gentools.compute_md5(msg_context, spec)
|
||||
if len(topics) == 0:
|
||||
topics.append(spec.short_name)
|
||||
em_globals = {
|
||||
"file_name_in": filename,
|
||||
"md5sum": md5sum,
|
||||
"search_path": search_path,
|
||||
"msg_context": msg_context,
|
||||
"spec": spec,
|
||||
"topics": topics
|
||||
}
|
||||
|
||||
# Make sure output directory exists:
|
||||
if not os.path.isdir(outputdir):
|
||||
os.makedirs(outputdir)
|
||||
|
||||
template_file = os.path.join(templatedir, TEMPLATE_FILE[format_idx])
|
||||
output_file = os.path.join(outputdir, spec.short_name +
|
||||
OUTPUT_FILE_EXT[format_idx])
|
||||
|
||||
return generate_by_template(output_file, template_file, em_globals)
|
||||
|
||||
|
||||
def generate_by_template(output_file, template_file, em_globals):
|
||||
"""
|
||||
Invokes empy intepreter to geneate output_file by the
|
||||
given template_file and predefined em_globals dict
|
||||
"""
|
||||
ofile = open(output_file, 'w')
|
||||
# todo, reuse interpreter
|
||||
interpreter = em.Interpreter(output=ofile, globals=em_globals, options={em.RAW_OPT:True,em.BUFFERED_OPT:True})
|
||||
if not os.path.isfile(template_file):
|
||||
ofile.close()
|
||||
os.remove(output_file)
|
||||
raise RuntimeError("Template file %s not found" % (template_file))
|
||||
interpreter.file(open(template_file)) #todo try
|
||||
interpreter.shutdown()
|
||||
ofile.close()
|
||||
return True
|
||||
|
||||
|
||||
def convert_dir(format_idx, inputdir, outputdir, templatedir):
|
||||
"""
|
||||
Converts all .msg files in inputdir to uORB header/source files
|
||||
"""
|
||||
|
||||
# Find the most recent modification time in input dir
|
||||
@@ -122,7 +187,7 @@ def convert_dir(inputdir, outputdir, templatedir):
|
||||
if (maxinputtime != 0 and maxouttime != 0 and maxinputtime < maxouttime):
|
||||
return False
|
||||
|
||||
includepath = incl_default + [':'.join([package, inputdir])]
|
||||
includepath = INCL_DEFAULT + [':'.join([PACKAGE, inputdir])]
|
||||
for f in os.listdir(inputdir):
|
||||
# Ignore hidden files
|
||||
if f.startswith("."):
|
||||
@@ -133,11 +198,10 @@ def convert_dir(inputdir, outputdir, templatedir):
|
||||
if not os.path.isfile(fn):
|
||||
continue
|
||||
|
||||
convert_file(fn,
|
||||
outputdir,
|
||||
templatedir,
|
||||
includepath)
|
||||
if fn[-4:].lower() != '.msg':
|
||||
continue
|
||||
|
||||
generate_output_from_file(format_idx, fn, outputdir, templatedir, includepath)
|
||||
return True
|
||||
|
||||
|
||||
@@ -151,15 +215,15 @@ def copy_changed(inputdir, outputdir, prefix='', quiet=False):
|
||||
if not os.path.isdir(outputdir):
|
||||
os.makedirs(outputdir)
|
||||
|
||||
for f in os.listdir(inputdir):
|
||||
fni = os.path.join(inputdir, f)
|
||||
for input_file in os.listdir(inputdir):
|
||||
fni = os.path.join(inputdir, input_file)
|
||||
if os.path.isfile(fni):
|
||||
# Check if f exists in outpoutdir, copy the file if not
|
||||
fno = os.path.join(outputdir, prefix + f)
|
||||
# Check if input_file exists in outpoutdir, copy the file if not
|
||||
fno = os.path.join(outputdir, prefix + input_file)
|
||||
if not os.path.isfile(fno):
|
||||
shutil.copy(fni, fno)
|
||||
if not quiet:
|
||||
print("{0}: new header file".format(f))
|
||||
print("{0}: new header file".format(fno))
|
||||
continue
|
||||
|
||||
if os.path.getmtime(fni) > os.path.getmtime(fno):
|
||||
@@ -168,26 +232,39 @@ def copy_changed(inputdir, outputdir, prefix='', quiet=False):
|
||||
if not filecmp.cmp(fni, fno):
|
||||
shutil.copy(fni, fno)
|
||||
if not quiet:
|
||||
print("{0}: updated".format(f))
|
||||
print("{0}: updated".format(input_file))
|
||||
continue
|
||||
|
||||
if not quiet:
|
||||
print("{0}: unchanged".format(f))
|
||||
print("{0}: unchanged".format(input_file))
|
||||
|
||||
|
||||
def convert_dir_save(inputdir, outputdir, templatedir, temporarydir, prefix, quiet=False):
|
||||
def convert_dir_save(format_idx, inputdir, outputdir, templatedir, temporarydir, prefix, quiet=False):
|
||||
"""
|
||||
Converts all .msg files in inputdir to uORB header files
|
||||
Unchanged existing files are not overwritten.
|
||||
"""
|
||||
# Create new headers in temporary output directory
|
||||
convert_dir(inputdir, temporarydir, templatedir)
|
||||
convert_dir(format_idx, inputdir, temporarydir, templatedir)
|
||||
if generate_idx == 1:
|
||||
generate_topics_list_file(inputdir, temporarydir, templatedir)
|
||||
# Copy changed headers from temporary dir to output dir
|
||||
copy_changed(temporarydir, outputdir, prefix, quiet)
|
||||
|
||||
def generate_topics_list_file(msgdir, outputdir, templatedir):
|
||||
# generate cpp file with topics list
|
||||
tl_globals = {"msgs" : get_msgs_list(msgdir)}
|
||||
tl_template_file = os.path.join(templatedir, TOPICS_LIST_TEMPLATE_FILE)
|
||||
tl_out_file = os.path.join(outputdir, TOPICS_LIST_TEMPLATE_FILE.replace(".template", ""))
|
||||
generate_by_template(tl_out_file, tl_template_file, tl_globals)
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Convert msg files to uorb headers')
|
||||
description='Convert msg files to uorb headers/sources')
|
||||
parser.add_argument('--headers', help='Generate header files',
|
||||
action='store_true')
|
||||
parser.add_argument('--sources', help='Generate source files',
|
||||
action='store_true')
|
||||
parser.add_argument('-d', dest='dir', help='directory with msg files')
|
||||
parser.add_argument('-f', dest='file',
|
||||
help="files to convert (use only without -d)",
|
||||
@@ -206,15 +283,22 @@ if __name__ == "__main__":
|
||||
' name when converting directories')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.headers:
|
||||
generate_idx = 0
|
||||
elif args.sources:
|
||||
generate_idx = 1
|
||||
else:
|
||||
print('Error: either --headers or --sources must be specified')
|
||||
exit(-1)
|
||||
|
||||
if args.file is not None:
|
||||
for f in args.file:
|
||||
convert_file(
|
||||
f,
|
||||
args.outputdir,
|
||||
args.templatedir,
|
||||
incl_default)
|
||||
for f in args.file:
|
||||
generate_output_from_file(generate_idx, f, args.outputdir, args.templatedir, INCL_DEFAULT)
|
||||
if generate_idx == 1:
|
||||
generate_topics_list_file(args.dir, args.outputdir, args.templatedir)
|
||||
elif args.dir is not None:
|
||||
convert_dir_save(
|
||||
convert_dir_save(
|
||||
generate_idx,
|
||||
args.dir,
|
||||
args.outputdir,
|
||||
args.templatedir,
|
||||
@@ -0,0 +1,171 @@
|
||||
|
||||
# helper methods & common code for the uorb message templates msg.{cpp,h}.template
|
||||
|
||||
# Another positive effect of having the code here, is that this file will get
|
||||
# precompiled and thus message generation will be much faster
|
||||
|
||||
|
||||
import genmsg.msgs
|
||||
import gencpp
|
||||
|
||||
type_map = {
|
||||
'int8': 'int8_t',
|
||||
'int16': 'int16_t',
|
||||
'int32': 'int32_t',
|
||||
'int64': 'int64_t',
|
||||
'uint8': 'uint8_t',
|
||||
'uint16': 'uint16_t',
|
||||
'uint32': 'uint32_t',
|
||||
'uint64': 'uint64_t',
|
||||
'float32': 'float',
|
||||
'float64': 'double',
|
||||
'bool': 'bool',
|
||||
'char': 'char',
|
||||
}
|
||||
|
||||
msgtype_size_map = {
|
||||
'int8': 1,
|
||||
'int16': 2,
|
||||
'int32': 4,
|
||||
'int64': 8,
|
||||
'uint8': 1,
|
||||
'uint16': 2,
|
||||
'uint32': 4,
|
||||
'uint64': 8,
|
||||
'float32': 4,
|
||||
'float64': 8,
|
||||
'bool': 1,
|
||||
'char': 1,
|
||||
}
|
||||
|
||||
|
||||
def bare_name(msg_type):
|
||||
"""
|
||||
Get bare_name from <dir>/<bare_name>[x] format
|
||||
"""
|
||||
bare = msg_type
|
||||
if '/' in msg_type:
|
||||
# removing prefix
|
||||
bare = (msg_type.split('/'))[1]
|
||||
# removing suffix
|
||||
return bare.split('[')[0]
|
||||
|
||||
|
||||
def sizeof_field_type(field):
|
||||
"""
|
||||
Get size of a field, used for sorting
|
||||
"""
|
||||
bare_name_str = bare_name(field.type)
|
||||
if bare_name_str in msgtype_size_map:
|
||||
return msgtype_size_map[bare_name_str]
|
||||
return 0 # this is for non-builtin types: sort them at the end
|
||||
|
||||
def get_children_fields(base_type, search_path):
|
||||
(package, name) = genmsg.names.package_resource_name(base_type)
|
||||
tmp_msg_context = genmsg.msg_loader.MsgContext.create_default()
|
||||
spec_temp = genmsg.msg_loader.load_msg_by_type(tmp_msg_context, '%s/%s' %(package, name), search_path)
|
||||
sorted_fields = sorted(spec_temp.parsed_fields(), key=sizeof_field_type, reverse=True)
|
||||
return sorted_fields
|
||||
|
||||
def add_padding_bytes(fields, search_path):
|
||||
"""
|
||||
Add padding fields before the embedded types, at the end and calculate the
|
||||
struct size
|
||||
returns a tuple with the struct size and padding at the end
|
||||
"""
|
||||
struct_size = 8 # account for the timestamp
|
||||
align_to = 8 # this is always 8, because of the 64bit timestamp
|
||||
i = 0
|
||||
padding_idx = 0
|
||||
while i < len(fields):
|
||||
field = fields[i]
|
||||
if not field.is_header:
|
||||
a_pos = field.type.find('[')
|
||||
array_size = 1
|
||||
if field.is_array:
|
||||
array_size = field.array_len
|
||||
if field.is_builtin:
|
||||
field.sizeof_field_type = sizeof_field_type(field)
|
||||
else:
|
||||
# embedded type: may need to add padding
|
||||
num_padding_bytes = align_to - (struct_size % align_to)
|
||||
if num_padding_bytes != align_to:
|
||||
padding_field = genmsg.Field('_padding'+str(padding_idx),
|
||||
'uint8['+str(num_padding_bytes)+']')
|
||||
padding_idx += 1
|
||||
padding_field.sizeof_field_type = 1
|
||||
struct_size += num_padding_bytes
|
||||
fields.insert(i, padding_field)
|
||||
i += 1
|
||||
children_fields = get_children_fields(field.base_type, search_path)
|
||||
field.sizeof_field_type, unused = add_padding_bytes(children_fields,
|
||||
search_path)
|
||||
struct_size += field.sizeof_field_type * array_size
|
||||
i += 1
|
||||
|
||||
# add padding at the end (necessary for embedded types)
|
||||
num_padding_bytes = align_to - (struct_size % align_to)
|
||||
if num_padding_bytes == align_to:
|
||||
num_padding_bytes = 0
|
||||
else:
|
||||
padding_field = genmsg.Field('_padding'+str(padding_idx),
|
||||
'uint8['+str(num_padding_bytes)+']')
|
||||
padding_idx += 1
|
||||
padding_field.sizeof_field_type = 1
|
||||
struct_size += num_padding_bytes
|
||||
fields.append(padding_field)
|
||||
return (struct_size, num_padding_bytes)
|
||||
|
||||
|
||||
def convert_type(spec_type):
|
||||
"""
|
||||
Convert from msg type to C type
|
||||
"""
|
||||
bare_type = spec_type
|
||||
if '/' in spec_type:
|
||||
# removing prefix
|
||||
bare_type = (spec_type.split('/'))[1]
|
||||
|
||||
msg_type, is_array, array_length = genmsg.msgs.parse_type(bare_type)
|
||||
c_type = msg_type
|
||||
if msg_type in type_map:
|
||||
c_type = type_map[msg_type]
|
||||
if is_array:
|
||||
return c_type + "[" + str(array_length) + "]"
|
||||
return c_type
|
||||
|
||||
|
||||
def print_field_def(field):
|
||||
"""
|
||||
Print the C type from a field
|
||||
"""
|
||||
type_name = field.type
|
||||
# detect embedded types
|
||||
sl_pos = type_name.find('/')
|
||||
type_appendix = ''
|
||||
type_prefix = ''
|
||||
if (sl_pos >= 0):
|
||||
type_name = type_name[sl_pos + 1:]
|
||||
type_prefix = 'struct '
|
||||
type_appendix = '_s'
|
||||
|
||||
# detect arrays
|
||||
a_pos = type_name.find('[')
|
||||
array_size = ''
|
||||
if (a_pos >= 0):
|
||||
# field is array
|
||||
array_size = type_name[a_pos:]
|
||||
type_name = type_name[:a_pos]
|
||||
|
||||
if type_name in type_map:
|
||||
# need to add _t: int8 --> int8_t
|
||||
type_px4 = type_map[type_name]
|
||||
else:
|
||||
type_px4 = type_name
|
||||
|
||||
comment = ''
|
||||
if field.name.startswith('_padding'):
|
||||
comment = ' // required for logger'
|
||||
|
||||
print('\t%s%s%s %s%s;%s'%(type_prefix, type_px4, type_appendix, field.name,
|
||||
array_size, comment))
|
||||
@@ -71,7 +71,7 @@ def main():
|
||||
const="",
|
||||
metavar="BOARD",
|
||||
help="Board to create airframes xml for")
|
||||
parser.add_argument("-v", "--verbose", help="verbose output")
|
||||
parser.add_argument('-v', '--verbose', action='store_true', help="verbose output")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Check for valid command
|
||||
|
||||
@@ -107,7 +107,7 @@ def main():
|
||||
metavar="SUMMARY",
|
||||
default="Automagically updated parameter documentation from code.",
|
||||
help="DokuWiki page edit summary")
|
||||
parser.add_argument("-v", "--verbose", help="verbose output")
|
||||
parser.add_argument('-v', '--verbose', action='store_true', help="verbose output")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Check for valid command
|
||||
|
||||
+18
-11
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2014-2015 PX4 Development Team. All rights reserved.
|
||||
# Copyright (C) 2014-2016 PX4 Development Team. All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -35,7 +35,12 @@
|
||||
|
||||
"""
|
||||
px_romfs_pruner.py:
|
||||
Delete all comments and newlines before ROMFS is converted to an image
|
||||
Try to keep size of ROMFS minimal.
|
||||
|
||||
This script goes through the temporarily copied ROMFS data and deletes all
|
||||
comments, empty lines and leading whitespace.
|
||||
It also deletes hidden files such as auto-saved backups that a text editor
|
||||
might have left in the tree.
|
||||
|
||||
@author: Julian Oes <julian@oes.ch>
|
||||
"""
|
||||
@@ -53,18 +58,20 @@ def main():
|
||||
help="ROMFS scratch folder.")
|
||||
args = parser.parse_args()
|
||||
|
||||
#print("Pruning ROMFS files.")
|
||||
|
||||
# go through
|
||||
# go through temp folder
|
||||
for (root, dirs, files) in os.walk(args.folder):
|
||||
for file in files:
|
||||
# only prune text files
|
||||
if ".zip" in file or ".bin" in file or ".swp" in file \
|
||||
or ".data" in file or ".DS_Store" in file \
|
||||
or file.startswith("."):
|
||||
file_path = os.path.join(root, file)
|
||||
|
||||
# delete hidden files
|
||||
if file.startswith("."):
|
||||
os.remove(file_path)
|
||||
continue
|
||||
|
||||
file_path = os.path.join(root, file)
|
||||
# only prune text files
|
||||
if ".zip" in file or ".bin" in file or ".swp" in file \
|
||||
or ".data" in file or ".DS_Store" in file:
|
||||
continue
|
||||
|
||||
# read file line by line
|
||||
pruned_content = ""
|
||||
@@ -77,7 +84,7 @@ def main():
|
||||
else:
|
||||
if not line.isspace() \
|
||||
and not line.strip().startswith("#"):
|
||||
pruned_content += line
|
||||
pruned_content += line.strip() + "\n"
|
||||
# overwrite old scratch file
|
||||
with open(file_path, "wb") as f:
|
||||
pruned_content = re.sub("\r\n", "\n", pruned_content)
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$#" < 2 ]]; then
|
||||
echo "usage: scp_upload.sh SRC1 [SRC2 ...] DEST"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Uploading..."
|
||||
|
||||
# Get last argument
|
||||
for last; do true; done
|
||||
|
||||
# Go through source files and push them one by one.
|
||||
i=0
|
||||
for arg
|
||||
do
|
||||
if [[ $((i+1)) == "$#" ]]; then
|
||||
break
|
||||
fi
|
||||
# echo "Pushing $arg to $last"
|
||||
#adb push $arg $last
|
||||
scp $arg pi@px4autopilot:$last
|
||||
((i+=1))
|
||||
done
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: 9353834b2f...459a0c9335
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
sitl_num=2
|
||||
|
||||
sim_port=15019
|
||||
mav_port=15010
|
||||
mav_port2=15011
|
||||
|
||||
mav_oport=15015
|
||||
mav_oport2=15016
|
||||
|
||||
port_step=10
|
||||
|
||||
src_path=`pwd`
|
||||
|
||||
rc_script="posix-configs/SITL/init/rcS_multiple"
|
||||
build_path=${src_path}/build_posix_sitl_default
|
||||
|
||||
pkill mainapp
|
||||
sleep 2
|
||||
|
||||
cd $build_path/src/firmware/posix
|
||||
|
||||
user=`whoami`
|
||||
n=1
|
||||
while [ $n -le $sitl_num ]; do
|
||||
if [ ! -d $n ]; then
|
||||
mkdir -p $n
|
||||
cd $n
|
||||
|
||||
mkdir -p rootfs/fs/microsd
|
||||
mkdir -p rootfs/eeprom
|
||||
touch rootfs/eeprom/parameters
|
||||
|
||||
cp ${src_path}/ROMFS/px4fmu_common/mixers/quad_w.main.mix ./
|
||||
cat ${src_path}/${rc_script}_gazebo_iris | sed s/_SIMPORT_/${sim_port}/ | sed s/_MAVPORT_/${mav_port}/g | sed s/_MAVOPORT_/${mav_oport}/ | sed s/_MAVPORT2_/${mav_port2}/ | sed s/_MAVOPORT2_/${mav_oport2}/ > rcS
|
||||
cd ../
|
||||
fi
|
||||
|
||||
cd $n
|
||||
|
||||
sudo -b -u $user ../mainapp -d rcS >out.log 2>err.log
|
||||
|
||||
cd ../
|
||||
|
||||
n=$(($n + 1))
|
||||
sim_port=$(($sim_port + $port_step))
|
||||
mav_port=$(($mav_port + $port_step))
|
||||
mav_port2=$(($mav_port2 + $port_step))
|
||||
mav_oport=$(($mav_oport + $port_step))
|
||||
mav_oport2=$(($mav_oport2 + $port_step))
|
||||
done
|
||||
+17
-13
@@ -58,7 +58,7 @@ cp Tools/posix.gdbinit $build_path/src/firmware/posix/.gdbinit
|
||||
|
||||
SIM_PID=0
|
||||
|
||||
if [ "$program" == "jmavsim" ] && [ "$no_sim" == "" ]
|
||||
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
cd Tools/jMAVSim
|
||||
ant create_run_jar copy_res
|
||||
@@ -66,31 +66,33 @@ then
|
||||
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560 &
|
||||
SIM_PID=`echo $!`
|
||||
cd ../..
|
||||
elif [ "$program" == "gazebo" ] && [ "$no_sim" == "" ]
|
||||
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
if [ -x "$(command -v gazebo)" ]
|
||||
then
|
||||
# Set the plugin path so Gazebo finds our model and sim
|
||||
export GAZEBO_PLUGIN_PATH=$curr_dir/Tools/sitl_gazebo/Build:${GAZEBO_PLUGIN_PATH}
|
||||
export GAZEBO_PLUGIN_PATH=$curr_dir/build_gazebo:${GAZEBO_PLUGIN_PATH}
|
||||
# Set the model path so Gazebo finds the airframes
|
||||
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:$curr_dir/Tools/sitl_gazebo/models
|
||||
# The next line would disable online model lookup, can be commented in, in case of unstable behaviour.
|
||||
# export GAZEBO_MODEL_DATABASE_URI=""
|
||||
export SITL_GAZEBO_PATH=$curr_dir/Tools/sitl_gazebo
|
||||
mkdir -p Tools/sitl_gazebo/Build
|
||||
cd Tools/sitl_gazebo/Build
|
||||
cmake -Wno-dev ..
|
||||
make -j4
|
||||
make sdf
|
||||
gzserver --verbose ../worlds/${model}.world &
|
||||
make --no-print-directory gazebo_build
|
||||
|
||||
gzserver --verbose $curr_dir/Tools/sitl_gazebo/worlds/${model}.world &
|
||||
SIM_PID=`echo $!`
|
||||
gzclient --verbose &
|
||||
GUI_PID=`echo $!`
|
||||
|
||||
if [[ -n "$HEADLESS" ]]; then
|
||||
echo "not running gazebo gui"
|
||||
else
|
||||
gzclient --verbose &
|
||||
GUI_PID=`echo $!`
|
||||
fi
|
||||
else
|
||||
echo "You need to have gazebo simulator installed!"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "$program" == "replay" ] && [ "$no_sim" == "" ]
|
||||
elif [ "$program" == "replay" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
echo "Replaying logfile: $logfile"
|
||||
# This is not a simulator, but a log file to replay
|
||||
@@ -135,5 +137,7 @@ then
|
||||
elif [ "$program" == "gazebo" ]
|
||||
then
|
||||
kill -9 $SIM_PID
|
||||
kill -9 $GUI_PID
|
||||
if [[ ! -n "$HEADLESS" ]]; then
|
||||
kill -9 $GUI_PID
|
||||
fi
|
||||
fi
|
||||
|
||||
+1
-1
Submodule cmake/cmake_hexagon updated: 77d487dc07...eb1d242e57
+92
-16
@@ -303,6 +303,9 @@ function(px4_add_module)
|
||||
if(MAIN)
|
||||
set_target_properties(${MODULE} PROPERTIES
|
||||
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
||||
add_definitions(-DMODULE_NAME="${MAIN}")
|
||||
else()
|
||||
add_definitions(-DMODULE_NAME="${MODULE}")
|
||||
endif()
|
||||
|
||||
if(INCLUDES)
|
||||
@@ -359,13 +362,15 @@ function(px4_generate_messages)
|
||||
NAME px4_generate_messages
|
||||
OPTIONS VERBOSE
|
||||
ONE_VALUE OS TARGET
|
||||
MULTI_VALUE MSG_FILES DEPENDS
|
||||
MULTI_VALUE MSG_FILES DEPENDS INCLUDES
|
||||
REQUIRED MSG_FILES OS TARGET
|
||||
ARGN ${ARGN})
|
||||
set(QUIET)
|
||||
if(NOT VERBOSE)
|
||||
set(QUIET "-q")
|
||||
endif()
|
||||
|
||||
# headers
|
||||
set(msg_out_path ${CMAKE_BINARY_DIR}/src/modules/uORB/topics)
|
||||
set(msg_list)
|
||||
foreach(msg_file ${MSG_FILES})
|
||||
@@ -378,18 +383,48 @@ function(px4_generate_messages)
|
||||
endforeach()
|
||||
add_custom_command(OUTPUT ${msg_files_out}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
Tools/px_generate_uorb_topic_headers.py
|
||||
Tools/px_generate_uorb_topic_files.py
|
||||
--headers
|
||||
${QUIET}
|
||||
-d msg
|
||||
-o ${msg_out_path}
|
||||
-e msg/templates/uorb
|
||||
-t ${CMAKE_BINARY_DIR}/topics_temporary
|
||||
-t ${CMAKE_BINARY_DIR}/topics_temporary_header
|
||||
DEPENDS ${DEPENDS} ${MSG_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Generating uORB topic headers"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# !sources
|
||||
set(msg_source_out_path ${CMAKE_BINARY_DIR}/topics_sources)
|
||||
set(msg_source_files_out ${msg_source_out_path}/uORBTopics.cpp)
|
||||
foreach(msg ${msg_list})
|
||||
list(APPEND msg_source_files_out ${msg_source_out_path}/${msg}.cpp)
|
||||
endforeach()
|
||||
add_custom_command(OUTPUT ${msg_source_files_out}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
Tools/px_generate_uorb_topic_files.py
|
||||
--sources
|
||||
${QUIET}
|
||||
-d msg
|
||||
-o ${msg_source_out_path}
|
||||
-e msg/templates/uorb
|
||||
-t ${CMAKE_BINARY_DIR}/topics_temporary_sources
|
||||
DEPENDS ${DEPENDS} ${MSG_FILES}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Generating uORB topic sources"
|
||||
VERBATIM
|
||||
)
|
||||
set_source_files_properties(${msg_source_files_out} PROPERTIES GENERATED TRUE)
|
||||
|
||||
# We remove uORBTopics.cpp to make sure the generator is re-run, which is
|
||||
# necessary when a .msg file is removed and because uORBTopics.cpp depends
|
||||
# on all topics.
|
||||
execute_process(COMMAND rm uORBTopics.cpp
|
||||
WORKING_DIRECTORY ${msg_source_out_path}
|
||||
ERROR_QUIET)
|
||||
|
||||
# multi messages for target OS
|
||||
set(msg_multi_out_path
|
||||
${CMAKE_BINARY_DIR}/src/platforms/${OS}/px4_messages)
|
||||
@@ -399,7 +434,8 @@ function(px4_generate_messages)
|
||||
endforeach()
|
||||
add_custom_command(OUTPUT ${msg_multi_files_out}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
Tools/px_generate_uorb_topic_headers.py
|
||||
Tools/px_generate_uorb_topic_files.py
|
||||
--headers
|
||||
${QUIET}
|
||||
-d msg
|
||||
-o ${msg_multi_out_path}
|
||||
@@ -411,8 +447,13 @@ function(px4_generate_messages)
|
||||
COMMENT "Generating uORB topic multi headers for ${OS}"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(${TARGET}
|
||||
DEPENDS ${msg_multi_files_out} ${msg_files_out})
|
||||
|
||||
add_library(${TARGET}
|
||||
${msg_source_files_out}
|
||||
${msg_multi_files_out}
|
||||
${msg_files_out}
|
||||
)
|
||||
|
||||
endfunction()
|
||||
|
||||
#=============================================================================
|
||||
@@ -490,6 +531,42 @@ function(px4_add_adb_push)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(px4_add_adb_push_to_bebop)
|
||||
px4_parse_function_args(
|
||||
NAME px4_add_upload_to_bebop
|
||||
ONE_VALUE OS BOARD OUT DEST
|
||||
MULTI_VALUE FILES DEPENDS
|
||||
REQUIRED OS BOARD OUT FILES DEPENDS DEST
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
|
||||
DEPENDS ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(px4_add_scp_push)
|
||||
px4_parse_function_args(
|
||||
NAME px4_add_upload
|
||||
ONE_VALUE OS BOARD OUT DEST
|
||||
MULTI_VALUE FILES DEPENDS
|
||||
REQUIRED OS BOARD OUT FILES DEPENDS DEST
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
|
||||
DEPENDS ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
)
|
||||
endfunction()
|
||||
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
@@ -541,7 +618,6 @@ function(px4_add_common_flags)
|
||||
-Wall
|
||||
-Werror
|
||||
-Wextra
|
||||
-Wpacked
|
||||
-Wno-sign-compare
|
||||
-Wshadow
|
||||
-Wfloat-equal
|
||||
@@ -583,7 +659,7 @@ function(px4_add_common_flags)
|
||||
endif()
|
||||
|
||||
if ($ENV{MEMORY_DEBUG} MATCHES "1")
|
||||
set(max_optimization -O0)
|
||||
set(max_optimization -Os)
|
||||
|
||||
set(optimization_flags
|
||||
-fno-strict-aliasing
|
||||
@@ -591,7 +667,7 @@ function(px4_add_common_flags)
|
||||
-funsafe-math-optimizations
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-g -fsanitize=address
|
||||
-g3 -fsanitize=address
|
||||
)
|
||||
else()
|
||||
set(max_optimization -Os)
|
||||
@@ -776,21 +852,21 @@ function(px4_create_git_hash_header)
|
||||
REQUIRED HEADER
|
||||
ARGN ${ARGN})
|
||||
execute_process(
|
||||
COMMAND git describe --tags
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
#message(STATUS "GIT_TAG = ${git_tag}")
|
||||
message(STATUS "GIT_TAG = ${git_tag}")
|
||||
execute_process(
|
||||
COMMAND git rev-parse HEAD
|
||||
OUTPUT_VARIABLE git_desc
|
||||
COMMAND git rev-parse --verify HEAD
|
||||
OUTPUT_VARIABLE git_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
#message(STATUS "GIT_DESC = ${git_desc}")
|
||||
set(git_desc_short)
|
||||
string(SUBSTRING ${git_desc} 1 16 git_desc_short)
|
||||
#message(STATUS "GIT_VERSION = ${git_version}")
|
||||
set(git_version_short)
|
||||
string(SUBSTRING ${git_version} 1 16 git_version_short)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ set(config_module_list
|
||||
drivers/led
|
||||
drivers/px4fmu
|
||||
#drivers/px4io
|
||||
drivers/test_ppm
|
||||
#drivers/test_ppm
|
||||
drivers/boards/mindpx-v2
|
||||
#drivers/rgbled
|
||||
drivers/rgbled_pwm
|
||||
@@ -76,6 +76,7 @@ set(config_module_list
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/gpio_led
|
||||
@@ -85,11 +86,11 @@ set(config_module_list
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
# Too high RAM usage due to static allocations
|
||||
# modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -105,6 +106,7 @@ set(config_module_list
|
||||
# Logging
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
|
||||
#
|
||||
# Library modules
|
||||
@@ -134,7 +136,7 @@ set(config_module_list
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
platforms/common
|
||||
platforms/common
|
||||
platforms/nuttx/px4_layer
|
||||
|
||||
#
|
||||
@@ -145,7 +147,7 @@ set(config_module_list
|
||||
#
|
||||
# Rover apps
|
||||
#
|
||||
examples/rover_steering_control
|
||||
#examples/rover_steering_control
|
||||
|
||||
#
|
||||
# Demo apps
|
||||
@@ -153,7 +155,7 @@ set(config_module_list
|
||||
#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
|
||||
@@ -176,10 +178,6 @@ set(config_extra_builtin_cmds
|
||||
sercon
|
||||
)
|
||||
|
||||
set(config_io_board
|
||||
px4io-v2
|
||||
)
|
||||
|
||||
set(config_extra_libs
|
||||
uavcan
|
||||
uavcan_stm32_driver
|
||||
@@ -191,9 +189,11 @@ set(config_io_extra_libs
|
||||
add_custom_target(sercon)
|
||||
set_target_properties(sercon PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "sercon" STACK_MAIN "2048")
|
||||
MAIN "sercon"
|
||||
STACK_MAIN "2048")
|
||||
|
||||
add_custom_target(serdis)
|
||||
set_target_properties(serdis PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "serdis" STACK_MAIN "2048")
|
||||
MAIN "serdis"
|
||||
STACK_MAIN "2048")
|
||||
|
||||
@@ -61,6 +61,7 @@ set(config_module_list
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/gpio_led
|
||||
@@ -90,6 +91,7 @@ set(config_module_list
|
||||
# Logging
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
|
||||
#
|
||||
# Library modules
|
||||
|
||||
@@ -48,7 +48,6 @@ set(config_module_list
|
||||
drivers/bst
|
||||
drivers/snapdragon_rc_pwm
|
||||
drivers/lis3mdl
|
||||
drivers/bmi160
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -67,14 +66,17 @@ set(config_module_list
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
#systemcmds/sd_bench
|
||||
#systemcmds/tests
|
||||
|
||||
#
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/gpio_led
|
||||
#modules/gpio_led
|
||||
modules/uavcan
|
||||
modules/land_detector
|
||||
|
||||
@@ -89,7 +91,6 @@ set(config_module_list
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
# modules/segway # XXX Needs GCC 4.7 fix
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_att_control
|
||||
modules/mc_att_control
|
||||
@@ -99,6 +100,7 @@ set(config_module_list
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
modules/logger
|
||||
modules/sdlog2
|
||||
|
||||
#
|
||||
|
||||
@@ -69,6 +69,7 @@ set(config_module_list
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/gpio_led
|
||||
@@ -78,11 +79,7 @@ set(config_module_list
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
# Too high RAM usage due to static allocations
|
||||
# modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf2
|
||||
modules/position_estimator_inav
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -98,6 +95,7 @@ set(config_module_list
|
||||
# Logging
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
|
||||
#
|
||||
# Library modules
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
include(nuttx/px4_impl_nuttx)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
||||
|
||||
set(config_uavcan_num_ifaces 2)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
drivers/stm32
|
||||
drivers/stm32/adc
|
||||
drivers/stm32/tone_alarm
|
||||
drivers/led
|
||||
drivers/px4fmu
|
||||
drivers/px4io
|
||||
drivers/boards/px4fmu-v2
|
||||
drivers/rgbled
|
||||
drivers/mpu6000
|
||||
drivers/mpu9250
|
||||
drivers/lsm303d
|
||||
drivers/l3gd20
|
||||
drivers/hmc5883
|
||||
drivers/ms5611
|
||||
#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/blinkm
|
||||
drivers/airspeed
|
||||
drivers/ets_airspeed
|
||||
drivers/meas_airspeed
|
||||
drivers/frsky_telemetry
|
||||
modules/sensors
|
||||
#drivers/mkblctrl
|
||||
drivers/px4flow
|
||||
#drivers/oreoled
|
||||
drivers/gimbal
|
||||
drivers/pwm_input
|
||||
drivers/camera_trigger
|
||||
#drivers/bst
|
||||
#drivers/snapdragon_rc_pwm
|
||||
#drivers/lis3mdl
|
||||
#drivers/bmi160
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/bl_update
|
||||
systemcmds/mixer
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
systemcmds/pwm
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
#systemcmds/topic_listener
|
||||
systemcmds/top
|
||||
systemcmds/config
|
||||
systemcmds/nshterm
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
systemcmds/sd_bench
|
||||
systemcmds/tests
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
drivers/test_ppm
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
|
||||
#
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/gpio_led
|
||||
modules/uavcan
|
||||
modules/land_detector
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
# modules/segway # XXX Needs GCC 4.7 fix
|
||||
modules/fw_pos_control_l1
|
||||
modules/fw_att_control
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
#modules/logger
|
||||
#modules/sdlog2
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/dataman
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/conversion
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
platforms/nuttx
|
||||
|
||||
# had to add for cmake, not sure why wasn't in original config
|
||||
platforms/common
|
||||
platforms/nuttx/px4_layer
|
||||
|
||||
#
|
||||
# OBC challenge
|
||||
#
|
||||
#modules/bottle_drop
|
||||
|
||||
#
|
||||
# Rover apps
|
||||
#
|
||||
#examples/rover_steering_control
|
||||
|
||||
#
|
||||
# Demo apps
|
||||
#
|
||||
#examples/math_demo
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/px4_simple_app
|
||||
#examples/px4_simple_app
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/daemon
|
||||
#examples/px4_daemon_app
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/debug_values
|
||||
#examples/px4_mavlink_debug
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/example_fixedwing_control
|
||||
#examples/fixedwing_control
|
||||
|
||||
# Hardware test
|
||||
#examples/hwtest
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
serdis
|
||||
sercon
|
||||
)
|
||||
|
||||
set(config_io_board
|
||||
px4io-v2
|
||||
)
|
||||
|
||||
set(config_extra_libs
|
||||
uavcan
|
||||
uavcan_stm32_driver
|
||||
)
|
||||
|
||||
set(config_io_extra_libs
|
||||
)
|
||||
|
||||
add_custom_target(sercon)
|
||||
set_target_properties(sercon PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "sercon" STACK_MAIN "2048")
|
||||
|
||||
add_custom_target(serdis)
|
||||
set_target_properties(serdis PROPERTIES
|
||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
||||
MAIN "serdis" STACK_MAIN "2048")
|
||||
@@ -45,6 +45,9 @@ set(config_module_list
|
||||
drivers/bst
|
||||
drivers/snapdragon_rc_pwm
|
||||
drivers/lis3mdl
|
||||
drivers/bmp280
|
||||
drivers/bma180
|
||||
drivers/bmi160
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -63,12 +66,14 @@ set(config_module_list
|
||||
systemcmds/mtd
|
||||
systemcmds/dumpfile
|
||||
systemcmds/ver
|
||||
systemcmds/sd_bench
|
||||
systemcmds/tests
|
||||
|
||||
#
|
||||
# General system control
|
||||
#
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
modules/gpio_led
|
||||
@@ -78,12 +83,11 @@ set(config_module_list
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
# Too high RAM usage due to static allocations
|
||||
# modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/ekf2
|
||||
modules/local_position_estimator
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
@@ -99,6 +103,7 @@ set(config_module_list
|
||||
# Logging
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
|
||||
#
|
||||
# Library modules
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_BEBOP
|
||||
)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
|
||||
set(config_module_list
|
||||
|
||||
examples/px4_simple_app
|
||||
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
modules/sensors
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/dataman
|
||||
modules/land_detector
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
|
||||
#
|
||||
# PX4 drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/geo
|
||||
lib/ecl
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/external_lgpl
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
|
||||
#
|
||||
# POSIX
|
||||
#
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
)
|
||||
@@ -27,8 +27,10 @@ set(config_module_list
|
||||
modules/sensors
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/simulator
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
@@ -12,7 +12,7 @@ set(CONFIG_SHMEM "1")
|
||||
# or if it is for the Snapdragon.
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_EAGLE
|
||||
-D__USING_SNAPDRAGON_LEGACY_DRIVER
|
||||
-D__USING_SNAPDRAGON_LEGACY_DRIVER
|
||||
)
|
||||
|
||||
set(config_module_list
|
||||
@@ -45,8 +45,11 @@ set(config_module_list
|
||||
modules/sensors
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/simulator
|
||||
modules/commander
|
||||
modules/navigator
|
||||
modules/load_mon
|
||||
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
|
||||
@@ -31,7 +31,9 @@ set(config_module_list
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
|
||||
@@ -1,57 +1,109 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
if ("${RPI_TOOLCHAIN_DIR}" STREQUAL "")
|
||||
set(RPI_TOOLCHAIN_DIR /opt/rpi_toolchain)
|
||||
endif()
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
# This definition allows to differentiate if this just the usual POSIX build
|
||||
# or if it is for the RPi.
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_RPI2
|
||||
)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
modules/sensors
|
||||
platforms/posix/drivers/df_mpu9250_wrapper
|
||||
platforms/posix/drivers/df_bmp280_wrapper
|
||||
platforms/posix/drivers/df_hmc5883_wrapper
|
||||
platforms/posix/drivers/df_trone_wrapper
|
||||
platforms/posix/drivers/df_isl29501_wrapper
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/ekf2
|
||||
|
||||
#
|
||||
# Vehicle Control
|
||||
#
|
||||
modules/mc_att_control
|
||||
modules/mc_pos_control
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/vtol_att_control
|
||||
|
||||
#
|
||||
# Library modules
|
||||
#
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
modules/vtol_att_control
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
modules/land_detector
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/uORB
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/commander
|
||||
modules/land_detector
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
|
||||
#
|
||||
# PX4 drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/ecl
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/external_lgpl
|
||||
lib/conversion
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
)
|
||||
|
||||
#
|
||||
# POSIX
|
||||
#
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
|
||||
)
|
||||
|
||||
set(config_df_driver_list
|
||||
mpu9250
|
||||
bmp280
|
||||
hmc5883
|
||||
trone
|
||||
isl29501
|
||||
)
|
||||
|
||||
@@ -38,8 +38,11 @@ set(config_module_list
|
||||
modules/sensors
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/simulator
|
||||
modules/commander
|
||||
modules/navigator
|
||||
modules/load_mon
|
||||
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
|
||||
@@ -49,6 +49,7 @@ set(config_module_list
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
modules/commander
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
|
||||
@@ -3,67 +3,88 @@ 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
|
||||
drivers/device
|
||||
drivers/gps
|
||||
platforms/posix/drivers/tonealrmsim
|
||||
drivers/pwm_out_sim
|
||||
|
||||
platforms/common
|
||||
platforms/posix/drivers/accelsim
|
||||
platforms/posix/drivers/adcsim
|
||||
platforms/posix/drivers/airspeedsim
|
||||
platforms/posix/drivers/barosim
|
||||
platforms/posix/drivers/gpssim
|
||||
platforms/posix/drivers/gyrosim
|
||||
platforms/posix/drivers/rgbledsim
|
||||
platforms/posix/drivers/ledsim
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
platforms/posix/drivers/rgbledsim
|
||||
platforms/posix/drivers/tonealrmsim
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/mixer
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/mavlink
|
||||
systemcmds/reboot
|
||||
systemcmds/sd_bench
|
||||
systemcmds/topic_listener
|
||||
systemcmds/ver
|
||||
systemcmds/top
|
||||
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/commander
|
||||
modules/dataman
|
||||
modules/ekf2
|
||||
modules/ekf_att_pos_estimator
|
||||
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/land_detector
|
||||
modules/load_mon
|
||||
modules/logger
|
||||
modules/mavlink
|
||||
modules/mc_att_control
|
||||
modules/mc_att_control_multiplatform
|
||||
modules/mc_pos_control
|
||||
modules/mc_pos_control_multiplatform
|
||||
modules/navigator
|
||||
modules/param
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/sdlog2
|
||||
modules/commander
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/vtol_att_control
|
||||
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/DriverFramework/framework
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
lib/terrain_estimation
|
||||
|
||||
examples/px4_simple_app
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
#modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
include(cmake/configs/posix_sitl_default.cmake)
|
||||
|
||||
list(APPEND config_module_list
|
||||
modules/local_position_estimator
|
||||
)
|
||||
|
||||
set(config_sitl_rcS
|
||||
posix-configs/SITL/init/rcS_lpe
|
||||
)
|
||||
|
||||
@@ -17,6 +17,7 @@ set(config_module_list
|
||||
modules/ekf2
|
||||
modules/ekf2_replay
|
||||
modules/sdlog2
|
||||
modules/logger
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
|
||||
@@ -3,66 +3,87 @@ 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/device
|
||||
drivers/gps
|
||||
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/adcsim
|
||||
platforms/posix/drivers/airspeedsim
|
||||
platforms/posix/drivers/barosim
|
||||
platforms/posix/drivers/gpssim
|
||||
platforms/posix/drivers/gyrosim
|
||||
platforms/posix/drivers/rgbledsim
|
||||
platforms/posix/drivers/ledsim
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
platforms/posix/drivers/rgbledsim
|
||||
platforms/posix/drivers/tonealrmsim
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/mixer
|
||||
systemcmds/param
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/mavlink
|
||||
systemcmds/reboot
|
||||
systemcmds/sd_bench
|
||||
systemcmds/topic_listener
|
||||
systemcmds/ver
|
||||
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/commander
|
||||
modules/dataman
|
||||
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/ekf_att_pos_estimator
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/land_detector
|
||||
modules/load_mon
|
||||
modules/logger
|
||||
modules/mavlink
|
||||
modules/mc_att_control
|
||||
modules/mc_att_control_multiplatform
|
||||
modules/mc_pos_control
|
||||
modules/mc_pos_control_multiplatform
|
||||
modules/navigator
|
||||
modules/param
|
||||
modules/position_estimator_inav
|
||||
modules/local_position_estimator
|
||||
modules/sdlog2
|
||||
modules/commander
|
||||
modules/sensors
|
||||
modules/simulator
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/vtol_att_control
|
||||
|
||||
lib/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/DriverFramework/framework
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
lib/DriverFramework/framework
|
||||
lib/terrain_estimation
|
||||
|
||||
examples/px4_simple_app
|
||||
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
modules/commander/commander_tests
|
||||
modules/controllib_test
|
||||
#modules/mavlink/mavlink_tests
|
||||
modules/unit_test
|
||||
modules/uORB/uORB_tests
|
||||
systemcmds/tests
|
||||
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
@@ -71,7 +92,7 @@ set(config_extra_builtin_cmds
|
||||
)
|
||||
|
||||
set(config_sitl_rcS
|
||||
posix-configs/SITL/init/rcS_ekf2
|
||||
posix-configs/SITL/init/rcS_test
|
||||
CACHE FILEPATH "init script for sitl"
|
||||
)
|
||||
|
||||
@@ -48,6 +48,7 @@ set(config_module_list
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
|
||||
#
|
||||
# Libraries
|
||||
|
||||
@@ -16,6 +16,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexa
|
||||
|
||||
add_definitions(
|
||||
-D__USING_SNAPDRAGON_LEGACY_DRIVER
|
||||
-D__PX4_QURT
|
||||
-D__PX4_QURT_EAGLE
|
||||
)
|
||||
|
||||
set(config_module_list
|
||||
@@ -26,8 +28,6 @@ set(config_module_list
|
||||
modules/sensors
|
||||
platforms/posix/drivers/df_mpu9250_wrapper
|
||||
platforms/posix/drivers/df_bmp280_wrapper
|
||||
platforms/posix/drivers/df_hmc5883_wrapper
|
||||
platforms/posix/drivers/df_trone_wrapper
|
||||
|
||||
#
|
||||
# System commands
|
||||
@@ -37,7 +37,6 @@ set(config_module_list
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
@@ -58,14 +57,21 @@ set(config_module_list
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/land_detector
|
||||
modules/load_mon
|
||||
|
||||
#
|
||||
# PX4 drivers
|
||||
#
|
||||
drivers/gps
|
||||
drivers/uart_esc
|
||||
drivers/pwm_out_rc_in
|
||||
drivers/qshell/qurt
|
||||
|
||||
#
|
||||
# FC_ADDON drivers
|
||||
#
|
||||
platforms/qurt/fc_addon/rc_receiver
|
||||
platforms/qurt/fc_addon/uart_esc
|
||||
|
||||
#
|
||||
# Libraries
|
||||
#
|
||||
@@ -97,6 +103,4 @@ set(config_module_list
|
||||
set(config_df_driver_list
|
||||
mpu9250
|
||||
bmp280
|
||||
hmc5883
|
||||
trone
|
||||
)
|
||||
|
||||
@@ -8,6 +8,7 @@ set(QURT_ENABLE_STUBS "1")
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
include(hexagon_sdk)
|
||||
|
||||
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
|
||||
message(FATAL_ERROR "Enviroment variable HEXAGON_SDK_ROOT must be set")
|
||||
@@ -15,7 +16,7 @@ else()
|
||||
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
|
||||
endif()
|
||||
|
||||
include_directories(${HEXAGON_SDK_ROOT}/lib/common/qurt/ADSPv5MP/include)
|
||||
include_directories(${HEXAGON_8074_INCLUDES})
|
||||
|
||||
set(config_generate_parameters_scope ALL)
|
||||
|
||||
@@ -55,6 +56,7 @@ set(config_module_list
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/commander
|
||||
modules/load_mon
|
||||
|
||||
#
|
||||
# Libraries
|
||||
|
||||
@@ -60,7 +60,7 @@ set(config_module_list
|
||||
# PX4 drivers
|
||||
#
|
||||
drivers/gps
|
||||
drivers/uart_esc
|
||||
drivers/pwm_out_rc_in
|
||||
drivers/qshell/qurt
|
||||
|
||||
#
|
||||
|
||||
@@ -202,21 +202,32 @@ function(px4_nuttx_add_export)
|
||||
add_dependencies(nuttx_patch nuttx_patch_${patch_name})
|
||||
endforeach()
|
||||
|
||||
# Read defconfig to see if CONFIG_ARMV7M_STACKCHECK is yes
|
||||
# note: CONFIG will be BOARD in the future evaluation of ${hw_stack_check_${CONFIG}
|
||||
file(STRINGS "${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/nsh/defconfig"
|
||||
hw_stack_check_${CONFIG}
|
||||
REGEX "CONFIG_ARMV7M_STACKCHECK=y"
|
||||
)
|
||||
if ("${hw_stack_check_${CONFIG}}" STREQUAL "CONFIG_ARMV7M_STACKCHECK=y")
|
||||
set(config_nuttx_hw_stack_check_${CONFIG} y CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
# copy and export
|
||||
file(RELATIVE_PATH nuttx_cp_src ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/NuttX)
|
||||
file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
||||
COMMAND ${MKDIR} -p ${nuttx_src}
|
||||
COMMAND ${CP} -a ${CMAKE_SOURCE_DIR}/NuttX/. ${nuttx_src}/
|
||||
COMMAND ${RM} -rf ${nuttx_src}/.git
|
||||
COMMAND rsync -a --delete --exclude=.git ${nuttx_cp_src}/ ${CONFIG}/NuttX/
|
||||
#COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
|
||||
COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
|
||||
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
|
||||
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
|
||||
COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh
|
||||
COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh && cd ..
|
||||
#COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
|
||||
COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log
|
||||
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
|
||||
DEPENDS ${config_files} ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Building NuttX for ${CONFIG}")
|
||||
|
||||
# extract
|
||||
@@ -428,6 +439,16 @@ function(px4_os_add_flags)
|
||||
|
||||
set(added_exe_linker_flags) # none currently
|
||||
|
||||
set(instrument_flags)
|
||||
if ("${config_nuttx_hw_stack_check_${BOARD}}" STREQUAL "y")
|
||||
set(instrument_flags
|
||||
-finstrument-functions
|
||||
-ffixed-r10
|
||||
)
|
||||
list(APPEND c_flags ${instrument_flags})
|
||||
list(APPEND cxx_flags ${instrument_flags})
|
||||
endif()
|
||||
|
||||
set(cpu_flags)
|
||||
if (${BOARD} STREQUAL "px4fmu-v1")
|
||||
set(cpu_flags
|
||||
|
||||
@@ -166,6 +166,15 @@ function(px4_os_add_flags)
|
||||
mavlink/include/mavlink
|
||||
)
|
||||
|
||||
# Use the pthread instead of lpthread if the firmware is build for the parrot
|
||||
# bebop. This resolves some linker errors in DriverFramework, when building a
|
||||
# static target.
|
||||
if ("${BOARD}" STREQUAL "bebop")
|
||||
set(PX4_PTHREAD_BUILD "-pthread")
|
||||
else()
|
||||
set(PX4_PTHREAD_BUILD "-lpthread")
|
||||
endif()
|
||||
|
||||
if(UNIX AND APPLE)
|
||||
set(added_definitions
|
||||
-D__PX4_POSIX
|
||||
@@ -177,7 +186,7 @@ if(UNIX AND APPLE)
|
||||
)
|
||||
|
||||
set(added_exe_linker_flags
|
||||
-lpthread
|
||||
${PX4_PTHREAD_BUILD}
|
||||
)
|
||||
|
||||
else()
|
||||
@@ -192,7 +201,7 @@ else()
|
||||
)
|
||||
|
||||
set(added_exe_linker_flags
|
||||
-lpthread -lrt
|
||||
${PX4_PTHREAD_BUILD} -lrt
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
+20
-21
@@ -59,30 +59,29 @@ find_package(Eigen REQUIRED)
|
||||
## Generate messages in the 'msg' folder
|
||||
add_message_files(
|
||||
FILES
|
||||
rc_channels.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_attitude_setpoint.msg
|
||||
manual_control_setpoint.msg
|
||||
actuator_controls.msg
|
||||
actuator_controls_0.msg
|
||||
actuator_controls_virtual_mc.msg
|
||||
vehicle_rates_setpoint.msg
|
||||
mc_virtual_rates_setpoint.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_control_mode.msg
|
||||
actuator_armed.msg
|
||||
parameter_update.msg
|
||||
vehicle_status.msg
|
||||
actuator_controls.msg
|
||||
commander_state.msg
|
||||
vehicle_local_position.msg
|
||||
control_state.msg
|
||||
distance_sensor.msg
|
||||
manual_control_setpoint.msg
|
||||
mc_virtual_rates_setpoint.msg
|
||||
offboard_control_mode.msg
|
||||
parameter_update.msg
|
||||
position_setpoint.msg
|
||||
position_setpoint_triplet.msg
|
||||
vehicle_local_position_setpoint.msg
|
||||
vehicle_global_velocity_setpoint.msg
|
||||
offboard_control_mode.msg
|
||||
rc_channels.msg
|
||||
ros/actuator_controls_0.msg
|
||||
ros/actuator_controls_virtual_mc.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_attitude_setpoint.msg
|
||||
vehicle_control_mode.msg
|
||||
vehicle_force_setpoint.msg
|
||||
distance_sensor.msg
|
||||
control_state.msg
|
||||
vehicle_global_velocity_setpoint.msg
|
||||
vehicle_local_position.msg
|
||||
vehicle_local_position_setpoint.msg
|
||||
vehicle_rates_setpoint.msg
|
||||
vehicle_status.msg
|
||||
)
|
||||
|
||||
## Generate services in the 'srv' folder
|
||||
@@ -148,8 +147,8 @@ set(MULTIPLATFORM_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/platforms/ros/px4_m
|
||||
set(MULTIPLATFORM_TEMPLATE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msg/templates/px4/ros)
|
||||
set(TOPICHEADER_TEMP_DIR ${CMAKE_BINARY_DIR}/topics_temporary)
|
||||
set(MULTIPLATFORM_PREFIX px4_)
|
||||
add_custom_target(multiplatform_message_headers ALL ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Tools/px_generate_uorb_topic_headers.py
|
||||
-d ${CMAKE_CURRENT_SOURCE_DIR}/msg -o ${MULTIPLATFORM_HEADER_DIR} -e ${MULTIPLATFORM_TEMPLATE_DIR}
|
||||
add_custom_target(multiplatform_message_headers ALL ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Tools/px_generate_uorb_topic_files.py
|
||||
--headers -d ${CMAKE_CURRENT_SOURCE_DIR}/msg -o ${MULTIPLATFORM_HEADER_DIR} -e ${MULTIPLATFORM_TEMPLATE_DIR}
|
||||
-t ${TOPICHEADER_TEMP_DIR} -p ${MULTIPLATFORM_PREFIX})
|
||||
|
||||
## Declare a cpp library
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Auto Magically Generated file */
|
||||
/* Do not edit! */
|
||||
#define PX4_GIT_VERSION_STR "@git_desc@"
|
||||
#define PX4_GIT_VERSION_BINARY 0x@git_desc_short@
|
||||
#define PX4_GIT_VERSION_STR "@git_version@"
|
||||
#define PX4_GIT_VERSION_BINARY 0x@git_version_short@
|
||||
#define PX4_GIT_TAG_STR "@git_tag@"
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# defines:
|
||||
#
|
||||
# NM
|
||||
# OBJCOPY
|
||||
# LD
|
||||
# CXX_COMPILER
|
||||
# C_COMPILER
|
||||
# CMAKE_SYSTEM_NAME
|
||||
# CMAKE_SYSTEM_VERSION
|
||||
# LINKER_FLAGS
|
||||
# CMAKE_EXE_LINKER_FLAGS
|
||||
# CMAKE_FIND_ROOT_PATH
|
||||
# CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
|
||||
# CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
|
||||
# CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
|
||||
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
if ("$ENV{RPI_TOOLCHAIN_DIR}" STREQUAL "")
|
||||
message(FATAL_ERROR "RPI_TOOLCHAIN_DIR not set")
|
||||
else()
|
||||
set(RPI_TOOLCHAIN_DIR $ENV{RPI_TOOLCHAIN_DIR})
|
||||
endif()
|
||||
|
||||
# this one is important
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
|
||||
#this one not so much
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the cross compiler
|
||||
find_program(C_COMPILER arm-linux-gnueabihf-gcc
|
||||
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(NOT C_COMPILER)
|
||||
message(FATAL_ERROR "could not find arm-linux-gnueabihf-gcc compiler")
|
||||
endif()
|
||||
cmake_force_c_compiler(${C_COMPILER} GNU)
|
||||
|
||||
find_program(CXX_COMPILER arm-linux-gnueabihf-g++
|
||||
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(NOT CXX_COMPILER)
|
||||
message(FATAL_ERROR "could not find arm-linux-gnueabihf-g++ compiler")
|
||||
endif()
|
||||
cmake_force_cxx_compiler(${CXX_COMPILER} GNU)
|
||||
|
||||
# compiler tools
|
||||
foreach(tool objcopy nm ld)
|
||||
string(TOUPPER ${tool} TOOL)
|
||||
find_program(${TOOL} arm-linux-gnueabihf-${tool}
|
||||
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
if(NOT ${TOOL})
|
||||
message(FATAL_ERROR "could not find arm-linux-gnueabihf-${tool}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# os tools
|
||||
foreach(tool echo grep rm mkdir nm cp touch make unzip)
|
||||
string(TOUPPER ${tool} TOOL)
|
||||
find_program(${TOOL} ${tool})
|
||||
if(NOT ${TOOL})
|
||||
message(FATAL_ERROR "could not find ${TOOL}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_definitions(
|
||||
-D __RPI2
|
||||
)
|
||||
|
||||
set(LINKER_FLAGS "-Wl,-gc-sections")
|
||||
set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
|
||||
set(CMAKE_C_FLAGS ${C_FLAGS})
|
||||
set(CMAKE_CXX_LINKER_FLAGS ${C_FLAGS})
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
|
||||
|
||||
# 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)
|
||||
@@ -8,7 +8,7 @@ foreach(tool nm ld)
|
||||
endforeach()
|
||||
|
||||
# os tools
|
||||
foreach(tool echo patch grep rm mkdir nm genromfs cp touch make unzip)
|
||||
foreach(tool echo grep rm mkdir nm cp touch make unzip)
|
||||
string(TOUPPER ${tool} TOOL)
|
||||
find_program(${TOOL} ${tool})
|
||||
if(NOT ${TOOL})
|
||||
|
||||
@@ -43,11 +43,7 @@ ln -s ${SRC_DIR} /root/Firmware
|
||||
echo "=====> compile ($SRC_DIR)"
|
||||
cd $SRC_DIR
|
||||
make ${BUILD}
|
||||
mkdir -p Tools/sitl_gazebo/Build
|
||||
cd Tools/sitl_gazebo/Build
|
||||
cmake -Wno-dev ..
|
||||
make -j4
|
||||
make sdf
|
||||
make --no-print-directory gazebo_build
|
||||
echo "<====="
|
||||
|
||||
# don't exit on error anymore from here on (because single tests or exports might fail)
|
||||
|
||||
@@ -15,6 +15,8 @@ SRC_DIR=$1
|
||||
|
||||
# setup Gazebo env and update package path
|
||||
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:${SRC_DIR}/Tools/sitl_gazebo/models
|
||||
export GAZEBO_PLUGIN_PATH=${SRC_DIR}/Tools/sitl_gazebo/Build/:${GAZEBO_PLUGIN_PATH}
|
||||
export GAZEBO_PLUGIN_PATH=${SRC_DIR}/build_gazebo:${GAZEBO_PLUGIN_PATH}
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SRC_DIR}/Tools/sitl_gazebo/Build/msgs/
|
||||
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:${SRC_DIR}
|
||||
export GAZEBO_MODEL_DATABASE_URI=""
|
||||
export SITL_GAZEBO_PATH=$SRC_DIR/Tools/sitl_gazebo
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<arg name="ns" default="/"/>
|
||||
<arg name="world" default="iris"/>
|
||||
<arg name="build" default="posix_sitl_default"/>
|
||||
<arg name="fcu_url" default="udp://:14540@localhost:14557"/>
|
||||
|
||||
<include file="$(find px4)/launch/posix_sitl.launch">
|
||||
<arg name="headless" value="$(arg headless)"/>
|
||||
@@ -17,6 +18,6 @@
|
||||
|
||||
<include file="$(find px4)/launch/mavros.launch">
|
||||
<arg name="ns" value="$(arg ns)"/>
|
||||
<arg name="fcu_url" value="udp://:14567@localhost:14557"/>
|
||||
<arg name="fcu_url" value="$(arg fcu_url)"/>
|
||||
</include>
|
||||
</launch>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<arg name="world" default="iris"/>
|
||||
<arg name="build" default="posix_sitl_default"/>
|
||||
|
||||
<node pkg="px4" type="sitl_run.sh" name="simulator" args="posix-configs/SITL/init/rcS none gazebo iris $(find px4)/build_$(arg build)">
|
||||
<node pkg="px4" type="sitl_run.sh" name="simulator" args="posix-configs/SITL/init/rcS none gazebo $(arg world) $(find px4)/build_$(arg build)">
|
||||
<env name="no_sim" value="1" />
|
||||
</node>
|
||||
|
||||
|
||||
Submodule mavlink/include/mavlink/v1.0 updated: 4e9682c6e8...d8ec54a69f
Submodule
+1
Submodule mavlink/include/mavlink/v2.0 added at 699a2b0df1
@@ -0,0 +1,130 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2016 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
set(msg_file_names
|
||||
actuator_armed.msg
|
||||
actuator_controls.msg
|
||||
actuator_direct.msg
|
||||
actuator_outputs.msg
|
||||
adc_report.msg
|
||||
airspeed.msg
|
||||
att_pos_mocap.msg
|
||||
battery_status.msg
|
||||
camera_trigger.msg
|
||||
commander_state.msg
|
||||
control_state.msg
|
||||
cpuload.msg
|
||||
debug_key_value.msg
|
||||
differential_pressure.msg
|
||||
distance_sensor.msg
|
||||
ekf2_innovations.msg
|
||||
ekf2_replay.msg
|
||||
encoders.msg
|
||||
esc_report.msg
|
||||
esc_status.msg
|
||||
estimator_status.msg
|
||||
fence.msg
|
||||
fence_vertex.msg
|
||||
filtered_bottom_flow.msg
|
||||
follow_target.msg
|
||||
fw_pos_ctrl_status.msg
|
||||
fw_virtual_attitude_setpoint.msg
|
||||
fw_virtual_rates_setpoint.msg
|
||||
geofence_result.msg
|
||||
gps_inject_data.msg
|
||||
hil_sensor.msg
|
||||
home_position.msg
|
||||
input_rc.msg
|
||||
manual_control_setpoint.msg
|
||||
mavlink_log.msg
|
||||
mc_att_ctrl_status.msg
|
||||
mc_virtual_attitude_setpoint.msg
|
||||
mc_virtual_rates_setpoint.msg
|
||||
mission.msg
|
||||
mission_result.msg
|
||||
multirotor_motor_limits.msg
|
||||
offboard_control_mode.msg
|
||||
optical_flow.msg
|
||||
output_pwm.msg
|
||||
parameter_update.msg
|
||||
position_setpoint.msg
|
||||
position_setpoint_triplet.msg
|
||||
pwm_input.msg
|
||||
qshell_req.msg
|
||||
rc_channels.msg
|
||||
rc_parameter_map.msg
|
||||
safety.msg
|
||||
satellite_info.msg
|
||||
sensor_accel.msg
|
||||
sensor_baro.msg
|
||||
sensor_combined.msg
|
||||
sensor_gyro.msg
|
||||
sensor_mag.msg
|
||||
servorail_status.msg
|
||||
subsystem_info.msg
|
||||
system_power.msg
|
||||
tecs_status.msg
|
||||
telemetry_status.msg
|
||||
test_motor.msg
|
||||
time_offset.msg
|
||||
transponder_report.msg
|
||||
uavcan_parameter_request.msg
|
||||
uavcan_parameter_value.msg
|
||||
vehicle_attitude.msg
|
||||
vehicle_attitude_setpoint.msg
|
||||
vehicle_command_ack.msg
|
||||
vehicle_command.msg
|
||||
vehicle_control_mode.msg
|
||||
vehicle_force_setpoint.msg
|
||||
vehicle_global_position.msg
|
||||
vehicle_global_velocity_setpoint.msg
|
||||
vehicle_gps_position.msg
|
||||
vehicle_land_detected.msg
|
||||
vehicle_local_position.msg
|
||||
vehicle_local_position_setpoint.msg
|
||||
vehicle_rates_setpoint.msg
|
||||
vehicle_status.msg
|
||||
vision_position_estimate.msg
|
||||
vtol_vehicle_status.msg
|
||||
wind_estimate.msg
|
||||
)
|
||||
|
||||
# Get absolute paths
|
||||
set(msg_files)
|
||||
foreach(msg_file ${msg_file_names})
|
||||
list(APPEND msg_files ${CMAKE_CURRENT_SOURCE_DIR}/${msg_file})
|
||||
endforeach()
|
||||
|
||||
set(msg_files ${msg_files} PARENT_SCOPE)
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
uint64 timestamp # Microseconds since system boot
|
||||
bool armed # Set to true if system is armed
|
||||
bool prearmed # Set to true if the actuator safety is disabled but motors are not armed
|
||||
bool ready_to_arm # Set to true if system is ready to be armed
|
||||
|
||||
@@ -10,6 +10,9 @@ uint8 INDEX_AIRBRAKES = 6
|
||||
uint8 INDEX_LANDING_GEAR = 7
|
||||
uint8 GROUP_INDEX_ATTITUDE = 0
|
||||
uint8 GROUP_INDEX_ATTITUDE_ALTERNATE = 1
|
||||
uint64 timestamp
|
||||
uint64 timestamp_sample # the timestamp the data this control response is based on was sampled
|
||||
float32[8] control
|
||||
|
||||
# TOPICS actuator_controls actuator_controls_0 actuator_controls_1 actuator_controls_2 actuator_controls_3
|
||||
# TOPICS actuator_controls_virtual_fw actuator_controls_virtual_mc
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
uint8 NUM_ACTUATOR_CONTROLS = 8
|
||||
uint8 NUM_ACTUATOR_CONTROL_GROUPS = 4
|
||||
uint64 timestamp
|
||||
uint64 timestamp_sample # the timestamp the data this control response is based on was sampled
|
||||
float32[8] control
|
||||
@@ -1,5 +0,0 @@
|
||||
uint8 NUM_ACTUATOR_CONTROLS = 8
|
||||
uint8 NUM_ACTUATOR_CONTROL_GROUPS = 4
|
||||
uint64 timestamp
|
||||
uint64 timestamp_sample # the timestamp the data this control response is based on was sampled
|
||||
float32[8] control
|
||||
@@ -1,5 +0,0 @@
|
||||
uint8 NUM_ACTUATOR_CONTROLS = 8
|
||||
uint8 NUM_ACTUATOR_CONTROL_GROUPS = 4
|
||||
uint64 timestamp
|
||||
uint64 timestamp_sample # the timestamp the data this control response is based on was sampled
|
||||
float32[8] control
|
||||
@@ -1,5 +0,0 @@
|
||||
uint8 NUM_ACTUATOR_CONTROLS = 8
|
||||
uint8 NUM_ACTUATOR_CONTROL_GROUPS = 4
|
||||
uint64 timestamp
|
||||
uint64 timestamp_sample # the timestamp the data this control response is based on was sampled
|
||||
float32[8] control
|
||||
@@ -1,4 +1,3 @@
|
||||
uint8 NUM_ACTUATORS_DIRECT = 16
|
||||
uint64 timestamp # timestamp in us since system boot
|
||||
uint32 nvalues # number of valid values
|
||||
float32[16] values # actuator values, from -1 to 1
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
uint8 NUM_ACTUATOR_OUTPUTS = 16
|
||||
uint8 NUM_ACTUATOR_OUTPUT_GROUPS = 4 # for sanity checking
|
||||
uint64 timestamp # output timestamp in us since system boot
|
||||
uint32 noutputs # valid outputs
|
||||
float32[16] output # output data, in natural output units
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
uint64 timestamp # Timestamp in microseconds since boot
|
||||
int16[8] channel_id # ADC channel IDs, negative for non-existent
|
||||
float32[8] channel_value # ADC channel value in volt, valid if channel ID is positive
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # microseconds since system boot, needed to integrate
|
||||
float32 indicated_airspeed_m_s # indicated airspeed in meters per second, -1 if unknown
|
||||
float32 true_airspeed_m_s # true filtered airspeed in meters per second, -1 if unknown
|
||||
float32 true_airspeed_unfiltered_m_s # true airspeed in meters per second, -1 if unknown
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # microseconds since system boot, needed to integrate
|
||||
float32 voltage_v # Battery voltage in volts, 0 if unknown
|
||||
float32 voltage_filtered_v # Battery voltage in volts, filtered, 0 if unknown
|
||||
float32 current_a # Battery current in amperes, -1 if unknown
|
||||
@@ -6,6 +5,7 @@ float32 current_filtered_a # Battery current in amperes, filtered, 0 if unknown
|
||||
float32 discharged_mah # Discharged amount in mAh, -1 if unknown
|
||||
float32 remaining # From 1 to 0, -1 if unknown
|
||||
int32 cell_count # Number of cells
|
||||
bool connected # Wether or not a battery is connected
|
||||
#bool is_powering_off # Power off event imminent indication, false if unknown
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
uint64 timestamp # Timestamp when camera was triggered
|
||||
uint32 seq # Image sequence
|
||||
|
||||
|
||||
@@ -14,6 +14,5 @@ uint8 MAIN_STATE_AUTO_LAND = 11
|
||||
uint8 MAIN_STATE_AUTO_FOLLOW_TARGET = 12
|
||||
uint8 MAIN_STATE_MAX = 13
|
||||
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
uint8 main_state # main state machine
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# This is similar to the mavlink message CONTROL_SYSTEM_STATE, but for onboard use */
|
||||
uint64 timestamp # in microseconds since system start
|
||||
float32 x_acc # X acceleration in body frame
|
||||
float32 y_acc # Y acceleration in body frame
|
||||
float32 z_acc # Z acceleration in body frame
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
float32 load # processor load from 0 to 1
|
||||
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # Microseconds since system boot, needed to integrate
|
||||
uint64 error_count # Number of errors detected by driver
|
||||
float32 differential_pressure_raw_pa # Raw differential pressure reading (may be negative)
|
||||
float32 differential_pressure_filtered_pa # Low pass filtered differential pressure reading
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# DISTANCE_SENSOR message data
|
||||
|
||||
uint64 timestamp # Microseconds since system boot
|
||||
|
||||
float32 min_distance # Minimum distance the sensor can measure (in m)
|
||||
float32 max_distance # Maximum distance the sensor can measure (in m)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # Timestamp in microseconds since boot
|
||||
float32[6] vel_pos_innov # velocity and position innovations
|
||||
float32[3] mag_innov # earth magnetic field innovations
|
||||
float32 heading_innov # heading innovation
|
||||
|
||||
+6
-3
@@ -7,6 +7,7 @@ uint64 baro_timestamp # timestamp of barometer measurement in us
|
||||
uint64 rng_timestamp # timestamp of range finder measurement in us
|
||||
uint64 flow_timestamp # timestamp of optical flow measurement in us
|
||||
uint64 asp_timestamp # timestamp of airspeed measurement in us
|
||||
uint64 ev_timestamp # timestamp of external vision measurement in us
|
||||
|
||||
float32[3] gyro_integral_rad # integrated gyro vector in rad
|
||||
float32[3] accelerometer_integral_m_s # integrated accelerometer vector in m/s
|
||||
@@ -42,7 +43,9 @@ uint8 flow_quality # Quality of accumulated optical flow data (0 - 255)
|
||||
# airspeed
|
||||
float32 indicated_airspeed_m_s # indicated airspeed in meters per second, -1 if unknown
|
||||
float32 true_airspeed_m_s # true filtered airspeed in meters per second, -1 if unknown
|
||||
float32 true_airspeed_unfiltered_m_s # true airspeed in meters per second, -1 if unknown
|
||||
float32 air_temperature_celsius # air temperature in degrees celsius, -1000 if unknown
|
||||
float32 confidence # confidence value from 0 to 1 for this sensor
|
||||
|
||||
# external vision measurements
|
||||
float32[3] pos_ev # position in earth (NED) frame (metres)
|
||||
float32[4] quat_ev # quaternion rotation from earth (NED) to body (XYZ) frame
|
||||
float32 pos_err # position error 1-std for each axis (metres)
|
||||
float32 ang_err # angular error 1-std for each axis (rad)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
uint8 NUM_ENCODERS = 4
|
||||
|
||||
uint64 timestamp
|
||||
int64[4] counts # counts of encoder
|
||||
float32[4] velocity # counts of encoder/ second
|
||||
|
||||
@@ -11,7 +11,6 @@ uint8 ESC_CONNECTION_TYPE_I2C = 3 # I2C
|
||||
uint8 ESC_CONNECTION_TYPE_CAN = 4 # CAN-Bus
|
||||
|
||||
uint16 counter # incremented by the writing thread everytime new data is stored
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
uint8 esc_count # number of connected ESCs
|
||||
uint8 esc_connectiontype # how ESCs connected to the system
|
||||
|
||||
+23
-10
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # Timestamp in microseconds since boot
|
||||
float32[32] states # Internal filter states
|
||||
float32 n_states # Number of states effectively used
|
||||
float32[3] vibe # Vibration levels in X, Y and Z
|
||||
@@ -23,12 +22,26 @@ uint16 control_mode_flags # Bitmask to indicate EKF logic state
|
||||
# 2 - true if GPS measurements are being fused
|
||||
# 3 - true if optical flow measurements are being fused
|
||||
# 4 - true if a simple magnetic yaw heading is being fused
|
||||
# 5 - true if the horizontal projection of magnetometer data is being fused
|
||||
# 6 - true if 3-axis magnetometer measurement are being fused
|
||||
# 7 - true if synthetic magnetic declination measurements are being fused
|
||||
# 8 - true when the vehicle is airborne
|
||||
# 9 - true when the vehicle motors are armed
|
||||
# 10 - true when wind velocity is being estimated
|
||||
# 11 - true when baro height is being fused as a primary height reference
|
||||
# 12 - true when range finder height is being fused as a primary height reference
|
||||
# 15 - true when range finder height is being fused as a primary height reference
|
||||
# 5 - true if 3-axis magnetometer measurement are being fused
|
||||
# 6 - true if synthetic magnetic declination measurements are being fused
|
||||
# 7 - true when the vehicle is airborne
|
||||
# 8 - true when wind velocity is being estimated
|
||||
# 9 - true when baro height is being fused as a primary height reference
|
||||
# 10 - true when range finder height is being fused as a primary height reference
|
||||
# 11 - true when range finder height is being fused as a primary height reference
|
||||
uint16 filter_fault_flags # Bitmask to indicate EKF internal faults
|
||||
# 0 - true if the fusion of the magnetometer X-axis has encountered a numerical error
|
||||
# 1 - true if the fusion of the magnetometer Y-axis has encountered a numerical error
|
||||
# 2 - true if the fusion of the magnetometer Z-axis has encountered a numerical error
|
||||
# 3 - true if the fusion of the magnetic heading has encountered a numerical error
|
||||
# 4 - true if the fusion of the magnetic declination has encountered a numerical error
|
||||
# 5 - true if fusion of the airspeed has encountered a numerical error
|
||||
# 6 - true if fusion of the synthetic sideslip constraint has encountered a numerical error
|
||||
# 7 - true if fusion of the optical flow X axis has encountered a numerical error
|
||||
# 8 - true if fusion of the optical flow Y axis has encountered a numerical error
|
||||
# 9 - true if fusion of the North velocity has encountered a numerical error
|
||||
# 10 - true if fusion of the East velocity has encountered a numerical error
|
||||
# 11 - true if fusion of the Down velocity has encountered a numerical error
|
||||
# 12 - true if fusion of the North position has encountered a numerical error
|
||||
# 13 - true if fusion of the East position has encountered a numerical error
|
||||
# 14 - true if fusion of the Down position has encountered a numerical error
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Filtered bottom flow in bodyframe.
|
||||
uint64 timestamp # time of this estimate, in microseconds since system start
|
||||
|
||||
float32 sumx # Integrated bodyframe x flow in meters
|
||||
float32 sumy # Integrated bodyframe y flow in meters
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
uint64 timestamp # timestamp, UNIX epoch (GPS synced)
|
||||
float64 lat # target position (deg * 1e7)
|
||||
float64 lon # target position (deg * 1e7)
|
||||
float32 alt # target position
|
||||
float32 alt # target position
|
||||
float32 vy # target vel in y
|
||||
float32 vx # target vel in x
|
||||
float32 vz # target vel in z
|
||||
uint8 est_cap # target reporting capabilities
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
uint64 timestamp # timestamp this topic was emitted
|
||||
float32 nav_roll
|
||||
float32 nav_pitch
|
||||
float32 nav_bearing
|
||||
|
||||
float32 target_bearing
|
||||
float32 wp_dist
|
||||
float32 xtrack_error
|
||||
float32 turn_distance # the optimal distance to a waypoint to switch to the next
|
||||
|
||||
float32 landing_horizontal_slope_displacement
|
||||
float32 landing_slope_angle_rad
|
||||
float32 landing_flare_length
|
||||
@@ -8,7 +8,6 @@
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
float32 roll_body # body angle in NED frame
|
||||
float32 pitch_body # body angle in NED frame
|
||||
@@ -35,3 +34,6 @@ bool fw_control_yaw # control heading with rudder (used for auto takeoff on
|
||||
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
|
||||
|
||||
bool apply_flaps
|
||||
|
||||
# WAS vehicle_attitude_setpoint mc_virtual_attitude_setpoint fw_virtual_attitude_setpoint
|
||||
# TOPICS fw_virtual_attitude_setpoint
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start
|
||||
|
||||
float32 roll # body angular rates in NED frame
|
||||
float32 pitch # body angular rates in NED frame
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
uint8 len # length of data
|
||||
uint8[110] data # data to write to GPS device
|
||||
uint8 flags # LSB: 1=fragmented
|
||||
uint8[182] data # data to write to GPS device (RTCM message)
|
||||
|
||||
@@ -17,7 +17,6 @@ int32 MAGNETOMETER_MODE_NEGATIVE_BIAS = 2
|
||||
#
|
||||
# NOTE: Ordering of fields optimized to align to 32 bit / 4 bytes Change with consideration only
|
||||
|
||||
uint64 timestamp # Timestamp in microseconds since boot, from gyro
|
||||
#
|
||||
int16[3] gyro_raw # Raw sensor values of angular velocity
|
||||
float32[3] gyro_rad_s # Angular velocity in radian per seconds
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# GPS home position in WGS84 coordinates.
|
||||
uint64 timestamp # Timestamp (microseconds since system boot)
|
||||
|
||||
float64 lat # Latitude in degrees
|
||||
float64 lon # Longitude in degrees
|
||||
|
||||
@@ -12,8 +12,6 @@ int8 MODE_SLOT_5 = 4 # mode slot 5 selected
|
||||
int8 MODE_SLOT_6 = 5 # mode slot 6 selected
|
||||
int8 MODE_SLOT_MAX = 6 # number of slots plus one
|
||||
|
||||
uint64 timestamp
|
||||
|
||||
# Any of the channels may not be available and be set to NaN
|
||||
# to indicate that it does not contain valid data.
|
||||
# The variable names follow the definition of the
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # Timestamp in microseconds since boot
|
||||
|
||||
uint8[50] text
|
||||
uint8 severity
|
||||
uint8 severity # log level (same as in the linux kernel, starting with 0)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
uint64 timestamp # in microseconds since system start
|
||||
|
||||
float32 roll_rate_integ # roll rate inegrator
|
||||
float32 pitch_rate_integ # pitch rate integrator
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
float32 roll_body # body angle in NED frame
|
||||
float32 pitch_body # body angle in NED frame
|
||||
@@ -35,3 +34,6 @@ bool fw_control_yaw # control heading with rudder (used for auto takeoff on
|
||||
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
|
||||
|
||||
bool apply_flaps
|
||||
|
||||
# WAS vehicle_attitude_setpoint mc_virtual_attitude_setpoint fw_virtual_attitude_setpoint
|
||||
# TOPICS mc_virtual_attitude_setpoint
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start
|
||||
|
||||
float32 roll # body angular rates in NED frame
|
||||
float32 pitch # body angular rates in NED frame
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user