mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-26 04:47:35 +08:00
Compare commits
767 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2057dd3381 | |||
| 771049799f | |||
| a3d5466ac3 | |||
| 4243be3a4b | |||
| af8c6d3cef | |||
| cf9584c36a | |||
| fb9de0c32a | |||
| e82c68da8b | |||
| 3de4e46cdc | |||
| 85ab62dd67 | |||
| b26ba88d40 | |||
| 5132ffc0e0 | |||
| 195082ccd1 | |||
| f0f82b6994 | |||
| e0dc8166dd | |||
| c181aefff7 | |||
| 963e5f5df9 | |||
| 991b288afb | |||
| f3bfad4e8a | |||
| 0d319f7a2f | |||
| c09f7af718 | |||
| a2fc0f7924 | |||
| ae0ba7cd98 | |||
| 083a043776 | |||
| 854d529c81 | |||
| 419c849a8e | |||
| c19ed79237 | |||
| 104ea0c53a | |||
| fc8cdb0b6f | |||
| 64276b0c8d | |||
| 939186fa7d | |||
| fc7e422821 | |||
| 92deb37f64 | |||
| c6a019a9d3 | |||
| 3358712b92 | |||
| ec441fdba6 | |||
| 3fecf8a23c | |||
| 48c32f7795 | |||
| 0c8a5b3da1 | |||
| 2761112466 | |||
| cb06f82f0f | |||
| d92244b664 | |||
| f3e2a197ad | |||
| e387f302f9 | |||
| f8a090e85e | |||
| a4206ba553 | |||
| 2b1229786e | |||
| ed475ca324 | |||
| e554f0174d | |||
| ae0bb8371d | |||
| 973116c7a4 | |||
| cd560da57c | |||
| 405852b5c8 | |||
| 5ec21835a4 | |||
| 1911ec0085 | |||
| 52a9040c62 | |||
| 955aad0dfb | |||
| d10f9030ad | |||
| 3af315f2c3 | |||
| 8eed43b515 | |||
| 367b6123e1 | |||
| f49bd9956b | |||
| 95b5bc0d84 | |||
| 70872d94c8 | |||
| 3a6ebe5fc1 | |||
| 1f9ace3901 | |||
| 999737ddd5 | |||
| ad447ab223 | |||
| 90358f078f | |||
| 463ac8e8a1 | |||
| 3862a24b8e | |||
| 3b277667ff | |||
| 274d0d65c6 | |||
| 058302ecdb | |||
| 32c53ff2dd | |||
| 9e999a39be | |||
| a2dc6e63cf | |||
| 0104b84289 | |||
| d2ce9a8560 | |||
| 70704ff9d6 | |||
| 4c75f1d505 | |||
| e1f2bff9be | |||
| 705171eb53 | |||
| 138f584e70 | |||
| 4c3234af38 | |||
| e959fcf9d1 | |||
| fe5059b0e8 | |||
| 1326c51a1c | |||
| 03c0a2d56c | |||
| 91b812fc42 | |||
| 700c13cdff | |||
| 68729e8ec0 | |||
| d181fe0cee | |||
| 76d4b6c7d0 | |||
| 7bb33e65ae | |||
| 98906c224b | |||
| 54f1e12684 | |||
| 51ceb9a85e | |||
| 714df398eb | |||
| ff4eae2c9b | |||
| d94cc1e114 | |||
| 49d9d1c987 | |||
| f499749c23 | |||
| 0ddf76ed7f | |||
| 425d03d909 | |||
| 996b01acbc | |||
| c8349811d1 | |||
| ae3070bbf1 | |||
| 3f25349eb9 | |||
| 2945ce7c87 | |||
| 82e88a9547 | |||
| d20e46567e | |||
| 1502d77df2 | |||
| 42404ade77 | |||
| 7c55229db7 | |||
| d73d8f390b | |||
| 38de07186d | |||
| b9fb8490ba | |||
| e0337a484b | |||
| 661496ab24 | |||
| 8525a8e520 | |||
| 4671a741dc | |||
| bbc2b703c3 | |||
| 8d03e71c16 | |||
| 8217e0f335 | |||
| 5ded1aedcb | |||
| 4c6e746360 | |||
| ee98a3336d | |||
| 07e6c274d5 | |||
| ed28b216c7 | |||
| 6203ad25c7 | |||
| 92769bd2b2 | |||
| 4de9c598fa | |||
| a11fe60135 | |||
| 7cb8ed3a1f | |||
| 0607982b23 | |||
| bcd057ac3e | |||
| a2260e53da | |||
| 446729566d | |||
| 0dea56f88b | |||
| dec5e7e9c8 | |||
| 19c98b8841 | |||
| e89e3c1b0c | |||
| ea80c5027e | |||
| 476c1e5c09 | |||
| ffebd8e771 | |||
| 92a5bbe97f | |||
| 36605bfff6 | |||
| c9f7c20d46 | |||
| d4e356a1ac | |||
| 8811482f1d | |||
| 632dfa55e6 | |||
| cbb8c90245 | |||
| 0950bb81ab | |||
| 258a563dd5 | |||
| fe44e281e5 | |||
| dd6b7fa98f | |||
| b1d2a0cc4e | |||
| 8067207ea6 | |||
| 953c90d3a6 | |||
| 408cf011b2 | |||
| 7eee949a81 | |||
| 548b7d5ece | |||
| ece09064c4 | |||
| cdb6a437a0 | |||
| 0bb9cce1ce | |||
| be9385ef06 | |||
| 2fb82789fe | |||
| 4cbee44220 | |||
| 425b268feb | |||
| cd2bb14f9b | |||
| 9249d3ae3d | |||
| 0ce44cebb7 | |||
| 1a4b2b37bb | |||
| 3b6c9448aa | |||
| 13c36155ce | |||
| 082e320191 | |||
| 66cbbf9f2e | |||
| 9ca58f5e97 | |||
| 98a9748bb8 | |||
| 81ecd130fc | |||
| 25099ce11f | |||
| 651702c2c1 | |||
| dc6067ed12 | |||
| 34bb671a73 | |||
| 555ee371e8 | |||
| f8c2ee73db | |||
| 8a01135a93 | |||
| d122513197 | |||
| bb1177d504 | |||
| d1304e1ceb | |||
| 3cd1e0ce19 | |||
| 443406ea2b | |||
| 4fc7348582 | |||
| ea7d2334c9 | |||
| 463513f31f | |||
| 2eec7842ae | |||
| 4e06b40e2b | |||
| 6ed48ad0c0 | |||
| b52972f3f8 | |||
| 1baecf07ad | |||
| 38439256e5 | |||
| 14fb019821 | |||
| feb2987fa8 | |||
| a061d7a02a | |||
| b3d830dd11 | |||
| 372a0da987 | |||
| 73044c51f9 | |||
| 22180a2639 | |||
| 0ffdccbd60 | |||
| b44f5b49ca | |||
| 8331339927 | |||
| b1a1e4913b | |||
| 28d69d3285 | |||
| b92aa92bec | |||
| 06b5b58b3b | |||
| 11b60904c3 | |||
| ca1fabf80a | |||
| f3a278dce5 | |||
| ecfc7cc24f | |||
| e15cbc3a6b | |||
| 24bdf79180 | |||
| c2e0e09b2d | |||
| e4763f15f6 | |||
| 9fe7a40673 | |||
| 1754e25920 | |||
| f03990f015 | |||
| cb15728536 | |||
| 7d09635fb6 | |||
| bb09646b41 | |||
| 0fbb03dee1 | |||
| a50f7af3b1 | |||
| fa282cfe86 | |||
| 880292f5d7 | |||
| 2b4b87571c | |||
| aa007dadee | |||
| 6301fa35c1 | |||
| 4a43155e69 | |||
| 7759ffb00e | |||
| 6960600c28 | |||
| 860b23dd17 | |||
| a21fefda48 | |||
| 856e229482 | |||
| 1be4e35ed4 | |||
| 76920171c7 | |||
| de1849167d | |||
| 185e4cfd48 | |||
| dd00e43ca3 | |||
| aefbd80b53 | |||
| f48c3a2cc6 | |||
| cc1fee525a | |||
| ab547bb982 | |||
| b58922a5d7 | |||
| 7d632254be | |||
| 2e2ac36cab | |||
| d9e7315420 | |||
| e731fcdbc0 | |||
| 45040be669 | |||
| c3ca40a98f | |||
| e5d49f6fff | |||
| d077ca15fb | |||
| df44df2df6 | |||
| 03bdc460d8 | |||
| d3301ba826 | |||
| 8de59dad32 | |||
| 1739ecc981 | |||
| 649d3e3f55 | |||
| b7ed4fd3e0 | |||
| 551a31ce2f | |||
| daa925137c | |||
| 78b3d22471 | |||
| 71d8b15b73 | |||
| 0b1402afe2 | |||
| 57fa9c545a | |||
| 6c97700eaa | |||
| bbad4a5397 | |||
| be0a5b4b32 | |||
| 2cbc993976 | |||
| 9eda5b373c | |||
| c17a9e8003 | |||
| aec97e0020 | |||
| 5d7ddf5734 | |||
| 30ccfdb2ed | |||
| 07d75d85cf | |||
| 2d8ebc6839 | |||
| dd6fb58f82 | |||
| 952cfe2fd7 | |||
| 4264ec992d | |||
| 0a82025faf | |||
| 20a1e5f77c | |||
| bbb04ab4b8 | |||
| 2445fa8b4c | |||
| 170849c8f8 | |||
| 846f807eff | |||
| d094fbbd70 | |||
| 6fbc0e95d0 | |||
| a89f21d566 | |||
| e835a7c4ea | |||
| 9d1558af25 | |||
| 333edfe12f | |||
| 35502c249d | |||
| eac92ec671 | |||
| bdec85fdd0 | |||
| 4127dfa791 | |||
| 52418f13b0 | |||
| e66e82228f | |||
| 75bb2f8dd2 | |||
| 673d4544d1 | |||
| 8e26b33009 | |||
| 80ef6e19df | |||
| 9cbb5c9920 | |||
| 2153710917 | |||
| c421bff73c | |||
| 7df1721d32 | |||
| f76aa0e772 | |||
| e9283d90cc | |||
| 0029317e55 | |||
| 439ad7daea | |||
| 501474993e | |||
| 77b65ee564 | |||
| 247b975675 | |||
| 03371f8522 | |||
| db159a43cc | |||
| 1b6700592b | |||
| 3514458f42 | |||
| b06215d038 | |||
| 5fc7e551ab | |||
| 6706d9b434 | |||
| 6d0339ba0c | |||
| 990d7c159d | |||
| 10f4a2e91f | |||
| 3ef9c2d16c | |||
| 8f8719d33b | |||
| 65e976bbc2 | |||
| d94767ef88 | |||
| 17a99bc827 | |||
| 983867f9af | |||
| b60e59d9be | |||
| 3f17acdcc9 | |||
| 0f4e1dd9f9 | |||
| 236794235a | |||
| 33d7b42040 | |||
| 20d3e6f4e1 | |||
| 72065c3d71 | |||
| 542ee86bc9 | |||
| 28e01c3510 | |||
| 98d706772e | |||
| d202bf9631 | |||
| 48be55dec8 | |||
| 31d7328f4d | |||
| 1ad66e606b | |||
| 5259877b1b | |||
| 460a0df850 | |||
| 2333bef670 | |||
| 203e253dfe | |||
| 8486ca5766 | |||
| 9bc9169b77 | |||
| 09200b994d | |||
| 478724c9fe | |||
| 6c8f322dfe | |||
| 082cd74cab | |||
| 8e04934eab | |||
| 39d441317a | |||
| 426aa76a59 | |||
| 18008b2de7 | |||
| 8743b78474 | |||
| 8c782b7cd9 | |||
| 0818bb4be0 | |||
| 751539304e | |||
| 627ec0df5d | |||
| 4d38742371 | |||
| 28c4d0b7df | |||
| fe1b726b62 | |||
| 07306c4be3 | |||
| 0568cff299 | |||
| 936f2dff52 | |||
| d688e5dee4 | |||
| 2362feddac | |||
| 4f8e6a9548 | |||
| e04b4a8dbf | |||
| 4c80adfaf1 | |||
| 301100ce0e | |||
| 590239dedb | |||
| b5c2cdf6c4 | |||
| 43e15148f6 | |||
| 8d9e2a28c4 | |||
| 4d2a403afa | |||
| ed3a115c8f | |||
| 70e46a194f | |||
| a81f11acdd | |||
| 28e995ede2 | |||
| 4becd6e4c7 | |||
| 5da67e2e28 | |||
| d1abdd0f8d | |||
| 1901edf13c | |||
| ccc1f0e8fa | |||
| 81cef522fd | |||
| 5bcc5d3a13 | |||
| 230aae580f | |||
| 86aa9f9336 | |||
| 9c767ff1ee | |||
| 20d96f3bd9 | |||
| 712353ea56 | |||
| 3f3836afa8 | |||
| d1cd4904dc | |||
| c0b8f2952c | |||
| 27a113ecab | |||
| cd8ce4d01e | |||
| 38731662c6 | |||
| 0e0639a5bf | |||
| b054fc7b8b | |||
| 0f7c850080 | |||
| 7e9cdef57b | |||
| 00eae055ac | |||
| e694fa906b | |||
| 47d6a6c63d | |||
| 14c2225b1c | |||
| 38af93085b | |||
| 64e00c41d4 | |||
| c8f2a29d67 | |||
| a5f58d321e | |||
| 7d7d707db9 | |||
| 28c34a0484 | |||
| a069a47d50 | |||
| a4040f7afd | |||
| f68ae39840 | |||
| 89974c46b9 | |||
| e29759d877 | |||
| 2c8a92c628 | |||
| 47fcdb1fdb | |||
| 5894f302b5 | |||
| 5cfe30fa2e | |||
| 2e0286e6bb | |||
| 0029a75ab0 | |||
| d2e931858d | |||
| 9686c81f7d | |||
| 88521b0145 | |||
| 199b5e7d48 | |||
| 9184038359 | |||
| 9894598b63 | |||
| 9312c772f1 | |||
| 764af19da4 | |||
| 9d02851893 | |||
| 90fe4b7a54 | |||
| 6d74b390d9 | |||
| d88f9353e8 | |||
| f7c4034f3c | |||
| 0ce4eae314 | |||
| 3c5bf497a3 | |||
| a6431ab8f0 | |||
| 019eaf7038 | |||
| dcf69144cb | |||
| 2cfe08b3b1 | |||
| 2d680dfd1a | |||
| 89f828fba7 | |||
| 17f5df2d3e | |||
| f6ced71d26 | |||
| 0f60e7debf | |||
| 064a602962 | |||
| 5ad8b84dec | |||
| ebb657bcf4 | |||
| 3e4031cf0f | |||
| 43bc6db99e | |||
| 298a8c4637 | |||
| 60a212f717 | |||
| c6098ef3dd | |||
| 8eca35111e | |||
| 72b1db4a63 | |||
| 43a04c9bca | |||
| ecc2ca7f98 | |||
| d59d16a6cd | |||
| ea29b45282 | |||
| 3fba7288af | |||
| eb69f15d3a | |||
| 37099f85b9 | |||
| e9b9176ce2 | |||
| ce6147f570 | |||
| 25c10eb124 | |||
| acdcc35392 | |||
| 6133ef0d63 | |||
| 67a893ac6d | |||
| 5468841aa5 | |||
| fc17797548 | |||
| 986cf288da | |||
| ad1bfb5410 | |||
| 63189067f6 | |||
| 167edcc77b | |||
| 95b961c622 | |||
| 4edfb4799f | |||
| b71b908ac7 | |||
| 0f6e30599c | |||
| 66290de745 | |||
| 9147d5ea5c | |||
| 5e790da634 | |||
| 0d874cf00a | |||
| 897775f38d | |||
| 300e439144 | |||
| d961a067b9 | |||
| ca3f6f59f9 | |||
| f76086ffa1 | |||
| a9e918c7b2 | |||
| a4ca298ee9 | |||
| 7aed8c4f47 | |||
| 80300c36b4 | |||
| 10f49c99ef | |||
| 87ec8839c4 | |||
| d1aec01b86 | |||
| aa96e39306 | |||
| ca6df035b4 | |||
| 0d1d454a4c | |||
| 31af09f8e7 | |||
| 24d871f792 | |||
| 16621b19b3 | |||
| ade4a1930c | |||
| 77af102cab | |||
| 3aab4d2daf | |||
| 8185e2a384 | |||
| 08ee3208b2 | |||
| ca90c785e9 | |||
| 95222baa33 | |||
| 8b1543e3b0 | |||
| b00ebe53bb | |||
| 94884594bb | |||
| 51c0e5553e | |||
| 3b94742117 | |||
| 9cb2bf389c | |||
| 08b0ac9654 | |||
| 495f1c9165 | |||
| 68e2940f58 | |||
| e8676fe87a | |||
| b41e345a5b | |||
| ee3bc6673a | |||
| fdc40880d0 | |||
| e70d70468a | |||
| 39641494da | |||
| 38d23f5345 | |||
| f9fc9a9af6 | |||
| b965923c08 | |||
| ddc6b6bc9c | |||
| da2fdf923e | |||
| d0d7f29422 | |||
| 7185bb3243 | |||
| c947562183 | |||
| 9651f78b0a | |||
| d583ef6b79 | |||
| 452a7199a6 | |||
| f9faa97d85 | |||
| 01e60e853e | |||
| 41378fcef9 | |||
| 8cd517f533 | |||
| 9ab633c18f | |||
| 4bf1b46e47 | |||
| 2256def180 | |||
| 1f6acd0171 | |||
| e692f4ca01 | |||
| 674b92df18 | |||
| 7bfebf5289 | |||
| 7560d45c61 | |||
| 9db5bc0755 | |||
| 1af068179e | |||
| ba1526896d | |||
| 10ceea2fe6 | |||
| 8db7a6225b | |||
| fe23718e2c | |||
| 3160e7a3cd | |||
| 01192e3c37 | |||
| 58421f2edc | |||
| f63a7642d6 | |||
| 10f2564ae8 | |||
| 713350930d | |||
| 37c1598f38 | |||
| 7d515e3d58 | |||
| aae794965a | |||
| 4478877820 | |||
| 4e3d944f58 | |||
| accbdbf129 | |||
| 7c0165ea0c | |||
| f537b30c86 | |||
| c15d3f7cfa | |||
| 2190f66096 | |||
| 8fbf79527f | |||
| b7efd4f947 | |||
| 89892d0d17 | |||
| a9b9362fea | |||
| a2064cceff | |||
| 36ba8cc6dd | |||
| ce10dd90e7 | |||
| ce909b23b1 | |||
| 79aa8ee587 | |||
| 9c94e4c5ef | |||
| a537925c3c | |||
| 2571860ff8 | |||
| a29820bdf8 | |||
| bfd5a90a5d | |||
| b59db7dac2 | |||
| 55dfbdc6a6 | |||
| 4f88c200ec | |||
| 9345f68a93 | |||
| cbd6e735ad | |||
| 01db98fccf | |||
| 76585409fa | |||
| 38e7f814d5 | |||
| e348425279 | |||
| bc7001ba49 | |||
| df1c94dd4e | |||
| ade7315e9b | |||
| c2cbab1e98 | |||
| 929820136a | |||
| 9b7c8c8a8b | |||
| b9152dc4d0 | |||
| bb562a6d10 | |||
| 0459b73520 | |||
| 2870b5bbb1 | |||
| 5440802aae | |||
| e507563911 | |||
| 23c73d4e0b | |||
| 51b55533af | |||
| b8bdf7e1c4 | |||
| 3504541ebd | |||
| 60229c28a8 | |||
| 01681d6b47 | |||
| 32c2160137 | |||
| cf36435ed3 | |||
| a6bc41ef75 | |||
| 0951b9b1e7 | |||
| e957ebac56 | |||
| c3ae713ec1 | |||
| 394b431364 | |||
| bddee78412 | |||
| fa3027537c | |||
| 38f017b12f | |||
| 3b6a5dbac3 | |||
| 661512cefe | |||
| afeb0db666 | |||
| 8294b9431a | |||
| 55dceae672 | |||
| 861145fcdc | |||
| 4f4ada90b1 | |||
| 1999003cf4 | |||
| 1179603437 | |||
| 5fd321ec43 | |||
| 9a9eb35ea8 | |||
| b7c3d560d3 | |||
| 0bc377ecd3 | |||
| ddc73b4647 | |||
| 6921b04600 | |||
| 84175eacff | |||
| ed473a5ebe | |||
| c82e0e0531 | |||
| 6e1500a7de | |||
| 8172a561ca | |||
| 947162f998 | |||
| 63bedd8e4a | |||
| d30431527c | |||
| f59a517be2 | |||
| a3832d3981 | |||
| c06e6ffaf7 | |||
| 8ae0c9aadd | |||
| 7393a68e28 | |||
| 7ddf43b443 | |||
| 7c90b06628 | |||
| 42845d6c6e | |||
| 3a9eef658c | |||
| fc1aaa58b2 | |||
| 2dffb04d61 | |||
| ffc52cc2fc | |||
| 51da169ccb | |||
| bf3f7da0a2 | |||
| 7d985ec7c5 | |||
| c049c26ac5 | |||
| 585fa12209 | |||
| 58a9bf0b2e | |||
| 8defbc8829 | |||
| c5fb68b7a1 | |||
| e76dda545c | |||
| 462b572172 | |||
| 8e3ee9f6cd | |||
| b1b948f4bc | |||
| 6327953fe9 | |||
| 83885b0304 | |||
| 48b617ee5e | |||
| 2fb615d7e2 | |||
| 04df95436d | |||
| c4ccde51df | |||
| daa1d76909 | |||
| 1922310404 | |||
| 5b30d1cd41 | |||
| d30ef0cac8 | |||
| 511e87f966 | |||
| 2799a7f436 | |||
| 5ff96fc77e | |||
| a097cb11cd | |||
| 0d203deb34 | |||
| 376e78b801 | |||
| bbe0ed8646 | |||
| e34aacd520 | |||
| 228a0ac5ed | |||
| 3f67ece322 | |||
| 53b579a79d | |||
| c391d6793c | |||
| 3cf901b29c | |||
| ea3b99e964 | |||
| c522a8b15a | |||
| 5489005e0b | |||
| 5bec3004c3 | |||
| 5dbbddb13f | |||
| b66270f8a8 | |||
| 3f884c5d24 | |||
| d9498ade32 | |||
| bb307cd462 | |||
| 0b9505453d | |||
| 99d3b2a4e4 | |||
| db2a1e5fee | |||
| 950767f1af | |||
| 4c03def6e9 | |||
| 312d84ca23 | |||
| 2809dd8944 | |||
| b29d9db7f1 | |||
| 93a54ee63d | |||
| bcba3dfe52 | |||
| a0e43bca96 | |||
| 52a2ef34fd | |||
| 357a16aca6 | |||
| b94c5db55d | |||
| 70b1b19902 | |||
| 19b89e1d35 | |||
| 4346ac4a37 | |||
| 282d35bbf0 | |||
| 490a2cd7ae | |||
| 21699935e8 | |||
| 6fdcc43ea8 | |||
| 36296794c8 | |||
| 36d9635518 | |||
| 5d6e785a4b | |||
| f99c2617ad | |||
| dbc889a2ae | |||
| 2ff6baa250 | |||
| 6537f480b1 | |||
| 1b7f4b6003 | |||
| 0153c870d2 | |||
| 572890f8c0 | |||
| 468022abba | |||
| c84b1c6566 | |||
| af7fa63480 | |||
| e596607e2e | |||
| 7ff72304b4 | |||
| 3140bf167c | |||
| 1c6b1f7554 | |||
| c95dbfd7ac | |||
| c2cbf74351 | |||
| 577d926639 | |||
| f058cbd0e0 | |||
| 25846f48c4 | |||
| c4de9f67a1 | |||
| 643002bd86 | |||
| 88d9ade4d7 | |||
| 8fc3b05491 | |||
| cbb743c64d | |||
| 7faaad79d0 | |||
| c73028bb1b | |||
| 7653bd1757 | |||
| 7a1a4ea7a6 | |||
| 51ce8306ee | |||
| b2c5919d29 | |||
| 160fec5f25 | |||
| 6e2060ddb6 | |||
| 505f963dd0 |
@@ -60,14 +60,19 @@ pipeline {
|
||||
"holybro_kakutef7_default",
|
||||
"holybro_pix32v5_default",
|
||||
"matek_h743-slim",
|
||||
"matek_gnss-m9n-f4_canbootloader",
|
||||
"matek_gnss-m9n-f4_default",
|
||||
"modalai_fc-v1_default",
|
||||
"modalai_fc-v1_rtps",
|
||||
"modalai_fc-v2_default",
|
||||
"mro_ctrl-zero-f7_default",
|
||||
"mro_ctrl-zero-f7-oem_default",
|
||||
"mro_ctrl-zero-h7_default",
|
||||
"mro_ctrl-zero-h7_rtps",
|
||||
"mro_ctrl-zero-h7-oem_default",
|
||||
"mro_ctrl-zero-h7-oem_rtps",
|
||||
"mro_pixracerpro_default",
|
||||
"mro_pixracerpro_rtps",
|
||||
"mro_x21-777_default",
|
||||
"mro_x21_default",
|
||||
"nxp_fmuk66-e_default",
|
||||
@@ -94,7 +99,6 @@ pipeline {
|
||||
"px4_fmu-v5_stackcheck",
|
||||
"px4_fmu-v5_uavcanv0periph",
|
||||
"px4_fmu-v5_uavcanv1",
|
||||
"px4_fmu-v5x_base_phy_DP83848C",
|
||||
"px4_fmu-v5x_default",
|
||||
"px4_fmu-v6u_default",
|
||||
"px4_fmu-v6x_default",
|
||||
@@ -168,7 +172,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) {
|
||||
try {
|
||||
sh('export')
|
||||
checkout(scm)
|
||||
sh('make distclean')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
sh('git fetch --tags')
|
||||
sh('ccache -s')
|
||||
sh('make ' + target)
|
||||
@@ -185,7 +189,7 @@ def createBuildNode(Boolean archive, String docker_image, String target) {
|
||||
throw (exc)
|
||||
}
|
||||
finally {
|
||||
sh('make distclean')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+119
-87
@@ -21,11 +21,11 @@ pipeline {
|
||||
sh 'make cubepilot_cubeorange_bootloader'
|
||||
sh 'make cubepilot_cubeorange_test'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'cubepilot_cubeorange_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*, build/cubepilot_cubeorange_test/etc/init.d/airframes/*', name: 'cubepilot_cubeorange_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -42,12 +42,16 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_bootloader/cubepilot_cubeorange_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
steps {
|
||||
// run tests
|
||||
runTests()
|
||||
|
||||
// load all airframes
|
||||
// sh("./Tools/HIL/test_airframes.sh `find /dev/serial -name *usb-*` `cd build/cubepilot_cubeorange_test/etc/init.d/airframes/; find . -regex '.*/[0-9].*' -exec basename {} \\; | cut -d '_' -f 1` || true") // test loading all airframes\
|
||||
}
|
||||
}
|
||||
stage("status") {
|
||||
@@ -69,9 +73,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -92,11 +98,11 @@ pipeline {
|
||||
sh 'make cuav_x7pro_bootloader'
|
||||
sh 'make cuav_x7pro_test'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'cuav_x7pro_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'cuav_x7pro_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -113,6 +119,7 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cuav_x7pro_bootloader/cuav_x7pro_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cuav_x7pro_test/cuav_x7pro_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -138,9 +145,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/cuav_x7pro_test/cuav_x7pro_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/cuav_x7pro_test/cuav_x7pro_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -161,11 +170,11 @@ pipeline {
|
||||
sh 'make px4_fmu-v3_test'
|
||||
sh 'make px4_fmu-v3_test bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'px4_fmu-v3_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v3_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -182,6 +191,7 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v3_test/px4_fmu-v3_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v3_test/px4_fmu-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -207,9 +217,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/px4_fmu-v3_test/px4_fmu-v3_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v3_test/px4_fmu-v3_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -230,11 +242,11 @@ pipeline {
|
||||
sh 'make px4_fmu-v4_test'
|
||||
sh 'make px4_fmu-v4_test bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'px4_fmu-v4_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v4_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -251,6 +263,7 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_test/px4_fmu-v4_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -275,9 +288,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -298,11 +313,11 @@ pipeline {
|
||||
sh 'make px4_fmu-v4pro_test'
|
||||
sh 'make px4_fmu-v4pro_test bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'px4_fmu-v4pro_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v4pro_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -319,6 +334,7 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -344,9 +360,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -367,11 +385,11 @@ pipeline {
|
||||
sh 'make px4_fmu-v5_debug'
|
||||
sh 'make px4_fmu-v5_debug bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'px4_fmu-v5_debug'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v5_debug'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -393,13 +411,24 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_debug/px4_fmu-v5_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_debug/px4_fmu-v5_debug.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600 || true'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
steps {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb top -1"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
||||
//sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_stress"'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -v"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -u -v" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_stress"'
|
||||
|
||||
// test dataman
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests dataman"'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests file" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests latency_test" || true'
|
||||
}
|
||||
@@ -412,7 +441,6 @@ pipeline {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SDLOG_MODE -1" || true' // limit cpu usage
|
||||
checkStatus()
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status" || true'
|
||||
}
|
||||
@@ -424,9 +452,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/px4_fmu-v5_debug/px4_fmu-v5_debug.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v5_debug/px4_fmu-v5_debug.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -447,11 +477,11 @@ pipeline {
|
||||
sh 'make px4_fmu-v5_stackcheck'
|
||||
sh 'make px4_fmu-v5_stackcheck bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'px4_fmu-v5_stackcheck'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v5_stackcheck'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -473,6 +503,7 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -481,6 +512,9 @@ pipeline {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests latency_test" || true'
|
||||
|
||||
// test dataman
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests dataman"'
|
||||
}
|
||||
}
|
||||
stage("status") {
|
||||
@@ -491,7 +525,6 @@ pipeline {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SDLOG_MODE -1" || true' // limit cpu usage
|
||||
checkStatus()
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status" || true'
|
||||
}
|
||||
@@ -503,9 +536,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -526,11 +561,11 @@ pipeline {
|
||||
sh 'make px4_fmu-v5_test'
|
||||
sh 'make px4_fmu-v5_test bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'px4_fmu-v5_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v5_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -547,6 +582,7 @@ pipeline {
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_test/px4_fmu-v5_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -572,9 +608,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -595,11 +633,11 @@ pipeline {
|
||||
sh 'make nxp_fmuk66-v3_test'
|
||||
//sh 'make nxp_fmuk66-v3_test bootloader_elf'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, Tools/HIL/*.py', name: 'nxp_fmuk66-v3_test'
|
||||
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'nxp_fmuk66-v3_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
} // stage build
|
||||
@@ -616,6 +654,7 @@ pipeline {
|
||||
//sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_bootloader.elf'
|
||||
// flash board and watch bootup
|
||||
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
||||
resetBoard()
|
||||
}
|
||||
}
|
||||
stage("tests") {
|
||||
@@ -641,9 +680,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh 'cat /tmp/pyserial_spy_file.txt'
|
||||
}
|
||||
always {
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf || true'
|
||||
resetBoard()
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf || true'
|
||||
}
|
||||
}
|
||||
} // stage test
|
||||
@@ -669,7 +710,7 @@ void checkoutSCM() {
|
||||
retry(3) {
|
||||
checkout scm
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --tags'
|
||||
sh 'ccache -z'
|
||||
}
|
||||
@@ -702,34 +743,44 @@ void checkStatus() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show SYS*"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true' // reboot to apply
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump"'
|
||||
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show SYS*"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump"'
|
||||
|
||||
// run logger
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sleep 1"' // sleep before continuing
|
||||
// status commands
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/blocks"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/mount"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/usage"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/meminfo"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/uptime"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander check" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "dataman status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "df -h"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "df"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ekf2 status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "free"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "gps status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener cpuload; top once; listener cpuload"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /bin"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /dev"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /etc"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /fs"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /fs/microsd"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /obj"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /proc"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /proc/fs"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink status streams" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mount"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "perf latency"'
|
||||
@@ -741,12 +792,12 @@ void checkStatus() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uavcan status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb status"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb top -1 -a"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ver all"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
||||
// stop logger
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"'
|
||||
}
|
||||
|
||||
void resetParameters() {
|
||||
@@ -756,13 +807,19 @@ void resetParameters() {
|
||||
}
|
||||
|
||||
void runTests() {
|
||||
|
||||
// test loading a range of airframes
|
||||
sh './Tools/HIL/test_airframes.sh `find /dev/serial -name *usb-*` 1000 1001 2100 3000 4001 4018 6001 8001 10016'
|
||||
|
||||
resetParameters()
|
||||
|
||||
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_CAL_EN" --value "0" || true' // disable during testing
|
||||
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_FFT_EN" --value "0" || true' // disable during testing
|
||||
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SENS_IMU_AUTOCAL" --value "0" || true' // disable during testing
|
||||
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SENS_MAG_AUTOCAL" --value "0" || true' // disable during testing
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true' // reboot to apply
|
||||
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
||||
@@ -774,35 +831,32 @@ void runTests() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests latency_test" || true'
|
||||
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-*`'
|
||||
|
||||
//sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests file" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests file" || true'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump /fs/mtd_params"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd readtest"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump /fs/mtd_params"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd rwtest"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump /fs/mtd_params"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd erase"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param dump /fs/mtd_params"'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -u"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -v"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -u -v"'
|
||||
|
||||
//sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_stress"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_stress"'
|
||||
|
||||
// tests (stop modules first)
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander stop"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink stop-all"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "navigator stop"'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-*`'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors stop"' // ignore irrelevant sensor timeouts during microbenchmarks
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "microbench all"'
|
||||
|
||||
// test rebooting multiple times
|
||||
resetParameters()
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SYS_AUTOSTART 4001" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CBRK*; param show SYS*"' // check that CBRK_BUZZER and SYS_AUTOSTART haven't been lost
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CBRK*; param show SYS*"' // check that CBRK_BUZZER and SYS_AUTOSTART haven't been lost
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CBRK*; param show SYS*"' // check that CBRK_BUZZER and SYS_AUTOSTART haven't been lost
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CBRK*; param show SYS*"' // check that CBRK_BUZZER and SYS_AUTOSTART haven't been lost
|
||||
//sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "calib_udelay"'
|
||||
}
|
||||
|
||||
void printTopics() {
|
||||
@@ -909,28 +963,6 @@ void resetBoard() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SDLOG_MODE -1" || true' // limit cpu usage
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "reboot" || true' // reboot to apply
|
||||
|
||||
// check SD card
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "df -h" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /fs/microsd" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /proc/fs" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/blocks" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/mount" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/usage" || true'
|
||||
// format
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "dataman stop" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "umount /fs/microsd" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mkfatfs -F 32 /dev/mmcsd0" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once" || true'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mount -t vfat /dev/mmcsd0 /fs/microsd" || true'
|
||||
// check SD card
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "df -h" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /fs/microsd" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /proc/fs" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/blocks" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/mount" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/usage" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "echo > /fs/microsd/.format" || true'
|
||||
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM gcr.io/oss-fuzz-base/base-builder:v1
|
||||
COPY . $SRC/PX4-Autopilot
|
||||
RUN apt-get install -y libjpeg8-dev zlib1g-dev
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN python3 -m pip install -r $SRC/PX4-Autopilot/Tools/setup/requirements.txt
|
||||
WORKDIR $SRC/PX4-Autopilot
|
||||
COPY ./.clusterfuzzlite/build.sh $SRC/
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash -eu
|
||||
|
||||
PX4_FUZZ=1 make px4_sitl
|
||||
cp build/px4_sitl_default/bin/px4 $OUT/px4
|
||||
@@ -0,0 +1 @@
|
||||
language: c++
|
||||
@@ -0,0 +1,154 @@
|
||||
# build docker images on:
|
||||
# * every pull request
|
||||
# * push to master
|
||||
# * stable release published
|
||||
# * tag name is:
|
||||
# - commit sha if pull request
|
||||
# - 'latest' if push to master
|
||||
# - release name if release
|
||||
|
||||
# pushes to registry if:
|
||||
# * is not a pull request
|
||||
# * is master branch
|
||||
# * is the result of release
|
||||
|
||||
# builds all nuttx targets and deploys metadata
|
||||
|
||||
name: Build docker
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
set_docker_tag:
|
||||
name: Set docker tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKER_TAG: "px4io/px4-dev"
|
||||
outputs:
|
||||
docker_tag: ${{ steps.set-outputs.outputs.docker_tag }}
|
||||
|
||||
steps:
|
||||
- name: Set pull request docker tag
|
||||
if: github.event_name == 'pull_request'
|
||||
run: echo "DOCKER_TAG=px4io/px4-dev:${{ github.sha }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set push docker tag
|
||||
if: github.event_name == 'push'
|
||||
run: echo "DOCKER_TAG=px4io/px4-dev:latest" >> $GITHUB_ENV
|
||||
|
||||
- name: Set release docker tag
|
||||
if: github.event_name == 'release'
|
||||
run: echo "DOCKER_TAG=px4io/px4-dev:${{ github.event.release.name }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set docker tag outputs
|
||||
id: set-outputs
|
||||
run: echo "::set-output name=docker_tag::$DOCKER_TAG"
|
||||
|
||||
build_docker:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
needs: set_docker_tag
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login to Github Registry
|
||||
uses: docker/login-action@v1
|
||||
if: github.event_name == 'push'
|
||||
with:
|
||||
registry: ghrc.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up image builder
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v2
|
||||
id: docker_build
|
||||
with:
|
||||
file: Tools/setup/Dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ needs.set_docker_tag.outputs.docker_tag }}
|
||||
outputs: type=tar,dest=/tmp/px4_docker_image.tar
|
||||
|
||||
- name: Save container to artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_docker_image
|
||||
path: /tmp/px4_docker_image.tar
|
||||
|
||||
- name: Push to Github Registry
|
||||
uses: docker/build-push-action@v2
|
||||
if: github.event_name == 'push'
|
||||
|
||||
- name: Image Digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
list_targets:
|
||||
name: Generate target list
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_docker
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
#- name: Install Python packages
|
||||
#run: pip install -r Tools/setup/requirements.txt
|
||||
#run: pip install kconfiglib
|
||||
|
||||
- id: set-matrix
|
||||
name: Get all nuttx targets
|
||||
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py -a)"
|
||||
|
||||
build_px4:
|
||||
name: Build targets with Docker
|
||||
runs-on: ubuntu-latest
|
||||
needs: [list_targets, set_docker_tag]
|
||||
#strategy:
|
||||
#matrix: ${{ fromJson(needs.enumerate_targets.outputs.matrix) }}
|
||||
|
||||
steps:
|
||||
- name: Get container from artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: px4_docker_image
|
||||
path: /tmp
|
||||
|
||||
- name: Load Docker image
|
||||
run: |
|
||||
docker import /tmp/px4_docker_image.tar ${{ needs.set_docker_tag.outputs.docker_tag }}
|
||||
docker image ls -a
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build targets
|
||||
#run: |
|
||||
#docker run --rm -w "${GITHUB_ACTION_PATH}" \
|
||||
#--env=LOCAL_USER_ID="$(id -u)" \
|
||||
#--volume=/tmp:/tmp:rw \
|
||||
#--volume=${GITHUB_ACTION_PATH}:${GITHUB_ACTION_PATH}:rw \
|
||||
#px4io/px4-dev:${{ needs.set_docker_tag.outputs.docker_tag }} /bin/bash -c "make ${{ matrix.target }}"
|
||||
|
||||
run: |
|
||||
docker run --rm -w ${{ github.workspace }} \
|
||||
--env=LOCAL_USER_ID="$(id -u)" \
|
||||
--volume=/tmp:/tmp:rw \
|
||||
--volume=${{ github.workspace }}:${{ github.workspace }}:rw \
|
||||
${{ needs.set_docker_tag.outputs.docker_tag }} /bin/bash -c "make px4_fmu-v6x"
|
||||
@@ -0,0 +1,34 @@
|
||||
name: ClusterFuzzLite batch fuzzing
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *' # UTC 6am every day.
|
||||
permissions: read-all
|
||||
jobs:
|
||||
BatchFuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer:
|
||||
- address
|
||||
- undefined
|
||||
- memory
|
||||
steps:
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
||||
with:
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
id: run
|
||||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fuzz-seconds: 1800 # 30 mins
|
||||
mode: 'batch'
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
# Optional but recommended: For storing certain artifacts from fuzzing.
|
||||
# See later section on "Git repo for storage".
|
||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
||||
@@ -1,54 +0,0 @@
|
||||
name: Linux Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2021-09-08
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
beaglebone_blue_default,
|
||||
emlid_navio2_default,
|
||||
px4_raspberrypi_default,
|
||||
scumaker_pilotpi_default,
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
run: make ${{matrix.config}}
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
@@ -1,51 +0,0 @@
|
||||
name: Linux ARM64 Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2021-09-08
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
scumaker_pilotpi_arm64,
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
run: make ${{matrix.config}}
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
@@ -1,118 +0,0 @@
|
||||
name: Nuttx Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config: [
|
||||
airmind_mindpx-v2,
|
||||
ark_can-flow,
|
||||
ark_can-gps,
|
||||
ark_can-rtk-gps,
|
||||
atl_mantis-edu,
|
||||
av_x-v1,
|
||||
bitcraze_crazyflie,
|
||||
bitcraze_crazyflie21,
|
||||
cuav_can-gps-v1,
|
||||
cuav_nora,
|
||||
cuav_x7pro,
|
||||
cubepilot_cubeorange,
|
||||
cubepilot_cubeyellow,
|
||||
freefly_can-rtk-gps,
|
||||
holybro_can-gps-v1,
|
||||
holybro_durandal-v1,
|
||||
holybro_kakutef7,
|
||||
holybro_pix32v5,
|
||||
matek_h743-slim,
|
||||
modalai_fc-v1,
|
||||
modalai_fc-v2,
|
||||
mro_ctrl-zero-f7,
|
||||
mro_ctrl-zero-f7-oem,
|
||||
mro_ctrl-zero-h7,
|
||||
mro_ctrl-zero-h7-oem,
|
||||
mro_pixracerpro,
|
||||
mro_x21,
|
||||
mro_x21-777,
|
||||
nxp_fmuk66-e,
|
||||
nxp_fmuk66-v3,
|
||||
nxp_fmurt1062-v1,
|
||||
nxp_ucans32k146,
|
||||
omnibus_f4sd,
|
||||
raspberrypi_pico,
|
||||
px4_fmu-v2,
|
||||
px4_fmu-v3,
|
||||
px4_fmu-v4,
|
||||
px4_fmu-v4pro,
|
||||
px4_fmu-v5,
|
||||
px4_fmu-v5x,
|
||||
px4_fmu-v6u,
|
||||
px4_fmu-v6x,
|
||||
spracing_h7extreme,
|
||||
uvify_core
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 120M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make all_variants_${{matrix.config}}
|
||||
run: make all_variants_${{matrix.config}}
|
||||
timeout-minutes: 45
|
||||
- name: make ${{matrix.config}} bloaty_compileunits
|
||||
run: make ${{matrix.config}} bloaty_compileunits || true
|
||||
- name: make ${{matrix.config}} bloaty_inlines
|
||||
run: make ${{matrix.config}} bloaty_inlines || true
|
||||
- name: make ${{matrix.config}} bloaty_segments
|
||||
run: make ${{matrix.config}} bloaty_segments || true
|
||||
- name: make ${{matrix.config}} bloaty_symbols
|
||||
run: make ${{matrix.config}} bloaty_symbols || true
|
||||
- name: make ${{matrix.config}} bloaty_templates
|
||||
run: make ${{matrix.config}} bloaty_templates || true
|
||||
- name: make ${{matrix.config}} bloaty_ram
|
||||
run: make ${{matrix.config}} bloaty_ram || true
|
||||
- name: make ${{matrix.config}} bloaty_compare_master
|
||||
run: make ${{matrix.config}} bloaty_compare_master || true
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
|
||||
- name: Upload px4 package
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_package_${{matrix.config}}
|
||||
path: |
|
||||
build/**/*.px4
|
||||
build/**/*.bin
|
||||
@@ -1,11 +1,17 @@
|
||||
name: Deploy metadata for all targets
|
||||
name: Build and deploy all targets with metadata
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
create:
|
||||
tags:
|
||||
- 'v*'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'release/*'
|
||||
- 'pr-metadata-test'
|
||||
- 'build_and_deploy_mix'
|
||||
|
||||
jobs:
|
||||
enumerate_targets:
|
||||
@@ -18,8 +24,8 @@ jobs:
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
- id: set-matrix
|
||||
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py)"
|
||||
build:
|
||||
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py -a)"
|
||||
build_all:
|
||||
runs-on: ubuntu-latest
|
||||
needs: enumerate_targets
|
||||
strategy:
|
||||
@@ -34,21 +40,4 @@ jobs:
|
||||
run: make ${{matrix.target}}
|
||||
|
||||
- name: parameter & events metadata
|
||||
run: |
|
||||
make ${{matrix.target}} ver_gen events_json
|
||||
./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV
|
||||
cd build/${{ matrix.target }}
|
||||
mkdir _metadata || true
|
||||
cp parameters.* events/*.xz _metadata
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'px4-travis'
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/'
|
||||
DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/'
|
||||
|
||||
run: make ${{matrix.target}} ver_gen events_json actuators_json
|
||||
|
||||
@@ -15,10 +15,10 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
|
||||
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer", model: "standard_vtol" } # Australia
|
||||
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
|
||||
- {model: "standard_vtol", latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer" } # Australia
|
||||
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
|
||||
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-09-08
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json
|
||||
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
|
||||
timeout-minutes: 45
|
||||
|
||||
- name: Look at core files
|
||||
|
||||
@@ -105,8 +105,4 @@ src/lib/version/build_git_version.h
|
||||
src/modules/simulator/simulator_config.h
|
||||
src/systemcmds/topic_listener/listener_generated.cpp
|
||||
|
||||
# SITL
|
||||
dataman
|
||||
eeprom/
|
||||
|
||||
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
|
||||
|
||||
@@ -42,12 +42,6 @@
|
||||
[submodule "src/drivers/uavcan_v1/public_regulated_data_types"]
|
||||
path = src/drivers/uavcan_v1/public_regulated_data_types
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
[submodule "src/drivers/uavcannode_gps_demo/public_regulated_data_types"]
|
||||
path = src/drivers/uavcannode_gps_demo/public_regulated_data_types
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
|
||||
path = src/drivers/uavcannode_gps_demo/libcanard
|
||||
url = https://github.com/UAVCAN/libcanard.git
|
||||
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
|
||||
path = src/drivers/uavcan_v1/legacy_data_types
|
||||
url = https://github.com/PX4/public_regulated_data_types.git
|
||||
|
||||
Vendored
+15
@@ -61,6 +61,11 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5_default
|
||||
px4_fmu-v5_debug:
|
||||
short: px4_fmu-v5_debug
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5_debug
|
||||
px4_fmu-v5x_default:
|
||||
short: px4_fmu-v5x
|
||||
buildType: MinSizeRel
|
||||
@@ -191,6 +196,16 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: matek_h743-slim_default
|
||||
matek_gnss-m9n-f4_canbootloader:
|
||||
short: matek_gnss-m9n-f4_canbootloader
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: matek_m9nf4can_canbootloader
|
||||
matek_gnss-m9n-f4_default:
|
||||
short: matek_gnss-m9n-f4_default
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: matek_gnss-m9n-f4_default
|
||||
modalai_fc-v1_default:
|
||||
short: modalai_fc-v1
|
||||
buildType: MinSizeRel
|
||||
|
||||
@@ -125,6 +125,11 @@ define_property(GLOBAL PROPERTY PX4_MODULE_LIBRARIES
|
||||
FULL_DOCS "List of all PX4 module libraries"
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_KERNEL_MODULE_LIBRARIES
|
||||
BRIEF_DOCS "PX4 kernel side module libs"
|
||||
FULL_DOCS "List of all PX4 kernel module libraries"
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
|
||||
BRIEF_DOCS "PX4 module paths"
|
||||
FULL_DOCS "List of paths to all PX4 modules"
|
||||
@@ -142,6 +147,7 @@ set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")
|
||||
|
||||
include(px4_add_module)
|
||||
set(config_module_list)
|
||||
set(config_kernel_list)
|
||||
|
||||
# Find Python
|
||||
# If using catkin, Python 2 is found since it points
|
||||
@@ -423,6 +429,8 @@ endforeach()
|
||||
|
||||
# add events lib after modules and libs as it needs to know all source files (PX4_SRC_FILES)
|
||||
add_subdirectory(src/lib/events EXCLUDE_FROM_ALL)
|
||||
# metadata needs PX4_MODULE_CONFIG_FILES
|
||||
add_subdirectory(src/lib/metadata EXCLUDE_FROM_ALL)
|
||||
|
||||
# must be the last module before firmware
|
||||
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
|
||||
|
||||
Vendored
+12
-12
@@ -88,7 +88,7 @@ pipeline {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make airframe_metadata'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
@@ -98,7 +98,7 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ pipeline {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make parameters_metadata'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
@@ -118,7 +118,7 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ pipeline {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make module_documentation'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
@@ -138,7 +138,7 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make uorb_graphs'
|
||||
dir('Tools/uorb_graph') {
|
||||
@@ -180,7 +180,7 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,7 +261,7 @@ pipeline {
|
||||
steps {
|
||||
sh('export')
|
||||
sh('git fetch --all --tags')
|
||||
sh('make distclean')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
sh('make px4_sitl_rtps')
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/micrortps_agent.git -b ${BRANCH_NAME}")
|
||||
@@ -290,7 +290,7 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
sh('make distclean')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git")
|
||||
// 'master' branch
|
||||
@@ -319,7 +319,7 @@ pipeline {
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
sh('make distclean')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_ros_com.git -b ${BRANCH_NAME}")
|
||||
// deploy uORB RTPS ID map
|
||||
|
||||
@@ -114,14 +114,14 @@ config BOARD_ETHERNET
|
||||
flag to indicate that ethernet is enabled
|
||||
|
||||
config BOARD_CRYPTO
|
||||
string "Crypto"
|
||||
bool "Crypto support"
|
||||
help
|
||||
Crypto implementation selection
|
||||
Enable PX4 Crypto Support. Select the implementation under drivers
|
||||
|
||||
config BOARD_KEYSTORE
|
||||
string "Keystore"
|
||||
config BOARD_PROTECTED
|
||||
bool "Memory protection"
|
||||
help
|
||||
Keystore implememntation selection
|
||||
Enable memory protection via MPU/MMU
|
||||
|
||||
menu "Serial ports"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2012 - 2021, PX4 Development Team
|
||||
Copyright (c) 2012 - 2022, PX4 Development Team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -158,6 +158,11 @@ else
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
|
||||
endif
|
||||
|
||||
# Fuzz Testing
|
||||
ifdef PX4_FUZZ
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=FuzzTesting
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Pick up specific Python path if set
|
||||
@@ -482,7 +487,9 @@ shellcheck_all:
|
||||
@make px4_fmu-v5_default shellcheck
|
||||
|
||||
validate_module_configs:
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f -not -path "$(SRC_DIR)/src/lib/mixer_module/*" -print0 | xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f \
|
||||
-not -path "$(SRC_DIR)/src/lib/mixer_module/*" -not -path "$(SRC_DIR)/src/lib/crypto/libtommath/*" -print0 | \
|
||||
xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
|
||||
# Cleanup
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@@ -11,40 +11,22 @@
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
|
||||
param set-default MPC_USE_HTE 0
|
||||
|
||||
param set-default VM_MASS 1.5
|
||||
param set-default VM_INERTIA_XX 0.03
|
||||
param set-default VM_INERTIA_YY 0.03
|
||||
param set-default VM_INERTIA_ZZ 0.05
|
||||
|
||||
param set-default CA_AIRFRAME 0
|
||||
param set-default CA_METHOD 1
|
||||
param set-default CA_ACT0_MIN 0.0
|
||||
param set-default CA_ACT1_MIN 0.0
|
||||
param set-default CA_ACT2_MIN 0.0
|
||||
param set-default CA_ACT3_MIN 0.0
|
||||
param set-default CA_ACT0_MAX 1.0
|
||||
param set-default CA_ACT1_MAX 1.0
|
||||
param set-default CA_ACT2_MAX 1.0
|
||||
param set-default CA_ACT3_MAX 1.0
|
||||
|
||||
param set-default CA_MC_R0_PX 0.1515
|
||||
param set-default CA_MC_R0_PY 0.245
|
||||
param set-default CA_MC_R0_CT 6.5
|
||||
param set-default CA_MC_R0_KM 0.05
|
||||
param set-default CA_MC_R1_PX -0.1515
|
||||
param set-default CA_MC_R1_PY -0.1875
|
||||
param set-default CA_MC_R1_CT 6.5
|
||||
param set-default CA_MC_R1_KM 0.05
|
||||
param set-default CA_MC_R2_PX 0.1515
|
||||
param set-default CA_MC_R2_PY -0.245
|
||||
param set-default CA_MC_R2_CT 6.5
|
||||
param set-default CA_MC_R2_KM -0.05
|
||||
param set-default CA_MC_R3_PX -0.1515
|
||||
param set-default CA_MC_R3_PY 0.1875
|
||||
param set-default CA_MC_R3_CT 6.5
|
||||
param set-default CA_MC_R3_KM -0.05
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 0.1515
|
||||
param set-default CA_ROTOR0_PY 0.245
|
||||
param set-default CA_ROTOR0_KM 0.05
|
||||
param set-default CA_ROTOR1_PX -0.1515
|
||||
param set-default CA_ROTOR1_PY -0.1875
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 0.1515
|
||||
param set-default CA_ROTOR2_PY -0.245
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.1515
|
||||
param set-default CA_ROTOR3_PY 0.1875
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
#Set data link loss failsafe mode (0: disabled)
|
||||
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
#Set data link loss failsafe mode (0: disabled)
|
||||
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
|
||||
@@ -5,11 +5,66 @@
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
#Set data link loss failsafe mode (0: disabled)
|
||||
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
set PWM_OUT 12345678
|
||||
set MIXER_FILE etc/mixers-sitl/vectored6dof_sitl.main.mix
|
||||
set MIXER custom
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 7
|
||||
|
||||
param set-default CA_ROTOR_COUNT 8
|
||||
param set-default CA_R_REV 255
|
||||
param set-default CA_ROTOR0_AX 1.0000
|
||||
param set-default CA_ROTOR0_AY -1.0000
|
||||
param set-default CA_ROTOR0_AZ 0.0000
|
||||
param set-default CA_ROTOR0_KM 0.0000
|
||||
param set-default CA_ROTOR0_PX 0.5000
|
||||
param set-default CA_ROTOR0_PY 0.3000
|
||||
param set-default CA_ROTOR0_PZ 0.2000
|
||||
param set-default CA_ROTOR1_AX 1.0000
|
||||
param set-default CA_ROTOR1_AY 1.0000
|
||||
param set-default CA_ROTOR1_AZ 0.0000
|
||||
param set-default CA_ROTOR1_KM 0.0000
|
||||
param set-default CA_ROTOR1_PX 0.5000
|
||||
param set-default CA_ROTOR1_PY -0.3000
|
||||
param set-default CA_ROTOR1_PZ 0.2000
|
||||
param set-default CA_ROTOR2_AX 1.0000
|
||||
param set-default CA_ROTOR2_AY 1.0000
|
||||
param set-default CA_ROTOR2_AZ 0.0000
|
||||
param set-default CA_ROTOR2_KM 0.0000
|
||||
param set-default CA_ROTOR2_PX -0.5000
|
||||
param set-default CA_ROTOR2_PY 0.3000
|
||||
param set-default CA_ROTOR2_PZ 0.2000
|
||||
param set-default CA_ROTOR3_AX 1.0000
|
||||
param set-default CA_ROTOR3_AY -1.0000
|
||||
param set-default CA_ROTOR3_AZ 0.0000
|
||||
param set-default CA_ROTOR3_KM 0.0000
|
||||
param set-default CA_ROTOR3_PX -0.5000
|
||||
param set-default CA_ROTOR3_PY -0.3000
|
||||
param set-default CA_ROTOR3_PZ 0.2000
|
||||
param set-default CA_ROTOR4_AZ -1.0000
|
||||
param set-default CA_ROTOR4_KM 0.0000
|
||||
param set-default CA_ROTOR4_PX 0.5000
|
||||
param set-default CA_ROTOR4_PY 0.5000
|
||||
param set-default CA_ROTOR5_AZ 1.0000
|
||||
param set-default CA_ROTOR5_KM 0.0000
|
||||
param set-default CA_ROTOR5_PX 0.5000
|
||||
param set-default CA_ROTOR5_PY -0.5000
|
||||
param set-default CA_ROTOR6_AZ 1.0000
|
||||
param set-default CA_ROTOR6_KM 0.0000
|
||||
param set-default CA_ROTOR6_PX -0.5000
|
||||
param set-default CA_ROTOR6_PY 0.5000
|
||||
param set-default CA_ROTOR7_KM 0.0000
|
||||
param set-default CA_ROTOR7_PX -0.5000
|
||||
param set-default CA_ROTOR7_PY -0.5000
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
param set-default PWM_MAIN_FUNC5 105
|
||||
param set-default PWM_MAIN_FUNC6 106
|
||||
param set-default PWM_MAIN_FUNC7 107
|
||||
param set-default PWM_MAIN_FUNC8 108
|
||||
|
||||
set MIXER skip
|
||||
|
||||
|
||||
@@ -29,12 +29,9 @@ param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
|
||||
param set-default FW_T_ALT_TC 2
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_HRATE_FF 0.5
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
param set-default FW_T_TAS_TC 2
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
@@ -46,5 +43,32 @@ param set-default NAV_DLL_ACT 2
|
||||
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
#param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 1
|
||||
|
||||
param set-default CA_ROTOR_COUNT 1
|
||||
param set-default CA_ROTOR0_PX 0.3
|
||||
|
||||
param set-default CA_SV_CS_COUNT 6
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
param set-default CA_SV_CS0_TYPE 1
|
||||
param set-default CA_SV_CS1_TRQ_R 0.5
|
||||
param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS3_TRQ_Y 1.0
|
||||
param set-default CA_SV_CS3_TYPE 4
|
||||
param set-default CA_SV_CS4_TYPE 9
|
||||
param set-default CA_SV_CS5_TYPE 10
|
||||
param set-default PWM_MAIN_FUNC3 204
|
||||
param set-default PWM_MAIN_FUNC4 205
|
||||
param set-default PWM_MAIN_FUNC5 101
|
||||
param set-default PWM_MAIN_FUNC6 201
|
||||
param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
|
||||
set MIXER custom
|
||||
|
||||
@@ -7,6 +7,39 @@
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
# param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 2
|
||||
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 0.1515
|
||||
param set-default CA_ROTOR0_PY 0.245
|
||||
param set-default CA_ROTOR0_KM 0.05
|
||||
param set-default CA_ROTOR1_PX -0.1515
|
||||
param set-default CA_ROTOR1_PY -0.1875
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 0.1515
|
||||
param set-default CA_ROTOR2_PY -0.245
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.1515
|
||||
param set-default CA_ROTOR3_PY 0.1875
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
param set-default CA_SV_CS_COUNT 3
|
||||
param set-default CA_SV_CS0_TYPE 1
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS1_TRQ_R 0.5
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
param set-default PWM_MAIN_FUNC5 105
|
||||
param set-default PWM_MAIN_FUNC6 201
|
||||
param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
param set-default FW_MAN_P_MAX 30
|
||||
param set-default FW_PR_FF 0.2
|
||||
@@ -19,12 +52,9 @@ param set-default FW_RR_P 0.3
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_T_ALT_TC 2
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_HRATE_FF 0.5
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
param set-default FW_T_TAS_TC 2
|
||||
|
||||
param set-default MC_ROLLRATE_P 0.3
|
||||
param set-default MC_YAW_P 1.6
|
||||
|
||||
@@ -7,14 +7,48 @@
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
# param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 4
|
||||
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 1
|
||||
param set-default CA_ROTOR0_PY 2
|
||||
param set-default CA_ROTOR0_KM 0.05
|
||||
param set-default CA_ROTOR1_PX -1
|
||||
param set-default CA_ROTOR1_PY -1
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 1
|
||||
param set-default CA_ROTOR2_PY -1
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -1
|
||||
param set-default CA_ROTOR3_PY 1
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
param set-default CA_SV_CS_COUNT 2
|
||||
param set-default CA_SV_CS0_TYPE 5
|
||||
param set-default CA_SV_CS0_TRQ_P 0.5
|
||||
param set-default CA_SV_CS0_TRQ_Y -0.5
|
||||
param set-default CA_SV_CS1_TYPE 6
|
||||
param set-default CA_SV_CS1_TRQ_P 0.5
|
||||
param set-default CA_SV_CS1_TRQ_Y 0.5
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
param set-default PWM_MAIN_FUNC5 0
|
||||
param set-default PWM_MAIN_FUNC6 201
|
||||
param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_REV 96 # invert both elevons
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
param set-default FW_MAN_P_MAX 30
|
||||
param set-default FW_PR_I 0.2
|
||||
param set-default FW_PR_P 0.3
|
||||
param set-default FW_PR_P 0.2
|
||||
param set-default FW_PSP_OFF 2
|
||||
param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
param set-default FW_RR_P 0.3
|
||||
param set-default FW_RR_P 0.2
|
||||
param set-default FW_THR_CRUISE 0.33
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
@@ -36,6 +70,8 @@ param set-default MPC_XY_VEL_D_ACC 0.1
|
||||
param set-default NAV_ACC_RAD 5
|
||||
param set-default NAV_LOITER_RAD 80
|
||||
|
||||
param set-default VT_FW_DIFTHR_EN 1
|
||||
param set-default VT_FW_DIFTHR_SC 0.5
|
||||
param set-default VT_F_TRANS_DUR 1.5
|
||||
param set-default VT_F_TRANS_THR 0.7
|
||||
param set-default VT_TYPE 0
|
||||
|
||||
@@ -7,6 +7,52 @@
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
# param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 3
|
||||
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 0.1515
|
||||
param set-default CA_ROTOR0_PY 0.245
|
||||
param set-default CA_ROTOR0_KM 0.05
|
||||
param set-default CA_ROTOR1_PX -0.1515
|
||||
param set-default CA_ROTOR1_PY -0.1875
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 0.1515
|
||||
param set-default CA_ROTOR2_PY -0.245
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.1515
|
||||
param set-default CA_ROTOR3_PY 0.1875
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
param set-default CA_ROTOR0_TILT 1
|
||||
param set-default CA_ROTOR1_TILT 2
|
||||
param set-default CA_ROTOR2_TILT 3
|
||||
param set-default CA_ROTOR3_TILT 4
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
param set-default CA_SV_CS0_TYPE 1
|
||||
param set-default CA_SV_CS1_TRQ_R 0.5
|
||||
param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS_COUNT 3
|
||||
param set-default CA_SV_TL0_CT 0
|
||||
param set-default CA_SV_TL1_CT 0
|
||||
param set-default CA_SV_TL2_CT 0
|
||||
param set-default CA_SV_TL3_CT 0
|
||||
param set-default CA_SV_TL_COUNT 4
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
param set-default PWM_MAIN_FUNC5 204
|
||||
param set-default PWM_MAIN_FUNC6 205
|
||||
param set-default PWM_MAIN_FUNC7 206
|
||||
param set-default PWM_MAIN_FUNC8 207
|
||||
param set-default PWM_MAIN_FUNC9 201
|
||||
param set-default PWM_MAIN_FUNC10 202
|
||||
param set-default PWM_MAIN_FUNC11 203
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
param set-default FW_MAN_P_MAX 30
|
||||
param set-default FW_PR_FF 0.2
|
||||
@@ -19,12 +65,9 @@ param set-default FW_RR_P 0.3
|
||||
param set-default FW_THR_CRUISE 0.38
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_T_ALT_TC 2
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_HRATE_FF 0.5
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
param set-default FW_T_TAS_TC 2
|
||||
|
||||
param set-default MC_YAW_P 1.6
|
||||
|
||||
|
||||
@@ -28,6 +28,15 @@ param set-default CBRK_AIRSPD_CHK 162128
|
||||
param set-default GND_MAX_ANG 0.6
|
||||
param set-default GND_WHEEL_BASE 2.0
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 5
|
||||
|
||||
param set-default CA_R_REV 1
|
||||
param set-default PWM_MAIN_FUNC1 201
|
||||
param set-default PWM_MAIN_FUNC2 201
|
||||
param set-default PWM_MAIN_FUNC6 101
|
||||
param set-default PWM_MAIN_FUNC7 101
|
||||
|
||||
set MAV_TYPE 10
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/rover_ackermann_sitl.main.mix
|
||||
set MIXER_FILE skip
|
||||
|
||||
@@ -28,6 +28,15 @@ param set-default CBRK_AIRSPD_CHK 162128
|
||||
param set-default GND_MAX_ANG 0.6
|
||||
param set-default GND_WHEEL_BASE 2.0
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 6
|
||||
|
||||
param set-default CA_R_REV 3
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 101
|
||||
param set-default PWM_MAIN_FUNC6 102
|
||||
param set-default PWM_MAIN_FUNC7 102
|
||||
|
||||
set MAV_TYPE 10
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/rover_diff_sitl.main.mix
|
||||
set MIXER_FILE skip
|
||||
|
||||
@@ -28,6 +28,25 @@ param set-default CBRK_AIRSPD_CHK 162128
|
||||
param set-default GND_MAX_ANG 0.6
|
||||
param set-default GND_WHEEL_BASE 2.0
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 9
|
||||
|
||||
param set-default CA_ROTOR_COUNT 2
|
||||
param set-default CA_ROTOR0_AX 1
|
||||
param set-default CA_ROTOR0_AZ 0
|
||||
param set-default CA_ROTOR0_KM 0
|
||||
param set-default CA_ROTOR0_PX -2
|
||||
param set-default CA_ROTOR0_PY -1
|
||||
param set-default CA_ROTOR1_AX 1
|
||||
param set-default CA_ROTOR1_AZ 0
|
||||
param set-default CA_ROTOR1_KM 0
|
||||
param set-default CA_ROTOR1_PX -2
|
||||
param set-default CA_ROTOR1_PY 1
|
||||
param set-default CA_R_REV 3
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
|
||||
set MAV_TYPE 11
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/boat_sitl.main.mix
|
||||
set MIXER skip
|
||||
|
||||
@@ -11,5 +11,31 @@
|
||||
|
||||
. ${R}etc/init.d/rc.airship_defaults
|
||||
|
||||
set MIXER cloudship
|
||||
set PWM_OUT 1234
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 9
|
||||
|
||||
param set-default CA_ROTOR_COUNT 3
|
||||
param set-default CA_ROTOR0_AX 1.0000
|
||||
param set-default CA_ROTOR0_AZ 0.0000
|
||||
param set-default CA_ROTOR0_KM 0.0000
|
||||
param set-default CA_ROTOR0_PY 2.0000
|
||||
param set-default CA_ROTOR1_AX 1.0000
|
||||
param set-default CA_ROTOR1_AZ 0.0000
|
||||
param set-default CA_ROTOR1_KM 0.0000
|
||||
param set-default CA_ROTOR1_PY -2.0000
|
||||
param set-default CA_ROTOR2_AY -1.0000
|
||||
param set-default CA_ROTOR2_AZ 0.0000
|
||||
param set-default CA_ROTOR2_KM 0.0000
|
||||
param set-default CA_ROTOR2_PX -10.0000
|
||||
|
||||
param set-default CA_SV_CS_COUNT 1
|
||||
param set-default CA_SV_CS0_TRQ_P 1.0000
|
||||
|
||||
param set-default CA_R_REV 7
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 201
|
||||
param set-default PWM_MAIN_FUNC4 103
|
||||
|
||||
set MIXER skip
|
||||
|
||||
@@ -29,52 +29,27 @@ param set-default TRIG_MODE 4
|
||||
param set-default MNT_MODE_IN 0
|
||||
param set-default MAV_PROTO_VER 2
|
||||
|
||||
param set-default MPC_USE_HTE 0
|
||||
|
||||
param set-default VM_MASS 2.66
|
||||
param set-default VM_INERTIA_XX 0.06
|
||||
param set-default VM_INERTIA_YY 0.06
|
||||
param set-default VM_INERTIA_ZZ 0.10
|
||||
|
||||
param set-default CA_AIRFRAME 0
|
||||
param set-default CA_METHOD 1
|
||||
param set-default CA_ACT0_MIN 0.0
|
||||
param set-default CA_ACT1_MIN 0.0
|
||||
param set-default CA_ACT2_MIN 0.0
|
||||
param set-default CA_ACT3_MIN 0.0
|
||||
param set-default CA_ACT4_MIN 0.0
|
||||
param set-default CA_ACT5_MIN 0.0
|
||||
param set-default CA_ACT0_MAX 1.0
|
||||
param set-default CA_ACT1_MAX 1.0
|
||||
param set-default CA_ACT2_MAX 1.0
|
||||
param set-default CA_ACT3_MAX 1.0
|
||||
param set-default CA_ACT4_MAX 1.0
|
||||
param set-default CA_ACT5_MAX 1.0
|
||||
param set-default CA_ROTOR_COUNT 6
|
||||
|
||||
param set-default CA_MC_R0_PX 0.0
|
||||
param set-default CA_MC_R0_PY 1.0
|
||||
param set-default CA_MC_R0_CT 9.5
|
||||
param set-default CA_MC_R0_KM -0.05
|
||||
param set-default CA_MC_R1_PX 0.0
|
||||
param set-default CA_MC_R1_PY -1.0
|
||||
param set-default CA_MC_R1_CT 9.5
|
||||
param set-default CA_MC_R1_KM 0.05
|
||||
param set-default CA_MC_R2_PX 0.866025
|
||||
param set-default CA_MC_R2_PY -0.5
|
||||
param set-default CA_MC_R2_CT 9.5
|
||||
param set-default CA_MC_R2_KM -0.05
|
||||
param set-default CA_MC_R3_PX -0.866025
|
||||
param set-default CA_MC_R3_PY 0.5
|
||||
param set-default CA_MC_R3_CT 9.5
|
||||
param set-default CA_MC_R3_KM 0.05
|
||||
param set-default CA_MC_R4_PX 0.866025
|
||||
param set-default CA_MC_R4_PY 0.5
|
||||
param set-default CA_MC_R4_CT 9.5
|
||||
param set-default CA_MC_R4_KM 0.05
|
||||
param set-default CA_MC_R5_PX -0.866025
|
||||
param set-default CA_MC_R5_PY -0.5
|
||||
param set-default CA_MC_R5_CT 9.5
|
||||
param set-default CA_MC_R5_KM -0.05
|
||||
param set-default CA_ROTOR0_PX 0.0
|
||||
param set-default CA_ROTOR0_PY 1.0
|
||||
param set-default CA_ROTOR0_KM -0.05
|
||||
param set-default CA_ROTOR1_PX 0.0
|
||||
param set-default CA_ROTOR1_PY -1.0
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 0.866025
|
||||
param set-default CA_ROTOR2_PY -0.5
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.866025
|
||||
param set-default CA_ROTOR3_PY 0.5
|
||||
param set-default CA_ROTOR3_KM 0.05
|
||||
param set-default CA_ROTOR4_PX 0.866025
|
||||
param set-default CA_ROTOR4_PY 0.5
|
||||
param set-default CA_ROTOR4_KM 0.05
|
||||
param set-default CA_ROTOR5_PX -0.866025
|
||||
param set-default CA_ROTOR5_PY -0.5
|
||||
param set-default CA_ROTOR5_KM -0.05
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
|
||||
@@ -10,7 +10,7 @@ fi
|
||||
|
||||
if [ ! -f replay_params.txt ]; then
|
||||
echo "Creating $(pwd)/replay_params.txt"
|
||||
ulog_params -i "${replay}" -d ' ' | grep -e '^EKF2' > replay_params.txt
|
||||
ulog_params -i "${replay}" -l ' ' | grep -e '^EKF2' > replay_params.txt
|
||||
fi
|
||||
|
||||
publisher_rules_file="orb_publisher.rules"
|
||||
@@ -21,6 +21,7 @@ ignore_others: false
|
||||
EOF
|
||||
|
||||
param set SDLOG_DIRS_MAX 7
|
||||
param set SDLOG_PROFILE 3
|
||||
|
||||
# apply all params before ekf starts, as some params cannot be changed after startup
|
||||
replay tryapplyparams
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# PX4 commands need the 'px4-' prefix in bash.
|
||||
# (px4-alias.sh is expected to be in the PATH)
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
@@ -35,6 +35,6 @@ param set-default MC_YAWRATE_P 0.25
|
||||
param set-default MC_YAWRATE_I 0.25
|
||||
|
||||
param set-default BAT1_V_DIV 12.27559
|
||||
param set-default BAT1_A_PER_V 15.39103
|
||||
param set-default BAT1_A_PER_V 15.391030303103
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
|
||||
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
|
||||
param set SYS_HITL 2
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
set MIXER AERT
|
||||
set PWM_OUT 1234
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
|
||||
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
|
||||
param set-default SYS_HITL 2
|
||||
|
||||
@@ -38,3 +40,4 @@ param set SIH_IXZ 0.00046
|
||||
param set SIH_KDV 0.2
|
||||
|
||||
param set SIH_VEHICLE_TYPE 1 # sih as fixed wing
|
||||
param set RWTO_TKOFF 1 # enable takeoff from runway (as opposed to launched)
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name SIH Tailsitter Duo
|
||||
#
|
||||
# @type Simulation
|
||||
# @class VTOL
|
||||
#
|
||||
# @output MAIN1 motor right
|
||||
# @output MAIN2 motor left
|
||||
# @output MAIN5 elevon right
|
||||
# @output MAIN6 elevon left
|
||||
#
|
||||
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_MOT_COUNT 2
|
||||
param set-default VT_TYPE 0
|
||||
param set-default VT_FW_DIFTHR_EN 1
|
||||
param set-default VT_FW_DIFTHR_SC 0.3
|
||||
param set-default MPC_MAN_Y_MAX 60
|
||||
param set-default MC_PITCH_P 5
|
||||
|
||||
param set-default MAV_TYPE 19
|
||||
set MAV_TYPE 19
|
||||
set MIXER vtol_tailsitter_duo_sat
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
|
||||
param set-default SYS_HITL 2
|
||||
|
||||
# disable some checks to allow to fly:
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
# - without real battery
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default COM_PREARM_MODE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set SIH_T_MAX 2.0
|
||||
param set SIH_Q_MAX 0.0165
|
||||
param set SIH_MASS 0.2
|
||||
# IXX and IZZ are inverted from the thesis as the body frame is pitched by 90 deg
|
||||
param set SIH_IXX 0.00354
|
||||
param set SIH_IYY 0.000625
|
||||
param set SIH_IZZ 0.00300
|
||||
param set SIH_IXZ 0.0
|
||||
param set SIH_KDV 0.2
|
||||
param set SIH_L_ROLL 0.145
|
||||
|
||||
# sih as tailsitter
|
||||
param set SIH_VEHICLE_TYPE 2
|
||||
@@ -64,7 +64,6 @@ param set-default FW_BAT_SCALE_EN 1
|
||||
param set-default FW_THR_ALT_SCL 2.7
|
||||
param set-default FW_T_RLL2THR 20
|
||||
|
||||
param set-default LNDMC_ALT_MAX 9999
|
||||
param set-default LNDMC_XY_VEL_MAX 1
|
||||
param set-default LNDMC_Z_VEL_MAX 0.7
|
||||
|
||||
|
||||
@@ -17,40 +17,21 @@ set MIXER_AUX none
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
|
||||
param set-default MPC_USE_HTE 0
|
||||
|
||||
param set-default VM_MASS 1.5
|
||||
param set-default VM_INERTIA_XX 0.03
|
||||
param set-default VM_INERTIA_YY 0.03
|
||||
param set-default VM_INERTIA_ZZ 0.05
|
||||
|
||||
param set-default CA_AIRFRAME 0
|
||||
param set-default CA_METHOD 1
|
||||
param set-default CA_ACT0_MIN 0.0
|
||||
param set-default CA_ACT1_MIN 0.0
|
||||
param set-default CA_ACT2_MIN 0.0
|
||||
param set-default CA_ACT3_MIN 0.0
|
||||
param set-default CA_ACT0_MAX 1.0
|
||||
param set-default CA_ACT1_MAX 1.0
|
||||
param set-default CA_ACT2_MAX 1.0
|
||||
param set-default CA_ACT3_MAX 1.0
|
||||
|
||||
param set-default CA_MC_R0_PX 0.177
|
||||
param set-default CA_MC_R0_PY 0.177
|
||||
param set-default CA_MC_R0_CT 6.5
|
||||
param set-default CA_MC_R0_KM 0.05
|
||||
param set-default CA_MC_R1_PX -0.177
|
||||
param set-default CA_MC_R1_PY -0.177
|
||||
param set-default CA_MC_R1_CT 6.5
|
||||
param set-default CA_MC_R1_KM 0.05
|
||||
param set-default CA_MC_R2_PX 0.177
|
||||
param set-default CA_MC_R2_PY -0.177
|
||||
param set-default CA_MC_R2_CT 6.5
|
||||
param set-default CA_MC_R2_KM -0.05
|
||||
param set-default CA_MC_R3_PX -0.177
|
||||
param set-default CA_MC_R3_PY 0.177
|
||||
param set-default CA_MC_R3_CT 6.5
|
||||
param set-default CA_MC_R3_KM -0.05
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 0.177
|
||||
param set-default CA_ROTOR0_PY 0.177
|
||||
param set-default CA_ROTOR0_KM 0.05
|
||||
param set-default CA_ROTOR1_PX -0.177
|
||||
param set-default CA_ROTOR1_PY -0.177
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 0.177
|
||||
param set-default CA_ROTOR2_PY -0.177
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.177
|
||||
param set-default CA_ROTOR3_PY 0.177
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Holybro X500 V2
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Farhang Naderi <farhang.nba@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default IMU_GYRO_CUTOFF 30
|
||||
|
||||
param set-default MC_ROLLRATE_P 0.14
|
||||
param set-default MC_PITCHRATE_P 0.14
|
||||
param set-default MC_ROLLRATE_I 0.3
|
||||
param set-default MC_PITCHRATE_I 0.3
|
||||
param set-default MC_ROLLRATE_D 0.004
|
||||
param set-default MC_PITCHRATE_D 0.004
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER none
|
||||
set MIXER_AUX none
|
||||
# We set the mixer and ESC manually.
|
||||
set MIXER skip
|
||||
set MIXER_AUX skip
|
||||
set MIXER_FILE ""
|
||||
|
||||
# Battery settings
|
||||
param set-default BAT_CRIT_THR 0.20
|
||||
@@ -33,12 +35,13 @@ param set-default CBRK_SUPPLY_CHK 894281
|
||||
|
||||
param set-default COM_DISARM_LAND 0.1
|
||||
param set-default COM_DISARM_PRFLT 3
|
||||
param set-default COM_FLTMODE1 -1
|
||||
param set-default COM_DL_LOSS_T 10
|
||||
param set-default COM_FLTMODE1 2
|
||||
param set-default COM_FLTMODE2 -1
|
||||
param set-default COM_FLTMODE3 -1
|
||||
param set-default COM_FLTMODE4 2
|
||||
param set-default COM_FLTMODE4 -1
|
||||
param set-default COM_FLTMODE5 -1
|
||||
param set-default COM_FLTMODE6 6
|
||||
param set-default COM_FLTMODE6 1
|
||||
param set-default COM_RC_LOSS_T 3
|
||||
|
||||
|
||||
@@ -68,6 +71,9 @@ param set-default EKF2_OF_GATE 2.0
|
||||
param set-default EKF2_OF_POS_X -0.035
|
||||
param set-default EKF2_OF_POS_Y 0.0
|
||||
param set-default EKF2_OF_POS_Z 0.033
|
||||
param set-default EKF2_OF_MIN_RNG 0.01
|
||||
param set-default EKF2_OF_A_HMAX 7.0
|
||||
param set-default EKF2_OF_QMIN 30
|
||||
|
||||
param set-default EKF2_PCOEF_XN -0.3
|
||||
param set-default EKF2_PCOEF_XP -0.4
|
||||
@@ -142,57 +148,30 @@ param set-default MPC_Z_VEL_P 0.27
|
||||
|
||||
# gimbal configuration
|
||||
param set-default MNT_MODE_IN 1
|
||||
param set-default MNT_MODE_OUT 2
|
||||
param set-default MNT_MAN_PITCH 1
|
||||
|
||||
param set-default MNT_MODE_OUT 1
|
||||
param set-default MNT_MAN_PITCH 2
|
||||
param set-default MNT_RC_IN_MODE 1
|
||||
param set-default MNT_RATE_PITCH 30
|
||||
|
||||
# RC
|
||||
param set-default RC_CHAN_CNT 12
|
||||
|
||||
param set-default RC_MAP_THROTTLE 1
|
||||
param set-default RC_MAP_ROLL 2
|
||||
param set-default RC_MAP_YAW 2
|
||||
param set-default RC_MAP_PITCH 3
|
||||
param set-default RC_MAP_YAW 4
|
||||
param set-default RC_MAP_FLTMODE 5
|
||||
param set-default RC_MAP_AUX1 7
|
||||
|
||||
param set-default RC1_DZ 10
|
||||
param set-default RC1_MAX 3413
|
||||
param set-default RC1_MIN 683
|
||||
param set-default RC1_REV 1
|
||||
param set-default RC1_TRIM 683
|
||||
param set-default RC2_DZ 10
|
||||
param set-default RC2_MAX 3413
|
||||
param set-default RC2_MIN 683
|
||||
param set-default RC2_REV -1
|
||||
param set-default RC2_TRIM 2048
|
||||
param set-default RC3_DZ 10
|
||||
param set-default RC3_MAX 3413
|
||||
param set-default RC3_MIN 683
|
||||
param set-default RC3_REV 1
|
||||
param set-default RC3_TRIM 2048
|
||||
param set-default RC4_DZ 10
|
||||
param set-default RC4_MAX 3413
|
||||
param set-default RC4_MIN 683
|
||||
param set-default RC4_REV -1
|
||||
param set-default RC4_TRIM 2048
|
||||
param set-default RC5_DZ 10
|
||||
param set-default RC5_MAX 3414
|
||||
param set-default RC5_MIN 2048
|
||||
param set-default RC5_REV 1
|
||||
param set-default RC5_TRIM 2048
|
||||
param set-default RC7_DZ 10
|
||||
param set-default RC7_MAX 3413
|
||||
param set-default RC7_MIN 683
|
||||
param set-default RC7_REV 1
|
||||
param set-default RC7_TRIM 2048
|
||||
param set-default RC_MAP_ROLL 4
|
||||
param set-default RC_MAP_AUX2 5
|
||||
param set-default RC_MAP_AUX3 10
|
||||
param set-default RC_MAP_AUX4 8
|
||||
param set-default RC_MAP_FLTMODE 6
|
||||
param set-default RC1_TRIM 1000
|
||||
|
||||
|
||||
# optical flow
|
||||
param set-default SENS_FLOW_MAXR 7.4
|
||||
param set-default SENS_FLOW_MINHGT 0.15
|
||||
param set-default SENS_FLOW_MAXHGT 5.0
|
||||
param set-default SENS_FLOW_ROT 4
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
|
||||
|
||||
mixer load /dev/tap_esc /etc/mixers/quad_x.main.mix
|
||||
# ignore the SD card errors and use normal startup sound
|
||||
set STARTUP_TUNE "1"
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
|
||||
#Set data link loss failsafe mode (0: disabled)
|
||||
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
|
||||
#Set data link loss failsafe mode (0: disabled)
|
||||
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
#Set data link loss failsafe mode (0: disabled)
|
||||
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
@@ -13,58 +13,33 @@
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default MPC_USE_HTE 0
|
||||
|
||||
param set-default VM_MASS 1.5
|
||||
param set-default VM_INERTIA_XX 0.03
|
||||
param set-default VM_INERTIA_YY 0.03
|
||||
param set-default VM_INERTIA_ZZ 0.05
|
||||
|
||||
param set-default CA_AIRFRAME 0
|
||||
param set-default CA_METHOD 1
|
||||
param set-default CA_ACT0_MIN 0.0
|
||||
param set-default CA_ACT1_MIN 0.0
|
||||
param set-default CA_ACT2_MIN 0.0
|
||||
param set-default CA_ACT3_MIN 0.0
|
||||
param set-default CA_ACT4_MIN 0.0
|
||||
param set-default CA_ACT5_MIN 0.0
|
||||
param set-default CA_ROTOR_COUNT 6
|
||||
|
||||
param set-default CA_ACT0_MAX 1.0
|
||||
param set-default CA_ACT1_MAX 1.0
|
||||
param set-default CA_ACT2_MAX 1.0
|
||||
param set-default CA_ACT3_MAX 1.0
|
||||
param set-default CA_ACT4_MAX 1.0
|
||||
param set-default CA_ACT5_MAX 1.0
|
||||
param set-default CA_ROTOR0_PX 0.0
|
||||
param set-default CA_ROTOR0_PY 0.275
|
||||
param set-default CA_ROTOR0_KM -0.05
|
||||
|
||||
param set-default CA_MC_R0_PX 0.0
|
||||
param set-default CA_MC_R0_PY 0.275
|
||||
param set-default CA_MC_R0_CT 6.5
|
||||
param set-default CA_MC_R0_KM -0.05
|
||||
param set-default CA_ROTOR1_PX 0.0
|
||||
param set-default CA_ROTOR1_PY -0.275
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
|
||||
param set-default CA_MC_R1_PX 0.0
|
||||
param set-default CA_MC_R1_PY -0.275
|
||||
param set-default CA_MC_R1_CT 6.5
|
||||
param set-default CA_MC_R1_KM 0.05
|
||||
param set-default CA_ROTOR2_PX 0.238
|
||||
param set-default CA_ROTOR2_PY -0.1375
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
|
||||
param set-default CA_MC_R2_PX 0.238
|
||||
param set-default CA_MC_R2_PY -0.1375
|
||||
param set-default CA_MC_R2_CT 6.5
|
||||
param set-default CA_MC_R2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.238
|
||||
param set-default CA_ROTOR3_PY 0.1375
|
||||
param set-default CA_ROTOR3_KM 0.05
|
||||
|
||||
param set-default CA_MC_R3_PX -0.238
|
||||
param set-default CA_MC_R3_PY 0.1375
|
||||
param set-default CA_MC_R3_CT 6.5
|
||||
param set-default CA_MC_R3_KM 0.05
|
||||
param set-default CA_ROTOR4_PX 0.238
|
||||
param set-default CA_ROTOR4_PY 0.1375
|
||||
param set-default CA_ROTOR4_KM 0.05
|
||||
|
||||
param set-default CA_MC_R4_PX 0.238
|
||||
param set-default CA_MC_R4_PY 0.1375
|
||||
param set-default CA_MC_R4_CT 6.5
|
||||
param set-default CA_MC_R4_KM 0.05
|
||||
|
||||
param set-default CA_MC_R5_PX -0.238
|
||||
param set-default CA_MC_R5_PY -0.1375
|
||||
param set-default CA_MC_R5_CT 6.5
|
||||
param set-default CA_MC_R5_KM -0.05
|
||||
param set-default CA_ROTOR5_PX -0.238
|
||||
param set-default CA_ROTOR5_PY -0.1375
|
||||
param set-default CA_ROTOR5_KM -0.05
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
|
||||
@@ -40,6 +40,7 @@ px4_add_romfs_files(
|
||||
1002_standard_vtol.hil
|
||||
1100_rc_quad_x_sih.hil
|
||||
1101_rc_plane_sih.hil
|
||||
1102_tailsitter_duo_sih.hil
|
||||
|
||||
# [2000, 2999] Standard planes"
|
||||
2100_standard_plane
|
||||
@@ -72,6 +73,7 @@ px4_add_romfs_files(
|
||||
4016_holybro_px4vision
|
||||
4017_nxp_hovergames
|
||||
4018_s500_ctrlalloc
|
||||
4019_x500_v2
|
||||
4030_3dr_solo
|
||||
4031_3dr_quad
|
||||
4040_reaper
|
||||
|
||||
@@ -48,6 +48,14 @@ fi
|
||||
# End Estimator Group Selection #
|
||||
###############################################################################
|
||||
|
||||
if param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
#
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
fi
|
||||
|
||||
#
|
||||
# Start Airship Attitude Controller.
|
||||
#
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
#
|
||||
ekf2 start &
|
||||
|
||||
if param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
#
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
fi
|
||||
|
||||
#
|
||||
# Start attitude controller.
|
||||
#
|
||||
|
||||
@@ -18,8 +18,17 @@ set OUTPUT_AUX_DEV /dev/pwm_output1
|
||||
set OUTPUT_EXTRA_DEV /dev/pwm_output0
|
||||
|
||||
# set these before starting the modules
|
||||
param set PWM_AUX_OUT ${PWM_AUX_OUT}
|
||||
param set PWM_MAIN_OUT ${PWM_OUT}
|
||||
if [ $PWM_AUX_OUT != none ]
|
||||
then
|
||||
|
||||
param set PWM_AUX_OUT ${PWM_AUX_OUT}
|
||||
fi
|
||||
|
||||
|
||||
if [ $PWM_OUT != none ]
|
||||
then
|
||||
param set PWM_MAIN_OUT ${PWM_OUT}
|
||||
fi
|
||||
|
||||
#
|
||||
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
|
||||
@@ -36,7 +45,7 @@ fi
|
||||
#
|
||||
# Set the default output mode if none was set.
|
||||
#
|
||||
if [ $OUTPUT_MODE = none ]
|
||||
if [ $OUTPUT_MODE = none -a $OUTPUT_MODE != skip ]
|
||||
then
|
||||
if [ $USE_IO = yes ]
|
||||
then
|
||||
@@ -63,7 +72,7 @@ fi
|
||||
#
|
||||
# If OUTPUT_MODE = none then something is wrong with setup and we shouldn't try to enable output.
|
||||
#
|
||||
if [ $OUTPUT_MODE != none ]
|
||||
if [ $OUTPUT_MODE != none -a $OUTPUT_MODE != skip ]
|
||||
then
|
||||
|
||||
if [ $OUTPUT_MODE = hil -o $OUTPUT_MODE = sim ]
|
||||
|
||||
@@ -54,14 +54,6 @@ then
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
|
||||
#
|
||||
# Disable hover thrust estimator and prearming
|
||||
# These features are currently incompatible with control allocation
|
||||
#
|
||||
# TODO: fix
|
||||
#
|
||||
param set MPC_USE_HTE 0
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
|
||||
set VEHICLE_TYPE mc
|
||||
|
||||
param set-default IMU_GYRO_RATEMAX 800
|
||||
if param compare IMU_GYRO_RATEMAX 400
|
||||
then
|
||||
param set-default IMU_GYRO_RATEMAX 800
|
||||
fi
|
||||
|
||||
param set-default NAV_ACC_RAD 2
|
||||
|
||||
|
||||
@@ -12,6 +12,13 @@ ekf2 start &
|
||||
#attitude_estimator_q start
|
||||
#local_position_estimator start
|
||||
|
||||
if param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
#
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
fi
|
||||
|
||||
#
|
||||
# Start attitude controllers.
|
||||
|
||||
@@ -4,19 +4,6 @@
|
||||
#
|
||||
# NOTE: Script variables are declared/initialized/unset in the rcS script.
|
||||
#
|
||||
|
||||
if ! ver hwcmp OMNIBUS_F4SD
|
||||
then
|
||||
if ! ver hwcmp BITCRAZE_CRAZYFLIE
|
||||
then
|
||||
# Configure all I2C buses to 100 KHz as they
|
||||
# are all external or slow
|
||||
# TODO: move this
|
||||
pwm_out i2c 1 100000
|
||||
pwm_out i2c 2 100000
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# Begin Optional drivers #
|
||||
###############################################################################
|
||||
@@ -143,6 +130,13 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# SHT3x temperature and hygrometer sensor, external I2C
|
||||
if param compare -s SENS_EN_SHT3X 1
|
||||
then
|
||||
sht3x start -X
|
||||
sht3x start -X -a 0x45
|
||||
fi
|
||||
|
||||
# TE MS4525 differential pressure sensor external I2C
|
||||
if param compare -s SENS_EN_MS4525 1
|
||||
then
|
||||
|
||||
@@ -15,6 +15,14 @@ ekf2 start &
|
||||
# End Estimator Group Selection #
|
||||
###############################################################################
|
||||
|
||||
if param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
#
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
fi
|
||||
|
||||
#
|
||||
# Start UUV Attitude Controller.
|
||||
#
|
||||
|
||||
@@ -15,6 +15,14 @@ ekf2 start &
|
||||
# End Estimator group selection #
|
||||
###############################################################################
|
||||
|
||||
if param compare SYS_CTRL_ALLOC 1
|
||||
then
|
||||
#
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
fi
|
||||
|
||||
airspeed_selector start
|
||||
|
||||
vtol_att_control start
|
||||
|
||||
@@ -35,7 +35,7 @@ set MIXER_AUX none
|
||||
set MIXER_FILE none
|
||||
set MIXER_EXTRA none
|
||||
set OUTPUT_MODE none
|
||||
set PARAM_FILE /fs/microsd/params
|
||||
set PARAM_FILE ""
|
||||
set PWM_OUT none
|
||||
set PWM_MAIN_RATE p:PWM_MAIN_RATE
|
||||
set PWM_AUX_OUT none
|
||||
@@ -46,6 +46,7 @@ set EXTRA_MIXER_MODE none
|
||||
set RC_INPUT_ARGS ""
|
||||
set SDCARD_AVAILABLE no
|
||||
set SDCARD_EXT_PATH /fs/microsd/ext_autostart
|
||||
set SDCARD_FORMAT no
|
||||
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
||||
set STARTUP_TUNE 1
|
||||
set USE_IO no
|
||||
@@ -59,51 +60,56 @@ ver all
|
||||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
# REBOOTWORK this needs to start after the flight control loop.
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
if [ -b "/dev/mmcsd0" ]
|
||||
then
|
||||
set PX4_INIT_TEST_FILE "/fs/microsd/.px4_init_test_file"
|
||||
date >> $PX4_INIT_TEST_FILE
|
||||
|
||||
if [ -f $PX4_INIT_TEST_FILE ]
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
cat $PX4_INIT_TEST_FILE
|
||||
rm $PX4_INIT_TEST_FILE
|
||||
|
||||
if [ ! -f $PX4_INIT_TEST_FILE ]
|
||||
if [ -f "/fs/microsd/.format" ]
|
||||
then
|
||||
echo "INFO [init] format /dev/mmcsd0 requested (/fs/microsd/.format)"
|
||||
set SDCARD_FORMAT yes
|
||||
rm /fs/microsd/.format
|
||||
umount /fs/microsd
|
||||
|
||||
else
|
||||
set SDCARD_AVAILABLE yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = no ]
|
||||
then
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
if mkfatfs -F 32 /dev/mmcsd0
|
||||
if [ $SDCARD_AVAILABLE = no -o $SDCARD_FORMAT = yes ]
|
||||
then
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
echo "INFO [init] formatting /dev/mmcsd0"
|
||||
set STARTUP_TUNE 15 # tune 15 = SD_ERROR (overridden to SD_INIT if format + mount succeeds)
|
||||
|
||||
if mkfatfs -F 32 /dev/mmcsd0
|
||||
then
|
||||
set SDCARD_AVAILABLE yes
|
||||
echo "INFO [init] card formatted"
|
||||
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
set SDCARD_AVAILABLE yes
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
else
|
||||
echo "ERROR [init] card mount failed"
|
||||
fi
|
||||
else
|
||||
set STARTUP_TUNE 15 # tune 15 = SD_ERROR
|
||||
echo "ERROR [init] format failed"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
then
|
||||
if hardfault_log check
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
then
|
||||
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
|
||||
if hardfault_log commit
|
||||
if hardfault_log check
|
||||
then
|
||||
hardfault_log reset
|
||||
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
|
||||
if hardfault_log commit
|
||||
then
|
||||
hardfault_log reset
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
set PARAM_FILE /fs/microsd/params
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -136,8 +142,36 @@ else
|
||||
param select $PARAM_FILE
|
||||
if ! param import
|
||||
then
|
||||
param reset_all
|
||||
echo "ERROR [init] param import failed"
|
||||
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
|
||||
|
||||
param dump $PARAM_FILE
|
||||
|
||||
if [ -d "/fs/microsd" ]
|
||||
then
|
||||
dmesg >> /fs/microsd/param_import_fail.txt &
|
||||
|
||||
# try to make a backup copy
|
||||
cp $PARAM_FILE /fs/microsd/param_import_fail.bson &
|
||||
fi
|
||||
|
||||
# try importing from backup file
|
||||
if [ -f "/fs/microsd/parameters_backup.bson" ]
|
||||
then
|
||||
echo "[init] importing from parameter backup"
|
||||
|
||||
# dump current backup file contents for comparison
|
||||
param dump /fs/microsd/parameters_backup.bson
|
||||
|
||||
param import /fs/microsd/parameters_backup.bson
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
then
|
||||
param select-backup /fs/microsd/parameters_backup.bson
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4_FMU_V5X PX4_FMU_V6X
|
||||
then
|
||||
netman update -i eth0
|
||||
@@ -185,7 +219,16 @@ else
|
||||
# Waypoint storage.
|
||||
# REBOOTWORK this needs to start in parallel.
|
||||
#
|
||||
dataman start
|
||||
if param compare SYS_DM_BACKEND 1
|
||||
then
|
||||
dataman start -r
|
||||
else
|
||||
if param compare SYS_DM_BACKEND 0
|
||||
then
|
||||
# dataman start default
|
||||
dataman start
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Start the socket communication send_event handler.
|
||||
@@ -248,15 +291,9 @@ else
|
||||
# Start core UAVCAN module.
|
||||
if uavcan start
|
||||
then
|
||||
if param greater UAVCAN_ENABLE 1
|
||||
if param greater UAVCAN_ENABLE 2
|
||||
then
|
||||
# Start UAVCAN firmware update server and dynamic node ID allocation server.
|
||||
uavcan start fw
|
||||
|
||||
if param greater UAVCAN_ENABLE 2
|
||||
then
|
||||
set OUTPUT_MODE uavcan_esc
|
||||
fi
|
||||
set OUTPUT_MODE uavcan_esc
|
||||
fi
|
||||
else
|
||||
tune_control play error
|
||||
@@ -372,17 +409,6 @@ else
|
||||
commander start
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Play the startup tune (if not disabled or there is an error)
|
||||
#
|
||||
param compare CBRK_BUZZER 782090
|
||||
if [ $? != 0 -o $STARTUP_TUNE != 1 ]
|
||||
then
|
||||
tune_control play -t $STARTUP_TUNE
|
||||
fi
|
||||
|
||||
|
||||
# Pre-takeoff continuous magnetometer calibration
|
||||
if param compare -s MBE_ENABLE 1
|
||||
then
|
||||
@@ -401,7 +427,7 @@ else
|
||||
set BOARD_RC_MAVLINK ${R}etc/init.d/rc.board_mavlink
|
||||
if [ -f $BOARD_RC_MAVLINK ]
|
||||
then
|
||||
echo "Board extras: ${BOARD_RC_MAVLINK}"
|
||||
echo "Board mavlink: ${BOARD_RC_MAVLINK}"
|
||||
. $BOARD_RC_MAVLINK
|
||||
fi
|
||||
unset BOARD_RC_MAVLINK
|
||||
@@ -418,6 +444,12 @@ else
|
||||
rc_input start $RC_INPUT_ARGS
|
||||
fi
|
||||
|
||||
# PPS capture driver (before pwm_out)
|
||||
if param greater -s PPS_CAP_ENABLE 0
|
||||
then
|
||||
pps_capture start
|
||||
fi
|
||||
|
||||
# Camera capture driver (before pwm_out)
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
@@ -434,6 +466,15 @@ else
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
#
|
||||
# Play the startup tune (if not disabled or there is an error)
|
||||
#
|
||||
param compare CBRK_BUZZER 782090
|
||||
if [ "$?" != "0" -o "$STARTUP_TUNE" != "1" ]
|
||||
then
|
||||
tune_control play -t $STARTUP_TUNE
|
||||
fi
|
||||
|
||||
#
|
||||
# Start the navigator.
|
||||
#
|
||||
@@ -547,6 +588,7 @@ unset PWM_EXTRA_RATE
|
||||
unset RC_INPUT_ARGS
|
||||
unset SDCARD_AVAILABLE
|
||||
unset SDCARD_EXT_PATH
|
||||
unset SDCARD_FORMAT
|
||||
unset SDCARD_MIXERS_PATH
|
||||
unset STARTUP_TUNE
|
||||
unset USE_IO
|
||||
|
||||
@@ -33,15 +33,11 @@
|
||||
|
||||
px4_add_romfs_files(
|
||||
autogyro_sitl.main.mix
|
||||
boat_sitl.main.mix
|
||||
delta_wing_sitl.main.mix
|
||||
package_drop.aux.mix
|
||||
plane_sitl.main.mix
|
||||
quad_x_vtol.main.mix
|
||||
rover_ackermann_sitl.main.mix
|
||||
rover_diff_sitl.main.mix
|
||||
standard_vtol_sitl.main.mix
|
||||
tiltrotor_sitl.main.mix
|
||||
uuv_x_sitl.main.mix
|
||||
vectored6dof_sitl.main.mix
|
||||
)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
Mixer for SITL boat
|
||||
=========================================================
|
||||
|
||||
Throttle of left propeller of boat on Output 0
|
||||
---------------------------------------
|
||||
M: 2
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Throttle of right propeller of boat on Output 1
|
||||
---------------------------------------
|
||||
M: 2
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
@@ -1,46 +0,0 @@
|
||||
Mixer for SITL rover
|
||||
=========================================================
|
||||
|
||||
Output 0
|
||||
---------------------------------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
Output 1
|
||||
---------------------------------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 3
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 4
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 5
|
||||
---------------------------------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
Output 6
|
||||
---------------------------------------
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
Output 7
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 8
|
||||
---------------------------------------
|
||||
Z:
|
||||
@@ -1,46 +0,0 @@
|
||||
Mixer for SITL rover
|
||||
=========================================================
|
||||
|
||||
Output 0
|
||||
---------------------------------------
|
||||
M: 2
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
Output 1
|
||||
---------------------------------------
|
||||
M: 2
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 3
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 4
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 5
|
||||
---------------------------------------
|
||||
M: 2
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
Output 6
|
||||
---------------------------------------
|
||||
M: 2
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
|
||||
Output 7
|
||||
---------------------------------------
|
||||
Z:
|
||||
|
||||
Output 8
|
||||
---------------------------------------
|
||||
Z:
|
||||
@@ -1,40 +0,0 @@
|
||||
# Motor 1
|
||||
M: 3
|
||||
S: 0 2 -4000 -4000 0 -4000 +4000
|
||||
S: 0 3 +4000 +4000 0 -4000 +4000
|
||||
S: 0 4 -4000 -4000 0 -4000 +4000
|
||||
# Motor 2
|
||||
M: 3
|
||||
S: 0 2 +4000 +4000 0 -4000 +4000
|
||||
S: 0 3 +4000 +4000 0 -4000 +4000
|
||||
S: 0 4 +4000 +4000 0 -4000 +4000
|
||||
# Motor 3
|
||||
M: 3
|
||||
S: 0 2 -4000 -4000 0 -4000 +4000
|
||||
S: 0 3 +4000 +4000 0 -4000 +4000
|
||||
S: 0 4 +4000 +4000 0 -4000 +4000
|
||||
# Motor 4
|
||||
M: 3
|
||||
S: 0 2 +4000 +4000 0 -4000 +4000
|
||||
S: 0 3 +4000 +4000 0 -4000 +4000
|
||||
S: 0 4 -4000 -4000 0 -4000 +4000
|
||||
# Motor 5
|
||||
M: 3
|
||||
S: 0 0 -4000 -4000 0 -4000 +4000
|
||||
S: 0 1 +4000 +4000 0 -4000 +4000
|
||||
S: 0 5 -4000 -4000 0 -4000 +4000
|
||||
# Motor 6
|
||||
M: 3
|
||||
S: 0 0 -4000 -4000 0 -4000 +4000
|
||||
S: 0 1 -4000 -4000 0 -4000 +4000
|
||||
S: 0 5 +4000 +4000 0 -4000 +4000
|
||||
# Motor 7
|
||||
M: 3
|
||||
S: 0 0 +4000 +4000 0 -4000 +4000
|
||||
S: 0 1 +4000 +4000 0 -4000 +4000
|
||||
S: 0 5 +4000 +4000 0 -4000 +4000
|
||||
# Motor 8
|
||||
M: 3
|
||||
S: 0 0 +4000 +4000 0 -4000 +4000
|
||||
S: 0 1 -4000 -4000 0 -4000 +4000
|
||||
S: 0 5 -4000 -4000 0 -4000 +4000
|
||||
@@ -90,4 +90,5 @@ px4_add_romfs_files(
|
||||
vtol_convergence.main.mix
|
||||
vtol_delta.aux.mix
|
||||
vtol_tailsitter_duo.main.mix
|
||||
vtol_tailsitter_duo_sat.main.mix
|
||||
)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
Tailsitter duo mixer
|
||||
============================
|
||||
|
||||
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
|
||||
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
|
||||
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
|
||||
|
||||
Motor mixer
|
||||
------------
|
||||
Channel 1 connects to the right (starboard) motor.
|
||||
Channel 2 connects to the left (port) motor.
|
||||
|
||||
R: 2-
|
||||
|
||||
Zero mixer (2x)
|
||||
---------------
|
||||
Channels 3,4 are unused.
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
Elevons mixer
|
||||
--------------
|
||||
Channel 5 connects to the right (starboard) elevon.
|
||||
Channel 6 connects to the left (port) elevon.
|
||||
Here we saturate the elevons before their full range
|
||||
to avoid roll-pitch-yaw coupling during faster maneuvers
|
||||
|
||||
M: 2
|
||||
S: 1 0 10000 10000 0 -6000 6000
|
||||
S: 1 1 10000 10000 0 -6000 6000
|
||||
|
||||
M: 2
|
||||
S: 1 0 10000 10000 0 -6000 6000
|
||||
S: 1 1 -10000 -10000 0 -6000 6000
|
||||
@@ -7,6 +7,8 @@ from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
import serial.tools.list_ports as list_ports
|
||||
import tempfile
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
@@ -36,12 +38,13 @@ def print_line(line):
|
||||
else:
|
||||
print('{0}'.format(line), end='')
|
||||
|
||||
def monitor_firmware_upload(port, baudrate):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
def monitor_firmware_upload(port_url, baudrate):
|
||||
ser = serial.serial_for_url(url=port_url, baudrate=baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=3, xonxoff=False, rtscts=False, dsrdtr=False, inter_byte_timeout=1)
|
||||
|
||||
timeout = 180 # 3 minutes
|
||||
timeout_start = time.time()
|
||||
timeout_newline = time.time()
|
||||
timeout_start = time.monotonic()
|
||||
timeout_newline = time.monotonic()
|
||||
|
||||
return_code = 0
|
||||
|
||||
@@ -49,33 +52,59 @@ def monitor_firmware_upload(port, baudrate):
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if len(serial_line) > 0:
|
||||
if "ERROR" in serial_line:
|
||||
return_code = -1
|
||||
|
||||
print_line(serial_line)
|
||||
|
||||
if "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(return_code)
|
||||
elif "nsh>" in serial_line:
|
||||
sys.exit(return_code)
|
||||
if "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(return_code)
|
||||
elif "nsh>" in serial_line:
|
||||
sys.exit(return_code)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
else:
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
# newline every 10 seconds if still running
|
||||
if (len(serial_line) <= 0) and (time.monotonic() - timeout_newline > 10):
|
||||
timeout_newline = time.monotonic()
|
||||
ser.write("\n".encode("ascii"))
|
||||
|
||||
# newline every 10 seconds if still running
|
||||
if time.time() - timeout_newline > 10:
|
||||
timeout_newline = time.time()
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
def main():
|
||||
|
||||
default_device = None
|
||||
device_required = True
|
||||
|
||||
# select USB UART as default if there's only 1
|
||||
ports = list(serial.tools.list_ports.grep('USB UART'))
|
||||
|
||||
if (len(ports) == 1):
|
||||
default_device = ports[0].device
|
||||
device_required = False
|
||||
|
||||
print("Default USB UART port: {0}".format(ports[0].name))
|
||||
print(" device: {0}".format(ports[0].device))
|
||||
print(" description: \"{0}\" ".format(ports[0].description))
|
||||
print(" hwid: {0}".format(ports[0].hwid))
|
||||
#print(" vid: {0}, pid: {1}".format(ports[0].vid, ports[0].pid))
|
||||
#print(" serial_number: {0}".format(ports[0].serial_number))
|
||||
#print(" location: {0}".format(ports[0].location))
|
||||
print(" manufacturer: {0}".format(ports[0].manufacturer))
|
||||
#print(" product: {0}".format(ports[0].product))
|
||||
#print(" interface: {0}".format(ports[0].interface))
|
||||
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=default_device, help='', required=device_required)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="serial port baud rate (default=57600)", default=57600)
|
||||
args = parser.parse_args()
|
||||
|
||||
monitor_firmware_upload(args.device, args.baudrate)
|
||||
tmp_file = "{0}/pyserial_spy_file.txt".format(tempfile.gettempdir())
|
||||
port_url = "spy://{0}?file={1}".format(args.device, tmp_file)
|
||||
|
||||
print("pyserial url: {0}".format(port_url))
|
||||
|
||||
monitor_firmware_upload(port_url, args.baudrate)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
+90
-56
@@ -6,6 +6,9 @@ from subprocess import call, Popen
|
||||
from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
import serial.tools.list_ports as list_ports
|
||||
import tempfile
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
@@ -29,109 +32,140 @@ def print_line(line):
|
||||
if "FAILED" in line:
|
||||
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
|
||||
|
||||
print(line, end='')
|
||||
if "\n" in line:
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
else:
|
||||
print('{0}'.format(line), end='')
|
||||
|
||||
def do_param_set_cmd(port, baudrate, param_name, param_value):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.1, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
timeout_start = time.time()
|
||||
def do_param_set_cmd(port_url, baudrate, param_name, param_value):
|
||||
ser = serial.serial_for_url(url=port_url, baudrate=baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=3, xonxoff=False, rtscts=False, dsrdtr=False, inter_byte_timeout=1)
|
||||
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 30 # 30 seconds
|
||||
|
||||
ser.write("\n\n\n".encode("ascii"))
|
||||
|
||||
# wait for nsh prompt
|
||||
while True:
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
if len(serial_line) > 0:
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
sys.exit(1)
|
||||
|
||||
ser.write("\n".encode("ascii"))
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
sys.exit(1)
|
||||
|
||||
# clear
|
||||
ser.readlines()
|
||||
ser.reset_input_buffer()
|
||||
|
||||
# run command
|
||||
timeout_start = time.time()
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 10 # 10 seconds
|
||||
|
||||
cmd = "param set " + param_name + " " + param_value
|
||||
|
||||
# write command (param set) and wait for command echo
|
||||
serial_cmd = '{0}\r\n'.format(cmd)
|
||||
print("Running command: \'{0}\'".format(cmd))
|
||||
serial_cmd = '{0}\n'.format(cmd)
|
||||
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if cmd in serial_line:
|
||||
print_line(serial_line)
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
if len(serial_line) > 0:
|
||||
if cmd in serial_line:
|
||||
break
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
print_line(serial_line)
|
||||
|
||||
else:
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
|
||||
# clear
|
||||
ser.reset_input_buffer()
|
||||
|
||||
# verify param value
|
||||
cmd = "param show " + param_name
|
||||
serial_cmd = '{0}\r\n'.format(cmd)
|
||||
print("Running command: \'{0}\'".format(cmd))
|
||||
serial_cmd = '{0}\n'.format(cmd)
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
param_show_response = param_name + " ["
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 2 # 2 seconds
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 3 # 3 seconds
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if param_show_response in serial_line:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
current_param_value = serial_line.split(":")[-1].strip()
|
||||
|
||||
if (current_param_value == param_value):
|
||||
sys.exit(0)
|
||||
if param_show_response in serial_line:
|
||||
current_param_value = serial_line.split(":")[-1].strip()
|
||||
|
||||
if (current_param_value == param_value):
|
||||
sys.exit(0)
|
||||
else:
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(1)
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
if "nsh>" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
elif "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
if "nsh>" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
elif "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
|
||||
if len(serial_line) <= 0:
|
||||
ser.write("\r\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
ser.close()
|
||||
|
||||
def main():
|
||||
|
||||
default_device = None
|
||||
device_required = True
|
||||
|
||||
# select USB UART as default if there's only 1
|
||||
ports = list(serial.tools.list_ports.grep('USB UART'))
|
||||
|
||||
if (len(ports) == 1):
|
||||
default_device = ports[0].device
|
||||
device_required = False
|
||||
|
||||
print("Default USB UART port: {0}".format(ports[0].name))
|
||||
print(" device: {0}".format(ports[0].device))
|
||||
print(" description: \"{0}\" ".format(ports[0].description))
|
||||
print(" hwid: {0}".format(ports[0].hwid))
|
||||
#print(" vid: {0}, pid: {1}".format(ports[0].vid, ports[0].pid))
|
||||
#print(" serial_number: {0}".format(ports[0].serial_number))
|
||||
#print(" location: {0}".format(ports[0].location))
|
||||
print(" manufacturer: {0}".format(ports[0].manufacturer))
|
||||
#print(" product: {0}".format(ports[0].product))
|
||||
#print(" interface: {0}".format(ports[0].interface))
|
||||
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=default_device, help='', required=device_required)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="serial port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument("--name", "-p", dest="param_name", help="Parameter name")
|
||||
parser.add_argument("--value", "-v", dest="param_value", help="Parameter value")
|
||||
args = parser.parse_args()
|
||||
|
||||
do_param_set_cmd(args.device, args.baudrate, args.param_name, args.param_value)
|
||||
tmp_file = "{0}/pyserial_spy_file.txt".format(tempfile.gettempdir())
|
||||
port_url = "spy://{0}?file={1}".format(args.device, tmp_file)
|
||||
|
||||
print("pyserial url: {0}".format(port_url))
|
||||
|
||||
do_param_set_cmd(port_url, args.baudrate, args.param_name, args.param_value)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import serial, time
|
||||
import subprocess
|
||||
from subprocess import call, Popen
|
||||
from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
import serial.tools.list_ports as list_ports
|
||||
import tempfile
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
COLOR_YELLOW = "\x1b[33m"
|
||||
COLOR_WHITE = "\x1b[37m"
|
||||
COLOR_RESET = "\x1b[0m"
|
||||
|
||||
def print_line(line):
|
||||
if "WARNING" in line:
|
||||
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
|
||||
elif "WARN" in line:
|
||||
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
|
||||
elif "ERROR" in line:
|
||||
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
|
||||
elif "INFO" in line:
|
||||
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
|
||||
|
||||
if "PASSED" in line:
|
||||
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
|
||||
|
||||
if "FAILED" in line:
|
||||
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
|
||||
|
||||
if "\n" in line:
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
else:
|
||||
print('{0}'.format(line), end='')
|
||||
|
||||
|
||||
def reboot(port_url, baudrate):
|
||||
ser = serial.serial_for_url(url=port_url, baudrate=baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=3, xonxoff=False, rtscts=False, dsrdtr=False, inter_byte_timeout=1)
|
||||
|
||||
time_start = time.monotonic()
|
||||
|
||||
ser.write("\n\n\n".encode("ascii"))
|
||||
|
||||
ser.write("reboot\n".encode("ascii"))
|
||||
time_reboot_cmd = time_start
|
||||
|
||||
timeout_reboot_cmd = 90
|
||||
timeout = 300 # 5 minutes
|
||||
|
||||
return_code = 0
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if "ERROR" in serial_line:
|
||||
return_code = -1
|
||||
|
||||
if "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(return_code)
|
||||
|
||||
else:
|
||||
if time.monotonic() > time_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
if time.monotonic() > time_reboot_cmd + timeout_reboot_cmd:
|
||||
time_reboot_cmd = time.monotonic()
|
||||
print("sending reboot cmd again")
|
||||
ser.write("reboot\n".encode("ascii"))
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
default_device = None
|
||||
device_required = True
|
||||
|
||||
# select USB UART as default if there's only 1
|
||||
ports = list(serial.tools.list_ports.grep('USB UART'))
|
||||
|
||||
if (len(ports) == 1):
|
||||
default_device = ports[0].device
|
||||
device_required = False
|
||||
|
||||
print("Default USB UART port: {0}".format(ports[0].name))
|
||||
print(" device: {0}".format(ports[0].device))
|
||||
print(" description: \"{0}\" ".format(ports[0].description))
|
||||
print(" hwid: {0}".format(ports[0].hwid))
|
||||
#print(" vid: {0}, pid: {1}".format(ports[0].vid, ports[0].pid))
|
||||
#print(" serial_number: {0}".format(ports[0].serial_number))
|
||||
#print(" location: {0}".format(ports[0].location))
|
||||
print(" manufacturer: {0}".format(ports[0].manufacturer))
|
||||
#print(" product: {0}".format(ports[0].product))
|
||||
#print(" interface: {0}".format(ports[0].interface))
|
||||
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=default_device, help='', required=device_required)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
|
||||
args = parser.parse_args()
|
||||
|
||||
reboot(args.device, args.baudrate)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+77
-53
@@ -7,6 +7,8 @@ from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
import serial.tools.list_ports as list_ports
|
||||
import tempfile
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
@@ -37,101 +39,123 @@ def print_line(line):
|
||||
print('{0}'.format(line), end='')
|
||||
|
||||
|
||||
def do_nsh_cmd(port, baudrate, cmd):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.2, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
def do_nsh_cmd(port_url, baudrate, cmd):
|
||||
ser = serial.serial_for_url(url=port_url, baudrate=baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1, xonxoff=False, rtscts=False, dsrdtr=False, inter_byte_timeout=1)
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 30 # 30 seconds
|
||||
|
||||
ser.write("\n\n\n".encode("ascii"))
|
||||
|
||||
# wait for nsh prompt
|
||||
while True:
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
if len(serial_line) > 0:
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
sys.exit(1)
|
||||
|
||||
ser.write("\n".encode("ascii"))
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
sys.exit(1)
|
||||
|
||||
# clear
|
||||
ser.readlines()
|
||||
ser.reset_input_buffer()
|
||||
|
||||
# run command
|
||||
timeout_start = time.time()
|
||||
timeout = 1 # 1 second
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 5 # 5 seconds
|
||||
|
||||
success_cmd = "cmd succeeded!"
|
||||
|
||||
# wait for command echo
|
||||
serial_cmd = '{0}; echo "{1}"; echo "{2}";\r\n'.format(cmd, success_cmd, success_cmd)
|
||||
print("Running command: \'{0}\'".format(cmd))
|
||||
serial_cmd = '{0}; echo "{1}"; echo "{2}";\n'.format(cmd, success_cmd, success_cmd)
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if cmd in serial_line:
|
||||
break
|
||||
elif serial_line.startswith(success_cmd) and len(serial_line) <= len(success_cmd) + 2:
|
||||
print_line(serial_line)
|
||||
# we missed the echo, but command ran and succeeded
|
||||
sys.exit(0)
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
if len(serial_line) > 0:
|
||||
if cmd in serial_line:
|
||||
break
|
||||
elif serial_line.startswith(success_cmd) and len(serial_line) <= len(success_cmd) + 2:
|
||||
print_line(serial_line)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
# we missed the echo, but command ran and succeeded
|
||||
sys.exit(0)
|
||||
else:
|
||||
print_line(serial_line)
|
||||
else:
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 180 # 3 minutes
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 240 # 4 minutes
|
||||
|
||||
return_code = 0
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if success_cmd in serial_line:
|
||||
sys.exit(return_code)
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
if len(serial_line) > 0:
|
||||
if success_cmd in serial_line:
|
||||
sys.exit(return_code)
|
||||
else:
|
||||
if "ERROR " in serial_line:
|
||||
return_code = -1
|
||||
|
||||
print_line(serial_line)
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
elif "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
if "nsh>" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
elif "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
else:
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
if len(serial_line) <= 0:
|
||||
ser.write("\r\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
ser.close()
|
||||
|
||||
def main():
|
||||
|
||||
default_device = None
|
||||
device_required = True
|
||||
|
||||
# select USB UART as default if there's only 1
|
||||
ports = list(serial.tools.list_ports.grep('USB UART'))
|
||||
|
||||
if (len(ports) == 1):
|
||||
default_device = ports[0].device
|
||||
device_required = False
|
||||
|
||||
print("Default USB UART port: {0}".format(ports[0].name))
|
||||
print(" device: {0}".format(ports[0].device))
|
||||
print(" description: \"{0}\" ".format(ports[0].description))
|
||||
print(" hwid: {0}".format(ports[0].hwid))
|
||||
#print(" vid: {0}, pid: {1}".format(ports[0].vid, ports[0].pid))
|
||||
#print(" serial_number: {0}".format(ports[0].serial_number))
|
||||
#print(" location: {0}".format(ports[0].location))
|
||||
print(" manufacturer: {0}".format(ports[0].manufacturer))
|
||||
#print(" product: {0}".format(ports[0].product))
|
||||
#print(" interface: {0}".format(ports[0].interface))
|
||||
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=default_device, help='', required=device_required)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="serial port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument("--cmd", "-c", dest="cmd", help="Command to run")
|
||||
args = parser.parse_args()
|
||||
|
||||
do_nsh_cmd(args.device, args.baudrate, args.cmd)
|
||||
tmp_file = "{0}/pyserial_spy_file.txt".format(tempfile.gettempdir())
|
||||
port_url = "spy://{0}?file={1}".format(args.device, tmp_file)
|
||||
|
||||
print("pyserial url: {0}".format(port_url))
|
||||
|
||||
do_nsh_cmd(port_url, args.baudrate, args.cmd)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
+81
-52
@@ -9,6 +9,9 @@ import unittest
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
import serial.tools.list_ports as list_ports
|
||||
import tempfile
|
||||
import warnings
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
@@ -38,33 +41,36 @@ def print_line(line):
|
||||
else:
|
||||
print('{0}'.format(line), end='')
|
||||
|
||||
def do_test(port, baudrate, test_name):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.2, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
timeout_start = time.time()
|
||||
def do_test(port_url, baudrate, test_name):
|
||||
|
||||
# ignore pyserial spy:// resource warnings
|
||||
warnings.filterwarnings(action="ignore", message="unclosed", category=ResourceWarning)
|
||||
|
||||
ser = serial.serial_for_url(url=port_url, baudrate=baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=3, xonxoff=False, rtscts=False, dsrdtr=False, inter_byte_timeout=1)
|
||||
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 30 # 30 seconds
|
||||
|
||||
ser.write("\n\n\n".encode("ascii"))
|
||||
|
||||
# wait for nsh prompt
|
||||
while True:
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
if len(serial_line) > 0:
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print(serial_line, end='')
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
return False
|
||||
|
||||
ser.write("\n".encode("ascii"))
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
return False
|
||||
|
||||
# clear
|
||||
ser.readlines()
|
||||
|
||||
success = False
|
||||
ser.reset_input_buffer()
|
||||
|
||||
# run test cmd
|
||||
print('\n|======================================================================')
|
||||
@@ -72,30 +78,28 @@ def do_test(port, baudrate, test_name):
|
||||
print("| Running:", cmd)
|
||||
print('|======================================================================')
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 2 # 2 seconds
|
||||
|
||||
# wait for command echo
|
||||
print("Running command: \'{0}\'".format(cmd))
|
||||
serial_cmd = '{0}\n'.format(cmd)
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if cmd in serial_line:
|
||||
break
|
||||
if len(serial_line) > 0:
|
||||
if cmd in serial_line:
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
|
||||
# print results, wait for final result (PASSED or FAILED)
|
||||
timeout = 300 # 5 minutes
|
||||
timeout_start = time.time()
|
||||
timeout_start = time.monotonic()
|
||||
timeout_newline = timeout_start
|
||||
|
||||
while True:
|
||||
@@ -104,27 +108,26 @@ def do_test(port, baudrate, test_name):
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if test_name + " PASSED" in serial_line:
|
||||
success = True
|
||||
break
|
||||
elif test_name + " FAILED" in serial_line:
|
||||
success = False
|
||||
break
|
||||
if test_name + " PASSED" in serial_line:
|
||||
ser.close()
|
||||
return True
|
||||
elif test_name + " FAILED" in serial_line:
|
||||
ser.close()
|
||||
return False
|
||||
else:
|
||||
if time.monotonic() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
print(test_name + f" {COLOR_RED}FAILED{COLOR_RESET}")
|
||||
ser.close()
|
||||
return False
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
print(test_name + f" {COLOR_RED}FAILED{COLOR_RESET}")
|
||||
success = False
|
||||
break
|
||||
|
||||
# newline every 10 seconds if still running
|
||||
if time.time() - timeout_newline > 10:
|
||||
ser.write("\n".encode("ascii"))
|
||||
timeout_newline = time.time()
|
||||
# newline every 30 seconds if still running
|
||||
if time.monotonic() - timeout_newline > 30:
|
||||
ser.write("\n".encode("ascii"))
|
||||
timeout_newline = time.monotonic()
|
||||
|
||||
ser.close()
|
||||
|
||||
return success
|
||||
return False
|
||||
|
||||
class TestHardwareMethods(unittest.TestCase):
|
||||
TEST_DEVICE = 0
|
||||
@@ -142,9 +145,8 @@ class TestHardwareMethods(unittest.TestCase):
|
||||
def test_bson(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "bson"))
|
||||
|
||||
# TODO: review
|
||||
# def test_dataman(self):
|
||||
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "dataman"))
|
||||
def test_dataman(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "dataman"))
|
||||
|
||||
# def test_file(self):
|
||||
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "file"))
|
||||
@@ -207,12 +209,39 @@ class TestHardwareMethods(unittest.TestCase):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "versioning"))
|
||||
|
||||
def main():
|
||||
|
||||
default_device = None
|
||||
device_required = True
|
||||
|
||||
# select USB UART as default if there's only 1
|
||||
ports = list(serial.tools.list_ports.grep('USB UART'))
|
||||
|
||||
if (len(ports) == 1):
|
||||
default_device = ports[0].device
|
||||
device_required = False
|
||||
|
||||
print("Default USB UART port: {0}".format(ports[0].name))
|
||||
print(" device: {0}".format(ports[0].device))
|
||||
print(" description: \"{0}\" ".format(ports[0].description))
|
||||
print(" hwid: {0}".format(ports[0].hwid))
|
||||
#print(" vid: {0}, pid: {1}".format(ports[0].vid, ports[0].pid))
|
||||
#print(" serial_number: {0}".format(ports[0].serial_number))
|
||||
#print(" location: {0}".format(ports[0].location))
|
||||
print(" manufacturer: {0}".format(ports[0].manufacturer))
|
||||
#print(" product: {0}".format(ports[0].product))
|
||||
#print(" interface: {0}".format(ports[0].interface))
|
||||
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=default_device, help='', required=device_required)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="serial port baud rate (default=57600)", default=57600)
|
||||
args = parser.parse_args()
|
||||
|
||||
TestHardwareMethods.TEST_DEVICE = args.device
|
||||
tmp_file = "{0}/pyserial_spy_file.txt".format(tempfile.gettempdir())
|
||||
port_url = "spy://{0}?file={1}".format(args.device, tmp_file)
|
||||
|
||||
print("pyserial url: {0}".format(port_url))
|
||||
|
||||
TestHardwareMethods.TEST_DEVICE = port_url
|
||||
TestHardwareMethods.TEST_BAUDRATE = args.baudrate
|
||||
|
||||
unittest.main(__name__, failfast=True, verbosity=0, argv=['main'])
|
||||
|
||||
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#! /bin/bash
|
||||
|
||||
# exit when any command fails
|
||||
set -e
|
||||
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
SERIAL_DEVICE=$1
|
||||
|
||||
if [ ! -e "${SERIAL_DEVICE}" ]
|
||||
then
|
||||
echo "Invalid serial device ${SERIAL_DEVICE}"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# all airframes (from ROMFS/px4fmu_common/init.d/airframes/)
|
||||
# $(find . -regex '.*/[0-9].*' -exec basename {} \; | cut -d "_" -f 1)
|
||||
ALL_AIRFRAMES=${@:2}
|
||||
echo "airframes: ${ALL_AIRFRAMES}"
|
||||
|
||||
for airframe in $ALL_AIRFRAMES
|
||||
do
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo "########################################################################################################################"
|
||||
echo " Airframe: $airframe"
|
||||
echo "########################################################################################################################"
|
||||
echo
|
||||
|
||||
${DIR}/nsh_param_set.py --device ${SERIAL_DEVICE} --name SYS_AUTOSTART --value $airframe
|
||||
${DIR}/nsh_param_set.py --device ${SERIAL_DEVICE} --name CBRK_BUZZER --value 782097
|
||||
|
||||
# enable all mavlink instances
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param set MAV_0_CONFIG 101' || true
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param set MAV_1_CONFIG 102' || true
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param set MAV_2_CONFIG 103' || true
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param set MAV_3_CONFIG 104' || true
|
||||
|
||||
# enable all GPS
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param set GPS_1_CONFIG 201' || true
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param set GPS_1_CONFIG 202' || true
|
||||
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param reset SYS_HITL'
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param status'
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param save'
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param dump'
|
||||
|
||||
${DIR}/reboot.py --device ${SERIAL_DEVICE}
|
||||
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param status'
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param dump /fs/mtd_params' || true
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'param dump /fs/microsd/parameters_backup.bson' || true
|
||||
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'ps'
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'work_queue status'
|
||||
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'pwm info'
|
||||
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'mavlink stop-all'
|
||||
${DIR}/run_nsh_cmd.py --device ${SERIAL_DEVICE} --cmd 'gps stop'
|
||||
|
||||
done
|
||||
+15
-52
@@ -1,35 +1,5 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
echo "guessing PX4_DOCKER_REPO based on input";
|
||||
if [[ $@ =~ .*px4_fmu.* ]]; then
|
||||
# nuttx-px4fmu-v{1,2,3,4,5}
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-09-08"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
|
||||
# beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-08-18"
|
||||
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
|
||||
# scumaker_pilotpi_arm64
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-aarch64:latest"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*bebop.* ]]; then
|
||||
# posix_rpi_cross, posix_bebop_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-08-18"
|
||||
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
|
||||
# clang tools
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-clang:2021-02-04"
|
||||
elif [[ $@ =~ .*tests* ]]; then
|
||||
# run all tests with simulation
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-simulation-bionic:2021-02-04"
|
||||
fi
|
||||
else
|
||||
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
|
||||
fi
|
||||
|
||||
# otherwise default to nuttx
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-09-08"
|
||||
fi
|
||||
|
||||
# docker hygiene
|
||||
|
||||
#Delete all stopped containers (including data-only containers)
|
||||
@@ -38,30 +8,23 @@ fi
|
||||
#Delete all 'untagged/dangling' (<none>) images
|
||||
#docker rmi $(docker images -q -f dangling=true)
|
||||
|
||||
echo "PX4_DOCKER_REPO: $PX4_DOCKER_REPO";
|
||||
if [[ -z "${DOCKER_TAG}" ]]; then
|
||||
TAG_NAME=""
|
||||
else
|
||||
TAG_NAME=":${DOCKER_TAG}"
|
||||
fi
|
||||
|
||||
PX4_DOCKER_REPO="px4io/px4-dev$TAG_NAME"
|
||||
|
||||
echo $PX4_DOCKER_REPO
|
||||
|
||||
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
SRC_DIR=$PWD/../
|
||||
|
||||
CCACHE_DIR=${HOME}/.ccache
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
|
||||
docker run -it --rm -w "${SRC_DIR}" \
|
||||
--env=AWS_ACCESS_KEY_ID \
|
||||
--env=AWS_SECRET_ACCESS_KEY \
|
||||
--env=BRANCH_NAME \
|
||||
--env=CCACHE_DIR="${CCACHE_DIR}" \
|
||||
--env=CI \
|
||||
--env=CODECOV_TOKEN \
|
||||
--env=COVERALLS_REPO_TOKEN \
|
||||
--env=LOCAL_USER_ID="$(id -u)" \
|
||||
--env=PX4_ASAN \
|
||||
--env=PX4_MSAN \
|
||||
--env=PX4_TSAN \
|
||||
--env=PX4_UBSAN \
|
||||
--env=TRAVIS_BRANCH \
|
||||
--env=TRAVIS_BUILD_ID \
|
||||
--publish 14556:14556/udp \
|
||||
--volume=${CCACHE_DIR}:${CCACHE_DIR}:rw \
|
||||
--volume=${SRC_DIR}:${SRC_DIR}:rw \
|
||||
${PX4_DOCKER_REPO} /bin/bash -c "$1 $2 $3"
|
||||
--env=LOCAL_USER_ID="$(id -u)" \
|
||||
--publish 14556:14556/udp \
|
||||
--volume=/tmp/.X11-unix:/tmp/.X11-unix \
|
||||
--volume=/tmp:/tmp:rw \
|
||||
--volume=${SRC_DIR}:${SRC_DIR}:rw \
|
||||
${PX4_DOCKER_REPO} /bin/bash -c "$1 $2 $3"
|
||||
|
||||
@@ -39,7 +39,7 @@ function spawn_model() {
|
||||
|
||||
echo "Spawning ${MODEL}_${N} at ${X} ${Y}"
|
||||
|
||||
gz model --spawn-file=/tmp/${MODEL}_${N}.sdf --model-name=${MODEL}_${N} -x ${X} -y ${Y} -z 0.0
|
||||
gz model --spawn-file=/tmp/${MODEL}_${N}.sdf --model-name=${MODEL}_${N} -x ${X} -y ${Y} -z 0.83
|
||||
|
||||
popd &>/dev/null
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import os
|
||||
import sys
|
||||
import json
|
||||
import re
|
||||
from kconfiglib import Kconfig
|
||||
# from kconfiglib import Kconfig
|
||||
|
||||
kconf = Kconfig()
|
||||
# kconf = Kconfig()
|
||||
|
||||
# Supress warning output
|
||||
kconf.warn_assign_undef = False
|
||||
kconf.warn_assign_override = False
|
||||
kconf.warn_assign_redun = False
|
||||
# kconf.warn_assign_undef = False
|
||||
# kconf.warn_assign_override = False
|
||||
# kconf.warn_assign_redun = False
|
||||
|
||||
source_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
|
||||
|
||||
@@ -23,6 +23,10 @@ parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='Verbose Output')
|
||||
parser.add_argument('-p', '--pretty', dest='pretty', action='store_true',
|
||||
help='Pretty output instead of a single line')
|
||||
parser.add_argument('-a', '--all_variants', dest='all_variants', action='store_true',
|
||||
help='Prints targets into a single all_variants_* target')
|
||||
parser.add_argument('-b', '--bloaty', dest='bloaty', action='store_true',
|
||||
help='Includes all bloaty targets')
|
||||
|
||||
args = parser.parse_args()
|
||||
verbose = args.verbose
|
||||
@@ -35,46 +39,66 @@ excluded_labels = [
|
||||
'nolockstep', 'replay', 'test',
|
||||
'uavcanv1' # TODO: fix and enable
|
||||
]
|
||||
bloaty_helpers = [
|
||||
'bloaty_compileunits',
|
||||
'bloaty_inlines',
|
||||
'bloaty_segments',
|
||||
'bloaty_symbols',
|
||||
'bloaty_templates',
|
||||
'bloaty_ram',
|
||||
'bloaty_compare_master',
|
||||
]
|
||||
|
||||
def process_target(px4board_file, target_name):
|
||||
ret = None
|
||||
platform = None
|
||||
toolchain = None
|
||||
# def process_target(px4board_file, target_name):
|
||||
# ret = None
|
||||
# platform = None
|
||||
# toolchain = None
|
||||
|
||||
if px4board_file.endswith("default.px4board"):
|
||||
kconf.load_config(px4board_file, replace=True)
|
||||
else: # Merge config with default.px4board
|
||||
default_kconfig = re.sub(r'[a-zA-Z\d_]+\.px4board', 'default.px4board', px4board_file)
|
||||
kconf.load_config(default_kconfig, replace=True)
|
||||
kconf.load_config(px4board_file, replace=False)
|
||||
# if px4board_file.endswith("default.px4board") or \
|
||||
# px4board_file.endswith("recovery.px4board") or \
|
||||
# px4board_file.endswith("bootloader.px4board"):
|
||||
# kconf.load_config(px4board_file, replace=True)
|
||||
# else: # Merge config with default.px4board
|
||||
# default_kconfig = re.sub(r'[a-zA-Z\d_]+\.px4board', 'default.px4board', px4board_file)
|
||||
# kconf.load_config(default_kconfig, replace=True)
|
||||
# kconf.load_config(px4board_file, replace=False)
|
||||
|
||||
if "BOARD_TOOLCHAIN" in kconf.syms:
|
||||
toolchain = kconf.syms["BOARD_TOOLCHAIN"].str_value
|
||||
# if "BOARD_TOOLCHAIN" in kconf.syms:
|
||||
# toolchain = kconf.syms["BOARD_TOOLCHAIN"].str_value
|
||||
|
||||
if "BOARD_PLATFORM" in kconf.syms:
|
||||
platform = kconf.syms["BOARD_PLATFORM"].str_value
|
||||
# if "BOARD_PLATFORM" in kconf.syms:
|
||||
# platform = kconf.syms["BOARD_PLATFORM"].str_value
|
||||
|
||||
assert platform, f"PLATFORM not found in {px4board_file}"
|
||||
# assert platform, f"PLATFORM not found in {px4board_file}"
|
||||
|
||||
if platform not in excluded_platforms:
|
||||
# get the container based on the platform and toolchain
|
||||
container = platform
|
||||
if platform == 'posix':
|
||||
container = 'base-focal'
|
||||
if toolchain:
|
||||
if toolchain.startswith('aarch64'):
|
||||
container = 'aarch64'
|
||||
elif toolchain == 'arm-linux-gnueabihf':
|
||||
container = 'armhf'
|
||||
else:
|
||||
if verbose: print(f'possibly unmatched toolchain: {toolchain}')
|
||||
elif platform == 'nuttx':
|
||||
container = 'nuttx-focal'
|
||||
# if platform not in excluded_platforms:
|
||||
# # get the container based on the platform and toolchain
|
||||
# container = platform
|
||||
# if platform == 'posix':
|
||||
# container = 'base-focal'
|
||||
# if toolchain:
|
||||
# if toolchain.startswith('aarch64'):
|
||||
# container = 'aarch64'
|
||||
# elif toolchain == 'arm-linux-gnueabihf':
|
||||
# container = 'armhf'
|
||||
# else:
|
||||
# if verbose: print(f'possibly unmatched toolchain: {toolchain}')
|
||||
# elif platform == 'nuttx':
|
||||
# container = 'nuttx-focal'
|
||||
|
||||
ret = {'target': target_name, 'container': container}
|
||||
# ret = {'target': target_name, 'container': container}
|
||||
|
||||
return ret
|
||||
# return ret
|
||||
|
||||
def process_bloaty(target_path, target_name):
|
||||
response = []
|
||||
for bloat in bloaty_helpers:
|
||||
bloaty_name = target_name + ' ' + bloat + ' || true'
|
||||
processed_target = process_target(target_path, bloaty_name)
|
||||
response.append(processed_target)
|
||||
return response
|
||||
|
||||
# Look up boards from each manufacturer
|
||||
for manufacturer in os.scandir(os.path.join(source_dir, 'boards')):
|
||||
if not manufacturer.is_dir():
|
||||
continue
|
||||
@@ -83,18 +107,37 @@ for manufacturer in os.scandir(os.path.join(source_dir, 'boards')):
|
||||
continue
|
||||
|
||||
for board in os.scandir(manufacturer.path):
|
||||
# Only boards are directories don't proceed if otherwise
|
||||
if not board.is_dir():
|
||||
continue
|
||||
for files in os.scandir(board.path):
|
||||
if files.is_file() and files.name.endswith('.px4board'):
|
||||
label = files.name[:-9]
|
||||
target_name = manufacturer.name + '_' + board.name + '_' + label
|
||||
if label in excluded_labels:
|
||||
if verbose: print(f'excluding label {label} ({target_name})')
|
||||
continue
|
||||
target = process_target(files.path, target_name)
|
||||
if target is not None:
|
||||
build_configs.append(target)
|
||||
|
||||
if args.all_variants:
|
||||
# The all_variants target makes all targets for a board
|
||||
target_name = 'all_variants_' + manufacturer.name + '_' + board.name
|
||||
default_target_path = f'{board.path}/default.px4board'
|
||||
# target = process_target(default_target_path, target_name)
|
||||
target = {'target': target_name}
|
||||
if target is not None:
|
||||
build_configs.append(target)
|
||||
if args.bloaty and target is not None:
|
||||
# bloaty targets
|
||||
bloat_target_name = manufacturer.name + '_' + board.name
|
||||
# bloaty_targets = process_bloaty(default_target_path, bloat_target_name)
|
||||
bloaty_targets = {'target': bloat_target_name}
|
||||
build_configs += bloaty_targets
|
||||
else:
|
||||
# Each board can have multiple variant targets
|
||||
for files in os.scandir(board.path):
|
||||
if files.is_file() and files.name.endswith('.px4board'):
|
||||
label = files.name[:-9]
|
||||
target_name = manufacturer.name + '_' + board.name + '_' + label
|
||||
if label in excluded_labels:
|
||||
if verbose: print(f'excluding label {label} ({target_name})')
|
||||
continue
|
||||
# target = process_target(files.path, target_name)
|
||||
target = {'target': target_name}
|
||||
if target is not None:
|
||||
build_configs.append(target)
|
||||
|
||||
|
||||
github_action_config = { 'include': build_configs }
|
||||
|
||||
+1
-1
Submodule Tools/jMAVSim updated: b23dc53d55...66b764ada5
@@ -10,7 +10,7 @@ extra_args=
|
||||
baudrate=921600
|
||||
device=
|
||||
ip="127.0.0.1"
|
||||
while getopts ":b:d:p:qsr:f:i:loa" opt; do
|
||||
while getopts ":b:d:p:qsr:f:i:loat" opt; do
|
||||
case $opt in
|
||||
b)
|
||||
baudrate=$OPTARG
|
||||
@@ -40,7 +40,10 @@ while getopts ":b:d:p:qsr:f:i:loa" opt; do
|
||||
extra_args="$extra_args -disponly"
|
||||
;;
|
||||
a)
|
||||
extra_args="$extra_args -fw" # aircraft
|
||||
extra_args="$extra_args -fw" # aircraft model
|
||||
;;
|
||||
t)
|
||||
extra_args="$extra_args -ts" # tailsitter model
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
|
||||
@@ -92,6 +92,7 @@ pca9685,CONFIG_DRIVERS_PCA9685=y
|
||||
pca9685_pwm_out,CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
power_monitor/ina226,CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
power_monitor/voxlpm,CONFIG_DRIVERS_POWER_MONITOR_VOXLPM=y
|
||||
pps_capture,CONFIG_DRIVERS_PPS_CAPTURE=y
|
||||
protocol_splitter,CONFIG_DRIVERS_PROTOCOL_SPLITTER=y
|
||||
pwm_input,CONFIG_DRIVERS_PWM_INPUT=y
|
||||
pwm_out_sim,CONFIG_DRIVERS_PWM_OUT_SIM=y
|
||||
@@ -155,7 +156,6 @@ bl_update,CONFIG_SYSTEMCMDS_BL_UPDATE=y
|
||||
dmesg,CONFIG_SYSTEMCMDS_DMESG=y
|
||||
dumpfile,CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
dyn,CONFIG_SYSTEMCMDS_DYN=y
|
||||
esc_calib,CONFIG_SYSTEMCMDS_ESC_CALIB=y
|
||||
failure,CONFIG_SYSTEMCMDS_FAILURE=y
|
||||
gpio,CONFIG_SYSTEMCMDS_GPIO=y
|
||||
hardfault_log,CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
@@ -164,7 +164,6 @@ led_control,CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
mft,CONFIG_SYSTEMCMDS_MFT=y
|
||||
microbench,CONFIG_SYSTEMCMDS_MICROBENCH=y
|
||||
mixer,CONFIG_SYSTEMCMDS_MIXER=y
|
||||
motor_ramp,CONFIG_SYSTEMCMDS_MOTOR_RAMP=y
|
||||
motor_test,CONFIG_SYSTEMCMDS_MOTOR_TEST=y
|
||||
mtd,CONFIG_SYSTEMCMDS_MTD=y
|
||||
netman,CONFIG_SYSTEMCMDS_NETMAN=y
|
||||
|
||||
+494
@@ -0,0 +1,494 @@
|
||||
#!/usr/bin/env python3
|
||||
""" Script to generate actuators.json metadata from module.yaml config file(s)
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import lzma #to create .xz file
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
from output_groups_from_timer_config import get_timer_groups, get_output_groups
|
||||
|
||||
try:
|
||||
import yaml
|
||||
except ImportError as e:
|
||||
print("Failed to import yaml: " + str(e))
|
||||
print("")
|
||||
print("You may need to install it using:")
|
||||
print(" pip3 install --user pyyaml")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Generate actuators.json from module.yaml file(s)')
|
||||
|
||||
parser.add_argument('--config-files', type=str, nargs='*', default=[],
|
||||
help='YAML module config file(s)')
|
||||
parser.add_argument('--output-file', type=str, action='store',
|
||||
help='JSON output file', required=True)
|
||||
parser.add_argument('--compress', action='store_true', help='Add a compressed output file')
|
||||
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='Verbose Output')
|
||||
parser.add_argument('--timer-config', type=str, action='store',
|
||||
help='board-specific timer_config.cpp file')
|
||||
parser.add_argument('--board', type=str, action='store',
|
||||
help='board name, e.g. ')
|
||||
parser.add_argument('--board-with-io', dest='board_with_io', action='store_true',
|
||||
help='Indicate that the board as an IO for extra PWM',
|
||||
default=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
compress = args.compress
|
||||
verbose = args.verbose
|
||||
output_file = args.output_file
|
||||
timer_config_file = args.timer_config
|
||||
board_with_io = args.board_with_io
|
||||
board = args.board
|
||||
|
||||
root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../..")
|
||||
output_functions_file = os.path.join(root_dir,"src/lib/mixer_module/output_functions.yaml")
|
||||
|
||||
def save_compressed(filename):
|
||||
#create lzma compressed version
|
||||
xz_filename=filename+'.xz'
|
||||
with lzma.open(xz_filename, 'wt', preset=9) as f:
|
||||
with open(filename, 'r') as content_file:
|
||||
f.write(content_file.read())
|
||||
|
||||
def load_yaml_file(file_name):
|
||||
with open(file_name, 'r') as stream:
|
||||
try:
|
||||
return yaml.safe_load(stream)
|
||||
except yaml.YAMLError as exc:
|
||||
print(exc)
|
||||
raise
|
||||
|
||||
# functions
|
||||
output_functions_yaml = load_yaml_file(output_functions_file)
|
||||
output_functions = output_functions_yaml['functions']
|
||||
functions = {}
|
||||
|
||||
def add_function(functions, index, name, function_obj=None):
|
||||
functions[index] = {
|
||||
"label": name
|
||||
}
|
||||
if function_obj is not None:
|
||||
if function_obj.get('exclude_from_actuator_testing', False):
|
||||
functions[index]['exclude-from-actuator-testing'] = True
|
||||
if 'note' in function_obj:
|
||||
functions[index]['note'] = function_obj['note']
|
||||
|
||||
for group_key in output_functions:
|
||||
group = output_functions[group_key]
|
||||
for function_name in group:
|
||||
function_name_label = function_name.replace('_', ' ')
|
||||
if isinstance(group[function_name], int):
|
||||
add_function(functions, group[function_name], function_name_label)
|
||||
elif not 'count' in group[function_name]:
|
||||
add_function(functions, group[function_name]['start'], function_name_label, group[function_name])
|
||||
else:
|
||||
start = group[function_name]['start']
|
||||
count = group[function_name]['count']
|
||||
for i in range(count):
|
||||
add_function(functions, start+i, function_name_label+' '+str(i+1), group[function_name])
|
||||
|
||||
# outputs
|
||||
outputs = []
|
||||
|
||||
def process_module_name(module_name):
|
||||
if module_name == '${PWM_MAIN_OR_AUX}':
|
||||
if board_with_io: return 'PWM AUX'
|
||||
return 'PWM MAIN'
|
||||
if '${' in module_name:
|
||||
raise Exception('unhandled variable in {:}'.format(module_name))
|
||||
return module_name
|
||||
|
||||
def process_param_prefix(param_prefix):
|
||||
if param_prefix == '${PWM_MAIN_OR_AUX}':
|
||||
if board_with_io: return 'PWM_AUX'
|
||||
return 'PWM_MAIN'
|
||||
if '${' in param_prefix:
|
||||
raise Exception('unhandled variable in {:}'.format(param_prefix))
|
||||
return param_prefix
|
||||
|
||||
def process_channel_label(module_name, channel_label, no_prefix):
|
||||
if channel_label == '${PWM_MAIN_OR_AUX_CAP}':
|
||||
return 'CAP'
|
||||
if channel_label == '${PWM_MAIN_OR_AUX}':
|
||||
if board_with_io: return 'AUX'
|
||||
return 'MAIN'
|
||||
if '${' in channel_label:
|
||||
raise Exception('unhandled variable in {:}'.format(channel_label))
|
||||
if no_prefix: return channel_label
|
||||
return channel_label
|
||||
|
||||
def get_actuator_output(yaml_config, output_functions, timer_config_file, verbose):
|
||||
""" parse the actuator_output section from the yaml config file
|
||||
"""
|
||||
if not 'actuator_output' in yaml_config:
|
||||
return None
|
||||
|
||||
|
||||
actuator_output_yaml = yaml_config['actuator_output']
|
||||
output_groups = actuator_output_yaml['output_groups']
|
||||
module_name = process_module_name(yaml_config['module_name'])
|
||||
group_idx = 0
|
||||
|
||||
if verbose: print('processing module: {}'.format(module_name))
|
||||
|
||||
actuator_output = {
|
||||
'label': module_name
|
||||
}
|
||||
if 'show_subgroups_if' in actuator_output_yaml:
|
||||
actuator_output['show-subgroups-if'] = actuator_output_yaml['show_subgroups_if']
|
||||
|
||||
# config parameters
|
||||
def get_config_params(param_list):
|
||||
""" convert config parameter list (per group or per subgroup) """
|
||||
parameters = []
|
||||
for config_param in param_list:
|
||||
if verbose:
|
||||
print('config param: {}'.format(config_param))
|
||||
param = {
|
||||
'name': config_param['param'],
|
||||
}
|
||||
if 'label' in config_param:
|
||||
param['label'] = config_param['label']
|
||||
if 'function' in config_param:
|
||||
param['function'] = config_param['function']
|
||||
parameters.append(param)
|
||||
return parameters
|
||||
|
||||
parameters = get_config_params(actuator_output_yaml.get('config_parameters', []))
|
||||
if len(parameters) > 0:
|
||||
actuator_output['parameters'] = parameters
|
||||
|
||||
subgroups = []
|
||||
|
||||
while group_idx < len(output_groups):
|
||||
group = output_groups[group_idx]
|
||||
group_idx += 1
|
||||
|
||||
if verbose: print("processing group: {:}".format(group))
|
||||
|
||||
# Check for generator and generate additional data.
|
||||
if 'generator' in group:
|
||||
if group['generator'] == 'pwm':
|
||||
param_prefix = process_param_prefix(group['param_prefix'])
|
||||
no_prefix = not group.get('channel_label_module_name_prefix', True)
|
||||
channel_labels = [process_channel_label(module_name, label, no_prefix)
|
||||
for label in group['channel_labels']]
|
||||
standard_params = group.get('standard_params', [])
|
||||
extra_function_groups = group.get('extra_function_groups', [])
|
||||
pwm_timer_param = group.get('pwm_timer_param', None)
|
||||
if 'timer_config_file' in group:
|
||||
timer_config_file = os.path.join(root_dir, group['timer_config_file'])
|
||||
if timer_config_file is None:
|
||||
raise Exception('trying to generate pwm outputs, but --timer-config not set')
|
||||
timer_groups = get_timer_groups(timer_config_file, verbose)
|
||||
timer_output_groups, timer_params = get_output_groups(timer_groups,
|
||||
param_prefix, channel_labels,
|
||||
standard_params, extra_function_groups, pwm_timer_param,
|
||||
verbose=verbose)
|
||||
output_groups.extend(timer_output_groups)
|
||||
else:
|
||||
raise Exception('unknown generator {:}'.format(group['generator']))
|
||||
continue
|
||||
|
||||
subgroup = {}
|
||||
|
||||
# supported actions
|
||||
if 'supported_actions' in group:
|
||||
actions = {}
|
||||
for action_name in group['supported_actions']:
|
||||
action = group['supported_actions'][action_name]
|
||||
action_name = action_name.replace('_', '-')
|
||||
actions[action_name] = {}
|
||||
if 'supported_if' in action:
|
||||
actions[action_name]['supported-if'] = action['supported_if']
|
||||
if 'actuator_types' in action:
|
||||
actions[action_name]['actuator-types'] = action['actuator_types']
|
||||
subgroup['supported-actions'] = actions
|
||||
|
||||
# channels
|
||||
num_channels = group['num_channels']
|
||||
no_prefix = not group.get('channel_label_module_name_prefix', True)
|
||||
channel_label = process_channel_label(module_name, group['channel_label'], no_prefix)
|
||||
instance_start = group.get('instance_start', 1)
|
||||
instance_start_label = group.get('instance_start_label', instance_start)
|
||||
channels = []
|
||||
for channel in range(num_channels):
|
||||
channels.append({
|
||||
'label': channel_label + ' ' +str(channel+instance_start_label),
|
||||
'param-index': channel+instance_start
|
||||
})
|
||||
subgroup['channels'] = channels
|
||||
|
||||
if 'group_label' in group:
|
||||
subgroup['label'] = group['group_label']
|
||||
|
||||
|
||||
# per-channel-params
|
||||
per_channel_params = []
|
||||
param_prefix = process_param_prefix(group['param_prefix'])
|
||||
standard_params = group.get('standard_params', {})
|
||||
standard_params_array = [
|
||||
( 'function', 'Function', 'FUNC', False ),
|
||||
( 'disarmed', 'Disarmed', 'DIS', False ),
|
||||
( 'min', 'Minimum', 'MIN', False ),
|
||||
( 'max', 'Maximum', 'MAX', False ),
|
||||
( 'failsafe', 'Failsafe', 'FAIL', True ),
|
||||
]
|
||||
for key, label, param_suffix, advanced in standard_params_array:
|
||||
show_if = None
|
||||
if key in standard_params and 'show_if' in standard_params[key]:
|
||||
show_if = standard_params[key]['show_if']
|
||||
|
||||
if key in standard_params or key == 'function':
|
||||
param = {
|
||||
'label': label,
|
||||
'name': param_prefix+'_'+param_suffix+'${i}',
|
||||
'function': key,
|
||||
}
|
||||
if advanced: param['advanced'] = True
|
||||
if show_if: param['show-if'] = show_if
|
||||
per_channel_params.append(param)
|
||||
|
||||
|
||||
param = {
|
||||
'label': 'Rev Range\n(for Servos)',
|
||||
'name': param_prefix+'_REV',
|
||||
'index-offset': -1,
|
||||
'show-as': 'bitset',
|
||||
}
|
||||
per_channel_params.append(param)
|
||||
|
||||
# TODO: support non-standard per-channel parameters
|
||||
|
||||
subgroup['per-channel-parameters'] = per_channel_params
|
||||
|
||||
# group config params
|
||||
parameters = get_config_params(group.get('config_parameters', []))
|
||||
if len(parameters) > 0:
|
||||
subgroup['parameters'] = parameters
|
||||
|
||||
subgroups.append(subgroup)
|
||||
|
||||
actuator_output['subgroups'] = subgroups
|
||||
return actuator_output
|
||||
|
||||
# Mixers
|
||||
mixers = None
|
||||
def get_mixers(yaml_config, output_functions, verbose):
|
||||
if not 'mixer' in yaml_config:
|
||||
return None
|
||||
|
||||
actuator_types = {}
|
||||
for actuator_type_key in yaml_config['mixer']['actuator_types']:
|
||||
actuator_type_conf = yaml_config['mixer']['actuator_types'][actuator_type_key]
|
||||
actuator_type = { }
|
||||
if actuator_type_key != 'DEFAULT':
|
||||
actuator_type['label-index-offset'] = 1 # always 1
|
||||
if 'functions' in actuator_type_conf:
|
||||
function_name = actuator_type_conf['functions']
|
||||
# we expect the function to be in 'common' (this is not a requirement, just simplicity)
|
||||
output_function = output_functions['common'][function_name]
|
||||
actuator_type['function-min'] = output_function['start']
|
||||
actuator_type['function-max'] = output_function['start'] + output_function['count'] - 1
|
||||
|
||||
values = actuator_type_conf['actuator_testing_values']
|
||||
actuator_type['values'] = {
|
||||
'min': values['min'],
|
||||
'max': values['max'],
|
||||
}
|
||||
if values.get('default_is_nan', False):
|
||||
actuator_type['values']['default-is-nan'] = True
|
||||
else:
|
||||
actuator_type['values']['default'] = values['default']
|
||||
if values.get('reversible', False):
|
||||
actuator_type['values']['reversible'] = True
|
||||
|
||||
# per item params
|
||||
per_item_params = []
|
||||
for per_item_param in actuator_type_conf.get('per_item_parameters', []):
|
||||
per_item_params.append({k.replace('_','-'): v for k, v in per_item_param.items()})
|
||||
if len(per_item_params) > 0:
|
||||
actuator_type['per-item-parameters'] = per_item_params
|
||||
|
||||
actuator_types[actuator_type_key] = actuator_type
|
||||
|
||||
if verbose:
|
||||
print('Actuator types: {}'.format(actuator_types))
|
||||
|
||||
config = []
|
||||
yaml_mixer_config = yaml_config['mixer']['config']
|
||||
select_param = yaml_mixer_config['param']
|
||||
types = yaml_mixer_config['types']
|
||||
for type_index in types:
|
||||
current_type = types[type_index]
|
||||
option = select_param + '==' + str(type_index)
|
||||
mixer_config = {
|
||||
'option': option,
|
||||
}
|
||||
if 'type' in current_type:
|
||||
mixer_config['type'] = current_type['type']
|
||||
actuators = []
|
||||
for actuator_conf in current_type['actuators']:
|
||||
actuator = {
|
||||
'actuator-type': actuator_conf['actuator_type'],
|
||||
'required': True, # for now always set as required
|
||||
}
|
||||
# sanity check that actuator type exists
|
||||
if actuator_conf['actuator_type'] not in actuator_types:
|
||||
raise Exception('actuator type "{}" does not exist (valid: {})'.format(actuator_conf['actuator_type'], actuator_types.keys()))
|
||||
|
||||
if 'group_label' in actuator_conf:
|
||||
actuator['group-label'] = actuator_conf['group_label']
|
||||
else:
|
||||
# infer from actuator type
|
||||
if actuator_conf['actuator_type'] == 'motor':
|
||||
actuator['group-label'] = 'Motors'
|
||||
elif actuator_conf['actuator_type'] == 'servo':
|
||||
actuator['group-label'] = 'Servos'
|
||||
else:
|
||||
raise Exception('Missing group label for actuator type "{}"'.format(actuator_conf['actuator_type']))
|
||||
|
||||
if 'count' in actuator_conf: # possibly dynamic size
|
||||
actuator['count'] = actuator_conf['count']
|
||||
per_item_params = actuator_conf.get('per_item_parameters', {})
|
||||
params = []
|
||||
if 'standard' in per_item_params:
|
||||
standard_params = per_item_params['standard']
|
||||
index_offset = standard_params.get('index_offset', 0)
|
||||
if 'position' in standard_params:
|
||||
params.extend([
|
||||
{
|
||||
'label': 'Position X',
|
||||
'function': 'posx',
|
||||
'name': standard_params['position'][0],
|
||||
'index-offset': index_offset,
|
||||
},
|
||||
{
|
||||
'label': 'Position Y',
|
||||
'function': 'posy',
|
||||
'name': standard_params['position'][1],
|
||||
'index-offset': index_offset,
|
||||
},
|
||||
{
|
||||
'label': 'Position Z',
|
||||
'function': 'posz',
|
||||
'name': standard_params['position'][2],
|
||||
'advanced': True,
|
||||
'index-offset': index_offset,
|
||||
},
|
||||
])
|
||||
if 'extra' in per_item_params:
|
||||
for extra_param in per_item_params['extra']:
|
||||
params.append({k.replace('_','-'): v for k, v in extra_param.items()})
|
||||
actuator['per-item-parameters'] = params
|
||||
if 'item_label_prefix' in actuator_conf:
|
||||
actuator['item-label-prefix'] = actuator_conf['item_label_prefix']
|
||||
else: # fixed size
|
||||
labels = []
|
||||
pos_x = []
|
||||
pos_y = []
|
||||
pos_z = []
|
||||
for instance in actuator_conf['instances']:
|
||||
labels.append(instance['name'])
|
||||
pos_x.append(instance['position'][0])
|
||||
pos_y.append(instance['position'][1])
|
||||
pos_z.append(instance['position'][2])
|
||||
actuator['count'] = len(labels)
|
||||
actuator['item-label-prefix'] = labels
|
||||
actuator['per-item-parameters'] = [
|
||||
{
|
||||
'label': 'Position X',
|
||||
'function': 'posx',
|
||||
'value': pos_x,
|
||||
},
|
||||
{
|
||||
'label': 'Position Y',
|
||||
'function': 'posy',
|
||||
'value': pos_y,
|
||||
},
|
||||
{
|
||||
'label': 'Position Z',
|
||||
'function': 'posz',
|
||||
'value': pos_z,
|
||||
'advanced': True,
|
||||
},
|
||||
]
|
||||
|
||||
# actuator parameters
|
||||
parameters = []
|
||||
for param in actuator_conf.get('parameters', []):
|
||||
parameters.append({k.replace('_','-'): v for k, v in param.items()})
|
||||
actuator['parameters'] = parameters
|
||||
|
||||
actuators.append(actuator)
|
||||
|
||||
mixer_config['actuators'] = actuators
|
||||
config.append(mixer_config)
|
||||
|
||||
if verbose:
|
||||
print('Mixer configs: {}'.format(config))
|
||||
|
||||
rules = []
|
||||
for rule in yaml_config['mixer'].get('rules', []):
|
||||
rules.append({k.replace('_','-'): v for k, v in rule.items()})
|
||||
|
||||
if verbose:
|
||||
print('Mixer rules: {}'.format(rules))
|
||||
|
||||
mixers = {
|
||||
'actuator-types': actuator_types,
|
||||
'config': config,
|
||||
'rules': rules,
|
||||
}
|
||||
return mixers
|
||||
|
||||
|
||||
for yaml_file in args.config_files:
|
||||
yaml_config = load_yaml_file(yaml_file)
|
||||
|
||||
try:
|
||||
actuator_output = get_actuator_output(yaml_config,
|
||||
output_functions, timer_config_file, verbose)
|
||||
if actuator_output:
|
||||
outputs.append(actuator_output)
|
||||
|
||||
parsed_mixers = get_mixers(yaml_config, output_functions, verbose)
|
||||
if parsed_mixers is not None:
|
||||
if mixers is not None:
|
||||
# only expected to be configured in one module
|
||||
raise Exception('multiple "mixer" sections in module config files')
|
||||
mixers = parsed_mixers
|
||||
except Exception as e:
|
||||
print('Exception while parsing {:}:'.format(yaml_file))
|
||||
raise e
|
||||
|
||||
if mixers is None:
|
||||
if len(outputs) > 0:
|
||||
raise Exception('Missing "mixer" section in yaml configs (CONFIG_MODULES_CONTROL_ALLOCATOR not added to the build?)')
|
||||
else:
|
||||
# set a minimal default
|
||||
mixers = {
|
||||
'actuator-types': { 'DEFAULT': { 'values': { 'min': 0, 'max': 1 } } },
|
||||
'config': [],
|
||||
}
|
||||
|
||||
actuators = {
|
||||
'version': 1,
|
||||
'show-ui-if': 'SYS_CTRL_ALLOC==1',
|
||||
'outputs_v1': outputs,
|
||||
'functions_v1': functions,
|
||||
'mixer_v1': mixers,
|
||||
}
|
||||
|
||||
with open(output_file, 'w') as outfile:
|
||||
indent = 2 if verbose else None
|
||||
json.dump(actuators, outfile, indent=indent)
|
||||
|
||||
if compress:
|
||||
save_compressed(output_file)
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
""" Script to params from module.yaml config file(s)
|
||||
""" Script to generate params from module.yaml config file(s)
|
||||
Note: serial params are handled in Tools/serial/generate_config.py
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
from copy import deepcopy
|
||||
|
||||
from output_groups_from_timer_config import get_timer_groups, get_output_groups
|
||||
|
||||
@@ -49,10 +50,15 @@ board = args.board
|
||||
root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../..")
|
||||
output_functions_file = os.path.join(root_dir,"src/lib/mixer_module/output_functions.yaml")
|
||||
|
||||
def process_module_name(module_name):
|
||||
if module_name == '${PWM_MAIN_OR_AUX}':
|
||||
if board_with_io: return 'PWM AUX'
|
||||
return 'PWM MAIN'
|
||||
if '${' in module_name:
|
||||
raise Exception('unhandled variable in {:}'.format(module_name))
|
||||
return module_name
|
||||
|
||||
def process_param_prefix(param_prefix):
|
||||
if param_prefix == '${PWM_MAIN_OR_HIL}':
|
||||
if board == 'px4_sitl': return 'PWM_MAIN'
|
||||
return 'HIL_ACT'
|
||||
if param_prefix == '${PWM_MAIN_OR_AUX}':
|
||||
if board_with_io: return 'PWM_AUX'
|
||||
return 'PWM_MAIN'
|
||||
@@ -60,16 +66,16 @@ def process_param_prefix(param_prefix):
|
||||
raise Exception('unhandled variable in {:}'.format(param_prefix))
|
||||
return param_prefix
|
||||
|
||||
def process_channel_label(channel_label):
|
||||
if channel_label == '${PWM_MAIN_OR_HIL}':
|
||||
if board == 'px4_sitl': return 'PWM Sim'
|
||||
return 'HIL actuator'
|
||||
def process_channel_label(module_name, channel_label, no_prefix):
|
||||
if channel_label == '${PWM_MAIN_OR_AUX_CAP}':
|
||||
return 'PWM Capture'
|
||||
if channel_label == '${PWM_MAIN_OR_AUX}':
|
||||
if board_with_io: return 'PWM Aux'
|
||||
return 'PWM Main'
|
||||
if '${' in channel_label:
|
||||
raise Exception('unhandled variable in {:}'.format(channel_label))
|
||||
return channel_label
|
||||
if no_prefix: return channel_label
|
||||
return module_name + ' ' + channel_label
|
||||
|
||||
|
||||
def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
@@ -104,6 +110,13 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
param_type = 'INT32'
|
||||
for key in param['values']:
|
||||
tags += '\n * @value {:} {:}'.format(key, param['values'][key])
|
||||
elif param['type'] == 'bitmask':
|
||||
param_type = 'INT32'
|
||||
for key in param['bit']:
|
||||
tags += '\n * @bit {:} {:}'.format(key, param['bit'][key])
|
||||
max_val = max(key for key in param['bit'])
|
||||
tags += '\n * @min 0'
|
||||
tags += '\n * @max {:}'.format((1<<(max_val+1)) - 1)
|
||||
elif param['type'] == 'boolean':
|
||||
param_type = 'INT32'
|
||||
tags += '\n * @boolean'
|
||||
@@ -114,7 +127,7 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
else:
|
||||
raise Exception("unknown param type {:}".format(param['type']))
|
||||
|
||||
for tag in ['decimal', 'increment', 'category', 'volatile', 'bit',
|
||||
for tag in ['decimal', 'increment', 'category', 'volatile',
|
||||
'min', 'max', 'unit', 'reboot_required']:
|
||||
if tag in param:
|
||||
tags += '\n * @{:} {:}'.format(tag, param[tag])
|
||||
@@ -144,7 +157,7 @@ def parse_yaml_parameters_config(yaml_config, ethernet_supported):
|
||||
*/
|
||||
PARAM_DEFINE_{param_type}({name}, {default_value});
|
||||
'''.format(short_descr=param['description']['short'].replace("\n", "\n * "),
|
||||
long_descr=param['description']['long'].replace("\n", "\n * "),
|
||||
long_descr=param['description'].get('long', "").replace("\n", "\n * "),
|
||||
tags=tags,
|
||||
param_type=param_type,
|
||||
name=param_name.replace('${i}', str(i+instance_start)),
|
||||
@@ -161,9 +174,12 @@ def get_actuator_output_params(yaml_config, output_functions,
|
||||
if not 'actuator_output' in yaml_config:
|
||||
return {}
|
||||
output_groups = yaml_config['actuator_output']['output_groups']
|
||||
module_name = process_module_name(yaml_config['module_name'])
|
||||
all_params = {}
|
||||
group_idx = 0
|
||||
|
||||
all_param_prefixes = {}
|
||||
|
||||
def add_local_param(param_name, param_def):
|
||||
nonlocal all_params
|
||||
# add as a list, as there can be multiple entries with the same param_name
|
||||
@@ -182,7 +198,9 @@ def get_actuator_output_params(yaml_config, output_functions,
|
||||
if 'generator' in group:
|
||||
if group['generator'] == 'pwm':
|
||||
param_prefix = process_param_prefix(group['param_prefix'])
|
||||
channel_labels = [process_channel_label(label) for label in group['channel_labels']]
|
||||
no_prefix = not group.get('channel_label_module_name_prefix', True)
|
||||
channel_labels = [process_channel_label(module_name, label, no_prefix)
|
||||
for label in group['channel_labels']]
|
||||
standard_params = group.get('standard_params', [])
|
||||
extra_function_groups = group.get('extra_function_groups', [])
|
||||
pwm_timer_param = group.get('pwm_timer_param', None)
|
||||
@@ -197,13 +215,29 @@ def get_actuator_output_params(yaml_config, output_functions,
|
||||
verbose=verbose)
|
||||
all_params.update(timer_params)
|
||||
output_groups.extend(timer_output_groups)
|
||||
|
||||
# In case of a board w/o IO and >8 PWM channels, pwm_out splits
|
||||
# into 2 instances (if SYS_CTRL_ALLOC==0) and we need to add the
|
||||
# PWM_AUX min/max/disarmed params as well.
|
||||
num_channels = len(timer_groups['types'])
|
||||
if not board_with_io and num_channels > 8:
|
||||
output_groups.append(
|
||||
{
|
||||
'param_prefix': 'PWM_AUX',
|
||||
'channel_label': 'PWM AUX',
|
||||
'instance_start': 1,
|
||||
'num_channels': num_channels - 8,
|
||||
'standard_params': deepcopy(timer_output_groups[0]['standard_params'])
|
||||
})
|
||||
|
||||
else:
|
||||
raise Exception('unknown generator {:}'.format(group['generator']))
|
||||
continue
|
||||
|
||||
num_channels = group['num_channels']
|
||||
param_prefix = process_param_prefix(group['param_prefix'])
|
||||
channel_label = process_channel_label(group['channel_label'])
|
||||
no_prefix = not group.get('channel_label_module_name_prefix', True)
|
||||
channel_label = process_channel_label(module_name, group['channel_label'], no_prefix)
|
||||
standard_params = group.get('standard_params', {})
|
||||
instance_start = group.get('instance_start', 1)
|
||||
instance_start_label = group.get('instance_start_label', instance_start)
|
||||
@@ -219,12 +253,19 @@ def get_actuator_output_params(yaml_config, output_functions,
|
||||
function_name_label = function_name.replace('_', ' ')
|
||||
if isinstance(group[function_name], int):
|
||||
output_function_values[group[function_name]] = function_name_label
|
||||
elif not 'count' in group[function_name]:
|
||||
output_function_values[group[function_name]['start']] = function_name_label
|
||||
else:
|
||||
start = group[function_name]['start']
|
||||
count = group[function_name]['count']
|
||||
for i in range(count):
|
||||
output_function_values[start+i] = function_name_label+' '+str(i+1)
|
||||
|
||||
if param_prefix not in all_param_prefixes:
|
||||
all_param_prefixes[param_prefix] = []
|
||||
all_param_prefixes[param_prefix].append((instance_start,
|
||||
instance_start_label, num_channels, channel_label))
|
||||
|
||||
# function param
|
||||
param = {
|
||||
'description': {
|
||||
@@ -257,13 +298,9 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
|
||||
'''
|
||||
minimum_description = \
|
||||
'''Minimum output value (when not disarmed).
|
||||
|
||||
The output range can be reversed by setting Min > Max.
|
||||
'''
|
||||
maximum_description = \
|
||||
'''Maxmimum output value (when not disarmed).
|
||||
|
||||
The output range can be reversed by setting Min > Max.
|
||||
'''
|
||||
failsafe_description = \
|
||||
'''This is the output value that is set when in failsafe mode.
|
||||
@@ -304,6 +341,30 @@ When set to -1 (default), the value depends on the function (see {:}).
|
||||
}
|
||||
add_local_param(param_prefix+'_'+param_suffix+'${i}', param)
|
||||
|
||||
# add reverse range param
|
||||
for param_prefix in all_param_prefixes:
|
||||
groups = all_param_prefixes[param_prefix]
|
||||
# collect the bits
|
||||
channel_bits = {}
|
||||
for instance_start, instance_start_label, num_instances, label in groups:
|
||||
for instance in range(instance_start, instance_start+num_instances):
|
||||
instance_label = instance - instance_start + instance_start_label
|
||||
channel_bits[instance-1] = label + ' ' + str(instance_label)
|
||||
|
||||
param = {
|
||||
'description': {
|
||||
'short': 'Reverse Output Range for '+module_name,
|
||||
'long':
|
||||
'''Allows to reverse the output range for each channel.
|
||||
Note: this is only useful for servos.
|
||||
'''.format(channel_label),
|
||||
},
|
||||
'type': 'bitmask',
|
||||
'default': 0,
|
||||
'bit': channel_bits
|
||||
}
|
||||
add_local_param(param_prefix+'_REV', param)
|
||||
|
||||
if verbose: print('adding actuator params: {:}'.format(all_params))
|
||||
return all_params
|
||||
|
||||
|
||||
@@ -151,6 +151,9 @@ def get_output_groups(timer_groups, param_prefix="PWM_MAIN",
|
||||
|
||||
channel_label = channel_labels[channel_type_idx]
|
||||
channel_type_instance = instance_start_label[channel_type_idx]
|
||||
group_label = channel_label + ' ' + str(channel_type_instance)
|
||||
if group_count > 1:
|
||||
group_label += '-' + str(channel_type_instance+group_count-1)
|
||||
group = {
|
||||
'param_prefix': param_prefix,
|
||||
'channel_label': channel_label,
|
||||
@@ -159,16 +162,39 @@ def get_output_groups(timer_groups, param_prefix="PWM_MAIN",
|
||||
'extra_function_groups': deepcopy(extra_function_groups),
|
||||
'num_channels': group_count,
|
||||
'standard_params': deepcopy(standard_params),
|
||||
'group_label': group_label,
|
||||
'channel_label_module_name_prefix': False,
|
||||
}
|
||||
output_groups.append(group)
|
||||
|
||||
if pwm_timer_param is not None:
|
||||
timer_channels_label = channel_label + ' ' + str(channel_type_instance)
|
||||
if group_count > 1:
|
||||
timer_channels_label += '-' + str(channel_type_instance+group_count-1)
|
||||
pwm_timer_param_cp = deepcopy(pwm_timer_param)
|
||||
timer_param_name = param_prefix+'_TIM'+str(timer_index)
|
||||
|
||||
if not dshot_support:
|
||||
group['config_parameters'] = [
|
||||
{
|
||||
'param': timer_param_name,
|
||||
'function': 'primary',
|
||||
}
|
||||
]
|
||||
|
||||
if dshot_support:
|
||||
# don't show pwm limit params when dshot enabled
|
||||
|
||||
for standard_param in group['standard_params']:
|
||||
group['standard_params'][standard_param]['show_if'] = timer_param_name + '>=-1'
|
||||
|
||||
# indicate support for changing motor spin direction
|
||||
group['supported_actions'] = {
|
||||
'set_spin_direction1': {
|
||||
'supported_if': timer_param_name + '<-1',
|
||||
'actuator_types': ['motor']
|
||||
},
|
||||
'set_spin_direction2': {
|
||||
'supported_if': timer_param_name + '<-1',
|
||||
'actuator_types': ['motor']
|
||||
},
|
||||
}
|
||||
else:
|
||||
# remove dshot entries if no dshot support
|
||||
values = pwm_timer_param_cp['values']
|
||||
for key in list(values.keys()):
|
||||
@@ -178,8 +204,9 @@ def get_output_groups(timer_groups, param_prefix="PWM_MAIN",
|
||||
for descr_type in ['short', 'long']:
|
||||
descr = pwm_timer_param_cp['description'][descr_type]
|
||||
pwm_timer_param_cp['description'][descr_type] = \
|
||||
descr.replace('${label}', timer_channels_label)
|
||||
timer_params[param_prefix+'_TIM'+str(timer_index)] = pwm_timer_param_cp
|
||||
descr.replace('${label}', group_label)
|
||||
timer_params[timer_param_name] = pwm_timer_param_cp
|
||||
output_groups.append(group)
|
||||
instance_start += group_count
|
||||
instance_start_label[channel_type_idx] += group_count
|
||||
return (output_groups, timer_params)
|
||||
|
||||
@@ -72,38 +72,27 @@ div.frame_variant td, div.frame_variant th {
|
||||
|
||||
# check if all outputs are equal for the group: if so, show them
|
||||
# only once
|
||||
outputs_prev = ['', ''] # split into MAINx and others (AUXx)
|
||||
outputs_match = [True, True]
|
||||
all_outputs = {}
|
||||
num_configs = len(group.GetParams())
|
||||
for param in group.GetParams():
|
||||
if not self.IsExcluded(param, board):
|
||||
outputs_current = ['', '']
|
||||
for output_name in param.GetOutputCodes():
|
||||
value = param.GetOutputValue(output_name)
|
||||
if output_name.lower().startswith('main'):
|
||||
idx = 0
|
||||
else:
|
||||
idx = 1
|
||||
outputs_current[idx] += '<li><b>%s</b>: %s</li>' % (output_name, value)
|
||||
for i in range(2):
|
||||
if len(outputs_current[i]) != 0:
|
||||
if outputs_prev[i] == '':
|
||||
outputs_prev[i] = outputs_current[i]
|
||||
elif outputs_current[i] != outputs_prev[i]:
|
||||
outputs_match[i] = False
|
||||
key_value_pair = (output_name, value)
|
||||
if key_value_pair not in all_outputs:
|
||||
all_outputs[key_value_pair] = 0
|
||||
all_outputs[key_value_pair] += 1
|
||||
has_common_outputs = any(all_outputs[k] == num_configs for k in all_outputs)
|
||||
|
||||
for i in range(2):
|
||||
if len(outputs_prev[i]) == 0:
|
||||
outputs_match[i] = False
|
||||
if not outputs_match[i]:
|
||||
outputs_prev[i] = ''
|
||||
|
||||
if outputs_match[0] or outputs_match[1]:
|
||||
if has_common_outputs:
|
||||
outputs_common = ''.join(['<li><b>{:}</b>: {:}</li>'.format(k[0], k[1]) \
|
||||
for k in all_outputs if all_outputs[k] == num_configs])
|
||||
result += '<table>\n'
|
||||
result += ' <thead>\n'
|
||||
result += ' <tr><th>Common Outputs</th></tr>\n'
|
||||
result += ' </thead>\n'
|
||||
result += ' <tbody>\n'
|
||||
result += '<tr>\n <td><ul>%s%s</ul></td>\n</tr>\n' % (outputs_prev[0], outputs_prev[1])
|
||||
result += '<tr>\n <td><ul>%s</ul></td>\n</tr>\n' % (outputs_common)
|
||||
result += '</tbody></table>\n'
|
||||
|
||||
result += '</div>\n\n'
|
||||
@@ -138,11 +127,8 @@ div.frame_variant td, div.frame_variant th {
|
||||
for output_name in param.GetOutputCodes():
|
||||
value = param.GetOutputValue(output_name)
|
||||
valstrs = value.split(";")
|
||||
if output_name.lower().startswith('main'):
|
||||
idx = 0
|
||||
else:
|
||||
idx = 1
|
||||
if not outputs_match[idx]:
|
||||
key_value_pair = (output_name, value)
|
||||
if all_outputs[key_value_pair] < num_configs:
|
||||
outputs += '<li><b>%s</b>: %s</li>' % (output_name, value)
|
||||
has_outputs = True
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ class RCOutput():
|
||||
result += "\n"
|
||||
result += "if [ ${AIRFRAME} != none ]\n"
|
||||
result += "then\n"
|
||||
result += "\techo \"Loading airframe: /etc/init.d/airframes/${AIRFRAME}\"\n"
|
||||
result += "\t. /etc/init.d/airframes/${AIRFRAME}\n"
|
||||
if not post_start:
|
||||
result += "else\n"
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# PX4 base development environment
|
||||
#
|
||||
|
||||
FROM ubuntu:20.04
|
||||
LABEL maintainer="Daniel Agar <daniel@agar.ca>, Ramon Roche <mrpollo@gmail.com>"
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV LANG C.UTF-8
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
||||
# Installing required utilities
|
||||
RUN apt-get update && apt-get -y --quiet --no-install-recommends install \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-core \
|
||||
lsb-release \
|
||||
sudo \
|
||||
software-properties-common \
|
||||
wget \
|
||||
gosu \
|
||||
;
|
||||
|
||||
# Install PX4 Requirements
|
||||
COPY Tools/setup/requirements.txt /tmp/requirements.txt
|
||||
COPY Tools/setup/ubuntu.sh /tmp/ubuntu.sh
|
||||
# We support pre-downloading the gcc arm none eabi compiler
|
||||
# to speed up build times, if the file is not present when
|
||||
# building, the ubuntu.sh script will download it from source
|
||||
COPY *gcc-arm-none-eabi-9-2020-q2-update-linux.tar.bz2 /tmp/gcc-arm-none-eabi-9-2020-q2-update-linux.tar.bz2
|
||||
# The PATH env is set within ubuntu.sh, but given how we
|
||||
# are running the image using `gosu` to avoid read-only problems
|
||||
# with the filesystem the env variable does not persist
|
||||
ENV PATH="/opt/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH"
|
||||
ENV PATH="/opt/jdk-14.0.2+12/bin:$PATH"
|
||||
RUN bash /tmp/ubuntu.sh --from-docker --with-java --with-rtps --no-sim-tools
|
||||
|
||||
ENV DISPLAY :99
|
||||
|
||||
ENV FASTRTPSGEN_DIR="/usr/local/bin/"
|
||||
ENV TERM=xterm
|
||||
ENV TZ=UTC
|
||||
|
||||
# SITL UDP PORTS
|
||||
EXPOSE 14556/udp
|
||||
EXPOSE 14557/udp
|
||||
|
||||
# create user with id 1001 (jenkins docker workflow default)
|
||||
RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user
|
||||
|
||||
# create and start as LOCAL_USER_ID
|
||||
COPY Tools/setup/docker-entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
@@ -48,7 +48,6 @@ echo "Installing PX4 general dependencies"
|
||||
sudo pacman -Sy --noconfirm --needed \
|
||||
astyle \
|
||||
base-devel \
|
||||
ccache \
|
||||
clang \
|
||||
cmake \
|
||||
cppcheck \
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start virtual X server in the background
|
||||
# - DISPLAY default is :99, set in dockerfile
|
||||
# - Users can override with `-e DISPLAY=` in `docker run` command to avoid
|
||||
# running Xvfb and attach their screen
|
||||
if [[ -x "$(command -v Xvfb)" && "$DISPLAY" == ":99" ]]; then
|
||||
echo "Starting Xvfb"
|
||||
Xvfb :99 -screen 0 1600x1200x24+32 &
|
||||
fi
|
||||
|
||||
# Check if the ROS_DISTRO is passed and use it
|
||||
# to source the ROS environment
|
||||
if [ -n "${ROS_DISTRO}" ]; then
|
||||
source "/opt/ros/$ROS_DISTRO/setup.bash"
|
||||
fi
|
||||
|
||||
# Use the LOCAL_USER_ID if passed in at runtime
|
||||
if [ -n "${LOCAL_USER_ID}" ]; then
|
||||
echo "Starting with UID : $LOCAL_USER_ID"
|
||||
# modify existing user's id
|
||||
usermod -u $LOCAL_USER_ID user
|
||||
|
||||
# run as user
|
||||
exec gosu user "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
+278
-158
@@ -2,20 +2,22 @@
|
||||
|
||||
set -e
|
||||
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04, 16.04).
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04).
|
||||
## Can also be used in docker.
|
||||
##
|
||||
## Installs:
|
||||
## - Common dependencies and tools for nuttx, jMAVSim, Gazebo
|
||||
## - Common dependencies and tools for NuttX, jMAVSim, Gazebo
|
||||
## - NuttX toolchain (omit with arg: --no-nuttx)
|
||||
## - jMAVSim and Gazebo9 simulator (omit with arg: --no-sim-tools)
|
||||
##
|
||||
## Not Installs:
|
||||
## - FastRTPS and FastCDR
|
||||
## - jMAVSim and Gazebo simulator (omit with arg: --no-sim-tools)
|
||||
## Optional:
|
||||
## - FastRTPS and FastCDR (with args: --with-rtps)
|
||||
|
||||
INSTALL_NUTTX="true"
|
||||
INSTALL_SIM="true"
|
||||
INSTALL_ARCH=`uname -m`
|
||||
INSTALL_RTPS="false"
|
||||
INSTALL_JAVA="false"
|
||||
INSIDE_DOCKER="false"
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
@@ -28,19 +30,19 @@ do
|
||||
INSTALL_SIM="false"
|
||||
fi
|
||||
|
||||
done
|
||||
if [[ $arg == "--with-rtps" ]]; then
|
||||
INSTALL_RTPS="true"
|
||||
fi
|
||||
|
||||
# detect if running in docker
|
||||
if [ -f /.dockerenv ]; then
|
||||
echo "Running within docker, installing initial dependencies";
|
||||
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-core \
|
||||
sudo \
|
||||
wget \
|
||||
;
|
||||
fi
|
||||
if [[ $arg == "--with-java" ]]; then
|
||||
INSTALL_JAVA="true"
|
||||
fi
|
||||
|
||||
if [[ $arg == "--from-docker" ]]; then
|
||||
INSIDE_DOCKER="true"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# script directory
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
@@ -69,188 +71,306 @@ elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
echo "Ubuntu 20.04"
|
||||
fi
|
||||
|
||||
VERBOSE_BAR="####################"
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "#⚡️ Starting PX4 Dependency Installer for Ubuntu ${UBUNTU_RELEASE} (${INSTALL_ARCH})"
|
||||
echo "# Options:
|
||||
#
|
||||
# - Install NuttX = ${INSTALL_NUTTX}
|
||||
# - Install Java = ${INSTALL_JAVA}
|
||||
# - Install Simulation = ${INSTALL_SIM}
|
||||
# - Install RTPS = ${INSTALL_RTPS}"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
echo
|
||||
echo "Installing PX4 general dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing System Dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
astyle \
|
||||
build-essential \
|
||||
ccache \
|
||||
cmake \
|
||||
cppcheck \
|
||||
file \
|
||||
g++ \
|
||||
gcc \
|
||||
gdb \
|
||||
git \
|
||||
lcov \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
make \
|
||||
ninja-build \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
rsync \
|
||||
shellcheck \
|
||||
unzip \
|
||||
zip \
|
||||
;
|
||||
g++ \
|
||||
gcc \
|
||||
gdb \
|
||||
astyle \
|
||||
cmake \
|
||||
cppcheck \
|
||||
file \
|
||||
git \
|
||||
lcov \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
make \
|
||||
ninja-build \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
rsync \
|
||||
shellcheck \
|
||||
unzip \
|
||||
zip \
|
||||
libssl-dev \
|
||||
;
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "16.04" ]]; then
|
||||
echo "Installing Ubuntu 16.04 PX4-compatible ccache version"
|
||||
wget -O /tmp/ccache_3.4.1-1_amd64.deb http://launchpadlibrarian.net/356662933/ccache_3.4.1-1_amd64.deb
|
||||
sudo dpkg -i /tmp/ccache_3.4.1-1_amd64.deb
|
||||
fi
|
||||
|
||||
# Python3 dependencies
|
||||
# Python 3 dependencies
|
||||
echo
|
||||
echo "Installing PX4 Python3 dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing Python dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
if [ -n "$VIRTUAL_ENV" ]; then
|
||||
# virtual envrionments don't allow --user option
|
||||
python -m pip install -r ${DIR}/requirements.txt
|
||||
python -m pip install -r ${DIR}/requirements.txt
|
||||
else
|
||||
# older versions of Ubuntu require --user option
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
if [[ $INSIDE_DOCKER == "true" ]]; then
|
||||
# when running inside a docker container we don't need to install
|
||||
# under --user since the installer user is root
|
||||
# its best to install packages globaly for any user to find
|
||||
python3 -m pip install -r /tmp/requirements.txt
|
||||
else
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
# NuttX toolchain (arm-none-eabi-gcc)
|
||||
if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
|
||||
echo
|
||||
echo "Installing NuttX dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing NuttX dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
automake \
|
||||
binutils-dev \
|
||||
bison \
|
||||
build-essential \
|
||||
flex \
|
||||
g++-multilib \
|
||||
gcc-multilib \
|
||||
gdb-multiarch \
|
||||
genromfs \
|
||||
gettext \
|
||||
gperf \
|
||||
kconfig-frontends \
|
||||
libelf-dev \
|
||||
libexpat-dev \
|
||||
libgmp-dev \
|
||||
libisl-dev \
|
||||
libmpc-dev \
|
||||
libmpfr-dev \
|
||||
libncurses5 \
|
||||
libncurses5-dev \
|
||||
libncursesw5-dev \
|
||||
libtool \
|
||||
pkg-config \
|
||||
screen \
|
||||
texinfo \
|
||||
u-boot-tools \
|
||||
util-linux \
|
||||
vim-common \
|
||||
;
|
||||
automake \
|
||||
binutils-dev \
|
||||
bison \
|
||||
flex \
|
||||
genromfs \
|
||||
gettext \
|
||||
gperf \
|
||||
libelf-dev \
|
||||
libexpat-dev \
|
||||
libgmp-dev \
|
||||
libisl-dev \
|
||||
libmpc-dev \
|
||||
libmpfr-dev \
|
||||
libncurses5 \
|
||||
libncurses5-dev \
|
||||
libncursesw5-dev \
|
||||
libtool \
|
||||
pkg-config \
|
||||
screen \
|
||||
texinfo \
|
||||
u-boot-tools \
|
||||
util-linux \
|
||||
vim-common \
|
||||
g++-arm-linux-gnueabihf \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
g++-aarch64-linux-gnu \
|
||||
gcc-aarch64-linux-gnu \
|
||||
;
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
kconfig-frontends \
|
||||
;
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$USER" ]; then
|
||||
# add user to dialout group (serial port access)
|
||||
sudo usermod -a -G dialout $USER
|
||||
fi
|
||||
|
||||
# arm-none-eabi-gcc
|
||||
NUTTX_GCC_VERSION="9-2020-q2-update"
|
||||
NUTTX_GCC_VERSION_SHORT="9-2020q2"
|
||||
NUTTX_GCC_VERSION="9-2020-q2-update"
|
||||
NUTTX_GCC_VERSION_SHORT="9-2020q2"
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Verifying proper gcc version (${NUTTX_GCC_VERSION}), and installing if not found"
|
||||
echo
|
||||
|
||||
source $HOME/.profile # load changed path for the case the script is reran before relogin
|
||||
source $HOME/.profile # load changed path for the case the script is reran before relogin
|
||||
if [ $(which arm-none-eabi-gcc) ]; then
|
||||
GCC_VER_STR=$(arm-none-eabi-gcc --version)
|
||||
GCC_FOUND_VER=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
fi
|
||||
GCC_VER_STR=$(arm-none-eabi-gcc --version)
|
||||
GCC_VER_FOUND=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ "$GCC_FOUND_VER" == "1" ]]; then
|
||||
echo "arm-none-eabi-gcc-${NUTTX_GCC_VERSION} found, skipping installation"
|
||||
if [[ $(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}") == "1" ]]; then
|
||||
echo "📌 Skipping installation, the arm cross compiler was found"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
else
|
||||
echo "Installing arm-none-eabi-gcc-${NUTTX_GCC_VERSION}";
|
||||
wget -O /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-${INSTALL_ARCH}-linux.tar.bz2 && \
|
||||
sudo tar -jxf /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 -C /opt/;
|
||||
else
|
||||
echo "📌 The arm cross compiler was not found";
|
||||
echo " * Installing arm-none-eabi-gcc-${NUTTX_GCC_VERSION}";
|
||||
# The arm cross compiler hosting provider is known to throttle download speeds
|
||||
# for users who reach a certain limit of downloads in a given time frame
|
||||
# for this reason we allow for using a previously downloaded file
|
||||
# this is specially helpful when debugging this installer script
|
||||
# from within a container COMPILER_PATH="/tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2"
|
||||
COMPILER_NAME="gcc-arm-none-eabi-${NUTTX_GCC_VERSION}"
|
||||
COMPILER_PATH="/tmp/$COMPILER_NAME-linux.tar.bz2"
|
||||
if [ ! -f "$COMPILER_PATH" ]; then
|
||||
wget -O $COMPILER_PATH https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/${COMPILER_NAME}-${INSTALL_ARCH}-linux.tar.bz2
|
||||
fi
|
||||
sudo tar -jxf $COMPILER_PATH -C /opt/;
|
||||
|
||||
# add arm-none-eabi-gcc to user's PATH
|
||||
exportline="export PATH=/opt/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}/bin:\$PATH"
|
||||
# add arm-none-eabi-gcc to user's PATH
|
||||
exportline="export PATH=\"/opt/${COMPILER_NAME}/bin:\$PATH\""
|
||||
if [[ $INSIDE_DOCKER == "true" ]]; then
|
||||
# when running on a docker container its best to set the environment globally
|
||||
# since we don't know which user is going to be running commands on the container
|
||||
touch /etc/profile.d/px4env.sh
|
||||
echo $exportline >> /etc/profile.d/px4env.sh
|
||||
else
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
echo "${NUTTX_GCC_VERSION} path already set.";
|
||||
else
|
||||
echo $exportline >> $HOME/.profile;
|
||||
fi
|
||||
fi
|
||||
echo " * arm-none-eabi-gcc (${NUTTX_GCC_VERSION}) Installed Succesful to /opt/${COMPILER_NAME}/bin"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install JAVA
|
||||
if [[ $INSTALL_JAVA == "true" ]]; then
|
||||
JDK_VERSION="14.0.2_12"
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing Java JDK
|
||||
|
||||
* Version: $JDK_VERSION
|
||||
* Path: /opt/jdk-14.0.2+12"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
JDK_DOWNLOAD="/tmp/OpenJDK14U-jdk_x64_linux_hotspot_$JDK_VERSION.tar.gz"
|
||||
wget -O $JDK_DOWNLOAD https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz
|
||||
sudo tar -xzf $JDK_DOWNLOAD -C /opt/
|
||||
export PATH="/opt/jdk-14.0.2+12/bin:$PATH"
|
||||
fi
|
||||
|
||||
# Fast-RTPS
|
||||
if [[ $INSTALL_RTPS == "true" ]]; then
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing Fast-RTPS"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
GRADLE_VERSION="6.4.1"
|
||||
wget -O "/tmp/gradle-$GRADLE_VERSION-bin.zip" "https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip" \
|
||||
&& unzip -d /opt/gradle "/tmp/gradle-$GRADLE_VERSION-bin.zip"
|
||||
export PATH="$PATH:/opt/gradle/gradle-$GRADLE_VERSION/bin"
|
||||
|
||||
# Intall foonathan_memory from source as it is required to Fast-RTPS >= 1.9
|
||||
git clone https://github.com/eProsima/foonathan_memory_vendor.git /tmp/foonathan_memory \
|
||||
&& cd /tmp/foonathan_memory \
|
||||
&& mkdir build && cd build \
|
||||
&& cmake .. \
|
||||
&& cmake --build . --target install -- -j $(nproc)
|
||||
|
||||
# Fast-DDS (Fast-RTPS 2.1.1)
|
||||
git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v2.1.1 /tmp/FastRTPS-2.1.1 \
|
||||
&& cd /tmp/FastRTPS-2.1.1 \
|
||||
&& mkdir build && cd build \
|
||||
&& cmake -DTHIRDPARTY=ON -DSECURITY=ON .. \
|
||||
&& cmake --build . --target install -- -j $(nproc)
|
||||
|
||||
# Fast-RTPS-Gen 1.0.4
|
||||
git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git -b v1.0.4 /tmp/Fast-RTPS-Gen-1.0.4 \
|
||||
&& cd /tmp/Fast-RTPS-Gen-1.0.4 \
|
||||
&& gradle assemble \
|
||||
&& gradle install
|
||||
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
echo "${NUTTX_GCC_VERSION} path already set.";
|
||||
else
|
||||
echo $exportline >> $HOME/.profile;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Simulation tools
|
||||
if [[ $INSTALL_SIM == "true" ]]; then
|
||||
|
||||
echo
|
||||
echo "Installing PX4 simulation dependencies"
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing PX4 Simulation Tools"
|
||||
echo
|
||||
|
||||
# General simulation dependencies
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
bc \
|
||||
;
|
||||
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
gazebo_version=9
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
gazebo_version=11
|
||||
fi
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
java_version=11
|
||||
gazebo_version=9
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
java_version=13
|
||||
gazebo_version=11
|
||||
else
|
||||
java_version=14
|
||||
gazebo_version=11
|
||||
fi
|
||||
# Java (jmavsim or fastrtps)
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
ant \
|
||||
openjdk-$java_version-jre \
|
||||
openjdk-$java_version-jdk \
|
||||
libvecmath-java \
|
||||
;
|
||||
echo " * Gazebo Version $gazebo_version"
|
||||
echo $VERBOSE_BAR
|
||||
|
||||
# Set Java 11 as default
|
||||
sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version")
|
||||
# General simulation dependencies
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
bc \
|
||||
ant \
|
||||
libvecmath-java \
|
||||
;
|
||||
|
||||
# Gazebo
|
||||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
||||
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
# Update list, since new gazebo-stable.list has been added
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
dmidecode \
|
||||
gazebo$gazebo_version \
|
||||
gstreamer1.0-plugins-bad \
|
||||
gstreamer1.0-plugins-base \
|
||||
gstreamer1.0-plugins-good \
|
||||
gstreamer1.0-plugins-ugly \
|
||||
gstreamer1.0-libav \
|
||||
libeigen3-dev \
|
||||
libgazebo$gazebo_version-dev \
|
||||
libgstreamer-plugins-base1.0-dev \
|
||||
libimage-exiftool-perl \
|
||||
libopencv-dev \
|
||||
libxml2-utils \
|
||||
pkg-config \
|
||||
protobuf-compiler \
|
||||
;
|
||||
# Installing Gazebo and dependencies
|
||||
# Setup OSRF Gazebo repository
|
||||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
||||
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
# Update list, since new gazebo-stable.list has been added
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
dmidecode \
|
||||
gazebo$gazebo_version \
|
||||
gstreamer1.0-plugins-bad \
|
||||
gstreamer1.0-plugins-base \
|
||||
gstreamer1.0-plugins-good \
|
||||
gstreamer1.0-plugins-ugly \
|
||||
gstreamer1.0-libav \
|
||||
libeigen3-dev \
|
||||
libgazebo$gazebo_version-dev \
|
||||
libgstreamer-plugins-base1.0-dev \
|
||||
libimage-exiftool-perl \
|
||||
libopencv-dev \
|
||||
libxml2-utils \
|
||||
pkg-config \
|
||||
protobuf-compiler \
|
||||
;
|
||||
|
||||
if sudo dmidecode -t system | grep -q "Manufacturer: VMware, Inc." ; then
|
||||
# fix VMWare 3D graphics acceleration for gazebo
|
||||
echo "export SVGA_VGPU10=0" >> ~/.profile
|
||||
fi
|
||||
if sudo dmidecode -t system | grep -q "Manufacturer: VMware, Inc." ; then
|
||||
# fix VMWare 3D graphics acceleration for gazebo
|
||||
echo "export SVGA_VGPU10=0" >> ~/.profile
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
echo
|
||||
echo "Relogin or reboot computer before attempting to build NuttX targets"
|
||||
if [[ $INSIDE_DOCKER == "true" ]]; then
|
||||
# cleanup installation
|
||||
rm -rf /tmp/
|
||||
fi
|
||||
|
||||
if [[ $INSIDE_DOCKER == "false" ]] && [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "💡 We recommend you relogin/reboot before attempting to build NuttX targets"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "#⚡️ PX4 Dependency Installer Ended Succesfully
|
||||
#
|
||||
# For more information on PX4 Autopilot check out our docs
|
||||
# at docs.px4.io, if you find a bug please file an issue
|
||||
# on GitHub https://github.com/px4/px4-autopilot"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
Submodule Tools/simulation-ignition updated: 0ea4dbe2c3...483193d9b8
+1
-1
Submodule Tools/sitl_gazebo updated: 607aa4d990...2750fe233c
@@ -56,6 +56,21 @@ def get_N_colors(N, s=0.8, v=0.9):
|
||||
hex_out.append("#"+"".join(map(lambda x: format(x, '02x'), rgb)))
|
||||
return hex_out
|
||||
|
||||
def topic_filename(topic):
|
||||
MSG_PATH = 'msg/'
|
||||
|
||||
file_list = os.listdir(MSG_PATH)
|
||||
msg_files = [file.replace('.msg', '') for file in file_list if file.endswith(".msg")]
|
||||
|
||||
if topic in msg_files:
|
||||
return topic
|
||||
else:
|
||||
for msg_file in msg_files:
|
||||
with open(f'{MSG_PATH}/{msg_file}.msg') as f:
|
||||
ret = re.findall(f'^# TOPICS.*{topic}.*',f.read(),re.MULTILINE)
|
||||
if len(ret) > 0:
|
||||
return msg_file
|
||||
return "no_file"
|
||||
|
||||
class PubSub(object):
|
||||
""" Collects either publication or subscription information for nodes
|
||||
@@ -679,8 +694,7 @@ class OutputJSON(object):
|
||||
node['type'] = 'topic'
|
||||
node['color'] = topic_colors[topic]
|
||||
# url is opened when double-clicking on the node
|
||||
# TODO: does not work for multi-topics
|
||||
node['url'] = 'https://github.com/PX4/PX4-Autopilot/blob/master/msg/'+topic+'.msg'
|
||||
node['url'] = 'https://github.com/PX4/PX4-Autopilot/blob/master/msg/'+topic_filename(topic)+'.msg'
|
||||
nodes.append(node)
|
||||
|
||||
data['nodes'] = nodes
|
||||
|
||||
@@ -5,6 +5,7 @@ https://json-schema.org/"""
|
||||
import argparse
|
||||
import sys
|
||||
import json
|
||||
import os
|
||||
|
||||
try:
|
||||
from jsonschema import validate
|
||||
@@ -21,6 +22,8 @@ parser = argparse.ArgumentParser(description='Validate JSON file(s) against a sc
|
||||
parser.add_argument('json_file', nargs='+', help='JSON config file(s)')
|
||||
parser.add_argument('--schema-file', type=str, action='store',
|
||||
help='JSON schema file', required=True)
|
||||
parser.add_argument('--skip-if-no-schema', dest='skip_if_no_schema', action='store_true',
|
||||
help='Skip test if schema file does not exist')
|
||||
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='Verbose Output')
|
||||
|
||||
@@ -29,6 +32,9 @@ schema_file = args.schema_file
|
||||
json_files = args.json_file
|
||||
verbose = args.verbose
|
||||
|
||||
if args.skip_if_no_schema and not os.path.isfile(schema_file):
|
||||
sys.exit(0)
|
||||
|
||||
# load the schema
|
||||
with open(schema_file, 'r') as stream:
|
||||
schema = json.load(stream)
|
||||
|
||||
@@ -65,6 +65,7 @@ CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
@@ -76,15 +77,14 @@ CONFIG_MODULES_UUV_POS_CONTROL=y
|
||||
CONFIG_MODULES_VMOUNT=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_BL_UPDATE=y
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
CONFIG_SYSTEMCMDS_ESC_CALIB=y
|
||||
CONFIG_SYSTEMCMDS_GPIO=y
|
||||
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_MFT=y
|
||||
CONFIG_SYSTEMCMDS_MIXER=y
|
||||
CONFIG_SYSTEMCMDS_MOTOR_RAMP=y
|
||||
CONFIG_SYSTEMCMDS_MOTOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_MTD=y
|
||||
CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
param set-default BAT1_V_DIV 10.177939394
|
||||
param set-default BAT1_A_PER_V 15.391030303
|
||||
@@ -42,6 +42,7 @@ CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_IFLOWCONTROL=y
|
||||
CONFIG_CDCACM_PRODUCTID=0x0030
|
||||
CONFIG_CDCACM_PRODUCTSTR="MindPX FMU v2.x"
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
@@ -113,7 +114,6 @@ CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAMTRON_WRITEWAIT=y
|
||||
CONFIG_RAM_SIZE=262144
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
|
||||
@@ -72,12 +72,6 @@
|
||||
#define ADC_RC_RSSI_CHANNEL 11
|
||||
#define ADC_AIRSPEED_VOLTAGE_CHANNEL 15
|
||||
|
||||
/* Define Battery 1 Voltage Divider and A per V
|
||||
*/
|
||||
|
||||
#define BOARD_BATTERY1_V_DIV (10.177939394f)
|
||||
#define BOARD_BATTERY1_A_PER_V (15.391030303f)
|
||||
|
||||
/* Power supply control and monitoring GPIOs */
|
||||
// #define GPIO_VDD_5V_PERIPH_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN8)
|
||||
// #define GPIO_VDD_BRICK_VALID (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN5)
|
||||
|
||||
@@ -239,7 +239,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
if (!spi4) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 4\n");
|
||||
board_autoled_on(LED_AMBER);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Default SPI4 to 10MHz and de-assert the known chip selects. */
|
||||
@@ -255,7 +254,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
if (!spi1) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port 1\n");
|
||||
board_autoled_on(LED_AMBER);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Default SPI1 to 37.5 MHz (40 MHz rounded to nearest valid divider, F4 max)
|
||||
@@ -279,9 +277,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO);
|
||||
|
||||
if (!sdio) {
|
||||
syslog(LOG_ERR, "[boot] Failed to initialize SDIO slot %d\n",
|
||||
CONFIG_NSH_MMCSDSLOTNO);
|
||||
return -ENODEV;
|
||||
syslog(LOG_ERR, "[boot] Failed to initialize SDIO slot %d\n", CONFIG_NSH_MMCSDSLOTNO);
|
||||
}
|
||||
|
||||
/* Now bind the SDIO interface to the MMC/SD driver */
|
||||
@@ -289,7 +285,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
|
||||
if (ret != OK) {
|
||||
syslog(LOG_ERR, "[boot] Failed to bind SDIO to the MMC/SD driver: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Then let's guess and say that there is a card in the slot. There is no card detect GPIO. */
|
||||
|
||||
@@ -91,7 +91,6 @@ CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAMTRON_WRITEWAIT=y
|
||||
CONFIG_RAM_SIZE=262144
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
|
||||
@@ -61,6 +61,5 @@ else()
|
||||
nuttx_arch
|
||||
nuttx_drivers
|
||||
px4_layer
|
||||
arch_io_pins
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -146,7 +146,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
|
||||
if (result != OK) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#endif // FLASH_BASED_PARAMS
|
||||
|
||||
@@ -93,7 +93,6 @@ CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAMTRON_WRITEWAIT=y
|
||||
CONFIG_RAM_SIZE=262144
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
|
||||
@@ -63,6 +63,5 @@ else()
|
||||
nuttx_arch
|
||||
nuttx_drivers
|
||||
px4_layer
|
||||
arch_io_pins
|
||||
)
|
||||
endif()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user