mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-16 11:21:29 +08:00
Compare commits
612 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5efe0afb0 | ||
|
|
73751922de | ||
|
|
08fbfd8ab4 | ||
|
|
1c03d3bfe5 | ||
|
|
efe9344fc2 | ||
|
|
37ae05df05 | ||
|
|
7c91aaee64 | ||
|
|
7fbd4a0b5b | ||
|
|
eb11c91733 | ||
|
|
4b6d0ef0a6 | ||
|
|
27a645353b | ||
|
|
e3f2467b91 | ||
|
|
6ac26c680d | ||
|
|
7fc0b0925c | ||
|
|
90276fa3a7 | ||
|
|
6d372e7d02 | ||
|
|
8007a84ab3 | ||
|
|
c26b18c153 | ||
|
|
9c08872b61 | ||
|
|
19151e93e1 | ||
|
|
ed134da8e0 | ||
|
|
6eb2e62306 | ||
|
|
228a54fd51 | ||
|
|
4c61b05ef3 | ||
|
|
0ccf0ce747 | ||
|
|
59a571d22f | ||
|
|
fe89bee02a | ||
|
|
3773eaad99 | ||
|
|
fa52aa322a | ||
|
|
967b404de8 | ||
|
|
1da686b125 | ||
|
|
1bbfb02430 | ||
|
|
a1c9dc1f68 | ||
|
|
ae3838ff2e | ||
|
|
0419a99f00 | ||
|
|
854660bd36 | ||
|
|
345246953b | ||
|
|
2aad0c079e | ||
|
|
e290bd4ebe | ||
|
|
3f9fc625f9 | ||
|
|
b7919e0039 | ||
|
|
c1e1d0b031 | ||
|
|
dd6549e1a2 | ||
|
|
f10770a4a4 | ||
|
|
bd606b05df | ||
|
|
e98cd6c746 | ||
|
|
d5d3b63dc8 | ||
|
|
8cd4b57c6b | ||
|
|
ead3eeda6c | ||
|
|
5de7c7e426 | ||
|
|
159abb9b00 | ||
|
|
101ac63737 | ||
|
|
770c020117 | ||
|
|
03e71c47b6 | ||
|
|
fb131f43c3 | ||
|
|
2a556f91ed | ||
|
|
f9a11b7a2f | ||
|
|
30cb1e6976 | ||
|
|
a85939f66b | ||
|
|
12437f1fc6 | ||
|
|
a2de2bb9cb | ||
|
|
59781167a2 | ||
|
|
48e2053f98 | ||
|
|
f11a619bf8 | ||
|
|
570fb97163 | ||
|
|
eb5b8a32ee | ||
|
|
bb4decfa8b | ||
|
|
0a4d0f6eae | ||
|
|
a3b57c6820 | ||
|
|
4207213fc3 | ||
|
|
8dbbe1b1f3 | ||
|
|
9e2e78c9ed | ||
|
|
cd7001fd2f | ||
|
|
15b0baf555 | ||
|
|
af5bbc916c | ||
|
|
2ca48037fd | ||
|
|
384ab209fc | ||
|
|
be6278a1ba | ||
|
|
c3529d353d | ||
|
|
230db2e050 | ||
|
|
2fd89ea904 | ||
|
|
17e77535bf | ||
|
|
1d5cf70e83 | ||
|
|
dc7077b125 | ||
|
|
7db35337da | ||
|
|
8c2eec6161 | ||
|
|
80f8fcbdf6 | ||
|
|
be0f680863 | ||
|
|
11df8168ee | ||
|
|
2177c0e18a | ||
|
|
e46824e784 | ||
|
|
9cb82e93be | ||
|
|
6d75f11d3c | ||
|
|
d2041b0ef3 | ||
|
|
b9b05dcc03 | ||
|
|
de8c4c9901 | ||
|
|
07a0da9114 | ||
|
|
f53b3ae49d | ||
|
|
df28f970fa | ||
|
|
fbb201845b | ||
|
|
f577f2efb0 | ||
|
|
ee4784ab25 | ||
|
|
c5b1e791bd | ||
|
|
f8915104e0 | ||
|
|
590e8df8d0 | ||
|
|
581623cd48 | ||
|
|
6e8f563d27 | ||
|
|
612d80a59a | ||
|
|
9172c7c491 | ||
|
|
2ff9fd64b1 | ||
|
|
38ecec86f7 | ||
|
|
ff43c1ab6a | ||
|
|
6d32b8f41d | ||
|
|
6ee8e148a2 | ||
|
|
41883a08d8 | ||
|
|
32d9bae44d | ||
|
|
ebeb9eba4b | ||
|
|
a8e3194dfa | ||
|
|
5b8b445425 | ||
|
|
d5eae460c0 | ||
|
|
2fa7380246 | ||
|
|
519a7e2c8e | ||
|
|
f2af55d92f | ||
|
|
19bc39e7ad | ||
|
|
0a76347c9d | ||
|
|
e8344de38a | ||
|
|
b4b385cc13 | ||
|
|
c7640723c9 | ||
|
|
c7ff253a6d | ||
|
|
e7cdb19424 | ||
|
|
a78d732957 | ||
|
|
e2c04b7fa7 | ||
|
|
1a6c4e123c | ||
|
|
f822b136dc | ||
|
|
82be3d09d6 | ||
|
|
f32021f856 | ||
|
|
23f428d639 | ||
|
|
42131e817d | ||
|
|
b54bc23550 | ||
|
|
6650bca35b | ||
|
|
42e8fe159f | ||
|
|
cca2807ff0 | ||
|
|
b25a9a45b5 | ||
|
|
403810c688 | ||
|
|
e25b26e2a8 | ||
|
|
de39b63402 | ||
|
|
8116f15d95 | ||
|
|
47337eb4a5 | ||
|
|
3edf304e55 | ||
|
|
aab63c78f9 | ||
|
|
419fa45657 | ||
|
|
84552d475e | ||
|
|
62d685440a | ||
|
|
e59323c7d7 | ||
|
|
3e02bb1070 | ||
|
|
fb8b981015 | ||
|
|
a63197b82b | ||
|
|
e60cd46ad0 | ||
|
|
7af0816570 | ||
|
|
20ef3adb1f | ||
|
|
baa11e357d | ||
|
|
46bd1cbacf | ||
|
|
4e0559eacf | ||
|
|
134e95efda | ||
|
|
b05465470a | ||
|
|
fec7950424 | ||
|
|
26c635359e | ||
|
|
e2328fcd72 | ||
|
|
e32ec2a29a | ||
|
|
1351c6f68c | ||
|
|
f8f208dbe6 | ||
|
|
dfb31f2252 | ||
|
|
0bdfb465cf | ||
|
|
c11a677207 | ||
|
|
ff47cae7c1 | ||
|
|
02aa0eacd5 | ||
|
|
b75eaf3c4a | ||
|
|
ac985ee1c7 | ||
|
|
93bc018c93 | ||
|
|
9e0c636b97 | ||
|
|
9ad39fec67 | ||
|
|
949b0738e1 | ||
|
|
a8d00ee46f | ||
|
|
f91520730b | ||
|
|
630ad18c8d | ||
|
|
8a42b312ef | ||
|
|
7a592d56a2 | ||
|
|
48ea0230e1 | ||
|
|
248bbcb520 | ||
|
|
9583ff1b8b | ||
|
|
3bdcb203f4 | ||
|
|
336a464ed3 | ||
|
|
8c56f38ea6 | ||
|
|
b1a16c711e | ||
|
|
8ba1132660 | ||
|
|
203416f136 | ||
|
|
1aff724ee2 | ||
|
|
7345440a1a | ||
|
|
45ea58d451 | ||
|
|
65081ca681 | ||
|
|
fcf642fe4e | ||
|
|
371e5f70b1 | ||
|
|
2db2d8f6f4 | ||
|
|
a37daf4cec | ||
|
|
8f020d5a8f | ||
|
|
4123da4963 | ||
|
|
9eb46fa7a0 | ||
|
|
497982aa4a | ||
|
|
f725ded9d4 | ||
|
|
edfbb90656 | ||
|
|
fdc0ef00b3 | ||
|
|
15e7b19991 | ||
|
|
39ee36a8ea | ||
|
|
5f93f04627 | ||
|
|
ac788ad5dc | ||
|
|
f5c5f4757d | ||
|
|
9f2498af94 | ||
|
|
14946f11c1 | ||
|
|
443a58cafe | ||
|
|
8e62c9eb8d | ||
|
|
61fac4a127 | ||
|
|
d8892eb86d | ||
|
|
4990272b19 | ||
|
|
fdcfb7c7c6 | ||
|
|
0bde2b6fa3 | ||
|
|
7541aecd18 | ||
|
|
80c532acf1 | ||
|
|
f0bad06bfd | ||
|
|
0aff2e6c09 | ||
|
|
6a98c6ca63 | ||
|
|
9a8050cc11 | ||
|
|
86c8308e98 | ||
|
|
b7470794c7 | ||
|
|
b44f20d705 | ||
|
|
3d282e4ee8 | ||
|
|
61bb8ac603 | ||
|
|
f2a6645cc9 | ||
|
|
7edd07f8cb | ||
|
|
0d13c41108 | ||
|
|
8268161b18 | ||
|
|
b3af469e80 | ||
|
|
0397537cf0 | ||
|
|
f3c22d3334 | ||
|
|
2949578832 | ||
|
|
019e197714 | ||
|
|
5e47ffdaf9 | ||
|
|
1843eea917 | ||
|
|
1454e2acba | ||
|
|
43553eacce | ||
|
|
c8bd81b739 | ||
|
|
c75cc75d25 | ||
|
|
904319f889 | ||
|
|
0f43a1ebbb | ||
|
|
04ad8ca594 | ||
|
|
92f0032475 | ||
|
|
6ffcca4b8f | ||
|
|
92f2492fff | ||
|
|
4594b3c69d | ||
|
|
5e4f76d844 | ||
|
|
bfd182d12e | ||
|
|
8167f729ad | ||
|
|
c78fd7014d | ||
|
|
7455a833d0 | ||
|
|
56cd54ab71 | ||
|
|
5f8ee1ea1a | ||
|
|
069471a62c | ||
|
|
260b77dd78 | ||
|
|
1245b50ef5 | ||
|
|
f50aba844f | ||
|
|
7104a853c9 | ||
|
|
6a74f2c69d | ||
|
|
76da9ab82b | ||
|
|
8d66e1c0ef | ||
|
|
7b7da618b8 | ||
|
|
81ae5cbd0d | ||
|
|
b8a60f2501 | ||
|
|
e6db5e2db1 | ||
|
|
1363e4aa8f | ||
|
|
cc79299375 | ||
|
|
1e7cfae683 | ||
|
|
f35e3335be | ||
|
|
f2af8a5a5d | ||
|
|
b54a0308a7 | ||
|
|
ba169ce0b5 | ||
|
|
3928924c43 | ||
|
|
5ea5ecf32b | ||
|
|
c9b1fb154d | ||
|
|
e11fff3011 | ||
|
|
17c3aa3bac | ||
|
|
fcbd717200 | ||
|
|
6c13cef85e | ||
|
|
4cb1f8a440 | ||
|
|
166f6e2e7a | ||
|
|
6ce5e1be49 | ||
|
|
563460444a | ||
|
|
28754d3f58 | ||
|
|
9d5728b96f | ||
|
|
2e8accc6ff | ||
|
|
d32d533d11 | ||
|
|
9cccc0ec76 | ||
|
|
6eac78d675 | ||
|
|
081da8bb7f | ||
|
|
737fe1fc7f | ||
|
|
b2237ce525 | ||
|
|
4b55c5276e | ||
|
|
443592136b | ||
|
|
6e26d1b8dc | ||
|
|
9169a585bf | ||
|
|
a284b77c7b | ||
|
|
06b496e257 | ||
|
|
fb21654807 | ||
|
|
69d4b1b692 | ||
|
|
d96a17adfb | ||
|
|
cfc3af8374 | ||
|
|
527fe4b374 | ||
|
|
c81c34b147 | ||
|
|
8f8b4485f1 | ||
|
|
29d759768e | ||
|
|
42f9079683 | ||
|
|
528e2826d5 | ||
|
|
3b9ef1cef5 | ||
|
|
4f55ae5306 | ||
|
|
a402b3beeb | ||
|
|
8d089d95d4 | ||
|
|
52ebbda5ac | ||
|
|
99286db832 | ||
|
|
6cb631716a | ||
|
|
4e4d1a98f6 | ||
|
|
ea4937491b | ||
|
|
bbc03731c7 | ||
|
|
82bb0564e2 | ||
|
|
8949a88f25 | ||
|
|
ff690dda80 | ||
|
|
bb565f5d6a | ||
|
|
214709dc89 | ||
|
|
47dcf71554 | ||
|
|
9a8e94bb68 | ||
|
|
759b107468 | ||
|
|
bf03b8cb18 | ||
|
|
e2fd2f466e | ||
|
|
cfd8173687 | ||
|
|
c6d30315d9 | ||
|
|
03434a0b9e | ||
|
|
e17f344119 | ||
|
|
c2aaeefa6c | ||
|
|
f52ce2001d | ||
|
|
4b893053a0 | ||
|
|
b37082e390 | ||
|
|
99068aebac | ||
|
|
c18d31ce41 | ||
|
|
1474ddbb78 | ||
|
|
0102e47708 | ||
|
|
871b4b482e | ||
|
|
c659d7851f | ||
|
|
e88367d722 | ||
|
|
7a8ef6c0e4 | ||
|
|
c185a12c8e | ||
|
|
21f7641e8d | ||
|
|
67eed88767 | ||
|
|
7452cfdf63 | ||
|
|
f460e95554 | ||
|
|
1cfa9d924d | ||
|
|
08ef2e8a1c | ||
|
|
9e2dd7aab6 | ||
|
|
7a8adaa591 | ||
|
|
c32938d2a8 | ||
|
|
93a9032f87 | ||
|
|
b6cf1b54f9 | ||
|
|
15b72045ce | ||
|
|
3a43038583 | ||
|
|
85c49ff642 | ||
|
|
19b81b9ab2 | ||
|
|
9c6f4de753 | ||
|
|
4614511474 | ||
|
|
7817924aef | ||
|
|
f918b0c992 | ||
|
|
e6d2d17109 | ||
|
|
4ce5d4e3e3 | ||
|
|
93042eccb6 | ||
|
|
afb01e6d9a | ||
|
|
619548b10a | ||
|
|
883148d3d1 | ||
|
|
a49dbbc9a8 | ||
|
|
b8f11dee99 | ||
|
|
83e45a1564 | ||
|
|
3c401c396c | ||
|
|
cbde246f0a | ||
|
|
92c946dae1 | ||
|
|
0025ab7258 | ||
|
|
751a95deb8 | ||
|
|
a76ecf3821 | ||
|
|
cd37ffd0bf | ||
|
|
d1cf8df2ad | ||
|
|
56957e7ee4 | ||
|
|
9d239c10e5 | ||
|
|
37cbb90930 | ||
|
|
37ffb61afd | ||
|
|
4351eb147c | ||
|
|
de88892f99 | ||
|
|
7ead4050d6 | ||
|
|
803f2ce035 | ||
|
|
ab65a55fbf | ||
|
|
f485b60f57 | ||
|
|
cb2c8a1390 | ||
|
|
8cb472af31 | ||
|
|
c802b86acc | ||
|
|
cb14e8589d | ||
|
|
bafa9bb6bb | ||
|
|
57b95916f5 | ||
|
|
efd7e202f7 | ||
|
|
07fafc4913 | ||
|
|
170f9aec49 | ||
|
|
3fd4f11f65 | ||
|
|
44792eb2fe | ||
|
|
401af28b38 | ||
|
|
f37865e5b4 | ||
|
|
44e229656c | ||
|
|
7ea41491e5 | ||
|
|
0db264bc79 | ||
|
|
415e42f5de | ||
|
|
0910cb3256 | ||
|
|
e663b60c69 | ||
|
|
be1db2ced5 | ||
|
|
4ab39725dd | ||
|
|
c77a2acb93 | ||
|
|
c0e88e262c | ||
|
|
c0bc721778 | ||
|
|
b26fc1f089 | ||
|
|
9fb29d3a38 | ||
|
|
5bd4495a78 | ||
|
|
c7767dfe7e | ||
|
|
5a93e68918 | ||
|
|
ab1bbb9ed8 | ||
|
|
4d7fe08069 | ||
|
|
5d588d98be | ||
|
|
df5cb5472d | ||
|
|
ecbcfe838b | ||
|
|
ab71af6053 | ||
|
|
4952d05652 | ||
|
|
32626b57a4 | ||
|
|
47207b8fc8 | ||
|
|
5cf78cd450 | ||
|
|
e0bbbd356f | ||
|
|
3d185e18e9 | ||
|
|
eb36eac137 | ||
|
|
9eecca6a71 | ||
|
|
425169921c | ||
|
|
ca2e9e7be1 | ||
|
|
72156d9cd6 | ||
|
|
71a3e3713c | ||
|
|
434ce85937 | ||
|
|
02030d9b36 | ||
|
|
0f3878a48a | ||
|
|
af42f454f7 | ||
|
|
05b23a8b54 | ||
|
|
0d1872f223 | ||
|
|
5fb6c75a2a | ||
|
|
f2e7d5ca77 | ||
|
|
2dab23ba04 | ||
|
|
960a233fe9 | ||
|
|
ee71a0d761 | ||
|
|
dd58dcfb91 | ||
|
|
67bba2065e | ||
|
|
4437727b97 | ||
|
|
30a86f4b79 | ||
|
|
0f78c28aca | ||
|
|
3e27189026 | ||
|
|
9f4e6e3208 | ||
|
|
1772cbe5e0 | ||
|
|
a2758eadb6 | ||
|
|
181cbd383c | ||
|
|
2c786e21f4 | ||
|
|
e1ce681960 | ||
|
|
e21062c6db | ||
|
|
7d7333cdea | ||
|
|
e9dd2aec48 | ||
|
|
365ef883e3 | ||
|
|
c40c91bedc | ||
|
|
21b99b408c | ||
|
|
79e7059eaf | ||
|
|
f99d052582 | ||
|
|
78f9bb79f1 | ||
|
|
ed081ef60b | ||
|
|
47786c8585 | ||
|
|
3dc4411592 | ||
|
|
1742cce6f6 | ||
|
|
6e1bf506ad | ||
|
|
41abe9221e | ||
|
|
d5c6fde5bc | ||
|
|
70e7f1bec6 | ||
|
|
07973bf87a | ||
|
|
c341f94e5d | ||
|
|
b97b3c68cb | ||
|
|
c42b0e7201 | ||
|
|
4ab4f1edc7 | ||
|
|
abf03c1c9d | ||
|
|
54677cd223 | ||
|
|
1d1ad3e9ed | ||
|
|
86ca7d8cfc | ||
|
|
5c1b84f16a | ||
|
|
8701e0ba78 | ||
|
|
b274a3f6d1 | ||
|
|
9f009d0615 | ||
|
|
9197b85cfe | ||
|
|
caf0121f95 | ||
|
|
fb702b7c48 | ||
|
|
902b774091 | ||
|
|
9d7b3bbff1 | ||
|
|
7e7b21cbdc | ||
|
|
b0333e3e95 | ||
|
|
77782bd254 | ||
|
|
e1125ce9d3 | ||
|
|
2207986a1e | ||
|
|
ecc53488dd | ||
|
|
4d36cb848f | ||
|
|
a355bdeea3 | ||
|
|
88b2c6c78d | ||
|
|
0510d2cb56 | ||
|
|
8a9b27f8f3 | ||
|
|
fe07079367 | ||
|
|
b22c05a19d | ||
|
|
9674c611b3 | ||
|
|
caab016425 | ||
|
|
a8c49809fa | ||
|
|
f22c574b87 | ||
|
|
f62a2ccfc3 | ||
|
|
c4a3387a39 | ||
|
|
4b659f1995 | ||
|
|
1cdb2d3209 | ||
|
|
83339a2de0 | ||
|
|
dd883d2c9b | ||
|
|
36a8bcc12e | ||
|
|
41f36aa99f | ||
|
|
055a17f2e1 | ||
|
|
d4fb8c2a89 | ||
|
|
b15757d6d5 | ||
|
|
f40243890e | ||
|
|
92f7f0d2c2 | ||
|
|
585e1c93e8 | ||
|
|
10430d430c | ||
|
|
5e57553615 | ||
|
|
424f4a9066 | ||
|
|
30df075244 | ||
|
|
f6ddf53865 | ||
|
|
ada07e2206 | ||
|
|
365b3680a1 | ||
|
|
864068b99d | ||
|
|
c6462b07ad | ||
|
|
485f0d0379 | ||
|
|
27725534a3 | ||
|
|
8580ac0155 | ||
|
|
de6d3a13de | ||
|
|
e7a87710bc | ||
|
|
5282dc04b5 | ||
|
|
b26d15c979 | ||
|
|
401d35677f | ||
|
|
b8517eb428 | ||
|
|
630740d54f | ||
|
|
8531cde567 | ||
|
|
c0316f3db1 | ||
|
|
71e743009a | ||
|
|
b2ff9e37c4 | ||
|
|
bd2551d5f7 | ||
|
|
7df8610cbd | ||
|
|
24c98ef14e | ||
|
|
5e6aebc8fa | ||
|
|
1dbbe90e06 | ||
|
|
f890dee5aa | ||
|
|
1418b45942 | ||
|
|
e66aab8e3a | ||
|
|
9c7970bd7d | ||
|
|
d18491b76e | ||
|
|
40a7c5a55d | ||
|
|
57ac8c19ff | ||
|
|
acc1aeb571 | ||
|
|
814a6fadc6 | ||
|
|
041b0d379a | ||
|
|
7c058b21ac | ||
|
|
e7d45575ad | ||
|
|
0255f881c6 | ||
|
|
bed182f6ab | ||
|
|
78be95ebc1 | ||
|
|
341d00e806 | ||
|
|
fe3ae3c79b | ||
|
|
8fc749f19b | ||
|
|
1e6d911ab9 | ||
|
|
364d323ddf | ||
|
|
47358a446f | ||
|
|
a494b45078 | ||
|
|
7dfcfd5f2b | ||
|
|
e11fbbf312 | ||
|
|
65f8b81fda | ||
|
|
13c993dda4 | ||
|
|
61f98262cf | ||
|
|
5ace8d993d | ||
|
|
a8e5084897 | ||
|
|
7eebb22a9c | ||
|
|
3bdbb6eacf | ||
|
|
20a829e691 | ||
|
|
045a598a97 | ||
|
|
d188f8012f | ||
|
|
4635827f01 | ||
|
|
162b7b87e9 | ||
|
|
acf01c5e88 | ||
|
|
f892492a17 | ||
|
|
2a68adfd35 | ||
|
|
f56efaf149 | ||
|
|
8595c734e6 | ||
|
|
0b50c6c003 | ||
|
|
9e143e3d4c | ||
|
|
965e0e5226 | ||
|
|
e55f1bc66d |
2
.gitignore
vendored
2
.gitignore
vendored
@ -22,6 +22,8 @@ build/*
|
||||
build_*/
|
||||
core
|
||||
cscope.out
|
||||
cscope.in.out
|
||||
cscope.po.out
|
||||
Firmware.sublime-workspace
|
||||
user.sublime*
|
||||
Images/*.bin
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -34,3 +34,6 @@
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
[submodule "cmake/cmake_hexagon"]
|
||||
path = cmake/cmake_hexagon
|
||||
url = https://github.com/ATLFlight/cmake_hexagon
|
||||
|
||||
30
.travis.yml
30
.travis.yml
@ -60,9 +60,8 @@ before_install:
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
brew tap PX4/homebrew-px4
|
||||
&& brew update; brew update
|
||||
&& brew install cmake ninja astyle gcc-arm-none-eabi
|
||||
&& brew install cmake ninja
|
||||
&& brew install genromfs
|
||||
&& brew install kconfig-frontends
|
||||
&& sudo easy_install pip
|
||||
&& sudo pip install pyserial empy
|
||||
;
|
||||
@ -93,23 +92,22 @@ env:
|
||||
- PX4_AWS_BUCKET=px4-travis
|
||||
|
||||
script:
|
||||
- make check_format
|
||||
- arm-none-eabi-gcc --version
|
||||
- git submodule update --quiet --init --recursive
|
||||
- echo 'Building POSIX Firmware..' && make posix_sitl_default
|
||||
- echo 'Running Tests..' && make posix_sitl_default test
|
||||
- echo 'Running Unittests..' && cd unittests && ./run_tests.sh
|
||||
- cd ..
|
||||
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
|
||||
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
|
||||
# Only provide UAVCAN firmware binaries for Pixracer and Pixhawk 3
|
||||
- echo 'Building UAVCAN node firmware..' && git clone https://github.com/thiemar/vectorcontrol
|
||||
- cd vectorcontrol
|
||||
- BOARD=s2740vc_1_0 make && BOARD=px4esc_1_6 make
|
||||
- ../Tools/uavcan_copy.sh
|
||||
- cd ..
|
||||
- echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
|
||||
- echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
|
||||
- echo 'Running Tests..' && make px4fmu-v2_default test
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
cd ${TRAVIS_BUILD_DIR}
|
||||
&& make check_format
|
||||
&& arm-none-eabi-gcc --version
|
||||
&& echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
|
||||
&& echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
|
||||
&& echo 'Building UAVCAN node firmware..' && (git clone https://github.com/thiemar/vectorcontrol && cd vectorcontrol && BOARD=s2740vc_1_0 make -s && BOARD=px4esc_1_6 make -s && ../Tools/uavcan_copy.sh)
|
||||
&& echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
|
||||
&& echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
|
||||
&& echo 'Running Tests..' && make px4fmu-v2_default test
|
||||
;
|
||||
fi
|
||||
|
||||
after_success:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
|
||||
@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
|
||||
|
||||
### Edit and build the code
|
||||
|
||||
The [developer guide](http://px4.io/dev/start) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
|
||||
@ -48,7 +48,7 @@ Download QGC from http://qgroundcontrol.org/downloads and install using the wind
|
||||
|
||||
## PX4
|
||||
|
||||
### Platfrom Requirements
|
||||
### Platform Requirements
|
||||
Linux or Eagle with a working IP interface (?? does this need further instructions?)
|
||||
|
||||
### Build Host Requirements
|
||||
|
||||
14
Makefile
14
Makefile
@ -109,7 +109,8 @@ endif
|
||||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule update --init --recursive --force && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule sync && git submodule update --init --recursive && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
||||
+Tools/check_submodules.sh
|
||||
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
|
||||
endef
|
||||
|
||||
@ -152,7 +153,7 @@ posix_sitl_ekf2:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
ros_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
|
||||
|
||||
qurt_eagle_travis:
|
||||
$(call cmake-build,$@)
|
||||
@ -168,6 +169,12 @@ qurt_eagle_default:
|
||||
|
||||
posix_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_rpi2_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_rpi2_release:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
@ -193,7 +200,8 @@ clean:
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
30
README.md
30
README.md
@ -9,33 +9,22 @@ This repository contains the [PX4 Flight Core](http://px4.io), with the main app
|
||||
* Official Website: http://px4.io
|
||||
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
|
||||
* Supported airframes (more experimental are supported):
|
||||
* [Multicopters](http://px4.io/platforms/multicopters/start)
|
||||
* [Fixed wing](http://px4.io/platforms/planes/start)
|
||||
* [VTOL](http://px4.io/platforms/vtol/start)
|
||||
* Binaries (always up-to-date from master):
|
||||
* [Downloads](http://px4.io/firmware/downloads)
|
||||
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
|
||||
* [Fixed wing](http://px4.io/portfolio_category/vtol/)
|
||||
* [VTOL](http://px4.io/portfolio_category/plane/)
|
||||
* Releases
|
||||
* [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
* Forum / Mailing list: [Google Groups](http://groups.google.com/group/px4users)
|
||||
|
||||
### Users ###
|
||||
|
||||
Please refer to the [user documentation](https://pixhawk.org/users/start) for flying drones with the PX4 flight stack.
|
||||
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
|
||||
|
||||
### Developers ###
|
||||
|
||||
Contributing guide:
|
||||
* [CONTRIBUTING.md](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [PX4 Contribution Guide](http://px4.io/dev/contributing)
|
||||
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
|
||||
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [Developer guide](http://dev.px4.io)
|
||||
|
||||
Software in the Loop guide:
|
||||
Use software in the loop [to get started with the codebase](https://pixhawk.org/dev/simulation/native_sitl).
|
||||
|
||||
Developer guide:
|
||||
http://dev.px4.io
|
||||
|
||||
Testing guide:
|
||||
http://px4.io/dev/unit_tests
|
||||
|
||||
This repository contains code supporting these boards:
|
||||
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
|
||||
@ -44,8 +33,3 @@ This repository contains code supporting these boards:
|
||||
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
|
||||
* AeroCore (v1 and v2)
|
||||
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
|
||||
## NuttShell (NSH) ##
|
||||
|
||||
NSH usage documentation:
|
||||
http://px4.io/users/serial_connection
|
||||
|
||||
@ -37,9 +37,8 @@ then
|
||||
param set FW_RR_I 0.1
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.3
|
||||
param set RWTO_TKOFF 1
|
||||
fi
|
||||
|
||||
param set RWTO_TKOFF 1
|
||||
|
||||
set HIL yes
|
||||
set MIXER AERT
|
||||
|
||||
41
ROMFS/px4fmu_common/init.d/12002_steadidrone_mavrik
Normal file
41
ROMFS/px4fmu_common/init.d/12002_steadidrone_mavrik
Normal file
@ -0,0 +1,41 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Steadidrone MAVRIK
|
||||
#
|
||||
# @type Octo Coax Wide
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_PITCH_P 4.0
|
||||
param set MC_PITCHRATE_P 0.24
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.013
|
||||
param set MC_PITCHRATE_MAX 180.0
|
||||
|
||||
param set MC_ROLL_P 4.0
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.07
|
||||
param set MC_ROLLRATE_D 0.009
|
||||
param set MC_ROLLRATE_MAX 180.0
|
||||
|
||||
param set MC_YAW_P 3.0
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.5
|
||||
|
||||
param set MPC_HOLD_MAX_XY 0.25
|
||||
param set MPC_THR_MIN 0.15
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
|
||||
param set BAT_N_CELLS 4
|
||||
fi
|
||||
|
||||
set MIXER octo_cox_w
|
||||
|
||||
set PWM_OUT 12345678
|
||||
@ -1,14 +1,40 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Duorotor Tailsitter
|
||||
# @name Caipiroshka Duo Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
# @type VTOL Duo Tailsitter
|
||||
#
|
||||
# @output MAIN1 motor left
|
||||
# @output MAIN2 motor right
|
||||
# @output MAIN5 elevon left
|
||||
# @output MAIN6 elevon right
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.12
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 4.5
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
fi
|
||||
|
||||
set MIXER caipirinha_vtol
|
||||
|
||||
set PWM_OUT 12
|
||||
|
||||
@ -14,12 +14,12 @@ then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
@ -35,13 +35,9 @@ fi
|
||||
|
||||
set MIXER firefly6
|
||||
set PWM_OUT 12345678
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX firefly6
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
|
||||
set MAV_TYPE 21
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Quadrotor X Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
@ -14,16 +14,18 @@ then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
param set VT_ARSP_TRANS 12
|
||||
param set VT_ARSP_BLEND 6
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.12
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.19
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
@ -31,17 +33,25 @@ then
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_PR_I 0.02
|
||||
param set FW_PR_IMAX 0.4
|
||||
param set FW_PR_P 0.08
|
||||
param set FW_RR_FF 0.6
|
||||
param set FW_RR_I 0.01
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.05
|
||||
param set FW_THR_CRUISE 0.75
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 12345678
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
|
||||
@ -34,14 +34,12 @@ then
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 12345678
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_delta
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_ACHDIS 3
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
|
||||
@ -31,18 +31,15 @@ then
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 12345678
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAVVT
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_DISARMED 1000
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
|
||||
57
ROMFS/px4fmu_common/init.d/13008_QuadRanger
Normal file
57
ROMFS/px4fmu_common/init.d/13008_QuadRanger
Normal file
@ -0,0 +1,57 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name QuadRanger
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TRANS_THR 0.75
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.1
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_FF 0.7
|
||||
param set MC_YAWRATE_P 0.6
|
||||
param set MC_YAWRATE_I 0.04
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
|
||||
param set VT_ARSP_TRANS 15.0
|
||||
param set VT_ARSP_BLEND 10.0
|
||||
param set VT_B_TRANS_DUR 4.0
|
||||
fi
|
||||
|
||||
set MIXER vtol_quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Applied Aeronautics Albatross
|
||||
#
|
||||
# @type Standard Plane
|
||||
# @type Plane A-Tail
|
||||
#
|
||||
# @output MAIN1 aileron right
|
||||
# @output MAIN2 aileron left
|
||||
|
||||
@ -30,9 +30,3 @@ then
|
||||
# DJI ESCs do not support calibration and need a higher min
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1075
|
||||
then
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
@ -18,11 +18,11 @@ then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.01
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.01
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MC_YAWRATE_I 0.1
|
||||
@ -30,9 +30,3 @@ then
|
||||
# DJI ESCs do not support calibration and need a higher min
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
# Transitional support: ensure suitable PWM min/max param values
|
||||
if param compare PWM_MIN 1075
|
||||
then
|
||||
param set PWM_MIN 1230
|
||||
fi
|
||||
|
||||
@ -14,11 +14,11 @@ then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.01
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.16
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.01
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MC_YAWRATE_I 0.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Quadrotor X config
|
||||
# @name 3DR Solo
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
|
||||
42
ROMFS/px4fmu_common/init.d/4040_reaper
Normal file
42
ROMFS/px4fmu_common/init.d/4040_reaper
Normal file
@ -0,0 +1,42 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Reaper 500 Quad
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @maintainer Blankered
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.14
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
fi
|
||||
|
||||
set MIXER quad_h
|
||||
|
||||
set PWM_RATE 50
|
||||
set PWM_OUT 1234
|
||||
set PWM_MIN 1100
|
||||
set PWM_MAX 1900
|
||||
set PWM_DISARMED 1500
|
||||
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_AUX_DISARMED 950
|
||||
37
ROMFS/px4fmu_common/init.d/4050_generic_250
Normal file
37
ROMFS/px4fmu_common/init.d/4050_generic_250
Normal file
@ -0,0 +1,37 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name generic_250
|
||||
#
|
||||
# @type Quadrotor x
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Mark Whitehorn <kd0aij@gmail.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.1
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.005
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.1
|
||||
param set MC_PITCHRATE_I 0.2
|
||||
param set MC_PITCHRATE_D 0.005
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set PWM_MIN 980
|
||||
param set MPC_THR_MIN 0.06
|
||||
param set MPC_MANTHR_MIN 0.06
|
||||
param set MC_ROLLRATE_MAX 360.0
|
||||
param set MC_PITCHRATE_MAX 360.0
|
||||
param set MC_YAWRATE_MAX 200.0
|
||||
param set ATT_BIAS_MAX 0.0
|
||||
fi
|
||||
@ -147,6 +147,7 @@ then
|
||||
set FAILSAFE_AUX none
|
||||
fi
|
||||
|
||||
# Set min / max for aux out and rates
|
||||
if [ $PWM_AUX_OUT != none ]
|
||||
then
|
||||
#
|
||||
@ -157,13 +158,6 @@ then
|
||||
pwm rate -c $PWM_AUX_OUT -r $PWM_AUX_RATE -d $OUTPUT_AUX_DEV
|
||||
fi
|
||||
|
||||
#
|
||||
# Set disarmed, min and max PWM_AUX values
|
||||
#
|
||||
if [ $PWM_AUX_DISARMED != none ]
|
||||
then
|
||||
pwm disarmed -c $PWM_AUX_OUT -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
|
||||
fi
|
||||
if [ $PWM_AUX_MIN != none ]
|
||||
then
|
||||
pwm min -c $PWM_AUX_OUT -p $PWM_AUX_MIN -d $OUTPUT_AUX_DEV
|
||||
@ -174,6 +168,23 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set disarmed values for aux out
|
||||
|
||||
# Transitional support until all configs
|
||||
# are updated
|
||||
if [ $PWM_ACHDIS == none ]
|
||||
then
|
||||
set PWM_ACHDIS ${PWM_AUX_OUT}
|
||||
fi
|
||||
|
||||
#
|
||||
# Set disarmed, min and max PWM_AUX values
|
||||
#
|
||||
if [ $PWM_AUX_DISARMED != none -a $PWM_ACHDIS != none ]
|
||||
then
|
||||
pwm disarmed -c $PWM_ACHDIS -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
|
||||
fi
|
||||
|
||||
if [ $FAILSAFE_AUX != none ]
|
||||
then
|
||||
pwm failsafe -d $OUTPUT_AUX_DEV $FAILSAFE
|
||||
|
||||
@ -145,6 +145,10 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if sf10a start
|
||||
then
|
||||
fi
|
||||
|
||||
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
|
||||
usleep 20000
|
||||
if sensors start
|
||||
|
||||
@ -4,40 +4,25 @@ set VEHICLE_TYPE vtol
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
#
|
||||
#Default controller parameters for MC
|
||||
#
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.1
|
||||
param set MC_ROLLRATE_I 0.0
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.2
|
||||
param set MC_PITCHRATE_I 0.0
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_YAW_P 4
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.3
|
||||
|
||||
#
|
||||
# Default parameters for FW
|
||||
#
|
||||
param set FW_PR_FF 0.3
|
||||
param set FW_PR_I 0.000
|
||||
param set FW_PR_IMAX 0.2
|
||||
param set FW_PR_P 0.02
|
||||
param set FW_RR_FF 0.3
|
||||
param set FW_RR_I 0.00
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.02
|
||||
|
||||
param set PE_VELNE_NOISE 0.5
|
||||
param set PE_VELD_NOISE 0.3
|
||||
param set PE_POSNE_NOISE 0.5
|
||||
param set PE_POSD_NOISE 1.25
|
||||
param set PE_ABIAS_PNOISE 0.0001
|
||||
|
||||
#
|
||||
# Default parameters for mission and position handling
|
||||
#
|
||||
param set NAV_ACC_RAD 3
|
||||
param set MPC_TKO_SPEED 1.0
|
||||
param set MPC_LAND_SPEED 0.7
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
param set MPC_XY_VEL_MAX 4.0
|
||||
param set MIS_YAW_TMT 10
|
||||
fi
|
||||
|
||||
set PWM_DISARMED 900
|
||||
|
||||
@ -86,70 +86,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compare existing params and save defaults
|
||||
# this only needs to be in for 1-2 releases
|
||||
if param compare RC_MAP_THROTTLE 0
|
||||
then
|
||||
# So this is a default setup,
|
||||
# now lets find out if channel 3
|
||||
# is calibrated
|
||||
if param compare RC3_MIN 1000
|
||||
then
|
||||
# This is default, do nothing
|
||||
else
|
||||
# Set old default
|
||||
param set RC_MAP_THROTTLE 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compare existing params and save defaults
|
||||
# this only needs to be in for 1-2 releases
|
||||
if param compare RC_MAP_ROLL 0
|
||||
then
|
||||
# So this is a default setup,
|
||||
# now lets find out if channel 1
|
||||
# is calibrated
|
||||
if param compare RC1_MIN 1000
|
||||
then
|
||||
# This is default, do nothing
|
||||
else
|
||||
# Set old default
|
||||
param set RC_MAP_ROLL 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compare existing params and save defaults
|
||||
# this only needs to be in for 1-2 releases
|
||||
if param compare RC_MAP_PITCH 0
|
||||
then
|
||||
# So this is a default setup,
|
||||
# now lets find out if channel 2
|
||||
# is calibrated
|
||||
if param compare RC2_MIN 1000
|
||||
then
|
||||
# This is default, do nothing
|
||||
else
|
||||
# Set old default
|
||||
param set RC_MAP_PITCH 2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compare existing params and save defaults
|
||||
# this only needs to be in for 1-2 releases
|
||||
if param compare RC_MAP_YAW 0
|
||||
then
|
||||
# So this is a default setup,
|
||||
# now lets find out if channel 4
|
||||
# is calibrated
|
||||
if param compare RC4_MIN 1000
|
||||
then
|
||||
# This is default, do nothing
|
||||
else
|
||||
# Set old default
|
||||
param set RC_MAP_YAW 4
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Start system state indicator
|
||||
#
|
||||
@ -182,6 +118,7 @@ then
|
||||
set PWM_MAX none
|
||||
set PWM_AUX_OUT none
|
||||
set PWM_AUX_RATE none
|
||||
set PWM_ACHDIS none
|
||||
set PWM_AUX_DISARMED none
|
||||
set PWM_AUX_MIN none
|
||||
set PWM_AUX_MAX none
|
||||
@ -550,9 +487,9 @@ then
|
||||
# Avoid using ttyS1 for MAVLink on FMUv4
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
set MAVLINK_F "-r 1200 -d /dev/ttyS2"
|
||||
set MAVLINK_F "-r 1200 -d /dev/ttyS1"
|
||||
# Start MAVLink on Wifi (ESP8266 port)
|
||||
mavlink start -r 800000 -b 921600 -d /dev/ttyS0
|
||||
mavlink start -r 20000 -m config -b 921600 -d /dev/ttyS0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -563,8 +500,9 @@ then
|
||||
#
|
||||
# MAVLink onboard / TELEM2
|
||||
#
|
||||
if ver hwcmp PX4FMU_V2
|
||||
if ver hwcmp PX4FMU_V1
|
||||
then
|
||||
else
|
||||
# XXX We need a better way for runtime eval of shell variables,
|
||||
# but this works for now
|
||||
if param compare SYS_COMPANION 921600
|
||||
@ -583,6 +521,10 @@ then
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
|
||||
fi
|
||||
if param compare SYS_COMPANION 357600
|
||||
then
|
||||
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
|
||||
fi
|
||||
# Sensors on the PWM interface bank
|
||||
# clear pins 5 and 6
|
||||
if param compare SENS_EN_LL40LS 1
|
||||
@ -670,6 +612,10 @@ then
|
||||
then
|
||||
set MAV_TYPE 2
|
||||
fi
|
||||
if [ $MIXER == quad_h ]
|
||||
then
|
||||
set MAV_TYPE 2
|
||||
fi
|
||||
if [ $MIXER == tri_y_yaw- -o $MIXER == tri_y_yaw+ ]
|
||||
then
|
||||
set MAV_TYPE 15
|
||||
@ -686,7 +632,7 @@ then
|
||||
then
|
||||
set MAV_TYPE 14
|
||||
fi
|
||||
if [ $MIXER == octo_cox ]
|
||||
if [ $MIXER == octo_cox -o $MIXER == octo_cox_w ]
|
||||
then
|
||||
set MAV_TYPE 14
|
||||
fi
|
||||
@ -835,6 +781,11 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V4
|
||||
then
|
||||
frsky_telemetry start -d /dev/ttyS6
|
||||
fi
|
||||
|
||||
if ver hwcmp PX4FMU_V2
|
||||
then
|
||||
# Check for flow sensor - as it is a background task, launch it last
|
||||
|
||||
@ -1,10 +1,27 @@
|
||||
#!nsh
|
||||
# Caipirinha vtol mixer for PX4FMU
|
||||
#
|
||||
#===========================
|
||||
Caipirinha tailsitter mixer
|
||||
============================
|
||||
|
||||
This file defines a mixer for the TBS Caipirinha tailsitter edition. This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers.
|
||||
|
||||
Motor mixer
|
||||
------------
|
||||
When standing in front of the vehicle the first motor should be on the left side
|
||||
while the second motor should be on the right side.
|
||||
|
||||
R: 2- 10000 10000 10000 0
|
||||
|
||||
#mixer for the elevons
|
||||
Zero mixer (2x)
|
||||
---------------
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
Elevons mixer
|
||||
--------------
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 10000 10000 0 -10000 10000
|
||||
|
||||
3
ROMFS/px4fmu_common/mixers/octo_cox_w.main.mix
Normal file
3
ROMFS/px4fmu_common/mixers/octo_cox_w.main.mix
Normal file
@ -0,0 +1,3 @@
|
||||
# Octo coaxial with wide arms
|
||||
|
||||
R: 8cw 10000 10000 10000 0
|
||||
24
ROMFS/px4fmu_common/mixers/standard_vtol_sitl.main.mix
Normal file
24
ROMFS/px4fmu_common/mixers/standard_vtol_sitl.main.mix
Normal file
@ -0,0 +1,24 @@
|
||||
Mixer for standard vtol plane (SITL) with motor x configuration
|
||||
=========================================================
|
||||
|
||||
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration.
|
||||
The plane has two ailerons and one elevator. The ailerons and elevator are treated as elevons
|
||||
in order to make the standard vtol simulation compatible with the tailsitter simulation.
|
||||
|
||||
R: 4x 10000 10000 10000 0
|
||||
|
||||
# mixer for the elevons
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 5000 5000 0 -10000 10000
|
||||
S: 1 1 -5000 -5000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 5000 5000 0 -10000 10000
|
||||
S: 1 1 5000 5000 0 -10000 10000
|
||||
|
||||
# mixer for the pusher/puller throttle
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 3 0 20000 -10000 -10000 10000
|
||||
@ -6,7 +6,7 @@ then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ $cmake_ver == *"2.8"* ]] || [[ $cmake_ver == *"2.9"* ]] || [[ $cmake_ver == *"3.0"* ]] || [[ $cmake_ver == *"3.1"* ]]
|
||||
if [[ $cmake_ver == *" 2.8"* ]] || [[ $cmake_ver == *" 2.9"* ]] || [[ $cmake_ver == *" 3.0"* ]] || [[ $cmake_ver == *" 3.1"* ]]
|
||||
then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
@ -25,7 +25,6 @@ for fn in $(find src/examples \
|
||||
src/modules/uORB \
|
||||
src/modules/bottle_drop \
|
||||
src/modules/dataman \
|
||||
src/modules/fixedwing_backside \
|
||||
src/modules/segway \
|
||||
src/modules/local_position_estimator \
|
||||
src/modules/unit_test \
|
||||
|
||||
81
Tools/check_submodules.sh
Executable file
81
Tools/check_submodules.sh
Executable file
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ -n "$GIT_SUBMODULES_ARE_EVIL" ] && {
|
||||
# GIT_SUBMODULES_ARE_EVIL is set, meaning user doesn't want submodules
|
||||
echo "Skipping submodules. NUTTX_SRC is set to $NUTTX_SRC"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ -f src/modules/uavcan/libuavcan/CMakeLists.txt ]
|
||||
then
|
||||
echo "Git submodule config valid."
|
||||
else
|
||||
git submodule update --init --recursive
|
||||
fi
|
||||
|
||||
GITSTATUS=$(git status)
|
||||
|
||||
function check_git_submodule {
|
||||
|
||||
if [ -d $1 ];
|
||||
then
|
||||
SUBMODULE_STATUS=$(git submodule summary "$1")
|
||||
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
|
||||
if [ -z "$STATUSRETVAL" ]; then
|
||||
echo "Checked $1 submodule, correct version found"
|
||||
else
|
||||
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
|
||||
echo ""
|
||||
echo -e "Different commits:"
|
||||
echo -e "$SUBMODULE_STATUS"
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e " *******************************************************************************"
|
||||
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
|
||||
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
|
||||
echo -e " * (performs \033[94mgit submodule update --init --recursive\033[0m) *"
|
||||
echo -e " *******************************************************************************"
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e " Only for EXPERTS:"
|
||||
echo -e " $1 submodule is not in the recommended version."
|
||||
echo -e " Hit 'y' and <ENTER> to continue the build with this version. Hit <ENTER> to resolve manually."
|
||||
echo -e " Use \033[94mgit add $1 && git commit -m 'Updated $1'\033[0m to choose this version (careful!)"
|
||||
echo ""
|
||||
read user_cmd
|
||||
if [ "$user_cmd" == "y" ]
|
||||
then
|
||||
echo "Continuing build with manually overridden submodule.."
|
||||
else
|
||||
if [ "$user_cmd" == "u" ]
|
||||
then
|
||||
git submodule update --init --recursive
|
||||
echo "Submodule fixed, continuing build.."
|
||||
else
|
||||
echo "Build aborted."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
git submodule update --init --recursive;
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
check_git_submodule NuttX
|
||||
check_git_submodule Tools/gencpp
|
||||
check_git_submodule Tools/genmsg
|
||||
check_git_submodule Tools/jMAVSim
|
||||
check_git_submodule Tools/sitl_gazebo
|
||||
check_git_submodule cmake/cmake_hexagon
|
||||
check_git_submodule mavlink/include/mavlink/v1.0
|
||||
check_git_submodule src/lib/DriverFramework/cmake_hexagon
|
||||
check_git_submodule src/lib/DriverFramework/dspal
|
||||
check_git_submodule src/lib/dspal
|
||||
check_git_submodule src/lib/ecl
|
||||
check_git_submodule src/lib/matrix
|
||||
check_git_submodule src/modules/uavcan/libuavcan
|
||||
check_git_submodule unittests/googletest
|
||||
|
||||
exit 0
|
||||
@ -136,12 +136,12 @@ extern "C" __EXPORT int listener_main(int argc, char *argv[]);
|
||||
int listener_main(int argc, char *argv[]) {
|
||||
int sub = -1;
|
||||
orb_id_t ID;
|
||||
if(argc < 3) {
|
||||
printf("need at least two arguments: topic name, number of messages to print\\n");
|
||||
if(argc < 2) {
|
||||
printf("need at least two arguments: topic name. [optional number of messages to print]\\n");
|
||||
return 1;
|
||||
}
|
||||
""")
|
||||
print("\tunsigned num_msgs = atoi(argv[2]);")
|
||||
print("\tunsigned num_msgs = (argc > 2) ? atoi(argv[2]) : 1;")
|
||||
print("\tif (strncmp(argv[1],\"%s\",50) == 0) {" % messages[0])
|
||||
print("\t\tsub = orb_subscribe(ORB_ID(%s));" % messages[0])
|
||||
print("\t\tID = ORB_ID(%s);" % messages[0])
|
||||
@ -154,9 +154,11 @@ for index,m in enumerate(messages[1:]):
|
||||
print("\t\tstruct %s_s container;" % m)
|
||||
print("\t\tmemset(&container, 0, sizeof(container));")
|
||||
print("\t\tbool updated;")
|
||||
print("\t\tfor (unsigned i = 0; i < num_msgs; i++) {")
|
||||
print("\t\tunsigned i = 0;")
|
||||
print("\t\twhile(i < num_msgs) {")
|
||||
print("\t\t\torb_check(sub,&updated);")
|
||||
print("\t\t\tupdated = true;")
|
||||
print("\t\t\tif (i == 0) { updated = true; } else { usleep(500); }")
|
||||
print("\t\t\ti++;")
|
||||
print("\t\t\tif (updated) {")
|
||||
print("\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
|
||||
print("\t\t\torb_copy(ID,sub,&container);")
|
||||
@ -190,9 +192,15 @@ for index,m in enumerate(messages[1:]):
|
||||
elif item[0] == "int32":
|
||||
print("\t\t\tprintf(\"%s: %%d\\n\",container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "uint32":
|
||||
print("\t\t\tprintf(\"%s: %%d\\n\",container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "uint8":
|
||||
print("\t\t\tprintf(\"%s: %%u\\n\",container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "int16":
|
||||
print("\t\t\tprintf(\"%s: %%d\\n\",(int)container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "uint16":
|
||||
print("\t\t\tprintf(\"%s: %%u\\n\",(unsigned)container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "int8":
|
||||
print("\t\t\tprintf(\"%s: %%d\\n\",(int)container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "uint8":
|
||||
print("\t\t\tprintf(\"%s: %%u\\n\",(unsigned)container.%s);" % (item[1], item[1]))
|
||||
elif item[0] == "bool":
|
||||
print("\t\t\tprintf(\"%s: %%s\\n\",container.%s ? \"True\" : \"False\");" % (item[1], item[1]))
|
||||
print("\t\t\t}")
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 0876a46d53954db34775151f73db024bcfc656a0
|
||||
Subproject commit 218ffbb8cf584fa2d02dbbc1215ce85bc25a9f57
|
||||
@ -752,7 +752,7 @@ class MAVLink_gps_raw_int_message(MAVLink_message):
|
||||
'''
|
||||
The global position, as returned by the Global Positioning
|
||||
System (GPS). This is NOT the global position
|
||||
estimate of the sytem, but rather a RAW sensor value. See
|
||||
estimate of the system, but rather a RAW sensor value. See
|
||||
message GLOBAL_POSITION for the global position estimate.
|
||||
Coordinate frame is right-handed, Z-axis up (GPS frame).
|
||||
'''
|
||||
@ -2812,7 +2812,7 @@ class MAVLink(object):
|
||||
'''
|
||||
The global position, as returned by the Global Positioning System
|
||||
(GPS). This is NOT the global position
|
||||
estimate of the sytem, but rather a RAW sensor value.
|
||||
estimate of the system, but rather a RAW sensor value.
|
||||
See message GLOBAL_POSITION for the global position
|
||||
estimate. Coordinate frame is right-handed, Z-axis up
|
||||
(GPS frame).
|
||||
@ -2837,7 +2837,7 @@ class MAVLink(object):
|
||||
'''
|
||||
The global position, as returned by the Global Positioning System
|
||||
(GPS). This is NOT the global position
|
||||
estimate of the sytem, but rather a RAW sensor value.
|
||||
estimate of the system, but rather a RAW sensor value.
|
||||
See message GLOBAL_POSITION for the global position
|
||||
estimate. Coordinate frame is right-handed, Z-axis up
|
||||
(GPS frame).
|
||||
|
||||
@ -28,29 +28,57 @@ class XMLOutput():
|
||||
xml_group = ET.SubElement(xml_parameters, "airframe_group")
|
||||
xml_group.attrib["name"] = group.GetName()
|
||||
if (group.GetName() == "Standard Plane"):
|
||||
xml_group.attrib["image"] = "AirframeStandardPlane.png"
|
||||
xml_group.attrib["image"] = "Plane"
|
||||
elif (group.GetName() == "Flying Wing"):
|
||||
xml_group.attrib["image"] = "AirframeFlyingWing.png"
|
||||
xml_group.attrib["image"] = "FlyingWing"
|
||||
elif (group.GetName() == "Quadrotor x"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorX.png"
|
||||
xml_group.attrib["image"] = "QuadRotorX"
|
||||
elif (group.GetName() == "Quadrotor +"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorPlus.png"
|
||||
xml_group.attrib["image"] = "QuadRotorPlus"
|
||||
elif (group.GetName() == "Hexarotor x"):
|
||||
xml_group.attrib["image"] = "AirframeHexaRotorX.png"
|
||||
xml_group.attrib["image"] = "HexaRotorX"
|
||||
elif (group.GetName() == "Hexarotor +"):
|
||||
xml_group.attrib["image"] = "AirframeHexaRotorPlus.png"
|
||||
xml_group.attrib["image"] = "HexaRotorPlus"
|
||||
elif (group.GetName() == "Octorotor +"):
|
||||
xml_group.attrib["image"] = "AirframeOctoRotorPlus.png"
|
||||
xml_group.attrib["image"] = "OctoRotorPlus"
|
||||
elif (group.GetName() == "Octorotor x"):
|
||||
xml_group.attrib["image"] = "AirframeOctoRotorX.png"
|
||||
xml_group.attrib["image"] = "OctoRotorX"
|
||||
elif (group.GetName() == "Octorotor Coaxial"):
|
||||
xml_group.attrib["image"] = "OctoRotorXCoaxial"
|
||||
elif (group.GetName() == "Octo Coax Wide"):
|
||||
xml_group.attrib["image"] = "OctoRotorXCoaxial"
|
||||
elif (group.GetName() == "Quadrotor Wide"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
|
||||
xml_group.attrib["image"] = "QuadRotorWide"
|
||||
elif (group.GetName() == "Quadrotor H"):
|
||||
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
|
||||
xml_group.attrib["image"] = "QuadRotorH"
|
||||
elif (group.GetName() == "Simulation"):
|
||||
xml_group.attrib["image"] = "AirframeSimulation.png"
|
||||
xml_group.attrib["image"] = "AirframeSimulation"
|
||||
elif (group.GetName() == "Plane A-Tail"):
|
||||
xml_group.attrib["image"] = "PlaneATail"
|
||||
elif (group.GetName() == "VTOL Duo Tailsitter"):
|
||||
xml_group.attrib["image"] = "VTOLDuoRotorTailSitter"
|
||||
elif (group.GetName() == "Standard VTOL"):
|
||||
xml_group.attrib["image"] = "VTOLPlane"
|
||||
elif (group.GetName() == "VTOL Quad Tailsitter"):
|
||||
xml_group.attrib["image"] = "VTOLQuadRotorTailSitter"
|
||||
elif (group.GetName() == "VTOL Tiltrotor"):
|
||||
xml_group.attrib["image"] = "VTOLTiltRotor"
|
||||
elif (group.GetName() == "Coaxial Helicopter"):
|
||||
xml_group.attrib["image"] = "HelicopterCoaxial"
|
||||
elif (group.GetName() == "Hexarotor Coaxial"):
|
||||
xml_group.attrib["image"] = "Y6A"
|
||||
elif (group.GetName() == "Y6B"):
|
||||
xml_group.attrib["image"] = "Y6B"
|
||||
elif (group.GetName() == "Tricopter Y-"):
|
||||
xml_group.attrib["image"] = "YMinus"
|
||||
elif (group.GetName() == "Tricopter Y+"):
|
||||
xml_group.attrib["image"] = "YPlus"
|
||||
elif (group.GetName() == "Rover"):
|
||||
xml_group.attrib["image"] = "Rover"
|
||||
elif (group.GetName() == "Boat"):
|
||||
xml_group.attrib["image"] = "Boat"
|
||||
else:
|
||||
xml_group.attrib["image"] = ""
|
||||
xml_group.attrib["image"] = "AirframeUnknown"
|
||||
for param in group.GetParams():
|
||||
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
|
||||
xml_param = ET.SubElement(xml_group, "airframe")
|
||||
|
||||
@ -51,6 +51,7 @@ class Parameter(object):
|
||||
|
||||
def __init__(self, name, type, default = ""):
|
||||
self.fields = {}
|
||||
self.values = {}
|
||||
self.name = name
|
||||
self.type = type
|
||||
self.default = default
|
||||
@ -70,6 +71,12 @@ class Parameter(object):
|
||||
"""
|
||||
self.fields[code] = value
|
||||
|
||||
def SetEnumValue(self, code, value):
|
||||
"""
|
||||
Set named enum value
|
||||
"""
|
||||
self.values[code] = value
|
||||
|
||||
def GetFieldCodes(self):
|
||||
"""
|
||||
Return list of existing field codes in convenient order
|
||||
@ -87,7 +94,26 @@ class Parameter(object):
|
||||
if not fv:
|
||||
# required because python 3 sorted does not accept None
|
||||
return ""
|
||||
return self.fields.get(code)
|
||||
return fv
|
||||
|
||||
def GetEnumCodes(self):
|
||||
"""
|
||||
Return list of existing value codes in convenient order
|
||||
"""
|
||||
keys = self.values.keys()
|
||||
#keys = sorted(keys)
|
||||
#keys = sorted(keys, key=lambda x: self.priority.get(x, 0), reverse=True)
|
||||
return keys
|
||||
|
||||
def GetEnumValue(self, code):
|
||||
"""
|
||||
Return value of the given enum code or None if not found.
|
||||
"""
|
||||
fv = self.values.get(code)
|
||||
if not fv:
|
||||
# required because python 3 sorted does not accept None
|
||||
return ""
|
||||
return fv
|
||||
|
||||
class SourceParser(object):
|
||||
"""
|
||||
@ -107,7 +133,7 @@ class SourceParser(object):
|
||||
re_remove_dots = re.compile(r'\.+$')
|
||||
re_remove_carriage_return = re.compile('\n+')
|
||||
|
||||
valid_tags = set(["group", "board", "min", "max", "unit", "decimal"])
|
||||
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "reboot_required", "value"])
|
||||
|
||||
# Order of parameter groups
|
||||
priority = {
|
||||
@ -137,6 +163,7 @@ class SourceParser(object):
|
||||
short_desc = None
|
||||
long_desc = None
|
||||
tags = {}
|
||||
def_values = {}
|
||||
elif state is not None and state != "comment-processed":
|
||||
m = self.re_comment_end.search(line)
|
||||
if m:
|
||||
@ -156,7 +183,12 @@ class SourceParser(object):
|
||||
m = self.re_comment_tag.match(comment_content)
|
||||
if m:
|
||||
tag, desc = m.group(1, 2)
|
||||
tags[tag] = desc
|
||||
if (tag == "value"):
|
||||
# Take the meta info string and split the code and description
|
||||
metainfo = desc.split(" ", 1)
|
||||
def_values[metainfo[0]] = metainfo[1]
|
||||
else:
|
||||
tags[tag] = desc
|
||||
current_tag = tag
|
||||
state = "wait-tag-end"
|
||||
elif state == "wait-short":
|
||||
@ -191,6 +223,7 @@ class SourceParser(object):
|
||||
defval = ""
|
||||
# Non-empty line outside the comment
|
||||
m = self.re_px4_param_default_definition.match(line)
|
||||
# Default value handling
|
||||
if m:
|
||||
name_m, defval_m = m.group(1,2)
|
||||
default_var[name_m] = defval_m
|
||||
@ -226,6 +259,8 @@ class SourceParser(object):
|
||||
return False
|
||||
else:
|
||||
param.SetField(tag, tags[tag])
|
||||
for def_value in def_values:
|
||||
param.SetEnumValue(def_value, def_values[def_value])
|
||||
# Store the parameter
|
||||
if group not in self.param_groups:
|
||||
self.param_groups[group] = ParameterGroup(group)
|
||||
@ -278,6 +313,13 @@ class SourceParser(object):
|
||||
if default != "" and float(default) > float(max):
|
||||
sys.stderr.write("Default value is larger than max: {0} default:{1} max:{2}\n".format(name, default, max))
|
||||
return False
|
||||
for code in param.GetEnumCodes():
|
||||
if not self.IsNumber(code):
|
||||
sys.stderr.write("Min value not number: {0} {1}\n".format(name, code))
|
||||
return False
|
||||
if param.GetEnumValue(code) == "":
|
||||
sys.stderr.write("Description for enum value is empty: {0} {1}\n".format(name, code))
|
||||
return False
|
||||
return True
|
||||
|
||||
def GetParamGroups(self):
|
||||
|
||||
@ -52,6 +52,13 @@ class XMLOutput():
|
||||
xml_field.text = value
|
||||
if last_param_name != param.GetName():
|
||||
board_specific_param_set = False
|
||||
|
||||
if len(param.GetEnumCodes()) > 0:
|
||||
xml_values = ET.SubElement(xml_param, "values")
|
||||
for code in param.GetEnumCodes():
|
||||
xml_value = ET.SubElement(xml_values, "value")
|
||||
xml_value.attrib["code"] = code;
|
||||
xml_value.text = param.GetEnumValue(code)
|
||||
indent(xml_parameters)
|
||||
self.xml_document = ET.ElementTree(xml_parameters)
|
||||
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (C) 2014 PX4 Development Team. All rights reserved.
|
||||
# Author: Julian Oes <joes@student.ethz.ch>
|
||||
# Copyright (C) 2014-2015 PX4 Development Team. All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@ -37,48 +36,53 @@
|
||||
"""
|
||||
px_romfs_pruner.py:
|
||||
Delete all comments and newlines before ROMFS is converted to an image
|
||||
|
||||
@author: Julian Oes <julian@oes.ch>
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import argparse, re
|
||||
import argparse
|
||||
import re
|
||||
import os
|
||||
|
||||
|
||||
def main():
|
||||
# Parse commandline arguments
|
||||
parser = argparse.ArgumentParser(description="ROMFS pruner.")
|
||||
parser.add_argument('--folder', action="store",
|
||||
help="ROMFS scratch folder.")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Parse commandline arguments
|
||||
parser = argparse.ArgumentParser(description="ROMFS pruner.")
|
||||
parser.add_argument('--folder', action="store", help="ROMFS scratch folder.")
|
||||
args = parser.parse_args()
|
||||
print("Pruning ROMFS files.")
|
||||
|
||||
print("Pruning ROMFS files.")
|
||||
# go through
|
||||
for (root, dirs, files) in os.walk(args.folder):
|
||||
for file in files:
|
||||
# only prune text files
|
||||
if ".zip" in file or ".bin" in file or ".swp" in file \
|
||||
or ".data" in file or ".DS_Store" in file \
|
||||
or file.startswith("."):
|
||||
continue
|
||||
|
||||
# go through
|
||||
for (root, dirs, files) in os.walk(args.folder):
|
||||
for file in files:
|
||||
# only prune text files
|
||||
if ".zip" in file or ".bin" in file or ".swp" in file or ".data" in file or ".DS_Store" in file:
|
||||
continue
|
||||
file_path = os.path.join(root, file)
|
||||
|
||||
file_path = os.path.join(root, file)
|
||||
|
||||
# read file line by line
|
||||
pruned_content = ""
|
||||
with open(file_path, "rU") as f:
|
||||
for line in f:
|
||||
|
||||
# handle mixer files differently than startup files
|
||||
if file_path.endswith(".mix"):
|
||||
if line.startswith(("Z:", "M:", "R: ", "O:", "S:")):
|
||||
pruned_content += line
|
||||
else:
|
||||
if not line.isspace() and not line.strip().startswith("#"):
|
||||
pruned_content += line
|
||||
# overwrite old scratch file
|
||||
with open(file_path, "wb") as f:
|
||||
pruned_content = re.sub("\r\n", "\n", pruned_content)
|
||||
f.write(pruned_content.encode("ascii", errors='strict'))
|
||||
# read file line by line
|
||||
pruned_content = ""
|
||||
with open(file_path, "rU") as f:
|
||||
for line in f:
|
||||
# handle mixer files differently than startup files
|
||||
if file_path.endswith(".mix"):
|
||||
if line.startswith(("Z:", "M:", "R: ", "O:", "S:")):
|
||||
pruned_content += line
|
||||
else:
|
||||
if not line.isspace() \
|
||||
and not line.strip().startswith("#"):
|
||||
pruned_content += line
|
||||
# overwrite old scratch file
|
||||
with open(file_path, "wb") as f:
|
||||
pruned_content = re.sub("\r\n", "\n", pruned_content)
|
||||
f.write(pruned_content.encode("ascii", errors='strict'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
||||
|
||||
@ -449,8 +449,9 @@ class uploader(object):
|
||||
if self.board_type != fw.property('board_id'):
|
||||
msg = "Firmware not suitable for this board (board_type=%u board_id=%u)" % (
|
||||
self.board_type, fw.property('board_id'))
|
||||
print("WARNING: %s" % msg)
|
||||
if args.force:
|
||||
print("WARNING: %s" % msg)
|
||||
print("FORCED WRITE, FLASHING ANYWAY!")
|
||||
else:
|
||||
raise IOError(msg)
|
||||
if self.fw_maxsize < fw.property('image_size'):
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 6af47249caefa3ddb6de2c31ae061aff1858fd0e
|
||||
Subproject commit b28258f1ac0d66eddb2c8682b8bad3586c6c855e
|
||||
1
cmake/cmake_hexagon
Submodule
1
cmake/cmake_hexagon
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 829f22eff345c934ca8939b2385768ca5e33794c
|
||||
@ -138,13 +138,15 @@ function(px4_add_git_submodule)
|
||||
string(REPLACE "/" "_" NAME ${PATH})
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND git submodule init ${PATH}
|
||||
COMMAND git submodule update --init --recursive ${PATH}
|
||||
COMMAND touch ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/.gitmodules
|
||||
)
|
||||
add_custom_target(${TARGET}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND git submodule update --recursive ${PATH}
|
||||
# This is NOT a good approach as it overwrites checked out branches
|
||||
# behind the back of a developer
|
||||
#COMMAND git submodule update --recursive ${PATH}
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
|
||||
)
|
||||
endfunction()
|
||||
@ -266,6 +268,10 @@ function(px4_add_module)
|
||||
|
||||
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
|
||||
|
||||
if(${OS} STREQUAL "qurt" )
|
||||
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
if(MAIN)
|
||||
set_target_properties(${MODULE} PROPERTIES
|
||||
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
||||
@ -530,15 +536,28 @@ function(px4_add_common_flags)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(max_optimization -Os)
|
||||
if ($ENV{MEMORY_DEBUG} MATCHES "1")
|
||||
set(max_optimization -O0)
|
||||
|
||||
set(optimization_flags
|
||||
-fno-strict-aliasing
|
||||
-fomit-frame-pointer
|
||||
-funsafe-math-optimizations
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
)
|
||||
set(optimization_flags
|
||||
-fno-strict-aliasing
|
||||
-fno-omit-frame-pointer
|
||||
-funsafe-math-optimizations
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-g -fsanitize=address
|
||||
)
|
||||
else()
|
||||
set(max_optimization -Os)
|
||||
|
||||
set(optimization_flags
|
||||
-fno-strict-aliasing
|
||||
-fomit-frame-pointer
|
||||
-funsafe-math-optimizations
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")
|
||||
list(APPEND optimization_flags
|
||||
|
||||
47
cmake/configs/posix_rpi2_default.cmake
Normal file
47
cmake/configs/posix_rpi2_default.cmake
Normal file
@ -0,0 +1,47 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
modules/vtol_att_control
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
modules/land_detector
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/commander
|
||||
modules/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
)
|
||||
56
cmake/configs/posix_rpi2_release.cmake
Normal file
56
cmake/configs/posix_rpi2_release.cmake
Normal file
@ -0,0 +1,56 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
if ("${RPI_TOOLCHAIN_DIR}" STREQUAL "")
|
||||
set(RPI_TOOLCHAIN_DIR /opt/rpi_toolchain)
|
||||
endif()
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
platforms/common
|
||||
platforms/posix/px4_layer
|
||||
platforms/posix/work_queue
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/reboot
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
modules/uORB
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/sensors
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_q
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
modules/vtol_att_control
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
modules/land_detector
|
||||
modules/fw_att_control
|
||||
modules/fw_pos_control_l1
|
||||
modules/dataman
|
||||
modules/sdlog2
|
||||
modules/commander
|
||||
modules/controllib
|
||||
lib/mathlib
|
||||
lib/mathlib/math/filter
|
||||
lib/conversion
|
||||
lib/ecl
|
||||
lib/external_lgpl
|
||||
lib/geo
|
||||
lib/geo_lookup
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/tailsitter_recovery
|
||||
)
|
||||
@ -34,6 +34,7 @@ set(config_module_list
|
||||
modules/mavlink
|
||||
modules/attitude_estimator_ekf
|
||||
modules/attitude_estimator_q
|
||||
modules/ekf2
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/navigator
|
||||
|
||||
@ -11,17 +11,18 @@ include(qurt/px4_impl_qurt)
|
||||
#include_directories(${HEXAGON_DRIVERS_ROOT}/inc)
|
||||
|
||||
# For Actual flight we need to link against the driver dynamic libraries
|
||||
set(target_libraries
|
||||
-L${HEXAGON_DRIVERS_ROOT}/libs
|
||||
#set(target_libraries
|
||||
# -L${HEXAGON_DRIVERS_ROOT}/libs
|
||||
# The plan is to replace these with our drivers
|
||||
# mpu9x50
|
||||
# uart_esc
|
||||
# csr_gps
|
||||
# rc_receiver
|
||||
)
|
||||
# )
|
||||
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@ -20,7 +20,8 @@ set(target_libraries
|
||||
)
|
||||
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
include(qurt/px4_impl_qurt)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@ -3,7 +3,8 @@ include(qurt/px4_impl_qurt)
|
||||
# Run a full link with build stubs to make sure qurt target isn't broken
|
||||
set(QURT_ENABLE_STUBS "1")
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
drivers/device
|
||||
|
||||
@ -172,16 +172,13 @@ function(px4_os_add_flags)
|
||||
set(added_definitions
|
||||
-D__PX4_QURT
|
||||
-D__PX4_POSIX
|
||||
-D__DF_QURT
|
||||
-include ${PX4_INCLUDE_DIR}visibility.h
|
||||
)
|
||||
|
||||
# Add the toolchain specific flags
|
||||
set(added_cflags ${QURT_CMAKE_C_FLAGS})
|
||||
set(added_cxx_flags ${QURT_CMAKE_CXX_FLAGS})
|
||||
set(added_cflags -O0)
|
||||
set(added_cxx_flags -O0)
|
||||
|
||||
# FIXME @jgoppert - how to work around issues like this?
|
||||
# Without changing global variables?
|
||||
# Clear -rdynamic flag which fails for hexagon
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
@ -1,254 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
include(common/px4_base)
|
||||
|
||||
if ("$ENV{HEXAGON_TOOLS_ROOT}" STREQUAL "")
|
||||
message(FATAL_ERROR
|
||||
"The HexagonTools version 7.2.10 must be installed and the environment variable HEXAGON_TOOLS_ROOT must be set"
|
||||
"(e.g. export HEXAGON_TOOLS_ROOT=/opt/HEXAGON_Tools/7.2.10/Tools)")
|
||||
else()
|
||||
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_TOOLS_ROOT})
|
||||
endif()
|
||||
|
||||
macro (list2string out in)
|
||||
set(list ${ARGV})
|
||||
list(REMOVE_ITEM list ${out})
|
||||
foreach(item ${list})
|
||||
set(${out} "${${out}} ${item}")
|
||||
endforeach()
|
||||
endmacro(list2string)
|
||||
|
||||
set(V_ARCH "v5")
|
||||
set(CROSSDEV "hexagon-")
|
||||
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/bin)
|
||||
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
|
||||
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/lib/iss)
|
||||
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/target/hexagon/lib/${V_ARCH}/G0)
|
||||
|
||||
# Use the HexagonTools compiler (7.2.10)
|
||||
set(CMAKE_C_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang)
|
||||
set(CMAKE_CXX_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang++)
|
||||
|
||||
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
|
||||
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld.qcld)
|
||||
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
|
||||
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
|
||||
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
|
||||
|
||||
list2string(HEXAGON_INCLUDE_DIRS
|
||||
-I${HEXAGON_TOOLS_ROOT}/target/hexagon/include
|
||||
)
|
||||
|
||||
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
|
||||
|
||||
#set(MAXOPTIMIZATION -O0)
|
||||
|
||||
# Base CPU flags for each of the supported architectures.
|
||||
#
|
||||
set(ARCHCPUFLAGS
|
||||
-m${V_ARCH}
|
||||
-G0
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-D_PID_T -D_UID_T -D_TIMER_T
|
||||
-Dnoreturn_function=
|
||||
-D_HAS_C9X
|
||||
-D__EXPORT=
|
||||
-Drestrict=
|
||||
-D_DEBUG
|
||||
-Wno-error=shadow
|
||||
)
|
||||
|
||||
# optimisation flags
|
||||
#
|
||||
set(ARCHOPTIMIZATION
|
||||
-O0
|
||||
-g
|
||||
-fno-strict-aliasing
|
||||
-fdata-sections
|
||||
-fno-zero-initialized-in-bss
|
||||
)
|
||||
|
||||
# Language-specific flags
|
||||
#
|
||||
set(ARCHCFLAGS
|
||||
-std=gnu99
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
set(ARCHCXXFLAGS
|
||||
-fno-exceptions
|
||||
-fno-rtti
|
||||
-std=c++11
|
||||
-fno-threadsafe-statics
|
||||
-DCONFIG_WCHAR_BUILTIN
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
|
||||
set(ARCHWARNINGS
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
-Wno-unused-variable
|
||||
-Wno-gnu-array-member-paren-init
|
||||
-Wno-cast-align
|
||||
-Wno-missing-braces
|
||||
-Wno-strict-aliasing
|
||||
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
|
||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
||||
)
|
||||
|
||||
# C-specific warnings
|
||||
#
|
||||
set(ARCHCWARNINGS
|
||||
${ARCHWARNINGS}
|
||||
-Wstrict-prototypes
|
||||
-Wnested-externs
|
||||
)
|
||||
|
||||
# C++-specific warnings
|
||||
#
|
||||
set(ARCHWARNINGSXX
|
||||
${ARCHWARNINGS}
|
||||
-Wno-missing-field-initializers
|
||||
)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
|
||||
|
||||
# Flags we pass to the C compiler
|
||||
#
|
||||
list2string(CFLAGS
|
||||
${ARCHCFLAGS}
|
||||
${ARCHCWARNINGS}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the C++ compiler
|
||||
#
|
||||
list2string(CXXFLAGS
|
||||
${ARCHCXXFLAGS}
|
||||
${ARCHWARNINGSXX}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHXXINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACXXFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the assembler
|
||||
#
|
||||
list2string(AFLAGS
|
||||
${CFLAGS}
|
||||
-D__ASSEMBLY__
|
||||
${EXTRADEFINES}
|
||||
${EXTRAAFLAGS}
|
||||
)
|
||||
|
||||
# Set cmake flags
|
||||
#
|
||||
list2string(CMAKE_C_FLAGS
|
||||
${CMAKE_C_FLAGS}
|
||||
${CFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
|
||||
|
||||
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
|
||||
|
||||
list2string(CMAKE_CXX_FLAGS
|
||||
${CMAKE_CXX_FLAGS}
|
||||
${CXXFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
|
||||
|
||||
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
|
||||
|
||||
# Flags we pass to the linker
|
||||
#
|
||||
list2string(CMAKE_EXE_LINKER_FLAGS
|
||||
-g
|
||||
-mv5
|
||||
-mG0lib
|
||||
-G0
|
||||
-fpic
|
||||
-shared
|
||||
-Wl,-Bsymbolic
|
||||
-Wl,--wrap=malloc
|
||||
-Wl,--wrap=calloc
|
||||
-Wl,--wrap=free
|
||||
-Wl,--wrap=realloc
|
||||
-Wl,--wrap=memalign
|
||||
-Wl,--wrap=__stack_chk_fail
|
||||
-lc
|
||||
${EXTRALDFLAGS}
|
||||
)
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
|
||||
|
||||
set(CMAKE_C_COMPILER_ID, "Clang")
|
||||
set(CMAKE_CXX_COMPILER_ID, "Clang")
|
||||
|
||||
# search for programs in the build host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# The Hexagon compiler doesn't support the -rdynamic flag and this is set
|
||||
# in the base cmake scripts. We have to redefine the __linux_compiler_gnu
|
||||
# macro for cmake 2.8 to work
|
||||
set(__LINUX_COMPILER_GNU 1)
|
||||
macro(__linux_compiler_gnu lang)
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
|
||||
endmacro()
|
||||
|
||||
@ -1,249 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
include(common/px4_base)
|
||||
|
||||
if(NOT HEXAGON_TOOLS_ROOT)
|
||||
set(HEXAGON_TOOLS_ROOT /opt/6.4.05)
|
||||
endif()
|
||||
|
||||
if(NOT HEXAGON_SDK_ROOT)
|
||||
set(HEXAGON_SDK_ROOT /opt/Hexagon_SDK)
|
||||
endif()
|
||||
|
||||
macro (list2string out in)
|
||||
set(list ${ARGV})
|
||||
list(REMOVE_ITEM list ${out})
|
||||
foreach(item ${list})
|
||||
set(${out} "${${out}} ${item}")
|
||||
endforeach()
|
||||
endmacro(list2string)
|
||||
|
||||
set(V_ARCH "v5")
|
||||
set(CROSSDEV "hexagon-")
|
||||
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/gnu/bin)
|
||||
set(HEXAGON_CLANG_BIN ${HEXAGON_TOOLS_ROOT}/qc/bin)
|
||||
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
|
||||
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/qc/lib/iss)
|
||||
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/dinkumware/lib/$(V_ARCH)/G0)
|
||||
set(QCTOOLSLIB ${HEXAGON_TOOLS_ROOT}/qc/lib/$(V_ARCH)/G0)
|
||||
|
||||
# Use the HexagonTools compiler (6.4.05)
|
||||
set(CMAKE_C_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang)
|
||||
set(CMAKE_CXX_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang++)
|
||||
|
||||
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
|
||||
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
|
||||
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld)
|
||||
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
|
||||
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
|
||||
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
|
||||
|
||||
list2string(HEXAGON_INCLUDE_DIRS
|
||||
-I${HEXAGON_TOOLS_ROOT}/gnu/hexagon/include
|
||||
-I${HEXAGON_SDK_ROOT}/inc
|
||||
-I${HEXAGON_SDK_ROOT}/inc/stddef
|
||||
)
|
||||
|
||||
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
|
||||
|
||||
#set(MAXOPTIMIZATION -O0)
|
||||
|
||||
# Base CPU flags for each of the supported architectures.
|
||||
#
|
||||
set(ARCHCPUFLAGS
|
||||
-m${V_ARCH}
|
||||
-G0
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-D_PID_T -D_UID_T -D_TIMER_T
|
||||
-Dnoreturn_function=
|
||||
-D__EXPORT=
|
||||
-Drestrict=
|
||||
-D_DEBUG
|
||||
-Wno-error=shadow
|
||||
)
|
||||
|
||||
# optimisation flags
|
||||
#
|
||||
set(ARCHOPTIMIZATION
|
||||
-O0
|
||||
-g
|
||||
-fno-strict-aliasing
|
||||
-fdata-sections
|
||||
-fpic
|
||||
-fno-zero-initialized-in-bss
|
||||
)
|
||||
|
||||
# Language-specific flags
|
||||
#
|
||||
set(ARCHCFLAGS
|
||||
-std=gnu99
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
set(ARCHCXXFLAGS
|
||||
-fno-exceptions
|
||||
-fno-rtti
|
||||
-std=c++11
|
||||
-fno-threadsafe-statics
|
||||
-DCONFIG_WCHAR_BUILTIN
|
||||
-D__CUSTOM_FILE_IO__
|
||||
)
|
||||
|
||||
set(ARCHWARNINGS
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-function
|
||||
-Wno-unused-variable
|
||||
-Wno-gnu-array-member-paren-init
|
||||
-Wno-cast-align
|
||||
-Wno-missing-braces
|
||||
-Wno-strict-aliasing
|
||||
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
|
||||
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
|
||||
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
|
||||
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
|
||||
)
|
||||
|
||||
# C-specific warnings
|
||||
#
|
||||
set(ARCHCWARNINGS
|
||||
${ARCHWARNINGS}
|
||||
-Wstrict-prototypes
|
||||
-Wnested-externs
|
||||
)
|
||||
|
||||
# C++-specific warnings
|
||||
#
|
||||
set(ARCHWARNINGSXX
|
||||
${ARCHWARNINGS}
|
||||
-Wno-missing-field-initializers
|
||||
)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
|
||||
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
|
||||
|
||||
# Flags we pass to the C compiler
|
||||
#
|
||||
list2string(CFLAGS
|
||||
${ARCHCFLAGS}
|
||||
${ARCHCWARNINGS}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the C++ compiler
|
||||
#
|
||||
list2string(CXXFLAGS
|
||||
${ARCHCXXFLAGS}
|
||||
${ARCHWARNINGSXX}
|
||||
${ARCHOPTIMIZATION}
|
||||
${ARCHCPUFLAGS}
|
||||
${ARCHXXINCLUDES}
|
||||
${INSTRUMENTATIONDEFINES}
|
||||
${ARCHDEFINES}
|
||||
${EXTRADEFINES}
|
||||
${EXTRACXXFLAGS}
|
||||
${HEXAGON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Flags we pass to the assembler
|
||||
#
|
||||
list2string(AFLAGS
|
||||
${CFLAGS}
|
||||
-D__ASSEMBLY__
|
||||
${EXTRADEFINES}
|
||||
${EXTRAAFLAGS}
|
||||
)
|
||||
|
||||
# Set cmake flags
|
||||
#
|
||||
list2string(CMAKE_C_FLAGS
|
||||
${CMAKE_C_FLAGS}
|
||||
${CFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
|
||||
|
||||
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
|
||||
|
||||
list2string(CMAKE_CXX_FLAGS
|
||||
${CMAKE_CXX_FLAGS}
|
||||
${CXXFLAGS}
|
||||
)
|
||||
|
||||
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
|
||||
|
||||
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
|
||||
|
||||
# Flags we pass to the linker
|
||||
#
|
||||
list2string(CMAKE_EXE_LINKER_FLAGS
|
||||
-g
|
||||
-mv5
|
||||
-mG0lib
|
||||
-G0
|
||||
-fpic
|
||||
-shared
|
||||
-Wl,-Bsymbolic
|
||||
-Wl,--wrap=malloc
|
||||
-Wl,--wrap=calloc
|
||||
-Wl,--wrap=free
|
||||
-Wl,--wrap=realloc
|
||||
-Wl,--wrap=memalign
|
||||
-Wl,--wrap=__stack_chk_fail
|
||||
-lc
|
||||
${EXTRALDFLAGS}
|
||||
)
|
||||
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
|
||||
|
||||
set(CMAKE_C_COMPILER_ID, "Clang")
|
||||
set(CMAKE_CXX_COMPILER_ID, "Clang")
|
||||
|
||||
# search for programs in the build host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
# for libraries and headers in the target directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@ -3,3 +3,4 @@ float32 indicated_airspeed_m_s # indicated airspeed in meters per second, -1 if
|
||||
float32 true_airspeed_m_s # true filtered airspeed in meters per second, -1 if unknown
|
||||
float32 true_airspeed_unfiltered_m_s # true airspeed in meters per second, -1 if unknown
|
||||
float32 air_temperature_celsius # air temperature in degrees celsius, -1000 if unknown
|
||||
float32 confidence # confidence value from 0 to 1 for this sensor
|
||||
|
||||
@ -3,3 +3,4 @@ float32 voltage_v # Battery voltage in volts, 0 if unknown
|
||||
float32 voltage_filtered_v # Battery voltage in volts, filtered, 0 if unknown
|
||||
float32 current_a # Battery current in amperes, -1 if unknown
|
||||
float32 discharged_mah # Discharged amount in mAh, -1 if unknown
|
||||
bool is_powering_off # Power off event imminent indication, false if unknown
|
||||
|
||||
7
msg/ekf2_innovations.msg
Normal file
7
msg/ekf2_innovations.msg
Normal file
@ -0,0 +1,7 @@
|
||||
uint64 timestamp # Timestamp in microseconds since boot
|
||||
float32[6] vel_pos_innov # velocity and position innovations
|
||||
float32[3] mag_innov # earth magnetic field innovations
|
||||
float32 heading_innov # heading innovation
|
||||
float32[6] vel_pos_innov_var # velocity and position innovation variances
|
||||
float32[3] mag_innov_var # earth magnetic field innovation variance
|
||||
float32 heading_innov_var # heading innovation variance
|
||||
@ -5,3 +5,14 @@ uint8 nan_flags # Bitmask to indicate NaN states
|
||||
uint8 health_flags # Bitmask to indicate sensor health states (vel, pos, hgt)
|
||||
uint8 timeout_flags # Bitmask to indicate timeout flags (vel, pos, hgt)
|
||||
float32[28] covariances # Diagonal Elements of Covariance Matrix
|
||||
uint16 gps_check_fail_flags # Bitmask to indicate status of GPS checks - see definition below
|
||||
# bits are true when corresponding test has failed
|
||||
# 0 : minimum required sat count fail
|
||||
# 1 : minimum required GDoP fail
|
||||
# 2 : maximum allowed horizontal position error fail
|
||||
# 3 : maximum allowed vertical position error fail
|
||||
# 4 : maximum allowed speed error fail
|
||||
# 5 : maximum allowed horizontal position drift fail
|
||||
# 6 : maximum allowed vertical position drift fail
|
||||
# 7 : maximum allowed horizontal speed fail
|
||||
# 8 : maximum allowed vertical velocity discrepancy fail
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
###############################################################################################
|
||||
# The vehicle_attitude_setpoint.msg needs to be in sync with the virtual setpoint messages
|
||||
#
|
||||
# Please keep the following messages identical;
|
||||
# vehicle_attitude_setpoint.msg
|
||||
# mc_virtual_attitude_setpoint.msg
|
||||
# fw_virtual_attitude_setpoint.msg
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
@ -21,3 +30,8 @@ float32 thrust # Thrust in Newton the power system should generate
|
||||
bool roll_reset_integral # Reset roll integral part (navigation logic change)
|
||||
bool pitch_reset_integral # Reset pitch integral part (navigation logic change)
|
||||
bool yaw_reset_integral # Reset yaw integral part (navigation logic change)
|
||||
|
||||
bool fw_control_yaw # control heading with rudder (used for auto takeoff on runway)
|
||||
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
|
||||
|
||||
bool apply_flaps
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
###############################################################################################
|
||||
# The vehicle_rates_setpoint.msg needs to be in sync with the virtual setpoint messages
|
||||
#
|
||||
# Please keep the following messages identical;
|
||||
# vehicle_rates_setpoint.msg
|
||||
# mc_virtual_rates_setpoint.msg
|
||||
# fw_virtual_rates_setpoint.msg
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start
|
||||
|
||||
float32 roll # body angular rates in NED frame
|
||||
float32 pitch # body angular rates in NED frame
|
||||
float32 yaw # body angular rates in NED frame
|
||||
float32 yaw # body angular rates in NED frame
|
||||
float32 thrust # thrust normalized to 0..1
|
||||
|
||||
@ -6,6 +6,12 @@ uint8 RC_INPUT_SOURCE_PX4IO_SBUS = 4
|
||||
uint8 RC_INPUT_SOURCE_PX4IO_ST24 = 5
|
||||
uint8 RC_INPUT_SOURCE_MAVLINK = 6
|
||||
uint8 RC_INPUT_SOURCE_QURT = 7
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_SPEKTRUM = 8
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_SBUS = 9
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_ST24 = 10
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_SUMD = 11
|
||||
uint8 RC_INPUT_SOURCE_PX4FMU_DSM = 12
|
||||
uint8 RC_INPUT_SOURCE_PX4IO_SUMD = 13
|
||||
|
||||
uint8 RC_INPUT_MAX_CHANNELS = 18 # Maximum number of R/C input channels in the system. S.Bus has up to 18 channels.
|
||||
|
||||
@ -14,7 +20,7 @@ uint64 timestamp_last_signal # last valid reception time
|
||||
uint32 channel_count # number of channels actually being seen
|
||||
int32 rssi # receive signal strength indicator (RSSI): < 0: Undefined, 0: no signal, 100: full reception
|
||||
bool rc_failsafe # explicit failsafe flag: true on TX failure or TX out of range , false otherwise. Only the true state is reliable, as there are some (PPM) receivers on the market going into failsafe without telling us explicitly.
|
||||
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
|
||||
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usUally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
|
||||
uint16 rc_lost_frame_count # Number of lost RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
|
||||
uint16 rc_total_frame_count # Number of total RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
|
||||
uint16 rc_ppm_frame_length # Length of a single PPM frame. Zero for non-PPM systems
|
||||
|
||||
@ -26,7 +26,7 @@ float32 z # throttle stick position 0..1
|
||||
# in general the value corresponds to the demanded throttle by the user,
|
||||
# if the input is used for setting the setpoint of a vertical position
|
||||
# controller any value > 0.5 means up and any value < 0.5 means down
|
||||
float32 r # yaw stick/twist positon, -1..1
|
||||
float32 r # yaw stick/twist position, -1..1
|
||||
# in general corresponds to the righthand rotation around the vertical
|
||||
# (downwards) axis of the vehicle
|
||||
float32 flaps # flap position
|
||||
@ -38,8 +38,9 @@ float32 aux5 # default function: payload drop
|
||||
|
||||
uint8 mode_switch # main mode 3 position switch (mandatory): _MANUAL_, ASSIST, AUTO
|
||||
uint8 return_switch # return to launch 2 position switch (mandatory): _NORMAL_, RTL
|
||||
uint8 rattitude_switch # rattitude control 2 position switch (optional): _MANUAL, RATTITUDE
|
||||
uint8 rattitude_switch # rattitude control 2 position switch (optional): _MANUAL, RATTITUDE
|
||||
uint8 posctl_switch # position control 2 position switch (optional): _ALTCTL_, POSCTL
|
||||
uint8 loiter_switch # loiter 2 position switch (optional): _MISSION_, LOITER
|
||||
uint8 acro_switch # acro 2 position switch (optional): _MANUAL_, ACRO
|
||||
uint8 offboard_switch # offboard 2 position switch (optional): _NORMAL_, OFFBOARD
|
||||
uint8 offboard_switch # offboard 2 position switch (optional): _NORMAL_, OFFBOARD
|
||||
uint8 kill_switch # throttle kill: _NORMAL_, KILL
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
###############################################################################################
|
||||
# The vehicle_attitude_setpoint.msg needs to be in sync with the virtual setpoint messages
|
||||
#
|
||||
# Please keep the following messages identical;
|
||||
# vehicle_attitude_setpoint.msg
|
||||
# mc_virtual_attitude_setpoint.msg
|
||||
# fw_virtual_attitude_setpoint.msg
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
@ -21,3 +30,8 @@ float32 thrust # Thrust in Newton the power system should generate
|
||||
bool roll_reset_integral # Reset roll integral part (navigation logic change)
|
||||
bool pitch_reset_integral # Reset pitch integral part (navigation logic change)
|
||||
bool yaw_reset_integral # Reset yaw integral part (navigation logic change)
|
||||
|
||||
bool fw_control_yaw # control heading with rudder (used for auto takeoff on runway)
|
||||
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
|
||||
|
||||
bool apply_flaps
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
###############################################################################################
|
||||
# The vehicle_rates_setpoint.msg needs to be in sync with the virtual setpoint messages
|
||||
#
|
||||
# Please keep the following messages identical;
|
||||
# vehicle_rates_setpoint.msg
|
||||
# mc_virtual_rates_setpoint.msg
|
||||
# fw_virtual_rates_setpoint.msg
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start
|
||||
|
||||
float32 roll # body angular rates in NED frame
|
||||
float32 pitch # body angular rates in NED frame
|
||||
float32 yaw # body angular rates in NED frame
|
||||
float32 yaw # body angular rates in NED frame
|
||||
float32 thrust # thrust normalized to 0..1
|
||||
|
||||
@ -6,7 +6,8 @@ bool warning # true if mission is valid, but has potentially problematic items
|
||||
bool reached # true if mission has been reached
|
||||
bool finished # true if mission has been completed
|
||||
bool stay_in_failsafe # true if the commander should not switch out of the failsafe mode
|
||||
bool flight_termination # true if the navigator demands a flight termination from the commander app
|
||||
bool flight_termination # true if the navigator demands a flight termination from the commander app
|
||||
bool item_do_jump_changed # true if the number of do jumps remaining has changed
|
||||
uint32 item_changed_index # indicate which item has changed
|
||||
uint32 item_do_jump_remaining # set to the number of do jumps remaining for that item
|
||||
bool mission_failure # true if the mission cannot continue or be completed for some reason
|
||||
|
||||
@ -1 +1,2 @@
|
||||
uint64 timestamp # time at which the latest parameter was updated
|
||||
bool saved # wether the change has already been saved to disk
|
||||
|
||||
@ -23,6 +23,7 @@ float64 lon # longitude, in deg
|
||||
float32 alt # altitude AMSL, in m
|
||||
float32 yaw # yaw (only for multirotors), in rad [-PI..PI), NaN = hold current yaw
|
||||
bool yaw_valid # true if yaw setpoint valid
|
||||
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
|
||||
float32 yawspeed # yawspeed (only for multirotors, in rad/s)
|
||||
bool yawspeed_valid # true if yawspeed setpoint valid
|
||||
float32 loiter_radius # loiter radius (only for fixed wing), in m
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
int32 RC_CHANNELS_FUNCTION_MAX=20
|
||||
int32 RC_CHANNELS_FUNCTION_MAX=21
|
||||
uint8 RC_CHANNELS_FUNCTION_THROTTLE=0
|
||||
uint8 RC_CHANNELS_FUNCTION_ROLL=1
|
||||
uint8 RC_CHANNELS_FUNCTION_PITCH=2
|
||||
@ -19,11 +19,12 @@ uint8 RC_CHANNELS_FUNCTION_PARAM_1=16
|
||||
uint8 RC_CHANNELS_FUNCTION_PARAM_2=17
|
||||
uint8 RC_CHANNELS_FUNCTION_PARAM_3_5=18
|
||||
uint8 RC_CHANNELS_FUNCTION_RATTITUDE=19
|
||||
uint8 RC_CHANNELS_FUNCTION_KILLSWITCH=20
|
||||
uint64 timestamp # Timestamp in microseconds since boot time
|
||||
uint64 timestamp_last_valid # Timestamp of last valid RC signal
|
||||
float32[20] channels # Scaled to -1..1 (throttle: 0..1)
|
||||
float32[18] channels # Scaled to -1..1 (throttle: 0..1)
|
||||
uint8 channel_count # Number of valid channels
|
||||
int8[20] function # Functions mapping
|
||||
int8[21] function # Functions mapping
|
||||
uint8 rssi # Receive signal strength index
|
||||
bool signal_lost # Control signal lost, should be checked together with topic timeout
|
||||
uint32 frame_drop_count # Number of dropped frames
|
||||
|
||||
@ -6,6 +6,6 @@ bool[3] valid #true for RC-Param channels which are mapped to a param
|
||||
int32[3] param_index # corresponding param index, this field is ignored if set to -1, in this case param_id will be used
|
||||
char[51] param_id # MAP_NCHAN * (ID_LEN + 1) chars, corresponding param id, null terminated
|
||||
float32[3] scale # scale to map the RC input [-1, 1] to a parameter value
|
||||
float32[3] value0 # inital value around which the parameter value is changed
|
||||
float32[3] value0 # initial value around which the parameter value is changed
|
||||
float32[3] value_min # minimal parameter value
|
||||
float32[3] value_max # minimal parameter value
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
###############################################################################################
|
||||
# The vehicle_attitude_setpoint.msg needs to be in sync with the virtual setpoint messages
|
||||
#
|
||||
# Please keep the following messages identical;
|
||||
# vehicle_attitude_setpoint.msg
|
||||
# mc_virtual_attitude_setpoint.msg
|
||||
# fw_virtual_attitude_setpoint.msg
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
||||
|
||||
@ -23,5 +32,6 @@ bool pitch_reset_integral # Reset pitch integral part (navigation logic change
|
||||
bool yaw_reset_integral # Reset yaw integral part (navigation logic change)
|
||||
|
||||
bool fw_control_yaw # control heading with rudder (used for auto takeoff on runway)
|
||||
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
|
||||
|
||||
bool apply_flaps
|
||||
|
||||
@ -31,6 +31,7 @@ uint32 VEHICLE_CMD_DO_SET_SERVO = 183 # Set a servo to a desired PWM value. |S
|
||||
uint32 VEHICLE_CMD_DO_REPEAT_SERVO = 184 # Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Cycle count| Cycle time (seconds)| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_FLIGHTTERMINATION=185 # Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_CONTROL_VIDEO = 200 # Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds (decimal)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_DIGICAM_CONTROL=203
|
||||
uint32 VEHICLE_CMD_DO_MOUNT_CONFIGURE=204 # Mission command to configure a camera or antenna mount |Mount operation mode (see MAV_MOUNT_MODE enum)| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| Empty| Empty| Empty|
|
||||
uint32 VEHICLE_CMD_DO_MOUNT_CONTROL=205 # Mission command to control a camera or antenna mount |pitch or lat in degrees, depending on mount mode.| roll or lon in degrees depending on mount mode| yaw or alt (in meters) depending on mount mode| reserved| reserved| reserved| MAV_MOUNT_MODE enum value|
|
||||
uint32 VEHICLE_CMD_DO_SET_CAM_TRIGG_DIST=206 # Mission command to set CAM_TRIGG_DIST for this flight |Camera trigger distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty|
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
###############################################################################################
|
||||
# The vehicle_rates_setpoint.msg needs to be in sync with the virtual setpoint messages
|
||||
#
|
||||
# Please keep the following messages identical;
|
||||
# vehicle_rates_setpoint.msg
|
||||
# mc_virtual_rates_setpoint.msg
|
||||
# fw_virtual_rates_setpoint.msg
|
||||
#
|
||||
###############################################################################################
|
||||
|
||||
uint64 timestamp # in microseconds since system start
|
||||
|
||||
float32 roll # body angular rates in NED frame
|
||||
float32 pitch # body angular rates in NED frame
|
||||
float32 yaw # body angular rates in NED frame
|
||||
float32 yaw # body angular rates in NED frame
|
||||
float32 thrust # thrust normalized to 0..1
|
||||
|
||||
@ -117,10 +117,9 @@ uint32 system_id # system id, inspired by MAVLink's system ID field
|
||||
uint32 component_id # subsystem / component id, inspired by MAVLink's component ID field
|
||||
|
||||
bool is_rotary_wing # True if system is in rotary wing configuration, so for a VTOL this is only true while flying as a multicopter
|
||||
bool vtol_in_transition # True if VTOL is doing a transition
|
||||
bool is_vtol # True if the system is VTOL capable
|
||||
bool vtol_fw_permanent_stab # True if vtol should stabilize attitude for fw in manual mode
|
||||
bool in_transition_mode
|
||||
bool in_transition_mode # True if VTOL is doing a transition
|
||||
|
||||
bool condition_battery_voltage_valid
|
||||
bool condition_system_in_air_restore # true if we can restore in mid air
|
||||
@ -151,9 +150,11 @@ bool data_link_lost_cmd # datalink to GCS lost mode commanded
|
||||
uint8 data_link_lost_counter # counts unique data link lost events
|
||||
bool engine_failure # Set to true if an engine failure is detected
|
||||
bool engine_failure_cmd # Set to true if an engine failure mode is commanded
|
||||
bool vtol_transition_failure # Set to true if vtol transition failed
|
||||
bool vtol_transition_failure_cmd # Set to true if vtol transition failure mode is commanded
|
||||
bool gps_failure # Set to true if a gps failure is detected
|
||||
bool gps_failure_cmd # Set to true if a gps failure mode is commanded
|
||||
|
||||
bool mission_failure # Set to true if mission could not continue/finish
|
||||
bool barometer_failure # Set to true if a barometer failure is detected
|
||||
|
||||
bool offboard_control_signal_found_once
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
uint64 timestamp # Microseconds since system boot
|
||||
bool vtol_in_rw_mode # true: vtol vehicle is in rotating wing mode
|
||||
uint64 timestamp # Microseconds since system boot
|
||||
bool vtol_in_rw_mode # true: vtol vehicle is in rotating wing mode
|
||||
bool vtol_in_trans_mode
|
||||
bool fw_permanent_stab # In fw mode stabilize attitude even if in manual mode
|
||||
float32 airspeed_tot # Estimated airspeed over control surfaces
|
||||
bool vtol_transition_failsafe # vtol in transition failsafe mode
|
||||
bool fw_permanent_stab # In fw mode stabilize attitude even if in manual mode
|
||||
float32 airspeed_tot # Estimated airspeed over control surfaces
|
||||
|
||||
@ -667,7 +667,7 @@ CONFIG_CDCACM_NWRREQS=4
|
||||
CONFIG_CDCACM_NRDREQS=4
|
||||
CONFIG_CDCACM_BULKIN_REQLEN=96
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=4000
|
||||
CONFIG_CDCACM_TXBUFSIZE=8000
|
||||
CONFIG_CDCACM_VENDORID=0x26ac
|
||||
CONFIG_CDCACM_PRODUCTID=0x0011
|
||||
CONFIG_CDCACM_VENDORSTR="3D Robotics"
|
||||
|
||||
@ -215,7 +215,7 @@
|
||||
#define GPIO_UART4_RX GPIO_UART4_RX_1
|
||||
#define GPIO_UART4_TX GPIO_UART4_TX_1
|
||||
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1 /* RC_INPUT */
|
||||
#define GPIO_USART6_TX GPIO_USART6_TX_1
|
||||
|
||||
#define GPIO_UART7_RX GPIO_UART7_RX_1
|
||||
@ -257,9 +257,10 @@
|
||||
#define GPIO_SPI1_MOSI (GPIO_SPI1_MOSI_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI1_SCK (GPIO_SPI1_SCK_1|GPIO_SPEED_50MHz)
|
||||
|
||||
|
||||
#define GPIO_SPI2_MISO (GPIO_SPI2_MISO_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI2_MOSI (GPIO_SPI2_MOSI_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_2|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_1|GPIO_SPEED_50MHz)
|
||||
|
||||
/************************************************************************************
|
||||
* Public Data
|
||||
|
||||
@ -552,7 +552,7 @@ CONFIG_UART7_SERIAL_CONSOLE=y
|
||||
# USART1 Configuration
|
||||
#
|
||||
CONFIG_USART1_RXBUFSIZE=600
|
||||
CONFIG_USART1_TXBUFSIZE=2000
|
||||
CONFIG_USART1_TXBUFSIZE=4000
|
||||
CONFIG_USART1_BAUD=115200
|
||||
CONFIG_USART1_BITS=8
|
||||
CONFIG_USART1_PARITY=0
|
||||
@ -667,7 +667,7 @@ CONFIG_CDCACM_NWRREQS=4
|
||||
CONFIG_CDCACM_NRDREQS=4
|
||||
CONFIG_CDCACM_BULKIN_REQLEN=96
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=4000
|
||||
CONFIG_CDCACM_TXBUFSIZE=8000
|
||||
CONFIG_CDCACM_VENDORID=0x26ac
|
||||
CONFIG_CDCACM_PRODUCTID=0x0012
|
||||
CONFIG_CDCACM_VENDORSTR="3D Robotics"
|
||||
|
||||
@ -164,8 +164,8 @@ CONFIG_USART1_SERIAL_CONSOLE=y
|
||||
CONFIG_USART2_SERIAL_CONSOLE=n
|
||||
CONFIG_USART3_SERIAL_CONSOLE=n
|
||||
|
||||
CONFIG_USART1_TXBUFSIZE=64
|
||||
CONFIG_USART2_TXBUFSIZE=64
|
||||
CONFIG_USART1_TXBUFSIZE=32
|
||||
CONFIG_USART2_TXBUFSIZE=32
|
||||
CONFIG_USART3_TXBUFSIZE=64
|
||||
|
||||
CONFIG_USART1_RXBUFSIZE=64
|
||||
|
||||
@ -50,7 +50,7 @@ mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
|
||||
63
posix-configs/SITL/init/rcS_gazebo_iris_opt_flow
Normal file
63
posix-configs/SITL/init/rcS_gazebo_iris_opt_flow
Normal file
@ -0,0 +1,63 @@
|
||||
uorb start
|
||||
simulator start -s
|
||||
param load
|
||||
param set MAV_TYPE 2
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
param set MC_YAW_P 2.0
|
||||
param set MC_YAWRATE_P 0.35
|
||||
param set SYS_AUTOSTART 4010
|
||||
param set SYS_RESTART_TYPE 2
|
||||
dataman start
|
||||
param set CAL_GYRO0_ID 2293768
|
||||
param set CAL_ACC0_ID 1376264
|
||||
param set CAL_ACC1_ID 1310728
|
||||
param set CAL_MAG0_ID 196616
|
||||
param set CAL_GYRO0_XOFF 0.01
|
||||
param set CAL_ACC0_XOFF 0.01
|
||||
param set CAL_ACC0_YOFF -0.01
|
||||
param set CAL_ACC0_ZOFF 0.01
|
||||
param set CAL_ACC0_XSCALE 1.01
|
||||
param set CAL_ACC0_YSCALE 1.01
|
||||
param set CAL_ACC0_ZSCALE 1.01
|
||||
param set CAL_ACC1_XOFF 0.01
|
||||
param set CAL_MAG0_XOFF 0.01
|
||||
param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_FF 0.1
|
||||
param set SENS_BOARD_ROT 8
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
barosim start
|
||||
adcsim start
|
||||
gpssim start
|
||||
pwm_out_sim mode_pwm
|
||||
sleep 1
|
||||
sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
attitude_estimator_q start
|
||||
position_estimator_inav start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 100 -e -t -a
|
||||
69
posix-configs/SITL/init/rcS_gazebo_standard_vtol
Normal file
69
posix-configs/SITL/init/rcS_gazebo_standard_vtol
Normal file
@ -0,0 +1,69 @@
|
||||
uorb start
|
||||
simulator start -s
|
||||
param load
|
||||
param set MAV_TYPE 20
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
param set MC_YAW_P 2.0
|
||||
param set MC_YAWRATE_P 0.35
|
||||
param set VT_TYPE 2
|
||||
param set SYS_AUTOSTART 4010
|
||||
param set SYS_RESTART_TYPE 2
|
||||
dataman start
|
||||
param set CAL_GYRO0_ID 2293768
|
||||
param set CAL_ACC0_ID 1376264
|
||||
param set CAL_ACC1_ID 1310728
|
||||
param set CAL_MAG0_ID 196616
|
||||
param set CAL_GYRO0_XOFF 0.01
|
||||
param set CAL_ACC0_XOFF 0.01
|
||||
param set CAL_ACC0_YOFF -0.01
|
||||
param set CAL_ACC0_ZOFF 0.01
|
||||
param set CAL_ACC0_XSCALE 1.01
|
||||
param set CAL_ACC0_YSCALE 1.01
|
||||
param set CAL_ACC0_ZSCALE 1.01
|
||||
param set CAL_ACC1_XOFF 0.01
|
||||
param set CAL_MAG0_XOFF 0.01
|
||||
param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_FF 0.1
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
param set SENS_BOARD_ROT 8
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set NAV_ACC_RAD 3.0
|
||||
param set MPC_TKO_SPEED 1.0
|
||||
param set MIS_YAW_TMT 10
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
barosim start
|
||||
adcsim start
|
||||
gpssim start
|
||||
measairspeedsim start
|
||||
pwm_out_sim mode_pwm
|
||||
sleep 1
|
||||
sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
attitude_estimator_q start
|
||||
position_estimator_inav start
|
||||
vtol_att_control start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
fw_pos_control_l1 start
|
||||
fw_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/standard_vtol_sitl.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 200 -e -t -a
|
||||
@ -27,6 +27,7 @@ param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_FF 0.1
|
||||
param set MPC_Z_VEL_MAX 1.0
|
||||
param set SENS_BOARD_ROT 8
|
||||
param set COM_RC_IN_MODE 1
|
||||
rgbledsim start
|
||||
@ -52,7 +53,7 @@ fw_pos_control_l1 start
|
||||
fw_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x_vtol.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
|
||||
@ -51,13 +51,12 @@ sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
attitude_estimator_q start
|
||||
position_estimator_inav start
|
||||
ekf2 start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
|
||||
@ -50,6 +50,7 @@ mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED_COV -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
|
||||
71
posix-configs/SITL/init/rcS_lpe_gazebo_iris_opt_flow
Normal file
71
posix-configs/SITL/init/rcS_lpe_gazebo_iris_opt_flow
Normal file
@ -0,0 +1,71 @@
|
||||
uorb start
|
||||
simulator start -s
|
||||
param load
|
||||
param set MAV_TYPE 2
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
param set MC_YAW_P 2.0
|
||||
param set MC_YAWRATE_P 0.35
|
||||
param set SYS_AUTOSTART 4010
|
||||
param set SYS_RESTART_TYPE 2
|
||||
dataman start
|
||||
param set CAL_GYRO0_ID 2293768
|
||||
param set CAL_ACC0_ID 1376264
|
||||
param set CAL_ACC1_ID 1310728
|
||||
param set CAL_MAG0_ID 196616
|
||||
param set CAL_GYRO0_XOFF 0.01
|
||||
param set CAL_ACC0_XOFF 0.01
|
||||
param set CAL_ACC0_YOFF -0.01
|
||||
param set CAL_ACC0_ZOFF 0.01
|
||||
param set CAL_ACC0_XSCALE 1.01
|
||||
param set CAL_ACC0_YSCALE 1.01
|
||||
param set CAL_ACC0_ZSCALE 1.01
|
||||
param set CAL_ACC1_XOFF 0.01
|
||||
param set CAL_MAG0_XOFF 0.01
|
||||
param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_FF 0.1
|
||||
param set SENS_BOARD_ROT 8
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
|
||||
# changes for LPE
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set LPE_BETA_MAX 10000
|
||||
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
barosim start
|
||||
adcsim start
|
||||
gpssim start
|
||||
pwm_out_sim mode_pwm
|
||||
sleep 1
|
||||
sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
attitude_estimator_q start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED_COV -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE -u 14556
|
||||
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 100 -e -t -a
|
||||
|
||||
# start LPE at end, when we know it is ok to init sensors
|
||||
sleep 5
|
||||
local_position_estimator start
|
||||
@ -3,8 +3,10 @@ simulator start -s
|
||||
param load
|
||||
param set MAV_TYPE 2
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_YAW_P 2.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.35
|
||||
param set SYS_AUTOSTART 4010
|
||||
param set SYS_RESTART_TYPE 2
|
||||
@ -26,12 +28,22 @@ param set MPC_XY_P 0.4
|
||||
param set MPC_XY_VEL_P 0.2
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set SENS_BOARD_ROT 0
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
param set MIS_TAKEOFF_ALT 5.0
|
||||
param set MPC_HOLD_MAX_Z 2.0
|
||||
param set MPC_HOLD_XY_DZ 0.1
|
||||
param set MPC_HOLD_Z_DZ 0.1
|
||||
param set MPC_Z_VEL_MAX 2.0
|
||||
param set MPC_Z_VEL_P 0.4
|
||||
|
||||
# changes for LPE
|
||||
param set COM_RC_IN_MODE 1
|
||||
param set LPE_BETA_MAX 10000
|
||||
|
||||
rgbled start
|
||||
rgbledsim start
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
@ -49,6 +61,7 @@ mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
mavlink start -u 14556 -r 2000000
|
||||
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
|
||||
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||
mavlink stream -r 80 -s LOCAL_POSITION_NED_COV -u 14556
|
||||
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||
@ -57,6 +70,7 @@ mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||
mavlink stream -r 20 -s MANUAL_CONTROL -u 14556
|
||||
mavlink boot_complete
|
||||
sdlog2 start -r 100 -e -t -a
|
||||
|
||||
|
||||
0
posix-configs/rpi2/init/rcS_navio
Normal file
0
posix-configs/rpi2/init/rcS_navio
Normal file
@ -77,30 +77,48 @@
|
||||
#include <drivers/drv_batt_smbus.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
|
||||
#define BATT_SMBUS_ADDR_MIN 0x08 ///< lowest possible address
|
||||
#define BATT_SMBUS_ADDR_MAX 0x7F ///< highest possible address
|
||||
#define BATT_SMBUS_ADDR_MIN 0x08 ///< lowest possible address
|
||||
#define BATT_SMBUS_ADDR_MAX 0x7F ///< highest possible address
|
||||
|
||||
#define BATT_SMBUS_I2C_BUS PX4_I2C_BUS_EXPANSION
|
||||
#define BATT_SMBUS_ADDR 0x0B ///< I2C address
|
||||
#define BATT_SMBUS_TEMP 0x08 ///< temperature register
|
||||
#define BATT_SMBUS_VOLTAGE 0x09 ///< voltage register
|
||||
#define BATT_SMBUS_I2C_BUS PX4_I2C_BUS_EXPANSION
|
||||
#define BATT_SMBUS_ADDR 0x0B ///< I2C address
|
||||
#define BATT_SMBUS_TEMP 0x08 ///< temperature register
|
||||
#define BATT_SMBUS_VOLTAGE 0x09 ///< voltage register
|
||||
#define BATT_SMBUS_REMAINING_CAPACITY 0x0f ///< predicted remaining battery capacity as a percentage
|
||||
#define BATT_SMBUS_FULL_CHARGE_CAPACITY 0x10 ///< capacity when fully charged
|
||||
#define BATT_SMBUS_DESIGN_CAPACITY 0x18 ///< design capacity register
|
||||
#define BATT_SMBUS_DESIGN_VOLTAGE 0x19 ///< design voltage register
|
||||
#define BATT_SMBUS_SERIALNUM 0x1c ///< serial number register
|
||||
#define BATT_SMBUS_MANUFACTURE_NAME 0x20 ///< manufacturer name
|
||||
#define BATT_SMBUS_MANUFACTURE_INFO 0x25 ///< cell voltage register
|
||||
#define BATT_SMBUS_CURRENT 0x2a ///< current register
|
||||
#define BATT_SMBUS_MEASUREMENT_INTERVAL_MS (1000000 / 10) ///< time in microseconds, measure at 10hz
|
||||
#define BATT_SMBUS_TIMEOUT_MS 10000000 ///< timeout looking for battery 10seconds after startup
|
||||
#define BATT_SMBUS_DESIGN_CAPACITY 0x18 ///< design capacity register
|
||||
#define BATT_SMBUS_DESIGN_VOLTAGE 0x19 ///< design voltage register
|
||||
#define BATT_SMBUS_MANUFACTURE_DATE 0x1B ///< manufacture date register
|
||||
#define BATT_SMBUS_SERIAL_NUMBER 0x1C ///< serial number register
|
||||
#define BATT_SMBUS_MANUFACTURER_NAME 0x20 ///< manufacturer name
|
||||
#define BATT_SMBUS_DEVICE_NAME 0x21 ///< device name register
|
||||
#define BATT_SMBUS_DEVICE_CHEMISTRY 0x22 ///< device chemistry register
|
||||
#define BATT_SMBUS_MANUFACTURER_DATA 0x23 ///< manufacturer data
|
||||
#define BATT_SMBUS_MANUFACTURE_INFO 0x25 ///< cell voltage register
|
||||
#define BATT_SMBUS_CURRENT 0x2a ///< current register
|
||||
#define BATT_SMBUS_MEASUREMENT_INTERVAL_US (1000000 / 10) ///< time in microseconds, measure at 10Hz
|
||||
#define BATT_SMBUS_TIMEOUT_US 10000000 ///< timeout looking for battery 10seconds after startup
|
||||
|
||||
#define BATT_SMBUS_PEC_POLYNOMIAL 0x07 ///< Polynomial for calculating PEC
|
||||
#define BATT_SMBUS_BUTTON_DEBOUNCE_MS 300 ///< button holds longer than this time will cause a power off event
|
||||
|
||||
#define BATT_SMBUS_MANUFACTURER_ACCESS 0x00
|
||||
#define BATT_SMBUS_MANUFACTURER_BLOCK_ACCESS 0x44
|
||||
|
||||
#define BATT_SMBUS_PEC_POLYNOMIAL 0x07 ///< Polynomial for calculating PEC
|
||||
|
||||
#ifndef CONFIG_SCHED_WORKQUEUE
|
||||
# error This requires CONFIG_SCHED_WORKQUEUE.
|
||||
#endif
|
||||
|
||||
struct battery_type {
|
||||
char *ManufacturerName;
|
||||
char *DeviceName;
|
||||
char *DeviceChemistry;
|
||||
};
|
||||
|
||||
// Declaration of the solo battery data, as determined by reading out the data from multiple 3DR Solo batteries
|
||||
const struct battery_type solo_battery = {(char *)"BMTPOW", (char *)"MA03", (char *)"LIon"};
|
||||
|
||||
class BATT_SMBUS : public device::I2C
|
||||
{
|
||||
public:
|
||||
@ -133,6 +151,62 @@ public:
|
||||
*/
|
||||
int search();
|
||||
|
||||
/**
|
||||
* Get the SBS manufacturer name of the battery device
|
||||
*
|
||||
* @param manufacturer_name pointer a buffer into which the manufacturer name is to be written
|
||||
* @param max_length the maximum number of bytes to attempt to read from the manufacturer name register, including the null character that is appended to the end
|
||||
*
|
||||
* @return the number of bytes read
|
||||
*/
|
||||
uint8_t manufacturer_name(uint8_t *man_name, uint8_t max_length);
|
||||
|
||||
/**
|
||||
* Return the SBS manufacture date of the battery device
|
||||
*
|
||||
* @return the date in the following format:
|
||||
* see Smart Battery Data Specification, Revision 1.1
|
||||
* http://sbs-forum.org/specs/sbdat110.pdf for more details
|
||||
* Date as uint16_t = (year-1980) * 512 + month * 32 + day
|
||||
* | Field | Bits | Format | Allowable Values |
|
||||
* | ----- | ---- | ------------------ | ------------------------------------------ |
|
||||
* | Day 0-4 5-bit binary value 1-31 (corresponds to day) |
|
||||
* | Month 5-8 4-bit binary value 1-12 (corresponds to month number) |
|
||||
* | Year 9-15 7-bit binary value 0-127 (corresponds to year biased by 1980) |
|
||||
* otherwise, return 0 on failure
|
||||
*/
|
||||
uint16_t manufacture_date();
|
||||
|
||||
/**
|
||||
* Get the SBS device name of the battery device
|
||||
*
|
||||
* @param dev_name pointer a buffer into which the device name is to be written
|
||||
* @param max_length the maximum number of bytes to attempt to read from the device name register, including the null character that is appended to the end
|
||||
*
|
||||
* @return the number of bytes read
|
||||
*/
|
||||
uint8_t device_name(uint8_t *dev_name, uint8_t max_length);
|
||||
|
||||
/**
|
||||
* Return the SBS serial number of the battery device
|
||||
*/
|
||||
uint16_t serial_number();
|
||||
|
||||
/**
|
||||
* Get the SBS device chemistry of the battery device
|
||||
*
|
||||
* @param dev_chem pointer a buffer into which the device chemistry is to be written
|
||||
* @param max_length the maximum number of bytes to attempt to read from the device chemistry register, including the null character that is appended to the end
|
||||
*
|
||||
* @return the number of bytes read
|
||||
*/
|
||||
uint8_t device_chemistry(uint8_t *dev_chem, uint8_t max_length);
|
||||
|
||||
/**
|
||||
* Checks whether the current SBS battery data corresponds to a 3DR Solo battery
|
||||
*/
|
||||
bool is_solo_battery();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Check if the device can be contacted
|
||||
@ -166,18 +240,41 @@ private:
|
||||
*/
|
||||
int read_reg(uint8_t reg, uint16_t &val);
|
||||
|
||||
/**
|
||||
* Write a word to specified register
|
||||
*/
|
||||
int write_reg(uint8_t reg, uint16_t val);
|
||||
|
||||
/**
|
||||
* Read block from bus
|
||||
* @return returns number of characters read if successful, zero if unsuccessful
|
||||
*/
|
||||
uint8_t read_block(uint8_t reg, uint8_t *data, uint8_t max_len, bool append_zero);
|
||||
|
||||
/**
|
||||
* Write block to the bus
|
||||
* @return the number of characters sent if successful, zero if unsuccessful
|
||||
*/
|
||||
uint8_t write_block(uint8_t reg, uint8_t *data, uint8_t len);
|
||||
|
||||
/**
|
||||
* Calculate PEC for a read or write from the battery
|
||||
* @param buff is the data that was read or will be written
|
||||
*/
|
||||
uint8_t get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len) const;
|
||||
|
||||
/**
|
||||
* Write a word to Manufacturer Access register (0x00)
|
||||
* @param cmd the word to be written to Manufacturer Access
|
||||
*/
|
||||
uint8_t ManufacturerAccess(uint16_t cmd);
|
||||
|
||||
/**
|
||||
* Checks if the battery that has been detected is a 3DR Solo Battery. If it is, it sets
|
||||
* the private variable _is_solo_battery to be true
|
||||
*/
|
||||
void check_if_solo_battery();
|
||||
|
||||
// internal variables
|
||||
bool _enabled; ///< true if we have successfully connected to battery
|
||||
work_s _work; ///< work queue for scheduling reads
|
||||
@ -187,6 +284,11 @@ private:
|
||||
orb_id_t _batt_orb_id; ///< uORB battery topic ID
|
||||
uint64_t _start_time; ///< system time we first attempt to communicate with battery
|
||||
uint16_t _batt_capacity; ///< battery's design capacity in mAh (0 means unknown)
|
||||
char *_manufacturer_name; ///< The name of the battery manufacturer
|
||||
char *_device_name; ///< The name of the battery device
|
||||
char *_device_chemistry; ///< The battery chemistry
|
||||
bool _is_solo_battery; ///< Boolean as to whether the battery detected is a 3DR Solo Battery or not
|
||||
uint8_t _button_press_counts; ///< count of button presses detected on 3DR Solo Battery
|
||||
};
|
||||
|
||||
namespace
|
||||
@ -198,15 +300,27 @@ void batt_smbus_usage();
|
||||
|
||||
extern "C" __EXPORT int batt_smbus_main(int argc, char *argv[]);
|
||||
|
||||
int manufacturer_name();
|
||||
int manufacture_date();
|
||||
int device_name();
|
||||
int serial_number();
|
||||
int device_chemistry();
|
||||
int solo_battery_check();
|
||||
|
||||
BATT_SMBUS::BATT_SMBUS(int bus, uint16_t batt_smbus_addr) :
|
||||
I2C("batt_smbus", BATT_SMBUS_DEVICE_PATH, bus, batt_smbus_addr, 400000),
|
||||
I2C("batt_smbus", BATT_SMBUS0_DEVICE_PATH, bus, batt_smbus_addr, 100000),
|
||||
_enabled(false),
|
||||
_work{},
|
||||
_reports(nullptr),
|
||||
_batt_topic(nullptr),
|
||||
_batt_topic(-1),
|
||||
_batt_orb_id(nullptr),
|
||||
_start_time(0),
|
||||
_batt_capacity(0)
|
||||
_batt_capacity(0),
|
||||
_manufacturer_name(nullptr),
|
||||
_device_name(nullptr),
|
||||
_device_chemistry(nullptr),
|
||||
_is_solo_battery(false),
|
||||
_button_press_counts(0)
|
||||
{
|
||||
// work_cancel in the dtor will explode if we don't do this...
|
||||
memset(&_work, 0, sizeof(_work));
|
||||
@ -223,6 +337,18 @@ BATT_SMBUS::~BATT_SMBUS()
|
||||
if (_reports != nullptr) {
|
||||
delete _reports;
|
||||
}
|
||||
|
||||
if (_manufacturer_name != nullptr) {
|
||||
delete _manufacturer_name;
|
||||
}
|
||||
|
||||
if (_device_name != nullptr) {
|
||||
delete _device_name;
|
||||
}
|
||||
|
||||
if (_device_chemistry != nullptr) {
|
||||
delete _device_chemistry;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
@ -297,8 +423,8 @@ BATT_SMBUS::test()
|
||||
|
||||
if (updated) {
|
||||
if (orb_copy(ORB_ID(battery_status), sub, &status) == OK) {
|
||||
warnx("V=%4.2f C=%4.2f DismAh=%4.2f Cap:%d", (float)status.voltage_v, (float)status.current_a,
|
||||
(float)status.discharged_mah, (int)_batt_capacity);
|
||||
warnx("V=%4.2f C=%4.2f DismAh=%4.2f Cap:%d Shutdown:%d", (double)status.voltage_v, (double)status.current_a,
|
||||
(double)status.discharged_mah, (int)_batt_capacity, (int)status.is_powering_off);
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,6 +469,89 @@ BATT_SMBUS::search()
|
||||
return OK;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::manufacturer_name(uint8_t *man_name, uint8_t max_length)
|
||||
{
|
||||
uint8_t len = read_block(BATT_SMBUS_MANUFACTURER_NAME, man_name, max_length, false);
|
||||
|
||||
if (len > 0) {
|
||||
if (len >= max_length - 1) {
|
||||
man_name[max_length - 1] = 0;
|
||||
|
||||
} else {
|
||||
man_name[len] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
BATT_SMBUS::manufacture_date()
|
||||
{
|
||||
uint16_t man_date;
|
||||
|
||||
if (read_reg(BATT_SMBUS_MANUFACTURE_DATE, man_date) == OK) {
|
||||
return man_date;
|
||||
}
|
||||
|
||||
// Return 0 if could not read the date correctly
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::device_name(uint8_t *dev_name, uint8_t max_length)
|
||||
{
|
||||
uint8_t len = read_block(BATT_SMBUS_DEVICE_NAME, dev_name, max_length, false);
|
||||
|
||||
if (len > 0) {
|
||||
if (len >= max_length - 1) {
|
||||
dev_name[max_length - 1] = 0;
|
||||
|
||||
} else {
|
||||
dev_name[len] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
BATT_SMBUS::serial_number()
|
||||
{
|
||||
uint16_t serial_num;
|
||||
|
||||
if (read_reg(BATT_SMBUS_SERIAL_NUMBER, serial_num) == OK) {
|
||||
return serial_num;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::device_chemistry(uint8_t *dev_chem, uint8_t max_length)
|
||||
{
|
||||
uint8_t len = read_block(BATT_SMBUS_DEVICE_CHEMISTRY, dev_chem, max_length, false);
|
||||
|
||||
if (len > 0) {
|
||||
if (len >= max_length - 1) {
|
||||
dev_chem[max_length - 1] = 0;
|
||||
|
||||
} else {
|
||||
dev_chem[len] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
bool
|
||||
BATT_SMBUS::is_solo_battery()
|
||||
{
|
||||
check_if_solo_battery();
|
||||
return _is_solo_battery;
|
||||
}
|
||||
|
||||
int
|
||||
BATT_SMBUS::probe()
|
||||
{
|
||||
@ -381,11 +590,53 @@ BATT_SMBUS::cycle()
|
||||
uint64_t now = hrt_absolute_time();
|
||||
|
||||
// exit without rescheduling if we have failed to find a battery after 10 seconds
|
||||
if (!_enabled && (now - _start_time > BATT_SMBUS_TIMEOUT_MS)) {
|
||||
if (!_enabled && (now - _start_time > BATT_SMBUS_TIMEOUT_US)) {
|
||||
warnx("did not find smart battery");
|
||||
return;
|
||||
}
|
||||
|
||||
bool perform_solo_battry_check = false; // Only check if it is a solo battery if changes have been made to the SBS data
|
||||
|
||||
// Try and get battery SBS info
|
||||
if (_manufacturer_name == nullptr) {
|
||||
char man_name[21];
|
||||
uint8_t len = manufacturer_name((uint8_t *)man_name, sizeof(man_name));
|
||||
|
||||
if (len > 0) {
|
||||
_manufacturer_name = new char[len];
|
||||
strcpy(_manufacturer_name, man_name);
|
||||
perform_solo_battry_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_device_name == nullptr) {
|
||||
char dev_name[21];
|
||||
uint8_t len = device_name((uint8_t *)dev_name, sizeof(dev_name));
|
||||
|
||||
if (len > 0) {
|
||||
_device_name = new char[len];
|
||||
strcpy(_device_name, dev_name);
|
||||
perform_solo_battry_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_device_chemistry == nullptr) {
|
||||
char dev_chem[21];
|
||||
uint8_t len = device_chemistry((uint8_t *)dev_chem, sizeof(dev_chem));
|
||||
|
||||
if (len > 0) {
|
||||
_device_chemistry = new char[len];
|
||||
strcpy(_device_chemistry, dev_chem);
|
||||
perform_solo_battry_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If necessary, check if the battery is a 3DR Solo Battery
|
||||
if (perform_solo_battry_check) {
|
||||
warnx("Checking solo battery");
|
||||
check_if_solo_battery();
|
||||
}
|
||||
|
||||
// read data from sensor
|
||||
struct battery_status_s new_report;
|
||||
|
||||
@ -403,7 +654,7 @@ BATT_SMBUS::cycle()
|
||||
new_report.voltage_v = ((float)tmp) / 1000.0f;
|
||||
|
||||
// read current
|
||||
uint8_t buff[4];
|
||||
uint8_t buff[6];
|
||||
|
||||
if (read_block(BATT_SMBUS_CURRENT, buff, 4, false) == 4) {
|
||||
new_report.current_a = -(float)((int32_t)((uint32_t)buff[3] << 24 | (uint32_t)buff[2] << 16 | (uint32_t)buff[1] << 8 |
|
||||
@ -426,14 +677,42 @@ BATT_SMBUS::cycle()
|
||||
}
|
||||
}
|
||||
|
||||
// if it is a solo battery, check for shutdown on button press
|
||||
if (_is_solo_battery) {
|
||||
// read the button press indicator
|
||||
if (read_block(BATT_SMBUS_MANUFACTURER_DATA, buff, 6, false) == 6) {
|
||||
bool pressed = (buff[1] >> 3) & 0x01;
|
||||
|
||||
if (_button_press_counts >= ((BATT_SMBUS_BUTTON_DEBOUNCE_MS * 1000) / BATT_SMBUS_MEASUREMENT_INTERVAL_US)) {
|
||||
// battery will power off
|
||||
new_report.is_powering_off = true;
|
||||
|
||||
// warn only once
|
||||
if (_button_press_counts++ == ((BATT_SMBUS_BUTTON_DEBOUNCE_MS * 1000) / BATT_SMBUS_MEASUREMENT_INTERVAL_US)) {
|
||||
warnx("system is shutting down NOW...");
|
||||
}
|
||||
|
||||
} else if (pressed) {
|
||||
// battery will power off if the button is held
|
||||
_button_press_counts++;
|
||||
|
||||
} else {
|
||||
// button released early, reset counters
|
||||
_button_press_counts = 0;
|
||||
new_report.is_powering_off = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// publish to orb
|
||||
if (_batt_topic != nullptr) {
|
||||
if (_batt_topic != -1) {
|
||||
orb_publish(_batt_orb_id, _batt_topic, &new_report);
|
||||
|
||||
} else {
|
||||
_batt_topic = orb_advertise(_batt_orb_id, &new_report);
|
||||
|
||||
if (_batt_topic == nullptr) {
|
||||
if (_batt_topic < 0) {
|
||||
errx(1, "ADVERT FAIL");
|
||||
}
|
||||
}
|
||||
@ -453,7 +732,7 @@ BATT_SMBUS::cycle()
|
||||
|
||||
// schedule a fresh cycle call when the measurement is done
|
||||
work_queue(HPWORK, &_work, (worker_t)&BATT_SMBUS::cycle_trampoline, this,
|
||||
USEC2TICK(BATT_SMBUS_MEASUREMENT_INTERVAL_MS));
|
||||
USEC2TICK(BATT_SMBUS_MEASUREMENT_INTERVAL_US));
|
||||
}
|
||||
|
||||
int
|
||||
@ -480,6 +759,27 @@ BATT_SMBUS::read_reg(uint8_t reg, uint16_t &val)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
BATT_SMBUS::write_reg(uint8_t reg, uint16_t val)
|
||||
{
|
||||
uint8_t buff[4]; // reg + 2 bytes of data + PEC
|
||||
|
||||
buff[0] = reg;
|
||||
buff[2] = uint8_t(val << 8) & 0xff;
|
||||
buff[1] = (uint8_t)val;
|
||||
buff[3] = get_PEC(reg, false, &buff[1], 2); // Append PEC
|
||||
|
||||
// write bytes to register
|
||||
int ret = transfer(buff, 3, nullptr, 0);
|
||||
|
||||
if (ret != OK) {
|
||||
debug("Register write error");
|
||||
}
|
||||
|
||||
// return success or failure
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::read_block(uint8_t reg, uint8_t *data, uint8_t max_len, bool append_zero)
|
||||
{
|
||||
@ -520,6 +820,31 @@ BATT_SMBUS::read_block(uint8_t reg, uint8_t *data, uint8_t max_len, bool append_
|
||||
return bufflen;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::write_block(uint8_t reg, uint8_t *data, uint8_t len)
|
||||
{
|
||||
uint8_t buff[len + 3]; // buffer to hold results
|
||||
|
||||
usleep(1);
|
||||
|
||||
buff[0] = reg;
|
||||
buff[1] = len;
|
||||
memcpy(&buff[2], data, len);
|
||||
buff[len + 2] = get_PEC(reg, false, &buff[1], len + 1); // Append PEC
|
||||
|
||||
// send bytes
|
||||
int ret = transfer(buff, len + 3, nullptr, 0);
|
||||
|
||||
// return zero on failure
|
||||
if (ret != OK) {
|
||||
debug("Block write error\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return success
|
||||
return len;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len) const
|
||||
{
|
||||
@ -528,12 +853,32 @@ BATT_SMBUS::get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len
|
||||
return 0;
|
||||
}
|
||||
|
||||
// prepare temp buffer for calcing crc
|
||||
uint8_t tmp_buff[len + 3];
|
||||
/**
|
||||
* Note: The PEC is calculated on all the message bytes. See http://cache.freescale.com/files/32bit/doc/app_note/AN4471.pdf
|
||||
* and http://www.ti.com/lit/an/sloa132/sloa132.pdf for more details
|
||||
*/
|
||||
|
||||
// prepare temp buffer for calculating crc
|
||||
uint8_t tmp_buff_len;
|
||||
|
||||
if (reading) {
|
||||
tmp_buff_len = len + 3;
|
||||
|
||||
} else {
|
||||
tmp_buff_len = len + 2;
|
||||
}
|
||||
|
||||
uint8_t tmp_buff[tmp_buff_len];
|
||||
tmp_buff[0] = (uint8_t)get_address() << 1;
|
||||
tmp_buff[1] = cmd;
|
||||
tmp_buff[2] = tmp_buff[0] | (uint8_t)reading;
|
||||
memcpy(&tmp_buff[3], buff, len);
|
||||
|
||||
if (reading) {
|
||||
tmp_buff[2] = tmp_buff[0] | (uint8_t)reading;
|
||||
memcpy(&tmp_buff[3], buff, len);
|
||||
|
||||
} else {
|
||||
memcpy(&tmp_buff[2], buff, len);
|
||||
}
|
||||
|
||||
// initialise crc to zero
|
||||
uint8_t crc = 0;
|
||||
@ -561,17 +906,133 @@ BATT_SMBUS::get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len
|
||||
return crc;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
BATT_SMBUS::ManufacturerAccess(uint16_t cmd)
|
||||
{
|
||||
// write bytes to Manufacturer Access
|
||||
int ret = write_reg(BATT_SMBUS_MANUFACTURER_ACCESS, cmd);
|
||||
|
||||
if (ret != OK) {
|
||||
debug("Manufacturer Access error");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
BATT_SMBUS::check_if_solo_battery()
|
||||
{
|
||||
// Check if the SBS information corresponds to that of a 3DR Solo Battery. If, yes, set the solo_battery flag to true;
|
||||
if (!strcmp(_manufacturer_name, solo_battery.ManufacturerName) && !strcmp(_device_name, solo_battery.DeviceName)
|
||||
&& !strcmp(_device_chemistry, solo_battery.DeviceChemistry)) {
|
||||
_is_solo_battery = true;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////// shell functions ///////////////////////
|
||||
|
||||
void
|
||||
batt_smbus_usage()
|
||||
{
|
||||
warnx("missing command: try 'start', 'test', 'stop', 'search'");
|
||||
warnx("missing command: try 'start', 'test', 'stop', 'search', 'man_name', 'man_date', 'dev_name', 'serial_num', 'dev_chem', 'sbs_info'");
|
||||
warnx("options:");
|
||||
warnx(" -b i2cbus (%d)", BATT_SMBUS_I2C_BUS);
|
||||
warnx(" -a addr (0x%x)", BATT_SMBUS_ADDR);
|
||||
}
|
||||
|
||||
int
|
||||
manufacturer_name()
|
||||
{
|
||||
uint8_t man_name[21];
|
||||
uint8_t len = g_batt_smbus->manufacturer_name(man_name, sizeof(man_name));
|
||||
|
||||
if (len > 0) {
|
||||
warnx("The manufacturer name: %s", man_name);
|
||||
return OK;
|
||||
|
||||
} else {
|
||||
warnx("Unable to read manufacturer name.");
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
manufacture_date()
|
||||
{
|
||||
uint16_t man_date = g_batt_smbus->manufacture_date();
|
||||
|
||||
if (man_date > 0) {
|
||||
// Convert the uint16_t into human-readable date format
|
||||
uint16_t year = ((man_date >> 9) & 0xFF) + 1980;
|
||||
uint8_t month = (man_date >> 5) & 0xF;
|
||||
uint8_t day = man_date & 0x1F;
|
||||
warnx("The manufacturer date is: %d which is %4d-%02d-%02d", man_date, year, month, day);
|
||||
return OK;
|
||||
|
||||
} else {
|
||||
warnx("Unable to read the manufacturer date.");
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
device_name()
|
||||
{
|
||||
uint8_t device_name[21];
|
||||
uint8_t len = g_batt_smbus->device_name(device_name, sizeof(device_name));
|
||||
|
||||
if (len > 0) {
|
||||
warnx("The device name: %s", device_name);
|
||||
return OK;
|
||||
|
||||
} else {
|
||||
warnx("Unable to read device name.");
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
serial_number()
|
||||
{
|
||||
uint16_t serial_num = g_batt_smbus->serial_number();
|
||||
warnx("The serial number: 0x%04x (%d in decimal)", serial_num, serial_num);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
int
|
||||
device_chemistry()
|
||||
{
|
||||
uint8_t device_chemistry[5];
|
||||
uint8_t len = g_batt_smbus->device_chemistry(device_chemistry, sizeof(device_chemistry));
|
||||
|
||||
if (len > 0) {
|
||||
warnx("The device chemistry: %s", device_chemistry);
|
||||
return OK;
|
||||
|
||||
} else {
|
||||
warnx("Unable to read device chemistry.");
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
solo_battery_check()
|
||||
{
|
||||
if (g_batt_smbus->is_solo_battery()) {
|
||||
warnx("The battery corresponds to a 3DR Solo Battery");
|
||||
|
||||
} else {
|
||||
warnx("The battery does not correspond to a 3DR Solo Battery");
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
int
|
||||
batt_smbus_main(int argc, char *argv[])
|
||||
{
|
||||
@ -649,6 +1110,41 @@ batt_smbus_main(int argc, char *argv[])
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "man_name")) {
|
||||
manufacturer_name();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "man_date")) {
|
||||
manufacture_date();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "dev_name")) {
|
||||
device_name();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "serial_num")) {
|
||||
serial_number();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "dev_chem")) {
|
||||
device_chemistry();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!strcmp(verb, "sbs_info")) {
|
||||
manufacturer_name();
|
||||
manufacture_date();
|
||||
device_name();
|
||||
serial_number();
|
||||
device_chemistry();
|
||||
solo_battery_check();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
batt_smbus_usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* @file aerocore_pwm_servo.c
|
||||
* @file aerocore_timer_config.c
|
||||
*
|
||||
* Configuration data for the stm32 pwm_servo driver.
|
||||
* Configuration data for the stm32 pwm_servo, input capture and pwm input driver.
|
||||
*
|
||||
* Note that these arrays must always be fully-sized.
|
||||
*/
|
||||
@ -42,76 +42,100 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stm32.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_gpio_out.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
#include <drivers/stm32/drv_pwm_servo.h>
|
||||
#include <drivers/stm32/drv_io_timer.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
__EXPORT const struct pwm_servo_timer pwm_timers[PWM_SERVO_MAX_TIMERS] = {
|
||||
__EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
{
|
||||
.base = STM32_TIM1_BASE,
|
||||
.clock_register = STM32_RCC_APB2ENR,
|
||||
.clock_bit = RCC_APB2ENR_TIM1EN,
|
||||
.clock_freq = STM32_APB2_TIM1_CLKIN
|
||||
.clock_freq = STM32_APB2_TIM1_CLKIN,
|
||||
.first_channel_index = 0,
|
||||
.last_channel_index = 3,
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM1CC,
|
||||
},
|
||||
{
|
||||
.base = STM32_TIM3_BASE,
|
||||
.clock_register = STM32_RCC_APB1ENR,
|
||||
.clock_bit = RCC_APB1ENR_TIM3EN,
|
||||
.clock_freq = STM32_APB1_TIM3_CLKIN
|
||||
.first_channel_index = 4,
|
||||
.last_channel_index = 7,
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM3,
|
||||
}
|
||||
};
|
||||
|
||||
__EXPORT const struct pwm_servo_channel pwm_channels[PWM_SERVO_MAX_CHANNELS] = {
|
||||
__EXPORT const timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
{
|
||||
.gpio = GPIO_TIM1_CH1OUT,
|
||||
.gpio_out = GPIO_TIM1_CH1OUT,
|
||||
.gpio_in = GPIO_TIM1_CH1IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 1,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR1_OFFSET,
|
||||
.masks = GTIM_SR_CC1IF | GTIM_SR_CC1OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM1_CH2OUT,
|
||||
.gpio_out = GPIO_TIM1_CH2OUT,
|
||||
.gpio_in = GPIO_TIM1_CH2IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 2,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR2_OFFSET,
|
||||
.masks = GTIM_SR_CC2IF | GTIM_SR_CC2OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM1_CH3OUT,
|
||||
.gpio_out = GPIO_TIM1_CH3OUT,
|
||||
.gpio_in = GPIO_TIM1_CH3IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 3,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR3_OFFSET,
|
||||
.masks = GTIM_SR_CC3IF | GTIM_SR_CC3OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM1_CH4OUT,
|
||||
.gpio_out = GPIO_TIM1_CH4OUT,
|
||||
.gpio_in = GPIO_TIM1_CH4IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 4,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR4_OFFSET,
|
||||
.masks = GTIM_SR_CC4IF | GTIM_SR_CC4OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM3_CH1OUT,
|
||||
.gpio_out = GPIO_TIM3_CH1OUT,
|
||||
.gpio_out = GPIO_TIM3_CH1IN,
|
||||
.timer_index = 1,
|
||||
.timer_channel = 1,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR1_OFFSET,
|
||||
.masks = GTIM_SR_CC1IF | GTIM_SR_CC1OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM3_CH2OUT,
|
||||
.gpio_out = GPIO_TIM3_CH2OUT,
|
||||
.gpio_out = GPIO_TIM3_CH2IN,
|
||||
.timer_index = 1,
|
||||
.timer_channel = 2,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR2_OFFSET,
|
||||
.masks = GTIM_SR_CC2IF | GTIM_SR_CC2OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM3_CH3OUT,
|
||||
.gpio_out = GPIO_TIM3_CH3OUT,
|
||||
.gpio_out = GPIO_TIM3_CH3IN,
|
||||
.timer_index = 1,
|
||||
.timer_channel = 3,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR3_OFFSET,
|
||||
.masks = GTIM_SR_CC3IF | GTIM_SR_CC3OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM3_CH4OUT,
|
||||
.gpio_out = GPIO_TIM3_CH4OUT,
|
||||
.gpio_out = GPIO_TIM3_CH4IN,
|
||||
.timer_index = 1,
|
||||
.timer_channel = 4,
|
||||
.default_value = 1500,
|
||||
.ccr_offset = STM32_GTIM_CCR4_OFFSET,
|
||||
.masks = GTIM_SR_CC4IF | GTIM_SR_CC4OF
|
||||
}
|
||||
};
|
||||
@ -152,6 +152,16 @@ __BEGIN_DECLS
|
||||
#define GPIO_TIM3_CH4OUT GPIO_TIM3_CH4OUT_2
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 8
|
||||
|
||||
#define GPIO_TIM1_CH1IN GPIO_TIM1_CH1IN_2
|
||||
#define GPIO_TIM1_CH2IN GPIO_TIM1_CH2IN_2
|
||||
#define GPIO_TIM1_CH3IN GPIO_TIM1_CH3IN_2
|
||||
#define GPIO_TIM1_CH4IN GPIO_TIM1_CH4IN_2
|
||||
#define GPIO_TIM3_CH1IN GPIO_TIM3_CH1IN_3
|
||||
#define GPIO_TIM3_CH2IN GPIO_TIM3_CH2IN_3
|
||||
#define GPIO_TIM3_CH3IN GPIO_TIM3_CH3IN_2
|
||||
#define GPIO_TIM3_CH4IN GPIO_TIM3_CH4IN_2
|
||||
#define DIRECT_INPUT_TIMER_CHANNELS 8
|
||||
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 8 /* use timer 8 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 1 /* use capture/compare channel */
|
||||
|
||||
@ -37,7 +37,7 @@ px4_add_module(
|
||||
SRCS
|
||||
px4fmu_can.c
|
||||
px4fmu_init.c
|
||||
px4fmu_pwm_servo.c
|
||||
px4fmu_timer_config.c
|
||||
px4fmu_spi.c
|
||||
px4fmu_usb.c
|
||||
px4fmu_led.c
|
||||
|
||||
@ -184,6 +184,12 @@ __BEGIN_DECLS
|
||||
#define GPIO_TIM2_CH4OUT GPIO_TIM2_CH4OUT_1
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 4
|
||||
|
||||
#define GPIO_TIM2_CH1IN GPIO_TIM2_CH1IN_1
|
||||
#define GPIO_TIM2_CH2IN GPIO_TIM2_CH2IN_1
|
||||
#define GPIO_TIM2_CH3IN GPIO_TIM2_CH3IN_1
|
||||
#define GPIO_TIM2_CH4IN GPIO_TIM2_CH4IN_1
|
||||
#define DIRECT_INPUT_TIMER_CHANNELS 4
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
* PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED)
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* @file px4fmu_pwm_servo.c
|
||||
* @file px4fmu_timer_config.c
|
||||
*
|
||||
* Configuration data for the stm32 pwm_servo driver.
|
||||
* Configuration data for the stm32 pwm_servo, input capture and pwm input driver.
|
||||
*
|
||||
* Note that these arrays must always be fully-sized.
|
||||
*/
|
||||
@ -45,43 +45,55 @@
|
||||
#include <stm32_gpio.h>
|
||||
#include <stm32_tim.h>
|
||||
|
||||
#include <drivers/stm32/drv_pwm_servo.h>
|
||||
#include <drivers/drv_pwm_output.h>
|
||||
#include <drivers/stm32/drv_io_timer.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
__EXPORT const struct pwm_servo_timer pwm_timers[PWM_SERVO_MAX_TIMERS] = {
|
||||
__EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
{
|
||||
.base = STM32_TIM2_BASE,
|
||||
.clock_register = STM32_RCC_APB1ENR,
|
||||
.clock_bit = RCC_APB1ENR_TIM2EN,
|
||||
.clock_freq = STM32_APB1_TIM2_CLKIN
|
||||
.clock_freq = STM32_APB1_TIM2_CLKIN,
|
||||
.first_channel_index = 0,
|
||||
.last_channel_index = 3,
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM2,
|
||||
}
|
||||
};
|
||||
|
||||
__EXPORT const struct pwm_servo_channel pwm_channels[PWM_SERVO_MAX_CHANNELS] = {
|
||||
__EXPORT const timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
{
|
||||
.gpio = GPIO_TIM2_CH1OUT,
|
||||
.gpio_out = GPIO_TIM2_CH1OUT,
|
||||
.gpio_in = GPIO_TIM2_CH1IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 1,
|
||||
.default_value = 1000,
|
||||
.ccr_offset = STM32_GTIM_CCR1_OFFSET,
|
||||
.masks = GTIM_SR_CC1IF | GTIM_SR_CC1OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM2_CH2OUT,
|
||||
.gpio_out = GPIO_TIM2_CH2OUT,
|
||||
.gpio_in = GPIO_TIM2_CH2IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 2,
|
||||
.default_value = 1000,
|
||||
.ccr_offset = STM32_GTIM_CCR2_OFFSET,
|
||||
.masks = GTIM_SR_CC2IF | GTIM_SR_CC2OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM2_CH3OUT,
|
||||
.gpio_out = GPIO_TIM2_CH3OUT,
|
||||
.gpio_in = GPIO_TIM2_CH3IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 3,
|
||||
.default_value = 1000,
|
||||
.ccr_offset = STM32_GTIM_CCR3_OFFSET,
|
||||
.masks = GTIM_SR_CC3IF | GTIM_SR_CC3OF
|
||||
},
|
||||
{
|
||||
.gpio = GPIO_TIM2_CH4OUT,
|
||||
.gpio_out = GPIO_TIM2_CH4OUT,
|
||||
.gpio_in = GPIO_TIM2_CH4IN,
|
||||
.timer_index = 0,
|
||||
.timer_channel = 4,
|
||||
.default_value = 1000,
|
||||
.ccr_offset = STM32_GTIM_CCR4_OFFSET,
|
||||
.masks = GTIM_SR_CC4IF | GTIM_SR_CC4OF
|
||||
}
|
||||
};
|
||||
@ -37,7 +37,7 @@ px4_add_module(
|
||||
SRCS
|
||||
px4fmu_can.c
|
||||
px4fmu2_init.c
|
||||
px4fmu_pwm_servo.c
|
||||
px4fmu_timer_config.c
|
||||
px4fmu_spi.c
|
||||
px4fmu_usb.c
|
||||
px4fmu2_led.c
|
||||
|
||||
@ -115,6 +115,7 @@ __BEGIN_DECLS
|
||||
#define PX4_SPI_BUS_SENSORS 1
|
||||
#define PX4_SPI_BUS_RAMTRON 2
|
||||
#define PX4_SPI_BUS_EXT 4
|
||||
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_SENSORS
|
||||
|
||||
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
|
||||
#define PX4_SPIDEV_GYRO 1
|
||||
@ -175,7 +176,7 @@ __BEGIN_DECLS
|
||||
#define GPIO_GPIO2_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN11)
|
||||
#define GPIO_GPIO3_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN9)
|
||||
#define GPIO_GPIO4_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN13)
|
||||
#define GPIO_GPIO5_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN14)
|
||||
#define GPIO_GPIO5_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN14)
|
||||
|
||||
/* 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)
|
||||
@ -204,14 +205,22 @@ __BEGIN_DECLS
|
||||
* CH5 : PD13 : TIM4_CH2
|
||||
* CH6 : PD14 : TIM4_CH3
|
||||
*/
|
||||
#define GPIO_TIM1_CH1OUT GPIO_TIM1_CH1OUT_2
|
||||
#define GPIO_TIM1_CH2OUT GPIO_TIM1_CH2OUT_2
|
||||
#define GPIO_TIM1_CH3OUT GPIO_TIM1_CH3OUT_2
|
||||
#define GPIO_TIM1_CH4OUT GPIO_TIM1_CH4OUT_2
|
||||
#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2
|
||||
#define GPIO_TIM4_CH3OUT GPIO_TIM4_CH3OUT_2
|
||||
#define GPIO_TIM1_CH1OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN9)
|
||||
#define GPIO_TIM1_CH2OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN11)
|
||||
#define GPIO_TIM1_CH3OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN13)
|
||||
#define GPIO_TIM1_CH4OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN14)
|
||||
#define GPIO_TIM4_CH2OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13)
|
||||
#define GPIO_TIM4_CH3OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN14)
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 6
|
||||
|
||||
#define GPIO_TIM1_CH1IN GPIO_TIM1_CH1IN_2
|
||||
#define GPIO_TIM1_CH2IN GPIO_TIM1_CH2IN_2
|
||||
#define GPIO_TIM1_CH3IN GPIO_TIM1_CH3IN_2
|
||||
#define GPIO_TIM1_CH4IN GPIO_TIM1_CH4IN_2
|
||||
#define GPIO_TIM4_CH2IN GPIO_TIM4_CH2IN_2
|
||||
#define GPIO_TIM4_CH3IN GPIO_TIM4_CH3IN_2
|
||||
#define DIRECT_INPUT_TIMER_CHANNELS 6
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
* PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user