mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-15 07:12:34 +00:00
Compare commits
1035 Commits
v1.2.testi
...
v1.3.3.2fe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fe124eb17 | ||
|
|
a450aac3b5 | ||
|
|
958f20da1a | ||
|
|
ef4c01f4ea | ||
|
|
97c76cde3c | ||
|
|
2ab0548dda | ||
|
|
75bf2cc9c6 | ||
|
|
ee533b2d5c | ||
|
|
52960f5fa2 | ||
|
|
5c281154fd | ||
|
|
2c7b3acbb9 | ||
|
|
cf928fca93 | ||
|
|
8eaaf842ab | ||
|
|
09edd7f89b | ||
|
|
556fc6210d | ||
|
|
4d8c0c11dc | ||
|
|
950b54aaba | ||
|
|
4b87a82eb3 | ||
|
|
2fa8f45d74 | ||
|
|
4209fc8b2c | ||
|
|
6d4d2bb6fa | ||
|
|
32ef354c22 | ||
|
|
a0395c1027 | ||
|
|
1f43132b52 | ||
|
|
ac8ba706f0 | ||
|
|
ca4c1c9d7c | ||
|
|
7b8746d596 | ||
|
|
91b0fcb257 | ||
|
|
768c26bb1b | ||
|
|
e5e13d78c3 | ||
|
|
a2eb148c50 | ||
|
|
33ed9476f8 | ||
|
|
92d5dedc63 | ||
|
|
10fefe7c7b | ||
|
|
92ffbca339 | ||
|
|
7c868c78cc | ||
|
|
3f2baeb56e | ||
|
|
ebba628736 | ||
|
|
2a02b4594f | ||
|
|
1e689b86b5 | ||
|
|
e53abbfb2b | ||
|
|
6f086bd3ba | ||
|
|
3c5e49d8f4 | ||
|
|
7a5ae40289 | ||
|
|
a83cfffd3a | ||
|
|
031b3665f8 | ||
|
|
206ae4e2b8 | ||
|
|
24556f2803 | ||
|
|
ffa7a36a03 | ||
|
|
ba7644e376 | ||
|
|
ebc9fef222 | ||
|
|
dee577cb5c | ||
|
|
ed5dea9f85 | ||
|
|
eeacb280d1 | ||
|
|
bc27dbde98 | ||
|
|
9b1bf7787c | ||
|
|
71bf9de638 | ||
|
|
3a04a0ee7a | ||
|
|
e218740488 | ||
|
|
86e767eec2 | ||
|
|
d57704b3bd | ||
|
|
218a208ab7 | ||
|
|
c5c12bcc6b | ||
|
|
0e686e4645 | ||
|
|
9050fe7f90 | ||
|
|
c511fa2fe6 | ||
|
|
9b44d2e999 | ||
|
|
01a86133ea | ||
|
|
338c30fe9a | ||
|
|
ac43a1b182 | ||
|
|
5bff62e428 | ||
|
|
a0f80c1a2a | ||
|
|
f9bcddafef | ||
|
|
a25beff241 | ||
|
|
529707489a | ||
|
|
ceccbd3ef2 | ||
|
|
59ce0c7d09 | ||
|
|
f2a31cc678 | ||
|
|
c97541d4fc | ||
|
|
fc54f2f63d | ||
|
|
c3cee236bd | ||
|
|
c5a8cc6d3f | ||
|
|
2e402a726b | ||
|
|
ca8598f8b7 | ||
|
|
b6d7eadea3 | ||
|
|
cd9def6850 | ||
|
|
060eac7ab9 | ||
|
|
d95d874258 | ||
|
|
e52f94820e | ||
|
|
31f4ec5d6c | ||
|
|
bb15ed903d | ||
|
|
ef2bc2b9fc | ||
|
|
972c2bb329 | ||
|
|
54ff8f2db3 | ||
|
|
a36889abba | ||
|
|
eb66ba2510 | ||
|
|
1e6e3805ad | ||
|
|
0133186f70 | ||
|
|
b15ef2749f | ||
|
|
7b2042f391 | ||
|
|
3d4fc63ecc | ||
|
|
3fdd425634 | ||
|
|
d416f28341 | ||
|
|
06064d92cd | ||
|
|
837c0e3717 | ||
|
|
389a8f1401 | ||
|
|
d32989cd7e | ||
|
|
e969e83037 | ||
|
|
57d824cf5d | ||
|
|
e34190b497 | ||
|
|
701668804a | ||
|
|
a7aa82e732 | ||
|
|
1075b95f79 | ||
|
|
29e70a80c6 | ||
|
|
8303500b74 | ||
|
|
e7e001c159 | ||
|
|
54f062e94d | ||
|
|
717491752b | ||
|
|
9cdc6ae860 | ||
|
|
4941fd30f7 | ||
|
|
5ddd280f92 | ||
|
|
3a621ef262 | ||
|
|
0c946609d5 | ||
|
|
554729dab2 | ||
|
|
ae6d0686bd | ||
|
|
57bbd912b1 | ||
|
|
6befed1176 | ||
|
|
1ba7f009dd | ||
|
|
eae8720068 | ||
|
|
18e95e6bb4 | ||
|
|
01e86512aa | ||
|
|
9fda734743 | ||
|
|
04d16b82ba | ||
|
|
4206982572 | ||
|
|
b99d793e23 | ||
|
|
71d5e6c478 | ||
|
|
111d7ecd5e | ||
|
|
1de086819c | ||
|
|
af1804ea62 | ||
|
|
fe87682d69 | ||
|
|
96b5537217 | ||
|
|
449926cff9 | ||
|
|
d4e5a3c67c | ||
|
|
2428ca09fc | ||
|
|
346712fbf3 | ||
|
|
a1ad1e7973 | ||
|
|
806a61251b | ||
|
|
34eee247e9 | ||
|
|
ee95594f74 | ||
|
|
7f3ad672b8 | ||
|
|
7cda49aba5 | ||
|
|
8e9b852faa | ||
|
|
6b4907e841 | ||
|
|
1808e9b3d8 | ||
|
|
1dd53eeaf5 | ||
|
|
892d9a34c7 | ||
|
|
ab96579904 | ||
|
|
3f83acdbef | ||
|
|
9db7c62a49 | ||
|
|
d79dc631f1 | ||
|
|
7ea6babb7f | ||
|
|
0b4b901504 | ||
|
|
cc7b5cf136 | ||
|
|
e3df4fe4b4 | ||
|
|
288f2be8ea | ||
|
|
c867af8522 | ||
|
|
856f2f9589 | ||
|
|
e649bc84e1 | ||
|
|
bbcd59ec7b | ||
|
|
e11fd593ae | ||
|
|
868af9dd6b | ||
|
|
10800a6914 | ||
|
|
e567fe7322 | ||
|
|
365120e9c2 | ||
|
|
b21b7de04b | ||
|
|
dd31a829fb | ||
|
|
9a505c27fa | ||
|
|
ed9cd7b03d | ||
|
|
66413d8b7f | ||
|
|
e4fe2c159a | ||
|
|
f5e0718052 | ||
|
|
64ff48c4a5 | ||
|
|
50969c4e42 | ||
|
|
5288f1846a | ||
|
|
c545155b03 | ||
|
|
a4e9fca80c | ||
|
|
3611293a98 | ||
|
|
dc7f376778 | ||
|
|
ff2cad9cac | ||
|
|
b781fb613c | ||
|
|
0a1125d7e4 | ||
|
|
ed2de3b885 | ||
|
|
19c1f9fa59 | ||
|
|
266d6ad205 | ||
|
|
66cd824437 | ||
|
|
e2db4f6927 | ||
|
|
56fb141ed0 | ||
|
|
e8e209be25 | ||
|
|
c278a0e299 | ||
|
|
fbc25c3a13 | ||
|
|
b7f04f4c91 | ||
|
|
d5377a0f19 | ||
|
|
dafc1092aa | ||
|
|
477b666998 | ||
|
|
dbcd720391 | ||
|
|
59c2bcd978 | ||
|
|
aea6675e64 | ||
|
|
8bff696bef | ||
|
|
da0ec09bf4 | ||
|
|
2c99020037 | ||
|
|
14419cbd02 | ||
|
|
1bfa6839e2 | ||
|
|
a61676504f | ||
|
|
f4d3de086a | ||
|
|
af249da1a3 | ||
|
|
7613c7bf83 | ||
|
|
e4608e0a10 | ||
|
|
d26549c7c2 | ||
|
|
697d52b9bd | ||
|
|
7a9450b250 | ||
|
|
6d372743f5 | ||
|
|
c2b309195d | ||
|
|
3c7670186a | ||
|
|
b51be320dd | ||
|
|
409ad9c2c3 | ||
|
|
eaa5252cdb | ||
|
|
3d718f45d5 | ||
|
|
a8dab94087 | ||
|
|
5a348da0e9 | ||
|
|
115b835b83 | ||
|
|
9df42799ff | ||
|
|
e1d3c01199 | ||
|
|
bdcc0f252b | ||
|
|
437aa1e9af | ||
|
|
6883bc7afc | ||
|
|
a2eef895bd | ||
|
|
64671c8ce7 | ||
|
|
252a27174e | ||
|
|
7c362af3de | ||
|
|
c6b851a2e6 | ||
|
|
ec4346aba3 | ||
|
|
791186a264 | ||
|
|
ab947f06aa | ||
|
|
cfa0ceb604 | ||
|
|
c7686ad57e | ||
|
|
8732b7cb4d | ||
|
|
fe9dcbb316 | ||
|
|
38d1a381e6 | ||
|
|
0b2f1d5675 | ||
|
|
caaa235c5d | ||
|
|
9a0126cde1 | ||
|
|
39d0c0fd8f | ||
|
|
be0b9979bc | ||
|
|
b3210f6c2c | ||
|
|
2357240d84 | ||
|
|
c2f0048931 | ||
|
|
d1ba314065 | ||
|
|
8a79ede285 | ||
|
|
c8ecd6ac8e | ||
|
|
13226adb2a | ||
|
|
e706aae41d | ||
|
|
91ad0df11c | ||
|
|
976627d974 | ||
|
|
6830f9861a | ||
|
|
2db307fc8d | ||
|
|
7fae43e1a5 | ||
|
|
8b60226497 | ||
|
|
ab8083dec4 | ||
|
|
a561713a48 | ||
|
|
00f3996cee | ||
|
|
9e4e79c5d7 | ||
|
|
61e1b8d859 | ||
|
|
165e8e8cba | ||
|
|
635fbcf0d5 | ||
|
|
815222ad80 | ||
|
|
64a9f15b1c | ||
|
|
abcdf39b20 | ||
|
|
16ee75313a | ||
|
|
bfd9938507 | ||
|
|
01f5f1b5ba | ||
|
|
b6706c7ac1 | ||
|
|
7723b30951 | ||
|
|
6d34151590 | ||
|
|
2230cbbe2a | ||
|
|
b49ba55658 | ||
|
|
0864154157 | ||
|
|
c4f64b1592 | ||
|
|
001d054924 | ||
|
|
5e590a4a5e | ||
|
|
22a2fe2cb4 | ||
|
|
f047ae6792 | ||
|
|
e1ef495071 | ||
|
|
209c6253a6 | ||
|
|
1acabb9d35 | ||
|
|
420495cb2d | ||
|
|
9309824874 | ||
|
|
4fc443e760 | ||
|
|
53399f06e5 | ||
|
|
4e3fda87a1 | ||
|
|
1ff3b3326c | ||
|
|
9f0ddda6ca | ||
|
|
8e3d30bd7f | ||
|
|
6ca3186bff | ||
|
|
68fadfe26c | ||
|
|
92bcdb5e53 | ||
|
|
04b1948ee9 | ||
|
|
6fdc16017a | ||
|
|
7f759d6bb5 | ||
|
|
1f227797c1 | ||
|
|
ab87c0a9ee | ||
|
|
6d960918e2 | ||
|
|
5797e32461 | ||
|
|
41da6c3b99 | ||
|
|
fe3a352511 | ||
|
|
b53f4214bc | ||
|
|
b6b1bcc5ad | ||
|
|
91117ca7c6 | ||
|
|
2d8e55a34e | ||
|
|
3a7292d3d0 | ||
|
|
3fea1c4e5f | ||
|
|
c2435470c1 | ||
|
|
1c993c10a1 | ||
|
|
0a62ce23af | ||
|
|
38efb8b3ad | ||
|
|
9ee7f5e0bd | ||
|
|
c798e1a2da | ||
|
|
7eb4713422 | ||
|
|
a9ed26fdbc | ||
|
|
a7451b6abe | ||
|
|
e61db642bc | ||
|
|
25a540c28b | ||
|
|
1993b8f8a6 | ||
|
|
38dd5612fd | ||
|
|
8a63c6f3a3 | ||
|
|
778d13dee7 | ||
|
|
2fd0d2baff | ||
|
|
399792803a | ||
|
|
8a6bbcb985 | ||
|
|
419349e13e | ||
|
|
6b0770fdd5 | ||
|
|
ee2b05da78 | ||
|
|
d900847bab | ||
|
|
8b56ebd566 | ||
|
|
b63802cef3 | ||
|
|
a1f80f024e | ||
|
|
41de8a1309 | ||
|
|
33f08364e4 | ||
|
|
c5b95ed3c0 | ||
|
|
f7c8cabdfe | ||
|
|
0f1c424731 | ||
|
|
3fa00f603b | ||
|
|
f5004a66a1 | ||
|
|
b832b82ec6 | ||
|
|
fbd5b8b721 | ||
|
|
772dfe39dc | ||
|
|
c7e62142e9 | ||
|
|
6eb2b33124 | ||
|
|
b3ddf16d64 | ||
|
|
4a29aef19e | ||
|
|
7b8849493f | ||
|
|
2b588f1567 | ||
|
|
975f7c0332 | ||
|
|
f9ff06b296 | ||
|
|
ad038b07b6 | ||
|
|
2e4b777625 | ||
|
|
a8f1115c05 | ||
|
|
f26bb6467e | ||
|
|
c1ee1265ab | ||
|
|
ad31d558a1 | ||
|
|
1b81b155d6 | ||
|
|
4a036db612 | ||
|
|
2e0cd7ce4a | ||
|
|
4ddc113ed6 | ||
|
|
47935aab98 | ||
|
|
0a43be6f8c | ||
|
|
053a00ec6c | ||
|
|
5392a83e33 | ||
|
|
1adca4e992 | ||
|
|
1e247f154e | ||
|
|
f302166832 | ||
|
|
51743f751a | ||
|
|
b22cc1a964 | ||
|
|
bd3688d21d | ||
|
|
465ff3dd25 | ||
|
|
2ee1155c78 | ||
|
|
6506d54859 | ||
|
|
6843ffe452 | ||
|
|
1fe4b95fe5 | ||
|
|
398a5baa90 | ||
|
|
fcd3170a0f | ||
|
|
95f2d0c933 | ||
|
|
e2d1cce1bb | ||
|
|
01f1b33eec | ||
|
|
94246a1fbc | ||
|
|
abae99f577 | ||
|
|
f221bc6275 | ||
|
|
706d6e2671 | ||
|
|
2857fafa81 | ||
|
|
17dfb7d152 | ||
|
|
dff219a037 | ||
|
|
1c63d2d334 | ||
|
|
b6eb927ad2 | ||
|
|
9d8a1b3522 | ||
|
|
9bc9d37596 | ||
|
|
76d0ad2907 | ||
|
|
3a17822893 | ||
|
|
da7ca98f44 | ||
|
|
841bc97a47 | ||
|
|
dbdbe75e9f | ||
|
|
d5fc905402 | ||
|
|
c366d81510 | ||
|
|
e9f01de051 | ||
|
|
f9905ea416 | ||
|
|
a8d10329f8 | ||
|
|
1157419e05 | ||
|
|
12f1fda934 | ||
|
|
cb0073f6fa | ||
|
|
da5bc9d9d9 | ||
|
|
38baebe48f | ||
|
|
97ad7a1825 | ||
|
|
1f9b1e2828 | ||
|
|
796d05e89e | ||
|
|
063d7a7d81 | ||
|
|
6d0368b13d | ||
|
|
b2011a1889 | ||
|
|
893472e36a | ||
|
|
4d82a0146b | ||
|
|
8569595249 | ||
|
|
88281dbbf1 | ||
|
|
dd3e8af4c0 | ||
|
|
a0d3d1dc89 | ||
|
|
9a87ec7353 | ||
|
|
3857dd7e52 | ||
|
|
690cb0c77a | ||
|
|
5d4f039b3e | ||
|
|
676e840b5b | ||
|
|
c00c2744bf | ||
|
|
83293a5f4d | ||
|
|
0812094f35 | ||
|
|
7dfe596bcb | ||
|
|
749d127281 | ||
|
|
dd464896ae | ||
|
|
00ff013799 | ||
|
|
415ded1f4d | ||
|
|
924069f9ad | ||
|
|
ad784532b7 | ||
|
|
de1d5d61ff | ||
|
|
af8f70e9ae | ||
|
|
c135a59787 | ||
|
|
333b195804 | ||
|
|
40f1a7bcaf | ||
|
|
432854ce31 | ||
|
|
6e706e0585 | ||
|
|
4ca8846c2f | ||
|
|
69e1985eda | ||
|
|
475348489e | ||
|
|
c8aec324f5 | ||
|
|
90f5fade84 | ||
|
|
df75182bcf | ||
|
|
6cb4900e0c | ||
|
|
8bbdfe4538 | ||
|
|
f53fdf1628 | ||
|
|
a16dcbe9d0 | ||
|
|
20497335c2 | ||
|
|
e24a2116d8 | ||
|
|
9c7121df3e | ||
|
|
c531ea8601 | ||
|
|
0a4659b605 | ||
|
|
41dcfdd7cb | ||
|
|
fbcbc791de | ||
|
|
7c6d53f297 | ||
|
|
68c52a8d36 | ||
|
|
759bdfd6a4 | ||
|
|
94aff87706 | ||
|
|
3fdb374dce | ||
|
|
6f3ffc6ef0 | ||
|
|
07adfd7543 | ||
|
|
bdacd97fea | ||
|
|
7eb00dd5f6 | ||
|
|
37dec91ed9 | ||
|
|
80d872448d | ||
|
|
cea35acfa0 | ||
|
|
672ea5b494 | ||
|
|
79e75a47f6 | ||
|
|
10dc8233ea | ||
|
|
f1c029d6da | ||
|
|
a2883789d1 | ||
|
|
654558abcd | ||
|
|
c1abe84abc | ||
|
|
f3427084c2 | ||
|
|
638d43a341 | ||
|
|
1063415292 | ||
|
|
a70b849039 | ||
|
|
33769b8657 | ||
|
|
a534eae43c | ||
|
|
5a22b49a24 | ||
|
|
06a6f75f00 | ||
|
|
bea9dfff38 | ||
|
|
2818dfc948 | ||
|
|
f521878308 | ||
|
|
648e8bb5e1 | ||
|
|
6907cb192e | ||
|
|
988f8c4d23 | ||
|
|
4a3bdb284d | ||
|
|
efdd2ad490 | ||
|
|
228be41ba6 | ||
|
|
5432d3d44b | ||
|
|
e77cbd0588 | ||
|
|
072707c77e | ||
|
|
366a028502 | ||
|
|
ea7bceb85b | ||
|
|
caa4f3cd71 | ||
|
|
521c55595a | ||
|
|
a0c9d18e0d | ||
|
|
0938cded58 | ||
|
|
0ea12436b6 | ||
|
|
8e50e25eec | ||
|
|
2d8bf4d684 | ||
|
|
0aa4ea86a0 | ||
|
|
d09754fbcf | ||
|
|
a192da5cd0 | ||
|
|
73985c47d6 | ||
|
|
476c6f25ce | ||
|
|
836113ef8b | ||
|
|
3e31d561ea | ||
|
|
192feeaf0e | ||
|
|
9f63a8c330 | ||
|
|
b6d72d3248 | ||
|
|
756528180e | ||
|
|
8d8fece89d | ||
|
|
7af4a31329 | ||
|
|
2ace1f48b8 | ||
|
|
d1d096d52a | ||
|
|
3adb79bd18 | ||
|
|
34908a8f79 | ||
|
|
9b15bb51b3 | ||
|
|
d7a1b9fd62 | ||
|
|
727dcbc809 | ||
|
|
94e9345354 | ||
|
|
4fcd82d6f5 | ||
|
|
4cd25bc755 | ||
|
|
252820c58c | ||
|
|
0e5a783c5a | ||
|
|
4a053801ce | ||
|
|
e68ca88c9c | ||
|
|
40d61543e4 | ||
|
|
f3fc88ac5d | ||
|
|
d1370071da | ||
|
|
b71051a227 | ||
|
|
a27260a605 | ||
|
|
5354c49c50 | ||
|
|
3dbc31e8f3 | ||
|
|
5ff6b919c6 | ||
|
|
62602b54f4 | ||
|
|
ee70b5996f | ||
|
|
1f4a3085ef | ||
|
|
f119555c12 | ||
|
|
2f16b3f345 | ||
|
|
1d0221e02d | ||
|
|
446fb857cc | ||
|
|
c6292679f5 | ||
|
|
65cc938c72 | ||
|
|
a1f97aea77 | ||
|
|
ce42707fc7 | ||
|
|
1ed3195194 | ||
|
|
4de89fab0d | ||
|
|
4fb5107298 | ||
|
|
686057a0b1 | ||
|
|
04683580ff | ||
|
|
66085d7447 | ||
|
|
033e0e99ec | ||
|
|
98d2499074 | ||
|
|
3d4e4bfa50 | ||
|
|
9e771f14d8 | ||
|
|
1156a3406e | ||
|
|
0475cc93ab | ||
|
|
8b508576ea | ||
|
|
a96dee5beb | ||
|
|
84332c60f0 | ||
|
|
61bc0e09e7 | ||
|
|
55da39823b | ||
|
|
fb15898ed6 | ||
|
|
9fd8df3872 | ||
|
|
2ad37e2126 | ||
|
|
148b62c02f | ||
|
|
098eee0062 | ||
|
|
b6d63059bf | ||
|
|
6cfdd99fd1 | ||
|
|
c8bea4f091 | ||
|
|
084ef821b7 | ||
|
|
8785f2848f | ||
|
|
f86e0d46b6 | ||
|
|
41493c9e1f | ||
|
|
67766b817c | ||
|
|
feb1f4fb9f | ||
|
|
d3dc51d102 | ||
|
|
e53a6615ad | ||
|
|
a904bb8cc5 | ||
|
|
d0715f85a0 | ||
|
|
df88feba0f | ||
|
|
b0a6c8929c | ||
|
|
9c8c419939 | ||
|
|
c83ca7bfdd | ||
|
|
f01952bd0d | ||
|
|
7cb0821886 | ||
|
|
bd11b7464e | ||
|
|
f6c3ae132a | ||
|
|
5fc9f3bfb1 | ||
|
|
3384c1ed1f | ||
|
|
b2e7507cd8 | ||
|
|
1cb5ba38f6 | ||
|
|
e9653dae03 | ||
|
|
5b34e3e1ab | ||
|
|
6b184ed448 | ||
|
|
9ec3085cd5 | ||
|
|
02e3d06bcb | ||
|
|
eefef1dceb | ||
|
|
465f7a6935 | ||
|
|
3da9c7b081 | ||
|
|
05835fd1bb | ||
|
|
92ebf1bd69 | ||
|
|
86d712ff4d | ||
|
|
068a6c0309 | ||
|
|
e5ff49d5aa | ||
|
|
aaefd2c2e7 | ||
|
|
e73f79a344 | ||
|
|
53efb9c0f6 | ||
|
|
9f6522a756 | ||
|
|
09b467ce7c | ||
|
|
105c026297 | ||
|
|
83c6d8b07e | ||
|
|
e19a7c73bc | ||
|
|
23e16bfb1a | ||
|
|
47e7b00000 | ||
|
|
9adbe28319 | ||
|
|
d1eb314047 | ||
|
|
371335e6ab | ||
|
|
8bc4b581d1 | ||
|
|
2311653ca8 | ||
|
|
040e3234fc | ||
|
|
62cf2adaec | ||
|
|
063499ef46 | ||
|
|
b7eaeb8c31 | ||
|
|
6bd495a491 | ||
|
|
f09aa9bec0 | ||
|
|
a7b3b4386f | ||
|
|
6a426d5d71 | ||
|
|
0ca061a457 | ||
|
|
f1ef1eeaff | ||
|
|
1175c981c0 | ||
|
|
1d3387466f | ||
|
|
fcccddc4ad | ||
|
|
be44fa11b1 | ||
|
|
de104a2707 | ||
|
|
9d019c1a99 | ||
|
|
11d954422b | ||
|
|
f4d348173c | ||
|
|
79eb5546a1 | ||
|
|
4f10ab8d04 | ||
|
|
ab0a06e536 | ||
|
|
59ef28dfa7 | ||
|
|
d87106900b | ||
|
|
241325d245 | ||
|
|
0118f3991a | ||
|
|
2a617ba7b2 | ||
|
|
bbf3091889 | ||
|
|
5199b4d3c7 | ||
|
|
99d35b175c | ||
|
|
98d0907f4d | ||
|
|
5f6d97151c | ||
|
|
8cefa82ff1 | ||
|
|
623b846713 | ||
|
|
e791a5aa2f | ||
|
|
82332c9cd0 | ||
|
|
d5506bb33c | ||
|
|
937f67c4ec | ||
|
|
3ed4a1e3e1 | ||
|
|
757de54a4f | ||
|
|
5cf0b6b3b1 | ||
|
|
809179ce0e | ||
|
|
d7315778d6 | ||
|
|
69a2029ade | ||
|
|
7a649e3fc3 | ||
|
|
f019151e3f | ||
|
|
88fd671880 | ||
|
|
d72c091ead | ||
|
|
3ec508169a | ||
|
|
1775770e54 | ||
|
|
f6fde55363 | ||
|
|
e548de3c88 | ||
|
|
f75aac8ebf | ||
|
|
bc311ac9f6 | ||
|
|
d4c6007047 | ||
|
|
c5f210384f | ||
|
|
d685682dd9 | ||
|
|
e31f9b6e5e | ||
|
|
a56851fefa | ||
|
|
0fc88c542f | ||
|
|
16307cb67d | ||
|
|
9f05bd11cc | ||
|
|
4b6ee2dc88 | ||
|
|
a0d829a91e | ||
|
|
dbabc24d7a | ||
|
|
e3ee3c411c | ||
|
|
d3e1bbf355 | ||
|
|
2fa2497ed8 | ||
|
|
a5727052bc | ||
|
|
083518c127 | ||
|
|
c36b233c49 | ||
|
|
bc7fc1285d | ||
|
|
9ddcc5d2ed | ||
|
|
a3ce728e26 | ||
|
|
cf0d9a2c86 | ||
|
|
ec7953ccf0 | ||
|
|
44a4bde626 | ||
|
|
5db0a57599 | ||
|
|
834f2f4160 | ||
|
|
4367f05b24 | ||
|
|
97aec5f125 | ||
|
|
5191fd6475 | ||
|
|
32017e53f5 | ||
|
|
37aab8a42b | ||
|
|
bfa0307231 | ||
|
|
8eb0d685ac | ||
|
|
43e543eabc | ||
|
|
eee6ef018c | ||
|
|
f7da9ac071 | ||
|
|
928198ff03 | ||
|
|
0cd82507d9 | ||
|
|
2d939d26ee | ||
|
|
d6c7ea921a | ||
|
|
19f43689ca | ||
|
|
e78e82ef42 | ||
|
|
fdfc600b3d | ||
|
|
334e14ea4d | ||
|
|
8115ee0c97 | ||
|
|
e21cc9d479 | ||
|
|
d5e4ceebcc | ||
|
|
51646f28ec | ||
|
|
2c5ba29648 | ||
|
|
41bed5c14d | ||
|
|
5ef9414a25 | ||
|
|
2ebed9cb6c | ||
|
|
7a1409c42a | ||
|
|
093e3e55b9 | ||
|
|
a911515dec | ||
|
|
7ecb36dbe7 | ||
|
|
d4ea18851d | ||
|
|
646d1caf66 | ||
|
|
74c138620a | ||
|
|
3981d2e1f6 | ||
|
|
6ccaa64ae8 | ||
|
|
5dd9610d36 | ||
|
|
d4ed7b2f73 | ||
|
|
9702dffa12 | ||
|
|
e2992cd3b9 | ||
|
|
4e5ac1ac07 | ||
|
|
e89b3bd1ec | ||
|
|
da9dd62a33 | ||
|
|
e6b4ee8084 | ||
|
|
0133a1b293 | ||
|
|
543283c0f6 | ||
|
|
6d778cdda4 | ||
|
|
3ffcecee6c | ||
|
|
24b2fd2657 | ||
|
|
b74c2da530 | ||
|
|
26415cf8e0 | ||
|
|
2f7b58abaf | ||
|
|
ef1d52ca04 | ||
|
|
f69c8dddad | ||
|
|
70b80e600d | ||
|
|
90d95d8e98 | ||
|
|
7d267e8027 | ||
|
|
0d884d159a | ||
|
|
3893810b76 | ||
|
|
fff4735a15 | ||
|
|
a914ee133c | ||
|
|
d0fb363422 | ||
|
|
992bbe76d7 | ||
|
|
6fc3c9c868 | ||
|
|
4fb844bddd | ||
|
|
dce2fe43a5 | ||
|
|
d54dad4225 | ||
|
|
91f4e17037 | ||
|
|
c597cd4a17 | ||
|
|
08d8e764d7 | ||
|
|
e626edeffa | ||
|
|
f9c3797397 | ||
|
|
8e45c5ecd7 | ||
|
|
76791220b9 | ||
|
|
a76e7c79e6 | ||
|
|
83eb94126b | ||
|
|
0a529dcaac | ||
|
|
128a481259 | ||
|
|
87ef15d371 | ||
|
|
9679861b56 | ||
|
|
3a2120391e | ||
|
|
3d197d732c | ||
|
|
5d6fc6d63e | ||
|
|
40505a23dc | ||
|
|
31e833ec59 | ||
|
|
2e65f577d8 | ||
|
|
89cd3fd73a | ||
|
|
9ef55e03be | ||
|
|
930de64bcd | ||
|
|
5c0a76ae46 | ||
|
|
df26f9ac51 | ||
|
|
14e36f0a2b | ||
|
|
96f4998d11 | ||
|
|
4a98bdd9d6 | ||
|
|
796e8c836a | ||
|
|
7081868143 | ||
|
|
ce7aae9ca0 | ||
|
|
1e455ac4c3 | ||
|
|
4669e4713c | ||
|
|
26330120ce | ||
|
|
c3ebe80f53 | ||
|
|
5eb2e6401f | ||
|
|
ee9c72b8c7 | ||
|
|
dc436a3cc9 | ||
|
|
99357e427b | ||
|
|
8bbcdaa951 | ||
|
|
92edfd3217 | ||
|
|
aa936ade7e | ||
|
|
bf695a5f36 | ||
|
|
91bc051e6d | ||
|
|
bc7d1a4ef0 | ||
|
|
debae67ae7 | ||
|
|
28e851c3fd | ||
|
|
c61bfae785 | ||
|
|
e3d9b94367 | ||
|
|
b182819aff | ||
|
|
a1b37d3407 | ||
|
|
b3777ef6f0 | ||
|
|
d54fecca4e | ||
|
|
0f14ed0a6c | ||
|
|
b3012b7ee5 | ||
|
|
2f7e200bef | ||
|
|
16d2c565e8 | ||
|
|
a74f038cba | ||
|
|
bd9bf585d3 | ||
|
|
56dd3eab23 | ||
|
|
cb42440963 | ||
|
|
da61090dc5 | ||
|
|
098f38fb83 | ||
|
|
c442fd3886 | ||
|
|
00bf7879af | ||
|
|
2ba68c9b6e | ||
|
|
2e48b88113 | ||
|
|
a2f06cb077 | ||
|
|
b9443d87aa | ||
|
|
e351f35cf2 | ||
|
|
be9d637c7c | ||
|
|
42986c852a | ||
|
|
de712ce41a | ||
|
|
f6f9b9cd03 | ||
|
|
1a671f2877 | ||
|
|
6f763c6418 | ||
|
|
3eb20d3bd1 | ||
|
|
1c06c2af9f | ||
|
|
eb27e744f7 | ||
|
|
c8269d67c3 | ||
|
|
21f3cc6f7a | ||
|
|
e3ed637942 | ||
|
|
ccb4596299 | ||
|
|
2741de90e5 | ||
|
|
adc51519fd | ||
|
|
72e22b6744 | ||
|
|
030d09740c | ||
|
|
d381f091e9 | ||
|
|
e7fa0ae38b | ||
|
|
5cf1a87657 | ||
|
|
25841c072a | ||
|
|
f40bd0745c | ||
|
|
fe3afaab3d | ||
|
|
8a7a3ec668 | ||
|
|
f96d8bf645 | ||
|
|
b1b3d9df6e | ||
|
|
29124c3416 | ||
|
|
71951a4e6a | ||
|
|
8dbfd0f19b | ||
|
|
5c6355489f | ||
|
|
8edac1f86c | ||
|
|
5fe3ec09de | ||
|
|
079843d777 | ||
|
|
bd7171a7a2 | ||
|
|
eaa15076cd | ||
|
|
2fd74d8f47 | ||
|
|
0e91d39b27 | ||
|
|
52d7a6b8e4 | ||
|
|
472e880280 | ||
|
|
189889489b | ||
|
|
0d758347af | ||
|
|
3266d57cfb | ||
|
|
f2c9c5553c | ||
|
|
bcdc42816b | ||
|
|
b04e313665 | ||
|
|
700e799125 | ||
|
|
a9f8080ee7 | ||
|
|
9f450cb1c5 | ||
|
|
388f19da79 | ||
|
|
4f11598112 | ||
|
|
bcb54b643f | ||
|
|
04d3f44179 | ||
|
|
5110a6de82 | ||
|
|
04c5ac0d7c | ||
|
|
6d2cd73599 | ||
|
|
057b04a88a | ||
|
|
28af18389b | ||
|
|
2af4c619e1 | ||
|
|
99d529be51 | ||
|
|
39df7108a8 | ||
|
|
72807f0fa0 | ||
|
|
2fe11d4fe8 | ||
|
|
596befff74 | ||
|
|
b2524ceaff | ||
|
|
5f323e8bd1 | ||
|
|
d40b66beac | ||
|
|
afa12d6e87 | ||
|
|
676a6f3bea | ||
|
|
bf0b598908 | ||
|
|
8a79663fa0 | ||
|
|
564262e75b | ||
|
|
a405d81c46 | ||
|
|
aac3143745 | ||
|
|
bb396508a4 | ||
|
|
810740b156 | ||
|
|
19ffddb02e | ||
|
|
5826c52242 | ||
|
|
a6904105f7 | ||
|
|
da8ab82126 | ||
|
|
978bb7aa8b | ||
|
|
32fea4cbd7 | ||
|
|
6e136b9796 | ||
|
|
986d44873a | ||
|
|
2e1746ca0f | ||
|
|
863b60277b | ||
|
|
035f25190b | ||
|
|
3ea03dadb5 | ||
|
|
753ae00ddb | ||
|
|
2759c8d037 | ||
|
|
301f196bca | ||
|
|
32f3682fae | ||
|
|
fc9fc1ee6f | ||
|
|
659286f738 | ||
|
|
17a1262382 | ||
|
|
66b96d2052 | ||
|
|
06892c412c | ||
|
|
5c4d1a88a8 | ||
|
|
eb9e976fab | ||
|
|
451b085c13 | ||
|
|
27dced6a35 | ||
|
|
3c4f3316c0 | ||
|
|
2f607d5a8c | ||
|
|
42f3154079 | ||
|
|
e7e09cb7ed | ||
|
|
c6092ea520 | ||
|
|
29ff778e22 | ||
|
|
d80814a12e | ||
|
|
cfeb0b47e9 | ||
|
|
6f14d017d8 | ||
|
|
cf4e508fb3 | ||
|
|
96fc1f5272 | ||
|
|
5b65fd5754 | ||
|
|
29587d4c4e | ||
|
|
a98bf80c24 | ||
|
|
49869ca044 | ||
|
|
54d4fb7d46 | ||
|
|
5699abc8ad | ||
|
|
6b56583023 | ||
|
|
abe95ae1a4 | ||
|
|
4e8e85c9f1 | ||
|
|
26bb4ffe79 | ||
|
|
c857e5707e | ||
|
|
aaf1570938 | ||
|
|
a8feb40ae9 | ||
|
|
be410a3913 | ||
|
|
069b0d38be | ||
|
|
7cae8dc50f | ||
|
|
70b0a73572 | ||
|
|
72d7142751 | ||
|
|
8367b9b159 | ||
|
|
ad1cbf60b4 | ||
|
|
1c4bf8ac18 | ||
|
|
13199f13c2 | ||
|
|
7f2bbcd95e | ||
|
|
68cb62ab23 | ||
|
|
5a3ff137f9 | ||
|
|
0206e65152 | ||
|
|
b16004dcdf | ||
|
|
844189671f | ||
|
|
e582615eda | ||
|
|
7f51517961 | ||
|
|
2e832774a2 | ||
|
|
7475e3c105 | ||
|
|
80e4bc6289 | ||
|
|
19ee911022 | ||
|
|
cb4d5d580a | ||
|
|
7b3d59569e | ||
|
|
3bc0aaabe4 | ||
|
|
2418fee444 | ||
|
|
b56c5df6e1 | ||
|
|
bc76c79e1e | ||
|
|
d179bda728 | ||
|
|
e60ef655cb | ||
|
|
c15204fed1 | ||
|
|
1f2dc82035 | ||
|
|
218d841511 | ||
|
|
f40c6f21d4 | ||
|
|
6dc4471bec | ||
|
|
4c1b7d4840 | ||
|
|
8ec73e653b | ||
|
|
babc1b3613 | ||
|
|
c27d479a9f | ||
|
|
14224088aa | ||
|
|
b95baadb9a | ||
|
|
c940d22a98 | ||
|
|
28b7bd347a | ||
|
|
a42bb80cf4 | ||
|
|
2a9b2d3b29 | ||
|
|
9c94a324e5 | ||
|
|
f07f3ae94b | ||
|
|
b6c2cd6caa | ||
|
|
a66ad8a9d9 | ||
|
|
8e3281a658 | ||
|
|
6e27856daa | ||
|
|
ce2d603def | ||
|
|
fa00e21f49 | ||
|
|
c4878671e3 | ||
|
|
1a8b128640 | ||
|
|
a83dcbadb9 | ||
|
|
57ef3b499f | ||
|
|
6c956591f8 | ||
|
|
640cc82103 | ||
|
|
a5e3f271ea |
11
.devcontainer/Dockerfile
Normal file
11
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ubuntu/.devcontainer/base.Dockerfile
|
||||||
|
|
||||||
|
# [Choice] Ubuntu version: bionic, focal
|
||||||
|
ARG VARIANT="focal"
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
|
||||||
|
|
||||||
|
# [Optional] Uncomment this section to install additional OS packages.
|
||||||
|
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get -y install python3-distutils python3-pip
|
||||||
|
RUN pip3 install platformio meshtastic adafruit-nrfutil
|
||||||
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip -O /tmp/protoc.zip && cd /tmp && unzip protoc.zip && chmod a+x bin/protoc && cp bin/protoc /usr/local/bin
|
||||||
32
.devcontainer/devcontainer.json
Normal file
32
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||||
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/ubuntu
|
||||||
|
{
|
||||||
|
"name": "Ubuntu",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
|
||||||
|
"args": { "VARIANT": "focal" }
|
||||||
|
},
|
||||||
|
|
||||||
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": "/bin/bash"
|
||||||
|
},
|
||||||
|
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"extensions": [
|
||||||
|
"platformio.platformio-ide",
|
||||||
|
"xaver.clang-format"
|
||||||
|
],
|
||||||
|
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
|
|
||||||
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
// "postCreateCommand": "uname -a",
|
||||||
|
|
||||||
|
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||||
|
"remoteUser": "vscode",
|
||||||
|
|
||||||
|
"postCreateCommand": "git submodule update --init"
|
||||||
|
}
|
||||||
76
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
Normal file
76
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: File a bug report
|
||||||
|
title: "[Bug]: "
|
||||||
|
labels: ["bug", "triage"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: category
|
||||||
|
attributes:
|
||||||
|
label: Category
|
||||||
|
description: How would you catagorize this issue?
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Hardware Compatibility
|
||||||
|
- BLE
|
||||||
|
- Serial
|
||||||
|
- WiFi
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: hardware
|
||||||
|
attributes:
|
||||||
|
label: Hardware
|
||||||
|
description: What hardware are you encountering this issue on?
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Not Applicable
|
||||||
|
- T-Beam
|
||||||
|
- T-Beam 0.7
|
||||||
|
- T-Lora v1
|
||||||
|
- T-Lora v1.3
|
||||||
|
- T-Lora v2 1.6
|
||||||
|
- T-Echo
|
||||||
|
- Rak4631
|
||||||
|
- Rak11200
|
||||||
|
- Heltec v1
|
||||||
|
- Heltec v2
|
||||||
|
- Heltec v2.1
|
||||||
|
- Relay v1
|
||||||
|
- Relay v2
|
||||||
|
- DIY
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Firmware Version
|
||||||
|
description: This can be found on the device's screen or via one of the apps.
|
||||||
|
placeholder: x.x.x.yyyyyyy
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: body
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Please provide details on what steps you performed for this to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: Relevant log output
|
||||||
|
description: If you have any log output to help in diagnosing your bug, please provide it here.
|
||||||
|
render: Shell
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report or feature proposal
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Please - if you just have a question (i.e. not a bug report or a feature proposal), post in our [forum](https://meshtastic.discourse.group/) instead.
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Device info:**
|
|
||||||
- Device model: [e.g. TBEAM]
|
|
||||||
- Software Version [e.g. 0.7.8]
|
|
||||||
|
|
||||||
**Smartphone information (if relevant):**
|
|
||||||
- Device: [e.g. iPhone6]
|
|
||||||
- OS: [e.g. iOS8.1]
|
|
||||||
- App Version [e.g. 0.7.2]
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
38
.github/actions/initbuild/action.yml
vendored
38
.github/actions/initbuild/action.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
name: 'Common init'
|
|
||||||
|
|
||||||
# WARNING due to https://github.com/actions/runner/issues/646
|
|
||||||
# this code can't work - must copy and paste into workflows for now because 'uses' is not supported
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Cache python libs
|
|
||||||
uses: actions/cache@v1
|
|
||||||
id: cache-pip # needed in if test
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip
|
|
||||||
|
|
||||||
- name: Upgrade python tools
|
|
||||||
# We actually want to run this every time
|
|
||||||
# if: steps.cache-pip.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio meshtastic adafruit-nrfutil
|
|
||||||
|
|
||||||
- name: Cache platformio
|
|
||||||
uses: actions/cache@v1
|
|
||||||
id: cache-platformio # needed in if test
|
|
||||||
with:
|
|
||||||
path: ~/.platformio
|
|
||||||
key: ${{ runner.os }}-platformio
|
|
||||||
|
|
||||||
- name: Upgrade platformio
|
|
||||||
run: |
|
|
||||||
pio upgrade
|
|
||||||
|
|
||||||
|
|
||||||
129
.github/workflows/main.yml
vendored
129
.github/workflows/main.yml
vendored
@@ -1,21 +1,11 @@
|
|||||||
name: Continuous Integration
|
name: Continuous Integration (Legacy serial build)
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push or pull request events but only for the master branch
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
push:
|
workflow_dispatch:
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# setup:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
|
|
||||||
# - name: Startup
|
jobs:
|
||||||
# run: echo "No action setup currently needed, skipping..."
|
|
||||||
|
|
||||||
build:
|
ci-check:
|
||||||
# needs: setup
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -23,6 +13,49 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install cppcheck
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y cppcheck
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools and install platformio
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Check everything
|
||||||
|
run: bin/check-all.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ci-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
@@ -43,17 +76,30 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -U platformio meshtastic adafruit-nrfutil
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
- name: Cache platformio
|
# - name: Cache platformio
|
||||||
uses: actions/cache@v1
|
# uses: actions/cache@v1
|
||||||
id: cache-platformio # needed in if test
|
# id: cache-platformio # needed in if test
|
||||||
with:
|
# with:
|
||||||
path: ~/.platformio
|
# path: ~/.platformio
|
||||||
key: ${{ runner.os }}-platformio
|
# key: ${{ runner.os }}-platformio
|
||||||
|
|
||||||
- name: Upgrade platformio
|
- name: Upgrade platformio
|
||||||
run: |
|
run: |
|
||||||
pio upgrade
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Pull web ui
|
||||||
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
|
with:
|
||||||
|
repo: "meshtastic/meshtastic-web"
|
||||||
|
file: "build.tar"
|
||||||
|
target: "build.tar"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Unpack web ui
|
||||||
|
run: |
|
||||||
|
tar -xf build.tar -C data/static
|
||||||
|
rm build.tar
|
||||||
|
|
||||||
# We now run integration test before other build steps (to quickly see runtime failures)
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
- name: Build for native
|
- name: Build for native
|
||||||
run: platformio run -e native
|
run: platformio run -e native
|
||||||
@@ -64,19 +110,42 @@ jobs:
|
|||||||
echo "Simulator started, launching python test..."
|
echo "Simulator started, launching python test..."
|
||||||
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
# - name: Build for tbeam
|
- name: Cat bin/build-all.sh
|
||||||
# run: platformio run -e tbeam
|
run: |
|
||||||
# - name: Build for heltec
|
cat bin/build-all.sh
|
||||||
# run: platformio run -e heltec
|
|
||||||
# - name: Build for wisblock RAK4631
|
|
||||||
# run: platformio run -e rak4631
|
|
||||||
|
|
||||||
- name: Build everything
|
- name: Build everything
|
||||||
run: bin/build-all.sh
|
run: bin/build-all.sh
|
||||||
|
|
||||||
- name: Store release zip as an artifact
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: built
|
name: firmware-${{ steps.version.outputs.version }}.zip
|
||||||
path: release/archive/firmware-*.zip
|
path: release/archive/firmware-${{ steps.version.outputs.version }}.zip
|
||||||
retention-days: 30
|
retention-days: 90
|
||||||
|
|
||||||
|
- name: Store debugging elf files as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: debug-elfs
|
||||||
|
path: release/archive/elfs-*.zip
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
|
- name: Download firmware.zip
|
||||||
|
uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: ./
|
||||||
|
|
||||||
|
- name: Pull request artifacts
|
||||||
|
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
||||||
|
uses: gavv/pull-request-artifacts@v1.0.0
|
||||||
|
with:
|
||||||
|
commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
artifacts-branch: artifacts
|
||||||
|
artifacts: ./firmware-${{ steps.version.outputs.version }}.zip
|
||||||
|
|||||||
345
.github/workflows/main_matrix.yml
vendored
Normal file
345
.github/workflows/main_matrix.yml
vendored
Normal file
@@ -0,0 +1,345 @@
|
|||||||
|
name: Continuous Integration
|
||||||
|
on:
|
||||||
|
# # Triggers the workflow on push but only for the master branch
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '**.yml'
|
||||||
|
- 'version.properties'
|
||||||
|
|
||||||
|
# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
|
||||||
|
pull_request_target:
|
||||||
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '**.yml'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
check:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- board: rak11200
|
||||||
|
- board: tlora-v2
|
||||||
|
- board: tlora-v1
|
||||||
|
- board: tlora_v1_3
|
||||||
|
- board: tlora-v2-1-1.6
|
||||||
|
- board: tbeam
|
||||||
|
- board: heltec-v1
|
||||||
|
- board: heltec-v2.0
|
||||||
|
- board: heltec-v2.1
|
||||||
|
- board: tbeam0.7
|
||||||
|
- board: meshtastic-diy-v1
|
||||||
|
- board: rak4631_5005
|
||||||
|
- board: rak4631_19003
|
||||||
|
- board: rak4631_5005_eink
|
||||||
|
- board: t-echo
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install cppcheck
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y cppcheck
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools and install platformio
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Check ${{ matrix.board }}
|
||||||
|
run: bin/check-all.sh ${{ matrix.board }}
|
||||||
|
|
||||||
|
build-esp32:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- board: rak11200
|
||||||
|
- board: tlora-v2
|
||||||
|
- board: tlora-v1
|
||||||
|
- board: tlora_v1_3
|
||||||
|
- board: tlora-v2-1-1.6
|
||||||
|
- board: tbeam
|
||||||
|
- board: heltec-v1
|
||||||
|
- board: heltec-v2.0
|
||||||
|
- board: heltec-v2.1
|
||||||
|
- board: tbeam0.7
|
||||||
|
- board: meshtastic-diy-v1
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil littlefs-python
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Pull web ui
|
||||||
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
|
with:
|
||||||
|
repo: "meshtastic/meshtastic-web"
|
||||||
|
file: "build.tar"
|
||||||
|
target: "build.tar"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Unpack web ui
|
||||||
|
run: |
|
||||||
|
tar -xf build.tar -C data/static
|
||||||
|
rm build.tar
|
||||||
|
|
||||||
|
- name: Build ESP32
|
||||||
|
run: bin/build-esp32.sh ${{ matrix.board }}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ matrix.board }}-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: |
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
|
build-nrf52:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 2
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- board: rak4631_5005
|
||||||
|
- board: rak4631_19003
|
||||||
|
- board: rak4631_5005_eink
|
||||||
|
- board: t-echo
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
- name: Build NRF52
|
||||||
|
run: bin/build-nrf52.sh ${{ matrix.board }}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ matrix.board }}-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: |
|
||||||
|
release/*.uf2
|
||||||
|
release/*.elf
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
|
build-native:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Cache python libs
|
||||||
|
uses: actions/cache@v1
|
||||||
|
id: cache-pip # needed in if test
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
|
- name: Upgrade python tools
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -U platformio meshtastic adafruit-nrfutil
|
||||||
|
|
||||||
|
- name: Upgrade platformio
|
||||||
|
run: |
|
||||||
|
pio upgrade
|
||||||
|
|
||||||
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
|
- name: Build for native
|
||||||
|
run: platformio run -e native
|
||||||
|
- name: Integration test
|
||||||
|
run: |
|
||||||
|
.pio/build/native/program &
|
||||||
|
sleep 20 # 5 seconds was not enough
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
|
- name: Build Native
|
||||||
|
run: bin/build-native.sh
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: |
|
||||||
|
release/meshtasticd_linux_amd64
|
||||||
|
release/device-*.sh
|
||||||
|
release/device-*.bat
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
|
after-checks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [check]
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
gather-artifacts:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-esp32, build-nrf52, build-native]
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ./
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Move files up
|
||||||
|
run: mv -b -t ./ ./*tbeam-*/littlefs*.bin ./*tbeam-*/system-info.bin ./**/firmware*.bin ./**/*.uf2 ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
|
||||||
|
|
||||||
|
- name: Repackage in single firmware zip
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ steps.version.outputs.version }}
|
||||||
|
path: |
|
||||||
|
./*.bin
|
||||||
|
./*.uf2
|
||||||
|
./meshtasticd_linux_amd64
|
||||||
|
./device-*.sh
|
||||||
|
./device-*.bat
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: firmware-${{ steps.version.outputs.version }}
|
||||||
|
path: ./output
|
||||||
|
|
||||||
|
# For diagnostics
|
||||||
|
- name: Show artifacts
|
||||||
|
run: ls -lR
|
||||||
|
|
||||||
|
- name: Zip firmware
|
||||||
|
run: zip -j -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
||||||
|
|
||||||
|
- name: Repackage in single elfs zip
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||||
|
path: ./*.elf
|
||||||
|
retention-days: 90
|
||||||
|
|
||||||
|
- name: Create request artifacts
|
||||||
|
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
|
||||||
|
uses: gavv/pull-request-artifacts@v1.0.0
|
||||||
|
with:
|
||||||
|
commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
artifacts-branch: artifacts
|
||||||
|
artifacts: ./firmware-${{ steps.version.outputs.version }}.zip
|
||||||
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
@@ -1,18 +1,18 @@
|
|||||||
name: Make Release
|
name: Make Release
|
||||||
on:
|
on:
|
||||||
# Can optionally take parameters from the github UI, more info here https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/#:~:text=You%20can%20now%20create%20workflows,the%20workflow%20is%20run%20on.
|
# Can optionally take parameters from the github UI, more info here https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/#:~:text=You%20can%20now%20create%20workflows,the%20workflow%20is%20run%20on.
|
||||||
# workflow_dispatch:
|
workflow_dispatch:
|
||||||
# inputs:
|
# inputs:
|
||||||
|
|
||||||
# Only want to be run if a new tag starting with v is pushed.
|
# Only want to run if version.properties is bumped in master
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "!*"
|
- master
|
||||||
tags:
|
paths:
|
||||||
- "v*"
|
- 'version.properties'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -21,19 +21,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
# get github branch and tag names as ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
|
||||||
- name: Branch name
|
|
||||||
id: branch_name
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
|
|
||||||
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
|
|
||||||
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
|
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
|
# Will be available in steps.version.outputs.version
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
|
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
|
||||||
|
|
||||||
- name: Upgrade python tools
|
- name: Upgrade python tools
|
||||||
@@ -41,16 +37,24 @@ jobs:
|
|||||||
# if: steps.cache-pip.outputs.cache-hit != 'true'
|
# if: steps.cache-pip.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -U platformio meshtastic adafruit-nrfutil
|
pip install -U platformio meshtastic adafruit-nrfutil littlefs-python
|
||||||
|
|
||||||
- name: Upgrade platformio
|
- name: Upgrade platformio
|
||||||
run: |
|
run: |
|
||||||
pio upgrade
|
pio upgrade
|
||||||
|
|
||||||
# Will be available in steps.version.outputs.version
|
- name: Pull web ui
|
||||||
- name: Get version string
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
run: echo "::set-output name=version::$(./bin/buildinfo.py)"
|
with:
|
||||||
id: version
|
repo: "meshtastic/meshtastic-web"
|
||||||
|
file: "build.tar"
|
||||||
|
target: "build.tar"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Unpack web ui
|
||||||
|
run: |
|
||||||
|
tar -xf build.tar -C data/static
|
||||||
|
rm build.tar
|
||||||
|
|
||||||
- name: Build everything
|
- name: Build everything
|
||||||
run: bin/build-all.sh
|
run: bin/build-all.sh
|
||||||
@@ -62,14 +66,13 @@ jobs:
|
|||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
release_name: ${{ steps.version.outputs.version }} alpha
|
release_name: ${{ steps.version.outputs.version }} alpha
|
||||||
tag_name: ${{ steps.branch_name.outputs.SOURCE_TAG }}
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
# was ${{ github.ref }}
|
|
||||||
body: |
|
body: |
|
||||||
Autogenerated by github action, developer should edit as required before publishing...
|
Autogenerated by github action, developer should edit as required before publishing...
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
- name: Add artifact to release
|
- name: Add bins to release
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
@@ -77,4 +80,14 @@ jobs:
|
|||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: release/archive/firmware-${{ steps.version.outputs.version }}.zip
|
asset_path: release/archive/firmware-${{ steps.version.outputs.version }}.zip
|
||||||
asset_name: firmware-${{ steps.version.outputs.version }}.zip
|
asset_name: firmware-${{ steps.version.outputs.version }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Add debug elfs to release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release/archive/elfs-${{ steps.version.outputs.version }}.zip
|
||||||
|
asset_name: debug-elfs-${{ steps.version.outputs.version }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|||||||
33
.github/workflows/update_protobufs.yml
vendored
Normal file
33
.github/workflows/update_protobufs.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: "Update protobufs and regenerate classes"
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-protobufs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Update submodule
|
||||||
|
run: |
|
||||||
|
git submodule update --remote proto
|
||||||
|
|
||||||
|
- name: Download nanopb
|
||||||
|
run: |
|
||||||
|
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.4-linux-x86.tar.gz
|
||||||
|
tar xvzf nanopb-0.4.4-linux-x86.tar.gz
|
||||||
|
mv nanopb-0.4.4-linux-x86 nanopb-0.4.4
|
||||||
|
|
||||||
|
- name: Re-generate protocol buffers
|
||||||
|
run: |
|
||||||
|
./bin/regen-protos.sh
|
||||||
|
|
||||||
|
- name: Create pull request
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
add-paths: |
|
||||||
|
proto
|
||||||
|
src/mesh
|
||||||
11
.gitignore
vendored
11
.gitignore
vendored
@@ -9,6 +9,8 @@ main/credentials.h
|
|||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
|
||||||
|
.idea
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.autotools
|
.autotools
|
||||||
@@ -19,4 +21,11 @@ Thumbs.db
|
|||||||
nanopb*
|
nanopb*
|
||||||
flash.uf2
|
flash.uf2
|
||||||
cmake-build*
|
cmake-build*
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
venv/
|
||||||
|
release/
|
||||||
|
|||||||
50
.gitlab-ci.yml
Normal file
50
.gitlab-ci.yml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
image: python:latest
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# make sure GitLab check out submodules
|
||||||
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- buildall
|
||||||
|
- upload
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: buildall
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
# we need zip later for packaging
|
||||||
|
- "apt update;apt -y install zip"
|
||||||
|
- "pip install -U platformio"
|
||||||
|
|
||||||
|
script:
|
||||||
|
# clean up residues from previous run
|
||||||
|
- rm -rf release
|
||||||
|
- bin/build-all.sh
|
||||||
|
|
||||||
|
# This is for my local environment, if your runners are tagged differently, modify or remove
|
||||||
|
tags:
|
||||||
|
- dockerized
|
||||||
|
|
||||||
|
# The files which are to be made available in GitLab
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- release/archive/firmware*.zip
|
||||||
|
|
||||||
|
|
||||||
|
upload:
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
|
||||||
|
stage: upload
|
||||||
|
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/master"
|
||||||
|
cd release/archive
|
||||||
|
for f in *.zip; do
|
||||||
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${f} ${PACKAGE_REGISTRY_URL}/${f}
|
||||||
|
done
|
||||||
|
echo 'Package uploaded!'
|
||||||
|
|
||||||
|
# This is for my local environment, if your runners are tagged differently, modify or remove
|
||||||
|
tags:
|
||||||
|
- dockerized
|
||||||
7
.idea/codeStyles/Project.xml
generated
7
.idea/codeStyles/Project.xml
generated
@@ -1,7 +0,0 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
|
||||||
<code_scheme name="Project" version="173">
|
|
||||||
<clangFormatSettings>
|
|
||||||
<option name="ENABLED" value="true" />
|
|
||||||
</clangFormatSettings>
|
|
||||||
</code_scheme>
|
|
||||||
</component>
|
|
||||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
5
.idea/codeStyles/codeStyleConfig.xml
generated
@@ -1,5 +0,0 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
|
||||||
<state>
|
|
||||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
|
||||||
</state>
|
|
||||||
</component>
|
|
||||||
2
.idea/meshtastic-esp32.iml
generated
2
.idea/meshtastic-esp32.iml
generated
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
|
||||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
|
||||||
</project>
|
|
||||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/meshtastic-esp32.iml" filepath="$PROJECT_DIR$/.idea/meshtastic-esp32.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
9
.idea/vcs.xml
generated
9
.idea/vcs.xml
generated
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/design" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/proto" vcs="Git" />
|
|
||||||
<mapping directory="$PROJECT_DIR$/sdk-nrfxlib" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
162
.idea/workspace.xml
generated
162
.idea/workspace.xml
generated
@@ -1,162 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
|
|
||||||
<generated>
|
|
||||||
<config projectName="meshtastic-esp32" targetName="Debug" />
|
|
||||||
<config projectName="meshtastic-esp32" targetName="Production" />
|
|
||||||
<config projectName="meshtastic-esp32" targetName="Z_DUMMY_TARGET" />
|
|
||||||
</generated>
|
|
||||||
</component>
|
|
||||||
<component name="CMakeSettings">
|
|
||||||
<configurations>
|
|
||||||
<configuration PROFILE_NAME="native" CONFIG_NAME="native" ENABLED="true" />
|
|
||||||
</configurations>
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="58922733-b05b-4b90-9655-b9b18914977a" name="Default Changelist" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectId" id="1pmWHw2wau2TbdKvXvmQUB0EUE9" />
|
|
||||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent">
|
|
||||||
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
|
|
||||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
|
||||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
||||||
<property name="cf.advertisement.text.overridden" value="true" />
|
|
||||||
<property name="cf.first.check.clang-format" value="false" />
|
|
||||||
<property name="node.js.detected.package.eslint" value="true" />
|
|
||||||
<property name="node.js.detected.package.tslint" value="true" />
|
|
||||||
<property name="node.js.path.for.package.eslint" value="project" />
|
|
||||||
<property name="node.js.path.for.package.tslint" value="project" />
|
|
||||||
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
|
||||||
<property name="node.js.selected.package.tslint" value="(autodetect)" />
|
|
||||||
<property name="settings.editor.selected.configurable" value="CMakeSettings" />
|
|
||||||
</component>
|
|
||||||
<component name="RunManager" selected="GDB Remote Debug.gdbremote-localhost-2345">
|
|
||||||
<configuration default="true" type="CLion_Remote" version="1" remoteCommand="tcp:localhost:2345" symbolFile="" sysroot="">
|
|
||||||
<debugger kind="GDB" isBundled="true" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
<configuration name="gdbremote-localhost-2345" type="CLion_Remote" version="1" remoteCommand="tcp:localhost:2345" symbolFile="" sysroot="">
|
|
||||||
<debugger kind="GDB" isBundled="true" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
<configuration name="Z_DUMMY_TARGET" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="meshtastic-esp32" TARGET_NAME="Z_DUMMY_TARGET" CONFIG_NAME="native" RUN_TARGET_PROJECT_NAME="meshtastic-esp32" RUN_TARGET_NAME="Z_DUMMY_TARGET">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<configuration default="true" type="GradleAppRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" PASS_PARENT_ENVS_2="true">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.cpp.gradle.execution.GradleNativeBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<configuration name="PlatformIO Debug" type="platformio" factoryName="PlatformIO Debug" REDIRECT_INPUT="false" ELEVATE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="meshtastic-esp32" TARGET_NAME="Debug" CONFIG_NAME="native" RUN_TARGET_PROJECT_NAME="meshtastic-esp32" RUN_TARGET_NAME="Debug">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<configuration name="PlatformIO Upload" type="platformio" factoryName="PlatformIO Upload" REDIRECT_INPUT="false" ELEVATE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="meshtastic-esp32" TARGET_NAME="Production" CONFIG_NAME="native" RUN_TARGET_PROJECT_NAME="meshtastic-esp32" RUN_TARGET_NAME="Production">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<list>
|
|
||||||
<item itemvalue="CMake Application.Z_DUMMY_TARGET" />
|
|
||||||
<item itemvalue="GDB Remote Debug.gdbremote-localhost-2345" />
|
|
||||||
<item itemvalue="PlatformIO.PlatformIO Debug" />
|
|
||||||
<item itemvalue="PlatformIO.PlatformIO Upload" />
|
|
||||||
</list>
|
|
||||||
</component>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="58922733-b05b-4b90-9655-b9b18914977a" name="Default Changelist" comment="" />
|
|
||||||
<created>1615788661896</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1615788661896</updated>
|
|
||||||
<workItem from="1615788663210" duration="6661000" />
|
|
||||||
<workItem from="1615938346019" duration="1208000" />
|
|
||||||
<workItem from="1615971126983" duration="5945000" />
|
|
||||||
<workItem from="1617115374907" duration="357000" />
|
|
||||||
<workItem from="1617115747078" duration="1391000" />
|
|
||||||
<workItem from="1617117632667" duration="307000" />
|
|
||||||
<workItem from="1617160691713" duration="1016000" />
|
|
||||||
<workItem from="1617279002260" duration="1626000" />
|
|
||||||
<workItem from="1617425689081" duration="1896000" />
|
|
||||||
<workItem from="1617437366919" duration="1182000" />
|
|
||||||
<workItem from="1618544034975" duration="1185000" />
|
|
||||||
</task>
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="3" />
|
|
||||||
</component>
|
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
|
||||||
<option name="TAB_STATES">
|
|
||||||
<map>
|
|
||||||
<entry key="MAIN">
|
|
||||||
<value>
|
|
||||||
<State />
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
<option name="oldMeFiltersMigrated" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="XDebuggerManager">
|
|
||||||
<breakpoint-manager>
|
|
||||||
<breakpoints>
|
|
||||||
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
|
|
||||||
<url>file://$PROJECT_DIR$/src/mesh/wifi/WiFiServerAPI.cpp</url>
|
|
||||||
<line>53</line>
|
|
||||||
<option name="timeStamp" value="6" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
|
|
||||||
<url>file://$PROJECT_DIR$/src/mesh/wifi/WiFiServerAPI.cpp</url>
|
|
||||||
<line>37</line>
|
|
||||||
<option name="timeStamp" value="7" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
|
|
||||||
<url>file://$PROJECT_DIR$/src/mqtt/MQTT.cpp</url>
|
|
||||||
<line>166</line>
|
|
||||||
<option name="timeStamp" value="10" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
|
|
||||||
<url>file://$PROJECT_DIR$/.pio/libdeps/native/PubSubClient/src/PubSubClient.cpp</url>
|
|
||||||
<line>468</line>
|
|
||||||
<option name="timeStamp" value="11" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
|
|
||||||
<url>file://$PROJECT_DIR$/src/mesh/mesh-pb-constants.cpp</url>
|
|
||||||
<line>20</line>
|
|
||||||
<option name="timeStamp" value="12" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
|
||||||
</breakpoint-manager>
|
|
||||||
<watches-manager>
|
|
||||||
<configuration name="CLion_Remote">
|
|
||||||
<watch expression="radioConfig" language="ObjectiveC" />
|
|
||||||
<watch expression="fromRadioScratch" language="ObjectiveC" />
|
|
||||||
</configuration>
|
|
||||||
</watches-manager>
|
|
||||||
</component>
|
|
||||||
<component name="XSLT-Support.FileAssociations.UIState">
|
|
||||||
<expand />
|
|
||||||
<select />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
19
.vscode/extensions.json
vendored
19
.vscode/extensions.json
vendored
@@ -1,8 +1,11 @@
|
|||||||
{
|
{
|
||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
// for the documentation about the extensions.json format
|
// for the documentation about the extensions.json format
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"platformio.platformio-ide",
|
"platformio.platformio-ide",
|
||||||
"xaver.clang-format"
|
"xaver.clang-format"
|
||||||
]
|
],
|
||||||
}
|
"unwantedRecommendations": [
|
||||||
|
"ms-vscode.cpptools-extension-pack"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -50,7 +50,8 @@
|
|||||||
"cassert": "cpp",
|
"cassert": "cpp",
|
||||||
"iterator": "cpp",
|
"iterator": "cpp",
|
||||||
"shared_mutex": "cpp",
|
"shared_mutex": "cpp",
|
||||||
"iostream": "cpp"
|
"iostream": "cpp",
|
||||||
|
"esp_nimble_hci.h": "c"
|
||||||
},
|
},
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Blox",
|
"Blox",
|
||||||
@@ -77,6 +78,5 @@
|
|||||||
"--java_out=/tmp",
|
"--java_out=/tmp",
|
||||||
"-I=/home/kevinh/development/meshtastic/meshtastic-esp32/proto"
|
"-I=/home/kevinh/development/meshtastic/meshtastic-esp32/proto"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"editor.formatOnSave": true
|
|
||||||
}
|
}
|
||||||
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM ubuntu
|
||||||
|
MAINTAINER Kevin Hester <kevinh@geeksville.com>
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install wget python3 g++ zip python3-venv git vim
|
||||||
|
RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -O get-platformio.py; chmod +x get-platformio.py
|
||||||
|
RUN python3 get-platformio.py
|
||||||
|
RUN git clone https://github.com/meshtastic/Meshtastic-device.git
|
||||||
|
RUN cd Meshtastic-device; git submodule update --init --recursive
|
||||||
|
# only build the simulator
|
||||||
|
RUN sed -i 's/^BOARDS_ESP32.*/BOARDS_ESP32=""/' Meshtastic-device/bin/build-all.sh
|
||||||
|
RUN sed -i 's/^BOARDS_NRF52.*/BOARDS_NRF52=""/' Meshtastic-device/bin/build-all.sh
|
||||||
|
RUN sed -i 's/echo "Building Filesystem.*/exit/' Meshtastic-device/bin/build-all.sh
|
||||||
|
RUN . ~/.platformio/penv/bin/activate; cd Meshtastic-device; ./bin/build-all.sh
|
||||||
|
|
||||||
|
CMD ["/Meshtastic-device/release/latest/bins/universal/meshtasticd_linux_amd64"]
|
||||||
72
README-docker.md
Normal file
72
README-docker.md
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
## What is Docker used for
|
||||||
|
|
||||||
|
Developers can simulate Device hardware by compiling and running
|
||||||
|
a linux native binary application. If you do not own a Linux
|
||||||
|
machine, or you just want to separate things, you might want
|
||||||
|
to run simulator inside a docker container
|
||||||
|
|
||||||
|
## The Image
|
||||||
|
To build docker image, type
|
||||||
|
|
||||||
|
`docker build -t meshtastic/device .`
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To run a container, type
|
||||||
|
|
||||||
|
`docker run --rm -p 4403:4403 meshtastic/device`
|
||||||
|
|
||||||
|
or, to get an interactive shell on the docker created container:
|
||||||
|
|
||||||
|
`docker run -it -p 4403:4403 meshtastic/device bash`
|
||||||
|
|
||||||
|
You might want to mount your local development folder:
|
||||||
|
|
||||||
|
`docker run -it --mount type=bind,source=/PathToMyProjects/Meshtastic/Meshtastic-device-mybranch,target=/Meshtastic-device-mybranch -p 4403:4403 meshtastic/device bash`
|
||||||
|
|
||||||
|
## Build the native application
|
||||||
|
|
||||||
|
Linux native application should be built inside the container.
|
||||||
|
For this you must run container with interactive console
|
||||||
|
"-it", as seen above.
|
||||||
|
|
||||||
|
First, some environment variables need to be set up with command:
|
||||||
|
|
||||||
|
`. ~/.platformio/penv/bin/activate`
|
||||||
|
|
||||||
|
You also want to make some adjustments in the bin/build-all.sh to conform the amd64 build:
|
||||||
|
|
||||||
|
```
|
||||||
|
sed -i 's/^BOARDS_ESP32.*/BOARDS_ESP32=""/' bin/build-all.sh
|
||||||
|
sed -i 's/^BOARDS_NRF52.*/BOARDS_NRF52=""/' bin/build-all.sh
|
||||||
|
sed -i 's/echo "Building SPIFFS.*/exit/' bin/build-all.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
You can build amd64 image with command
|
||||||
|
|
||||||
|
`bin/build-all.sh`
|
||||||
|
|
||||||
|
## Executing the application interactively
|
||||||
|
|
||||||
|
The built binary file should be found under name
|
||||||
|
`release/latest/bins/universal/meshtastic_linux_amd64`.
|
||||||
|
If this is not the case, you can also use direct program name:
|
||||||
|
`.pio/build/native/program`
|
||||||
|
|
||||||
|
To use python cli against exposed port 4403,
|
||||||
|
type this in the host machine:
|
||||||
|
|
||||||
|
`meshtastic --info --host localhost`
|
||||||
|
|
||||||
|
## Stop the container
|
||||||
|
|
||||||
|
Run this to get the ID:
|
||||||
|
|
||||||
|
`docker ps`
|
||||||
|
|
||||||
|
Stop the container with command:
|
||||||
|
|
||||||
|
`docker kill <id>`
|
||||||
|
|
||||||
|
> Tip: you can just use the first few characters of the ID in docker commands
|
||||||
|
|
||||||
215
README.md
215
README.md
@@ -1,213 +1,18 @@
|
|||||||
# Meshtastic-device
|
# Meshtastic-device
|
||||||
|
[](https://open.vscode.dev/meshtastic/Meshtastic-device)
|
||||||
|
[](https://github.com/meshtastic/Meshtastic-device/actions/workflows/main.yml)
|
||||||
|

|
||||||
|
|
||||||
This is the device side code for the [meshtastic.org](https://www.meshtastic.org) project.
|
## This repository contains the device firmware used in the [Meshtastic](https://meshtastic.org) project.
|
||||||
|
|
||||||

|
Update Instructions
|
||||||
|
|
||||||
Meshtastic® is a project that lets you use
|
[Using Meshtastic Flasher](https://meshtastic.org/docs/getting-started/meshtastic-flasher)
|
||||||
inexpensive GPS mesh radios as an extensible, super long battery life mesh GPS communicator. These radios are great for hiking, skiing, paragliding -
|
|
||||||
essentially any hobby where you don't have reliable internet access. Each member of your private mesh can always see the location and distance of all other
|
|
||||||
members and any text messages sent to your group chat.
|
|
||||||
|
|
||||||
The radios automatically create a mesh to forward packets as needed, so everyone in the group can receive messages from even the furthest member. The radios
|
Manual Method
|
||||||
will optionally work with your phone, but no phone is required.
|
|
||||||
|
|
||||||
Typical time between recharging the radios should be about eight days.
|
[For ESP32 devices click here](https://meshtastic.org/docs/getting-started/flashing-esp32)
|
||||||
|
|
||||||
This project is is currently in beta-testing - if you have questions please [join our discussion forum](https://meshtastic.discourse.group/).
|
[For nRF52 devices click here](https://meshtastic.org/docs/getting-started/flashing-nrf52)
|
||||||
|
|
||||||
This software is 100% open source and developed by a group of hobbyist experimenters. No warranty is provided, if you'd like to improve it - we'd love your help. Please post in the chat.
|
For developer information and specific building instructions, please see the [developer documentation](https://meshtastic.org/docs/developers)
|
||||||
|
|
||||||
## Supported hardware
|
|
||||||
|
|
||||||
We currently support three models of radios.
|
|
||||||
|
|
||||||
- TTGO T-Beam (usually the recommended choice)
|
|
||||||
- [T-Beam V1.1 w/ NEO-6M - special Meshtastic version](https://www.aliexpress.com/item/4001178678568.html) (Includes built-in OLED display and they have **preinstalled** the meshtastic software)
|
|
||||||
- [T-Beam V1.1 w/ NEO-M8N](https://www.aliexpress.com/item/33047631119.html) (slightly better GPS)
|
|
||||||
- [T-Beam V1.1 w/ NEO-M8N /w SX1262](https://www.aliexpress.com/item/4001287221970.html) (slightly better GPS + LoRa)
|
|
||||||
- board labels "TTGO T22_V1.1 20191212"
|
|
||||||
- [T-Beam V0.7 w/ NEO-6M](https://www.aliexpress.com/item/4000574335430.html) (will work but **you must use the tbeam0.7 firmware ** - but the T-Beam V1.0 or later are better!)
|
|
||||||
- board labels "TTGO T22_V07 20180711"
|
|
||||||
- 3D printable cases
|
|
||||||
- [T-Beam V0](https://www.thingiverse.com/thing:3773717) (GPS and LoRa antenna misaligned if GPS placed as pictured)
|
|
||||||
- [T-Beam V1 (SMA-antenna)](https://www.thingiverse.com/thing:3830711)
|
|
||||||
- [T-Beam V1 (SMA-antenna)](https://www.thingiverse.com/thing:4677388) (Mounting option for larger GPS antenna but LoRa antenna enclosed)
|
|
||||||
- [T-Beam V1 (IPEX-antenna)](https://www.thingiverse.com/thing:4587297) (GPS and LoRa antenna misaligned if GPS placed as pictured)
|
|
||||||
- [T-Beam V1 (IPEX-antenna)](https://www.thingiverse.com/thing:4589651)
|
|
||||||
- [T-Beam V1 (IPEX-antenna)](https://www.thingiverse.com/thing:4619981) (GPS and LoRa antenna misaligned if GPS placed as pictured)
|
|
||||||
- Laser-cut cases
|
|
||||||
- [T-Beam V1 (SMA-antenna)](https://www.thingiverse.com/thing:4552771)
|
|
||||||
|
|
||||||
- [TTGO LORA32](https://www.aliexpress.com/item/4000211331316.html) - No GPS
|
|
||||||
- version 2.1
|
|
||||||
- board labels "TTGO T3_V1.6 20180606"
|
|
||||||
- 3D printable case
|
|
||||||
- [TTGO LORA32 v1](https://www.thingiverse.com/thing:3385109)
|
|
||||||
|
|
||||||
- [Heltec LoRa 32](https://heltec.org/project/wifi-lora-32/) - No GPS
|
|
||||||
- [Official Heltec case](https://www.aliexpress.com/item/4001050707951.html)
|
|
||||||
- [3D Printable case](https://www.thingiverse.com/thing:3125854)
|
|
||||||
|
|
||||||
Note: The GPS and LoRa stock antennas should be placed in a way, that the GPS antenna faces the sky and the LoRa antenna radiates 360 degrees horizontally. For better GPS reception you might want to [upgrade the GPS antenna](https://meshtastic.discourse.group/t/the-importance-of-gps-antennas-and-request-to-3d-case-documentation-people/1505) and to properly align the antennas you might want to upgrade to a LoRa antenna that can be adjusted to radiate into the right directions.
|
|
||||||
|
|
||||||
**Make sure to get the frequency for your country**
|
|
||||||
|
|
||||||
- US/JP/AU/NZ/CA - 915MHz
|
|
||||||
- CN - 470MHz
|
|
||||||
- EU - 868MHz, 433MHz
|
|
||||||
- full list of LoRa frequencies per region is available [here](https://www.thethingsnetwork.org/docs/lorawan/frequencies-by-country.html)
|
|
||||||
|
|
||||||
Getting a version that includes a screen is optional, but highly recommended.
|
|
||||||
|
|
||||||
## Firmware Installation
|
|
||||||
|
|
||||||
Prebuilt binaries for the supported radios are available in our [releases](https://github.com/meshtastic/Meshtastic-esp32/releases). Your initial installation has to happen over USB from your Mac, Windows or Linux PC. Once our software is installed, all future software updates happen over bluetooth from your phone.
|
|
||||||
|
|
||||||
Be **very careful** to install the correct load for your board. In particular the popular 'T-BEAM' radio from TTGO is not called 'TTGO-Lora' (that is a different board). So don't install the 'TTGO-Lora' build on a TBEAM, it won't work correctly.
|
|
||||||
|
|
||||||
Please post comments on our [group chat](https://meshtastic.discourse.group/) if you have problems or successes.
|
|
||||||
|
|
||||||
### Installing from a GUI - Windows and Mac
|
|
||||||
|
|
||||||
1. Download and unzip the latest Meshtastic firmware [release](https://github.com/meshtastic/Meshtastic-esp32/releases).
|
|
||||||
2. Download [ESPHome Flasher](https://github.com/esphome/esphome-flasher/releases) (either x86-32bit Windows or x64-64 bit Windows).
|
|
||||||
3. Connect your radio to your USB port and open ESPHome Flasher.
|
|
||||||
4. If your board is not showing under Serial Port then you likely need to install the drivers for the CP210X serial chip. In Windows you can check by searching “Device Manager” and ensuring the device is shown under “Ports”.
|
|
||||||
5. If there is an error, download the drivers [here](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers), then unzip and run the Installer application.
|
|
||||||
6. In ESPHome Flasher, refresh the serial ports and select your board.
|
|
||||||
7. Browse to the previously downloaded firmware and select the correct firmware based on the board type, country and frequency.
|
|
||||||
8. Select Flash ESP.
|
|
||||||
9. Once complete, “Done! Flashing is complete!” will be shown.
|
|
||||||
10. Debug messages sent from the Meshtastic device can be viewed with a terminal program such as [PuTTY](https://www.putty.org/) (Windows only). Within PuTTY, click “Serial”, enter the “Serial line” com port (can be found at step 4), enter “Speed” as 921600, then click “Open”.
|
|
||||||
|
|
||||||
### Installing from a commandline
|
|
||||||
|
|
||||||
These instructions currently require a few commmand lines, but it should be pretty straightforward.
|
|
||||||
|
|
||||||
1. Install "pip". Pip is the python package manager we use to get the esptool installer app. Instructions [here](https://www.makeuseof.com/tag/install-pip-for-python/). If you are using OS-X, see these [special instructions](docs/software/install-OSX.md).
|
|
||||||
2. Run "pip install --upgrade esptool" to get esptool installed on your machine.
|
|
||||||
3. Connect your radio to your USB port.
|
|
||||||
4. Confirm that your device is talking to your PC by running "esptool.py chip_id". The Heltec build also works on the TTGO LORA32 radio. You should see something like:
|
|
||||||
|
|
||||||
```
|
|
||||||
mydir$ esptool.py chip_id
|
|
||||||
esptool.py v2.6
|
|
||||||
Found 2 serial ports
|
|
||||||
Serial port /dev/ttyUSB0
|
|
||||||
Connecting....
|
|
||||||
Detecting chip type... ESP32
|
|
||||||
Chip is ESP32D0WDQ6 (revision 1)
|
|
||||||
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
|
|
||||||
MAC: 24:6f:28:b5:36:71
|
|
||||||
Uploading stub...
|
|
||||||
Running stub...
|
|
||||||
Stub running...
|
|
||||||
Warning: ESP32 has no Chip ID. Reading MAC instead.
|
|
||||||
MAC: 24:6f:28:b5:36:71
|
|
||||||
Hard resetting via RTS pin...
|
|
||||||
```
|
|
||||||
|
|
||||||
5. cd into the directory where the release zip file was expanded.
|
|
||||||
6. Install the correct firmware for your board with `device-install.sh -f firmware-_board_-_country_.bin`.
|
|
||||||
- Example: `./device-install.sh -f firmware-HELTEC-US-0.0.3.bin`.
|
|
||||||
7. To update run `device-update.sh -f firmware-_board_-_country_.bin`
|
|
||||||
- Example: `./device-update.sh -f firmware-HELTEC-US-0.0.3.bin`.
|
|
||||||
|
|
||||||
Note: If you have previously installed meshtastic, you don't need to run this full script instead just run `esptool.py --baud 921600 write_flash 0x10000 firmware-_board_-_country_-_version_.bin`. This will be faster, also all of your current preferences will be preserved.
|
|
||||||
|
|
||||||
You should see something like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
kevinh@kevin-server:~/development/meshtastic/meshtastic-esp32/release/latest$ ./device-install.sh firmware-TBEAM-US-0.1.8.bin
|
|
||||||
Trying to flash firmware-TBEAM-US-0.1.8.bin, but first erasing and writing system information
|
|
||||||
esptool.py v2.6
|
|
||||||
Found 2 serial ports
|
|
||||||
Serial port /dev/ttyUSB0
|
|
||||||
Connecting........____
|
|
||||||
Detecting chip type... ESP32
|
|
||||||
Chip is ESP32D0WDQ6 (revision 1)
|
|
||||||
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
|
|
||||||
MAC: 24:6f:28:b2:01:6c
|
|
||||||
Uploading stub...
|
|
||||||
Running stub...
|
|
||||||
Stub running...
|
|
||||||
Changing baud rate to 921600
|
|
||||||
Changed.
|
|
||||||
Erasing flash (this may take a while)...
|
|
||||||
Chip erase completed successfully in 6.1s
|
|
||||||
Hard resetting via RTS pin...
|
|
||||||
esptool.py v2.6
|
|
||||||
Found 2 serial ports
|
|
||||||
Serial port /dev/ttyUSB0
|
|
||||||
Connecting.......
|
|
||||||
Detecting chip type... ESP32
|
|
||||||
Chip is ESP32D0WDQ6 (revision 1)
|
|
||||||
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
|
|
||||||
MAC: 24:6f:28:b2:01:6c
|
|
||||||
Uploading stub...
|
|
||||||
Running stub...
|
|
||||||
Stub running...
|
|
||||||
Changing baud rate to 921600
|
|
||||||
Changed.
|
|
||||||
Configuring flash size...
|
|
||||||
Auto-detected Flash size: 4MB
|
|
||||||
Flash params set to 0x0220
|
|
||||||
Compressed 61440 bytes to 11950...
|
|
||||||
Wrote 61440 bytes (11950 compressed) at 0x00001000 in 0.2 seconds (effective 3092.4 kbit/s)...
|
|
||||||
Hash of data verified.
|
|
||||||
|
|
||||||
Leaving...
|
|
||||||
Hard resetting via RTS pin...
|
|
||||||
esptool.py v2.6
|
|
||||||
Found 2 serial ports
|
|
||||||
Serial port /dev/ttyUSB0
|
|
||||||
Connecting.....
|
|
||||||
Detecting chip type... ESP32
|
|
||||||
Chip is ESP32D0WDQ6 (revision 1)
|
|
||||||
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
|
|
||||||
MAC: 24:6f:28:b2:01:6c
|
|
||||||
Uploading stub...
|
|
||||||
Running stub...
|
|
||||||
Stub running...
|
|
||||||
Changing baud rate to 921600
|
|
||||||
Changed.
|
|
||||||
Configuring flash size...
|
|
||||||
Auto-detected Flash size: 4MB
|
|
||||||
Compressed 1223568 bytes to 678412...
|
|
||||||
Wrote 1223568 bytes (678412 compressed) at 0x00010000 in 10.7 seconds (effective 912.0 kbit/s)...
|
|
||||||
Hash of data verified.
|
|
||||||
|
|
||||||
Leaving...
|
|
||||||
Hard resetting via RTS pin...
|
|
||||||
```
|
|
||||||
|
|
||||||
7. The board will boot and show the Meshtastic logo.
|
|
||||||
8. Please post a comment on our chat so we know if these instructions worked for you ;-). If you find bugs/have-questions post there also - we will be rapidly iterating over the next few weeks.
|
|
||||||
|
|
||||||
# Meshtastic Android app
|
|
||||||
|
|
||||||
The companion (optional) Meshtastic Android app is [here](https://play.google.com/store/apps/details?id=com.geeksville.mesh&referrer=utm_source%3Dgithub-dev-readme). You can also download it on Google Play.
|
|
||||||
|
|
||||||
# Python API
|
|
||||||
|
|
||||||
We offer a [python API](https://github.com/meshtastic/Meshtastic-python) that makes it easy to use these devices to provide mesh networking for your custom projects.
|
|
||||||
|
|
||||||
# Development
|
|
||||||
|
|
||||||
We'd love to have you join us on this merry little project. Please see our [development documents](./docs/software/sw-design.md) and [join us in our discussion forum](https://meshtastic.discourse.group/).
|
|
||||||
|
|
||||||
# Credits
|
|
||||||
|
|
||||||
This project is run by volunteers. We are a friendly group and welcome any contribution (code fixes, documentation, features, bug reports etc...). We try to be good about listing contributor names in release notes, but it has become unwieldy for the main-devs to keep updating the list below and we've neglected it too long. If you'd like your name included in this list please send a pull request to edit this README and simply add your line yourself. Thank you very much for your help!
|
|
||||||
|
|
||||||
- @astro-arphid: Added support for 433MHz radios in europe.
|
|
||||||
- @claesg: Various documentation fixes and 3D print enclosures
|
|
||||||
- @girtsf: Lots of improvements
|
|
||||||
- @spattinson: Fixed interrupt handling for the AXP192 part
|
|
||||||
|
|
||||||
# IMPORTANT DISCLAIMERS AND FAQ
|
|
||||||
|
|
||||||
For a listing of currently missing features and a FAQ click [here](docs/faq.md).
|
|
||||||
|
|
||||||
Copyright 2019 Geeksville Industries, LLC. GPL V3 Licensed.
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=`bin/buildinfo.py`
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
BOARDS_ESP32="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec tbeam0.7"
|
BOARDS_ESP32="rak11200 tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v1 heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1"
|
||||||
#BOARDS_ESP32=tbeam
|
#BOARDS_ESP32=tbeam
|
||||||
|
|
||||||
# FIXME note nrf52840dk build is for some reason only generating a BIN file but not a HEX file nrf52840dk-geeksville is fine
|
# FIXME note nrf52840dk build is for some reason only generating a BIN file but not a HEX file nrf52840dk-geeksville is fine
|
||||||
BOARDS_NRF52="rak4631"
|
BOARDS_NRF52="rak4631_5005 rak4631_5005_eink rak4631_19003 t-echo"
|
||||||
|
#BOARDS_NRF52=""
|
||||||
|
|
||||||
OUTDIR=release/latest
|
OUTDIR=release/latest
|
||||||
|
|
||||||
@@ -26,7 +28,7 @@ function do_build() {
|
|||||||
BOARD=$1
|
BOARD=$1
|
||||||
isNrf=$3
|
isNrf=$3
|
||||||
|
|
||||||
echo "Building for $BOARD with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $BOARD ($isNrf) with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$BOARD/firmware.*
|
rm -f .pio/build/$BOARD/firmware.*
|
||||||
|
|
||||||
# The shell vars the build tool expects to find
|
# The shell vars the build tool expects to find
|
||||||
@@ -57,6 +59,7 @@ function do_boards() {
|
|||||||
declare isNrf=$2
|
declare isNrf=$2
|
||||||
for board in $boards; do
|
for board in $boards; do
|
||||||
# Build universal
|
# Build universal
|
||||||
|
echo "about to build $board $isNrf"
|
||||||
do_build $board "" "$isNrf"
|
do_build $board "" "$isNrf"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -70,12 +73,15 @@ platformio lib update
|
|||||||
do_boards "$BOARDS_ESP32" "false"
|
do_boards "$BOARDS_ESP32" "false"
|
||||||
do_boards "$BOARDS_NRF52" "true"
|
do_boards "$BOARDS_NRF52" "true"
|
||||||
|
|
||||||
echo "Building SPIFFS for ESP32 targets"
|
pio run --environment native
|
||||||
|
cp .pio/build/native/program $OUTDIR/bins/universal/meshtasticd_linux_amd64
|
||||||
|
|
||||||
|
echo "Building Filesystem for ESP32 targets"
|
||||||
pio run --environment tbeam -t buildfs
|
pio run --environment tbeam -t buildfs
|
||||||
cp .pio/build/tbeam/spiffs.bin $OUTDIR/bins/universal/spiffs-$VERSION.bin
|
cp .pio/build/tbeam/spiffs.bin $OUTDIR/bins/universal/littlefs-$VERSION.bin
|
||||||
|
|
||||||
# keep the bins in archive also
|
# keep the bins in archive also
|
||||||
cp $OUTDIR/bins/universal/spiffs* $OUTDIR/bins/universal/firmware* $OUTDIR/elfs/universal/firmware* $ARCHIVEDIR
|
cp $OUTDIR/bins/universal/littlefs* $OUTDIR/bins/universal/firmware* $OUTDIR/elfs/universal/firmware* $ARCHIVEDIR
|
||||||
|
|
||||||
echo Updating android bins $OUTDIR/forandroid
|
echo Updating android bins $OUTDIR/forandroid
|
||||||
rm -rf $OUTDIR/forandroid
|
rm -rf $OUTDIR/forandroid
|
||||||
@@ -91,11 +97,15 @@ Generated by bin/buildall.sh -->
|
|||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="cur_firmware_version" translatable="false">$VERSION</string>
|
<string name="cur_firmware_version" translatable="false">$VERSION</string>
|
||||||
|
<string name="short_firmware_version" translatable="false">$SHORT_VERSION</string>
|
||||||
</resources>
|
</resources>
|
||||||
XML
|
XML
|
||||||
|
|
||||||
echo Generating $ARCHIVEDIR/firmware-$VERSION.zip
|
echo Generating $ARCHIVEDIR/firmware-$VERSION.zip
|
||||||
rm -f $ARCHIVEDIR/firmware-$VERSION.zip
|
rm -f $ARCHIVEDIR/firmware-$VERSION.zip
|
||||||
zip --junk-paths $ARCHIVEDIR/firmware-$VERSION.zip $ARCHIVEDIR/spiffs-$VERSION.bin $OUTDIR/bins/universal/firmware-*-$VERSION.* images/system-info.bin bin/device-install.sh bin/device-update.sh
|
zip --junk-paths $ARCHIVEDIR/firmware-$VERSION.zip $ARCHIVEDIR/littlefs-$VERSION.bin $OUTDIR/bins/universal/firmware-*-$VERSION.* $OUTDIR/bins/universal/meshtasticd* images/system-info.bin bin/device-install.* bin/device-update.*
|
||||||
|
echo Generating $ARCHIVEDIR/elfs-$VERSION.zip
|
||||||
|
rm -f $ARCHIVEDIR/elfs-$VERSION.zip
|
||||||
|
zip --junk-paths $ARCHIVEDIR/elfs-$VERSION.zip $OUTDIR/elfs/universal/firmware-*-$VERSION.*
|
||||||
|
|
||||||
echo BUILT ALL
|
echo BUILT ALL
|
||||||
|
|||||||
43
bin/build-esp32.sh
Executable file
43
bin/build-esp32.sh
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
|
OUTDIR=release/
|
||||||
|
|
||||||
|
rm -f $OUTDIR/firmware*
|
||||||
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
|
platformio lib update
|
||||||
|
|
||||||
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
|
rm -f .pio/build/$1/firmware.*
|
||||||
|
|
||||||
|
# The shell vars the build tool expects to find
|
||||||
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
|
# Are we building a universal/regionless rom?
|
||||||
|
export HW_VERSION="1.0"
|
||||||
|
basename=firmware-$1-$VERSION
|
||||||
|
|
||||||
|
pio run --environment $1 # -v
|
||||||
|
SRCELF=.pio/build/$1/firmware.elf
|
||||||
|
cp $SRCELF $OUTDIR/$basename.elf
|
||||||
|
|
||||||
|
echo "Copying ESP32 bin file"
|
||||||
|
SRCBIN=.pio/build/$1/firmware.bin
|
||||||
|
cp $SRCBIN $OUTDIR/$basename.bin
|
||||||
|
|
||||||
|
echo "Building Filesystem for ESP32 targets"
|
||||||
|
pio run --environment tbeam -t buildfs
|
||||||
|
cp .pio/build/tbeam/spiffs.bin $OUTDIR/littlefs-$VERSION.bin
|
||||||
|
cp images/system-info.bin $OUTDIR/system-info.bin
|
||||||
|
|
||||||
|
cp bin/device-install.* $OUTDIR
|
||||||
|
cp bin/device-update.* $OUTDIR
|
||||||
26
bin/build-native.sh
Executable file
26
bin/build-native.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
|
OUTDIR=release/
|
||||||
|
|
||||||
|
rm -f $OUTDIR/firmware*
|
||||||
|
|
||||||
|
mkdir -p $OUTDIR/
|
||||||
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
|
platformio lib update
|
||||||
|
|
||||||
|
pio run --environment native
|
||||||
|
cp .pio/build/native/program $OUTDIR/meshtasticd_linux_amd64
|
||||||
|
|
||||||
|
cp bin/device-install.* $OUTDIR
|
||||||
|
cp bin/device-update.* $OUTDIR
|
||||||
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
source ~/.bashrc
|
|
||||||
|
|
||||||
# Meshtastic Nightly Build Script.
|
|
||||||
# McHamster (jm@casler.org)
|
|
||||||
#
|
|
||||||
# This is the script that is used for the nightly build server.
|
|
||||||
#
|
|
||||||
# It's probably not useful for most people, but you may want to run your own
|
|
||||||
# nightly builds.
|
|
||||||
#
|
|
||||||
# The last line of ~/.bashrc contains an inclusion of platformio in the path.
|
|
||||||
# Without this, the build script won't run from the crontab:
|
|
||||||
#
|
|
||||||
# export PATH="$HOME/.platformio/penv/bin:$PATH"
|
|
||||||
#
|
|
||||||
# The crontab contains:
|
|
||||||
# 0 2 * * * cd ~/meshtastic/github/meshtastic && source "~/.bashrc"; ./build-nightly.sh > ~/cronout.txt 2> ~/cronout.txt
|
|
||||||
|
|
||||||
cd Meshtastic-device
|
|
||||||
|
|
||||||
git pull
|
|
||||||
|
|
||||||
bin/build-all.sh
|
|
||||||
|
|
||||||
date_stamp=$(date +'%Y-%m-%d')
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# TODO: Archive the same binaries used by the build-all script.
|
|
||||||
#zip -r meshtastic_device_nightly_${date_stamp} Meshtastic-device/release/latest/bins
|
|
||||||
cp Meshtastic-device/release/archive/`ls -t ./Meshtastic-device/release/archive/| head -1` meshtastic_device_nightly_${date_stamp}.zip
|
|
||||||
|
|
||||||
# Copy the file to the webserver
|
|
||||||
scp meshtastic_device_nightly_${date_stamp}.zip jm@10.11.12.20:/volume1/web/meshtastic/nightly_builds/
|
|
||||||
|
|
||||||
# Delete the local copy
|
|
||||||
rm meshtastic_device_nightly_${date_stamp}.zip
|
|
||||||
37
bin/build-nrf52.sh
Executable file
37
bin/build-nrf52.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
|
OUTDIR=release/
|
||||||
|
|
||||||
|
rm -f $OUTDIR/firmware*
|
||||||
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
|
# Make sure our submodules are current
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
|
platformio lib update
|
||||||
|
|
||||||
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
|
rm -f .pio/build/$1/firmware.*
|
||||||
|
|
||||||
|
# The shell vars the build tool expects to find
|
||||||
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
|
export HW_VERSION="1.0"
|
||||||
|
basename=firmware-$1-$VERSION
|
||||||
|
|
||||||
|
pio run --environment $1 # -v
|
||||||
|
SRCELF=.pio/build/$1/firmware.elf
|
||||||
|
cp $SRCELF $OUTDIR/$basename.elf
|
||||||
|
|
||||||
|
echo "Generating NRF52 uf2 file"
|
||||||
|
SRCHEX=.pio/build/$1/firmware.hex
|
||||||
|
bin/uf2conv.py $SRCHEX -c -o $OUTDIR/$basename.uf2 -f 0xADA52840
|
||||||
|
|
||||||
|
cp bin/device-install.* $OUTDIR
|
||||||
|
cp bin/device-update.* $OUTDIR
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import configparser
|
import configparser
|
||||||
|
import sys
|
||||||
from readprops import readProps
|
from readprops import readProps
|
||||||
|
|
||||||
|
|
||||||
verStr = readProps('version.properties')
|
verObj = readProps('version.properties')
|
||||||
print(f"{verStr}")
|
propName = sys.argv[1]
|
||||||
|
print(f"{verObj[propName]}")
|
||||||
|
|||||||
26
bin/check-all.sh
Executable file
26
bin/check-all.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Note: This is a prototype for how we could add static code analysis to the CI.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
|
||||||
|
# The shell vars the build tool expects to find
|
||||||
|
export APP_VERSION=$VERSION
|
||||||
|
|
||||||
|
if [[ $# -gt 0 ]]; then
|
||||||
|
# can override which environment by passing arg
|
||||||
|
BOARDS="$@"
|
||||||
|
else
|
||||||
|
BOARDS="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v1 heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 rak4631_5005 rak4631_19003 rak11200 t-echo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "BOARDS:${BOARDS}"
|
||||||
|
|
||||||
|
CHECK=""
|
||||||
|
for BOARD in $BOARDS; do
|
||||||
|
CHECK="${CHECK} -e ${BOARD}"
|
||||||
|
done
|
||||||
|
|
||||||
|
pio check --flags "-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt" $CHECK --skip-packages --pattern="src/" --fail-on-defect=low --fail-on-defect=medium --fail-on-defect=high
|
||||||
42
bin/device-install.bat
Normal file
42
bin/device-install.bat
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set PYTHON=python
|
||||||
|
|
||||||
|
goto GETOPTS
|
||||||
|
:HELP
|
||||||
|
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
|
||||||
|
echo Flash image file to device, but first erasing and writing system information
|
||||||
|
echo.
|
||||||
|
echo -h Display this help and exit
|
||||||
|
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
|
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
||||||
|
echo -f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
|
goto EOF
|
||||||
|
|
||||||
|
:GETOPTS
|
||||||
|
if /I "%1"=="-h" goto HELP
|
||||||
|
if /I "%1"=="--help" goto HELP
|
||||||
|
if /I "%1"=="-F" set "FILENAME=%2" & SHIFT
|
||||||
|
if /I "%1"=="-p" set ESPTOOL_PORT=%2 & SHIFT
|
||||||
|
if /I "%1"=="-P" set PYTHON=%2 & SHIFT
|
||||||
|
SHIFT
|
||||||
|
IF NOT "__%1__"=="____" goto GETOPTS
|
||||||
|
|
||||||
|
IF "__%FILENAME%__" == "____" (
|
||||||
|
echo "Missing FILENAME"
|
||||||
|
goto HELP
|
||||||
|
)
|
||||||
|
IF EXIST %FILENAME% (
|
||||||
|
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
|
||||||
|
%PYTHON% -m esptool --baud 921600 erase_flash
|
||||||
|
%PYTHON% -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
||||||
|
for %%f in (littlefs-*.bin) do (
|
||||||
|
%PYTHON% -m esptool --baud 921600 write_flash 0x00390000 %%f
|
||||||
|
)
|
||||||
|
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
||||||
|
) else (
|
||||||
|
echo "Invalid file: %FILENAME%"
|
||||||
|
goto HELP
|
||||||
|
)
|
||||||
|
|
||||||
|
:EOF
|
||||||
@@ -11,7 +11,7 @@ Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME]
|
|||||||
Flash image file to device, but first erasing and writing system information"
|
Flash image file to device, but first erasing and writing system information"
|
||||||
|
|
||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
EOF
|
EOF
|
||||||
@@ -46,10 +46,10 @@ shift "$((OPTIND-1))"
|
|||||||
|
|
||||||
if [ -f "${FILENAME}" ]; then
|
if [ -f "${FILENAME}" ]; then
|
||||||
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
||||||
$PYTHON -m esptool --baud 921600 erase_flash
|
"$PYTHON" -m esptool erase_flash
|
||||||
$PYTHON -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
"$PYTHON" -m esptool write_flash 0x1000 system-info.bin
|
||||||
$PYTHON -m esptool --baud 921600 write_flash 0x00390000 spiffs-*.bin
|
"$PYTHON" -m esptool write_flash 0x00390000 littlefs-*.bin
|
||||||
$PYTHON -m esptool --baud 921600 write_flash 0x10000 ${FILENAME}
|
"$PYTHON" -m esptool write_flash 0x10000 ${FILENAME}
|
||||||
else
|
else
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
show_help
|
show_help
|
||||||
|
|||||||
39
bin/device-update.bat
Normal file
39
bin/device-update.bat
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
set PYTHON=python
|
||||||
|
|
||||||
|
goto GETOPTS
|
||||||
|
:HELP
|
||||||
|
echo Usage: %~nx0 [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME^|FILENAME]
|
||||||
|
echo Flash image file to device, leave existing system intact.
|
||||||
|
echo.
|
||||||
|
echo -h Display this help and exit
|
||||||
|
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
|
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
||||||
|
echo -f FILENAME The .bin file to flash. Custom to your device type and region.
|
||||||
|
goto EOF
|
||||||
|
|
||||||
|
:GETOPTS
|
||||||
|
if /I "%1"=="-h" goto HELP
|
||||||
|
if /I "%1"=="--help" goto HELP
|
||||||
|
if /I "%1"=="-F" set "FILENAME=%2" & SHIFT
|
||||||
|
if /I "%1"=="-p" set ESPTOOL_PORT=%2 & SHIFT
|
||||||
|
if /I "%1"=="-P" set PYTHON=%2 & SHIFT
|
||||||
|
SHIFT
|
||||||
|
IF NOT "__%1__"=="____" goto GETOPTS
|
||||||
|
|
||||||
|
IF "__%FILENAME%__" == "____" (
|
||||||
|
echo "Missing FILENAME"
|
||||||
|
goto HELP
|
||||||
|
)
|
||||||
|
IF EXIST %FILENAME% (
|
||||||
|
echo Trying to flash update %FILENAME%
|
||||||
|
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
||||||
|
echo Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used
|
||||||
|
%PYTHON% -m esptool --baud 921600 erase_region 0xe000 0x2000
|
||||||
|
) else (
|
||||||
|
echo "Invalid file: %FILENAME%"
|
||||||
|
goto HELP
|
||||||
|
)
|
||||||
|
|
||||||
|
:EOF
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
arm-none-eabi-readelf -s -e .pio/build/nrf52dk/firmware.elf | head -80
|
arm-none-eabi-readelf -s -e .pio/build/nrf52dk/firmware.elf | head -80
|
||||||
|
|
||||||
nm -CSr --size-sort .pio/build/nrf52dk/firmware.elf | grep '^200'
|
nm -CSr --size-sort .pio/build/nrf52dk/firmware.elf | grep '^200'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python2
|
#!/usr/bin/env python2
|
||||||
|
|
||||||
# This is a layout for 4MB of flash
|
# This is a layout for 4MB of flash
|
||||||
# Name, Type, SubType, Offset, Size, Flags
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
@@ -38,4 +38,4 @@ app0, app, ota_0, , 0x{app:x},
|
|||||||
app1, app, ota_1, , 0x{app:x},
|
app1, app, ota_1, , 0x{app:x},
|
||||||
spiffs, data, spiffs, , 0x{spi:x} """.format(**locals())
|
spiffs, data, spiffs, , 0x{spi:x} """.format(**locals())
|
||||||
|
|
||||||
print(table)
|
print(table)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# You probably don't want to use this script, it programs a custom bootloader build onto a nrf52 board
|
# You probably don't want to use this script, it programs a custom bootloader build onto a nrf52 board
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# You probably don't want to use this script, it programs a custom bootloader build onto a nrf52 board
|
# You probably don't want to use this script, it programs a custom bootloader build onto a nrf52 board
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
51
bin/mklittlefs.py
Executable file
51
bin/mklittlefs.py
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import getopt
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
from littlefs import LittleFS
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
print( "Building LittleFS image..." )
|
||||||
|
|
||||||
|
argList = sys.argv[1:]
|
||||||
|
arxx = { argList[i]: argList[i+1] for i in range(0, len(argList)-1, 2) }
|
||||||
|
|
||||||
|
dataPath = arxx["-c"]
|
||||||
|
blockSize = int(arxx["-b"])
|
||||||
|
blockCount = int(arxx["-s"]) / blockSize
|
||||||
|
|
||||||
|
cwd = os.getcwd()
|
||||||
|
|
||||||
|
os.chdir(dataPath)
|
||||||
|
|
||||||
|
fileList = []
|
||||||
|
dirList = []
|
||||||
|
|
||||||
|
for (dirpath, dirnames, filenames) in os.walk('.'):
|
||||||
|
for f in filenames:
|
||||||
|
if (f[:1] != '.'):
|
||||||
|
fileList.append( os.path.join(dirpath, f) )
|
||||||
|
for d in dirnames:
|
||||||
|
if (d[:1] != '.'):
|
||||||
|
dirList.append( os.path.join(dirpath, d) )
|
||||||
|
|
||||||
|
fs = LittleFS(block_size=blockSize, block_count=blockCount) # create a 448kB partition
|
||||||
|
|
||||||
|
for curDir in dirList:
|
||||||
|
print( "Creating dir " + curDir )
|
||||||
|
fs.mkdir( curDir )
|
||||||
|
|
||||||
|
for curFile in fileList:
|
||||||
|
print( "Adding file " + curFile )
|
||||||
|
with open( curFile, 'rb' ) as f:
|
||||||
|
data = f.read()
|
||||||
|
|
||||||
|
with fs.open( curFile, 'wb') as fh:
|
||||||
|
fh.write( data )
|
||||||
|
|
||||||
|
outName = argList[-1]
|
||||||
|
|
||||||
|
os.chdir(cwd)
|
||||||
|
|
||||||
|
with open(outName, 'wb') as fh:
|
||||||
|
fh.write(fs.context.buffer)
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
mosquitto_sub -h mqtt.meshtastic.org -v -t \$SYS/\# -t msh/+/stat/\# -t msh/+/json/\#
|
mosquitto_sub -h mqtt.meshtastic.org -v -t \$SYS/\# -t msh/+/stat/\# -t msh/+/json/\#
|
||||||
# mosquitto_sub -h test.mosquitto.org -v -t mesh/\# -F "%j"
|
# mosquitto_sub -h test.mosquitto.org -v -t mesh/\# -F "%j"
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
mosquitto_pub -h mqtt.meshtastic.org -u meshdev -P large4cats -t msh/1/stat/FakeNode -m online -d
|
mosquitto_pub -h mqtt.meshtastic.org -u meshdev -P large4cats -t msh/1/stat/FakeNode -m online -d
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
pio run --environment native
|
pio run --environment native
|
||||||
gdbserver --once localhost:2345 .pio/build/native/program "$@"
|
gdbserver --once localhost:2345 .pio/build/native/program "$@"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
pio run --environment native
|
pio run --environment native
|
||||||
.pio/build/native/program "$@"
|
.pio/build/native/program "$@"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# JLinkRTTViewer
|
# JLinkRTTViewer
|
||||||
JLinkRTTClient
|
JLinkRTTClient
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52832_XXAA
|
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52832_XXAA
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52833_XXAA
|
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52833_XXAA
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52840_XXAA -SuppressInfoUpdateFW -DisableAutoUpdateFW -rtos GDBServer/RTOSPlugin_FreeRTOS
|
JLinkGDBServerCLExe -if SWD -select USB -port 2331 -device NRF52840_XXAA -SuppressInfoUpdateFW -DisableAutoUpdateFW -rtos GDBServer/RTOSPlugin_FreeRTOS
|
||||||
|
|||||||
@@ -6,14 +6,22 @@ import traceback
|
|||||||
import sys
|
import sys
|
||||||
from readprops import readProps
|
from readprops import readProps
|
||||||
|
|
||||||
|
Import("env")
|
||||||
|
env.Replace( MKSPIFFSTOOL=env.get("PROJECT_DIR") + '/bin/mklittlefs.py' )
|
||||||
|
try:
|
||||||
|
import littlefs
|
||||||
|
except ImportError:
|
||||||
|
env.Execute("$PYTHONEXE -m pip install --user littlefs-python")
|
||||||
|
|
||||||
Import("projenv")
|
Import("projenv")
|
||||||
|
|
||||||
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
||||||
verStr = readProps(prefsLoc)
|
verObj = readProps(prefsLoc)
|
||||||
print("Using meshtastic platform-custom.py, firmare version " + verStr)
|
print("Using meshtastic platform-custom.py, firmare version " + verObj['long'])
|
||||||
# print("path is" + ','.join(sys.path))
|
# print("path is" + ','.join(sys.path))
|
||||||
|
|
||||||
# General options that are passed to the C and C++ compilers
|
# General options that are passed to the C and C++ compilers
|
||||||
projenv.Append(CCFLAGS=[
|
projenv.Append(CCFLAGS=[
|
||||||
"-DAPP_VERSION=" + verStr
|
"-DAPP_VERSION=" + verObj['long'],
|
||||||
|
"-DAPP_VERSION_SHORT=" + verObj['short']
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
esptool.py --baud 921600 write_flash 0x10000 release/archive/old/firmware-tbeam-EU865-1.0.0.bin
|
esptool.py --baud 921600 write_flash 0x10000 release/archive/old/firmware-tbeam-EU865-1.0.0.bin
|
||||||
echo "Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used"
|
echo "Erasing the otadata partition, which will turn off flash flippy-flop and force the first image to be used"
|
||||||
esptool.py --baud 921600 erase_region 0xe000 0x2000
|
esptool.py --baud 921600 erase_region 0xe000 0x2000
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
esptool.py --baud 921600 write_flash 0x10000 release/archive/old/firmware-tbeam-1.1.50.bin
|
esptool.py --baud 921600 write_flash 0x10000 release/archive/old/firmware-tbeam-1.1.50.bin
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|||||||
17
bin/promote-release.sh
Executable file
17
bin/promote-release.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "This script is only for developers who are publishing new builds on github. Most users don't need it"
|
||||||
|
|
||||||
|
VERSION=`bin/buildinfo.py long`
|
||||||
|
|
||||||
|
# Must have a V prefix to trigger github
|
||||||
|
git tag "v${VERSION}"
|
||||||
|
|
||||||
|
# Commented out per https://github.com/meshtastic/Meshtastic-device/issues/947
|
||||||
|
#git push root "v${VERSION}" # push the tag
|
||||||
|
|
||||||
|
git push origin "v${VERSION}" # push the tag
|
||||||
|
|
||||||
|
echo "Tag ${VERSION} pushed to github, github actions should now be building the draft release. If it seems good, click to publish it"
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# You probably don't need this - it is a basic test of the serial flash on the TTGO eink board
|
# You probably don't need this - it is a basic test of the serial flash on the TTGO eink board
|
||||||
|
|
||||||
nrfjprog --qspiini nrf52/ttgo_eink_qpsi.ini --qspieraseall
|
nrfjprog --qspiini nrf52/ttgo_eink_qpsi.ini --qspieraseall
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
esptool.py --baud 921600 read_flash 0x1000 0xf000 system-info.img
|
esptool.py --baud 921600 read_flash 0x1000 0xf000 system-info.img
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ def readProps(prefsLoc):
|
|||||||
config = configparser.RawConfigParser()
|
config = configparser.RawConfigParser()
|
||||||
config.read(prefsLoc)
|
config.read(prefsLoc)
|
||||||
version = dict(config.items('VERSION'))
|
version = dict(config.items('VERSION'))
|
||||||
|
verObj = dict(short = "{}.{}.{}".format(version["major"], version["minor"], version["build"]),
|
||||||
|
long = "unset")
|
||||||
|
|
||||||
# Try to find current build SHA if if the workspace is clean. This could fail if git is not installed
|
# Try to find current build SHA if if the workspace is clean. This could fail if git is not installed
|
||||||
try:
|
try:
|
||||||
@@ -23,14 +25,13 @@ def readProps(prefsLoc):
|
|||||||
if isDirty:
|
if isDirty:
|
||||||
# short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
# short for 'dirty', we want to keep our verstrings source for protobuf reasons
|
||||||
suffix = sha + "-d"
|
suffix = sha + "-d"
|
||||||
verStr = "{}.{}.{}.{}".format(
|
verObj['long'] = "{}.{}.{}.{}".format(
|
||||||
version["major"], version["minor"], version["build"], suffix)
|
version["major"], version["minor"], version["build"], suffix)
|
||||||
except:
|
except:
|
||||||
# print("Unexpected error:", sys.exc_info()[0])
|
# print("Unexpected error:", sys.exc_info()[0])
|
||||||
# traceback.print_exc()
|
# traceback.print_exc()
|
||||||
verStr = "{}.{}.{}".format(
|
verObj['long'] = verObj['short']
|
||||||
version["major"], version["minor"], version["build"])
|
|
||||||
|
|
||||||
# print("firmare version " + verStr)
|
# print("firmare version " + verStr)
|
||||||
return verStr
|
return verObj
|
||||||
# print("path is" + ','.join(sys.path))
|
# print("path is" + ','.join(sys.path))
|
||||||
|
|||||||
1
bin/regen-protos.bat
Normal file
1
bin/regen-protos.bat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
cd proto && ..\nanopb-0.4.4\generator-bin\protoc.exe --nanopb_out=-v:..\src\mesh\generated -I=..\proto *.proto
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -10,6 +10,6 @@ echo "prebuilt binaries for your computer into nanopb-0.4.4"
|
|||||||
cd proto
|
cd proto
|
||||||
../nanopb-0.4.4/generator-bin/protoc --nanopb_out=-v:../src/mesh/generated -I=../proto *.proto
|
../nanopb-0.4.4/generator-bin/protoc --nanopb_out=-v:../src/mesh/generated -I=../proto *.proto
|
||||||
|
|
||||||
echo "Regenerating protobuf documentation - if you see an error message"
|
#echo "Regenerating protobuf documentation - if you see an error message"
|
||||||
echo "you can ignore it unless doing a new protobuf release to github."
|
#echo "you can ignore it unless doing a new protobuf release to github."
|
||||||
bin/regen-docs.sh
|
#bin/regen-docs.sh
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
pio run --upload-port /dev/ttyUSB0 -t upload -t monitor
|
pio run --upload-port /dev/ttyUSB0 -t upload -t monitor
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
pio run --upload-port /dev/ttyUSB1 -t upload -t monitor
|
pio run --upload-port /dev/ttyUSB1 -t upload -t monitor
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo uploading to usb1
|
echo uploading to usb1
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
TARG=tbeam
|
TARG=tbeam
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# /home/kevinh/.platformio/packages/tool-openocd-esp32/bin/openocd -s /home/kevinh/.platformio/packages/tool-openocd-esp32 -c gdb_port pipe; tcl_port disabled; telnet_port disabled -s /home/kevinh/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
|
# /home/kevinh/.platformio/packages/tool-openocd-esp32/bin/openocd -s /home/kevinh/.platformio/packages/tool-openocd-esp32 -c gdb_port pipe; tcl_port disabled; telnet_port disabled -s /home/kevinh/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
|
||||||
/home/kevinh/.platformio/packages/tool-openocd-esp32/bin/openocd -s /home/kevinh/.platformio/packages/tool-openocd-esp32 -s /home/kevinh/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/jlink.cfg -f ./lora32-openocd.cfg
|
/home/kevinh/.platformio/packages/tool-openocd-esp32/bin/openocd -s /home/kevinh/.platformio/packages/tool-openocd-esp32 -s /home/kevinh/.platformio/packages/tool-openocd-esp32/share/openocd/scripts -f interface/jlink.cfg -f ./lora32-openocd.cfg
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
pio device monitor -b 921600
|
pio device monitor -b 921600
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
pio device monitor -p /dev/ttyUSB1 -b 921600
|
pio device monitor -p /dev/ttyUSB1 -b 921600
|
||||||
|
|||||||
11
bin/test-simulator.sh
Executable file
11
bin/test-simulator.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Starting simulator"
|
||||||
|
.pio/build/native/program &
|
||||||
|
sleep 20 # 5 seconds was not enough
|
||||||
|
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
2
bin/uf2-convert.bat
Normal file
2
bin/uf2-convert.bat
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
@echo off
|
||||||
|
if [%1]==[] (echo "Please specify a platformio NRF target (i.e. rak4631) as the first argument.") else (python3 .\bin\uf2conv.py .\.pio\build\%1\firmware.hex -c -o .\.pio\build\%1\firmware.uf2 -f 0xADA52840)
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Converting to uf2 for NRF52 Adafruit bootloader"
|
echo "building for t-echo"
|
||||||
bin/uf2conv.py .pio/build/rak4631/firmware.hex -f 0xADA52840
|
pio run --environment t-echo
|
||||||
|
|
||||||
|
echo "Converting to uf2 for NRF52 Adafruit bootloader - double tap on the reset button to force bootloader entry"
|
||||||
|
bin/uf2conv.py .pio/build/t-echo/firmware.hex -f 0xADA52840
|
||||||
cp flash.uf2 /media/kevinh/FTH*BOOT/
|
cp flash.uf2 /media/kevinh/FTH*BOOT/
|
||||||
|
|||||||
7
bin/upload-to-rak4631.sh
Executable file
7
bin/upload-to-rak4631.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Converting to uf2 for NRF52 Adafruit bootloader"
|
||||||
|
bin/uf2conv.py .pio/build/rak4631/firmware.hex -f 0xADA52840
|
||||||
|
cp flash.uf2 /media/kevinh/FTH*BOOT/
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
pio run --upload-port /dev/ttyUSB1 -t upload
|
pio run --upload-port /dev/ttyUSB1 -t upload
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
echo using amap tool to display memory map
|
echo using amap tool to display memory map
|
||||||
amap .pio/build/output.map
|
amap .pio/build/output.map
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
"name": "adafruit"
|
"name": "adafruit"
|
||||||
},
|
},
|
||||||
"softdevice": {
|
"softdevice": {
|
||||||
"sd_flags": "-DS113",
|
"sd_flags": "-DS140",
|
||||||
"sd_name": "s113",
|
"sd_name": "s140",
|
||||||
"sd_version": "7.2.0",
|
"sd_version": "6.1.1",
|
||||||
"sd_fwid": "0x00B6"
|
"sd_fwid": "0x00B6"
|
||||||
},
|
},
|
||||||
"bootloader": {
|
"bootloader": {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
],
|
],
|
||||||
"usb_product": "TTGO_eink",
|
"usb_product": "TTGO_eink",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
"variant": "eink",
|
"variant": "t-echo",
|
||||||
"variants_dir": "variants",
|
"variants_dir": "variants",
|
||||||
"bsp": {
|
"bsp": {
|
||||||
"name": "adafruit"
|
"name": "adafruit"
|
||||||
@@ -44,17 +44,20 @@
|
|||||||
"arduino"
|
"arduino"
|
||||||
],
|
],
|
||||||
"name": "TTGO eink (Adafruit BSP)",
|
"name": "TTGO eink (Adafruit BSP)",
|
||||||
"upload": {
|
"upload": {
|
||||||
"maximum_ram_size": 248832,
|
"maximum_ram_size": 248832,
|
||||||
"maximum_size": 815104,
|
"maximum_size": 815104,
|
||||||
"require_upload_port": true,
|
"speed": 115200,
|
||||||
"speed": 115200,
|
"protocol": "nrfutil",
|
||||||
"protocol": "jlink",
|
"protocols": [
|
||||||
"protocols": [
|
"jlink",
|
||||||
"jlink",
|
"nrfjprog",
|
||||||
"nrfjprog",
|
"nrfutil",
|
||||||
"stlink"
|
"stlink"
|
||||||
]
|
],
|
||||||
|
"use_1200bps_touch": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"wait_for_upload_port": true
|
||||||
},
|
},
|
||||||
"url": "FIXME",
|
"url": "FIXME",
|
||||||
"vendor": "TTGO"
|
"vendor": "TTGO"
|
||||||
39
boards/wiscore_rak11200.json
Normal file
39
boards/wiscore_rak11200.json
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino":{
|
||||||
|
"ldscript": "esp32_out.ld"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": "-DARDUINO_ESP32_DEV",
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "40000000L",
|
||||||
|
"flash_mode": "dio",
|
||||||
|
"mcu": "esp32",
|
||||||
|
"variant": "WisCore_RAK11200_Board"
|
||||||
|
},
|
||||||
|
"connectivity": [
|
||||||
|
"wifi",
|
||||||
|
"bluetooth",
|
||||||
|
"ethernet",
|
||||||
|
"can"
|
||||||
|
],
|
||||||
|
"frameworks": [
|
||||||
|
"arduino",
|
||||||
|
"espidf"
|
||||||
|
],
|
||||||
|
"name": "WisCore RAK11200 Board",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "4MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 4194304,
|
||||||
|
"protocols": [
|
||||||
|
"esptool",
|
||||||
|
"espota",
|
||||||
|
"ftdi"
|
||||||
|
],
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 460800
|
||||||
|
},
|
||||||
|
"url": "https://www.rakwireless.com",
|
||||||
|
"vendor": "RAKwireless"
|
||||||
|
}
|
||||||
0
data/static/.gitkeep
Normal file
0
data/static/.gitkeep
Normal file
@@ -1 +0,0 @@
|
|||||||
not yet supported - soon will be included in build
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 532 B |
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.62 9.5 12c0 1.02.62 1.9 1.5 2.29v3.3L7.59 21 9 22.41l3-3 3 3L16.41 21 13 17.59v-3.3zM12 1C5.93 1 1 5.93 1 12h2c0-4.97 4.03-9 9-9s9 4.03 9 9h2c0-6.07-4.93-11-11-11z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 442 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -2,22 +2,21 @@
|
|||||||
|
|
||||||
You probably don't care about this section - skip to the next one.
|
You probably don't care about this section - skip to the next one.
|
||||||
|
|
||||||
## before next release
|
* usb lora dongle from pine64, add end user instructions
|
||||||
|
* measure rak4630 power draw and turn off power for GPS most of the time. We should be able to run on the small solar panel.
|
||||||
* @havealoha fixedposition not working
|
* turn on watchdog reset if app hangs on nrf52 or esp32
|
||||||
* pine64 lora module
|
* pine64 solar boards
|
||||||
* merge https://meshtastic.discourse.group/t/spanish-translation-update/2986/5
|
* for the matrix gateway? recommended by @sam-uk https://github.com/matrix-org/coap-proxy
|
||||||
* nrf52 USB is unreliable while sleeping?
|
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
|
||||||
* @luxonn reports that after a while the android app stops showing new messages
|
|
||||||
* nrf52 shows as "sleeping" in android app? (but led is blinking)
|
|
||||||
* ask for vercel access
|
* ask for vercel access
|
||||||
* fix heltec battery scaling
|
* finish plan for riot.im
|
||||||
* check android 1.2.20 usage, possibly release to general
|
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code
|
||||||
* release android APK
|
* NO add rak4600 support (with rf95 radio and limited ram)
|
||||||
|
* store esp32 crashes to flash (and 64KB coredump partition) - https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/core_dump.html
|
||||||
* add rak4600 support (with rf95 radio and limited ram)
|
* If more nodes appear than the nodedb can hold, delete oldest entries from DB
|
||||||
|
* send debug info 'in-band'
|
||||||
* Switch to use https://github.com/adafruit/Adafruit_nRF52_Arduino.git when available (see arduino code for examples)
|
* DONE @luxonn reports that after a while the android app stops showing new messages
|
||||||
|
* DONE release android APK - fix recent 1.2.28 crash report
|
||||||
* DONE remote admin busted?
|
* DONE remote admin busted?
|
||||||
* DONE check android code - @havealoha comments about odd sleep behavior
|
* DONE check android code - @havealoha comments about odd sleep behavior
|
||||||
* ABANDONED test github actions locally on linux
|
* ABANDONED test github actions locally on linux
|
||||||
@@ -28,7 +27,6 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* DONE tcp stream problem in python+pordtuino, server thinks client dropped when client DID NOT DROP
|
* DONE tcp stream problem in python+pordtuino, server thinks client dropped when client DID NOT DROP
|
||||||
* DONE TCP mode for android, localhost is at 10.0.2.2
|
* DONE TCP mode for android, localhost is at 10.0.2.2
|
||||||
* DONE make sure USB still works in android
|
* DONE make sure USB still works in android
|
||||||
* add portduino builds to zip
|
|
||||||
* add license to portduino and make announcement
|
* add license to portduino and make announcement
|
||||||
* DONE naks are being dropped (though enqueuedLocal) sometimes before phone/PC gets them
|
* DONE naks are being dropped (though enqueuedLocal) sometimes before phone/PC gets them
|
||||||
* DONE have android fill in if local GPS has poor signal
|
* DONE have android fill in if local GPS has poor signal
|
||||||
@@ -65,7 +63,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
|
|
||||||
## Multichannel support
|
## Multichannel support
|
||||||
|
|
||||||
* DONE cleanup the external notification and serial plugins
|
* DONE cleanup the external notification and serial modules
|
||||||
* non ack version of stress test fails sometimes!
|
* non ack version of stress test fails sometimes!
|
||||||
* tx fault test has a bug #734 - * turn off fault 8: https://github.com/meshtastic/Meshtastic-device/issues/734
|
* tx fault test has a bug #734 - * turn off fault 8: https://github.com/meshtastic/Meshtastic-device/issues/734
|
||||||
* DONE move device types into an enum in nodeinfo
|
* DONE move device types into an enum in nodeinfo
|
||||||
@@ -73,7 +71,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* nrf52 should preserve local time across reset
|
* nrf52 should preserve local time across reset
|
||||||
* cdcacm bug on nrf52: emittx thinks it emitted but client sees nothing. works again later
|
* cdcacm bug on nrf52: emittx thinks it emitted but client sees nothing. works again later
|
||||||
* nrf52: segger logs have errors in formatting that should be impossible (because not going through serial, try stalling on segger)
|
* nrf52: segger logs have errors in formatting that should be impossible (because not going through serial, try stalling on segger)
|
||||||
* DONE call RouterPlugin for *all* packets - not just Router packets
|
* DONE call RouterModule for *all* packets - not just Router packets
|
||||||
* DONE generate channel hash from the name of the channel+the psk (not just one or the other)
|
* DONE generate channel hash from the name of the channel+the psk (not just one or the other)
|
||||||
* DONE send a hint that can be used to select which channel to try and hash against with each message
|
* DONE send a hint that can be used to select which channel to try and hash against with each message
|
||||||
* DONE remove deprecated
|
* DONE remove deprecated
|
||||||
@@ -81,13 +79,13 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* DONE set mynodeinfo.max_channels
|
* DONE set mynodeinfo.max_channels
|
||||||
* DONE set mynodeinfo.num_bands (formerly num_channels)
|
* DONE set mynodeinfo.num_bands (formerly num_channels)
|
||||||
* DONE fix sniffing of non Routing packets
|
* DONE fix sniffing of non Routing packets
|
||||||
* DONE enable remote setttings access by moving settings operations into a regular plugin (move settings ops out of PhoneAPI)
|
* DONE enable remote setttings access by moving settings operations into a regular module (move settings ops out of PhoneAPI)
|
||||||
* DONE move portnum up?
|
* DONE move portnum up?
|
||||||
* DONE remove region specific builds from the firmware
|
* DONE remove region specific builds from the firmware
|
||||||
* DONE test single channel without python
|
* DONE test single channel without python
|
||||||
* DONE Use "default" for name if name is empty
|
* DONE Use "default" for name if name is empty
|
||||||
* DONE fix python data packet receiving (nothing showing in log?)
|
* DONE fix python data packet receiving (nothing showing in log?)
|
||||||
* DONE implement 'get channels' Admin plugin operation
|
* DONE implement 'get channels' Admin module operation
|
||||||
* DONE use get-channels from python
|
* DONE use get-channels from python
|
||||||
* DONE use get channels & get settings from android
|
* DONE use get channels & get settings from android
|
||||||
* DONE use set-channel from python
|
* DONE use set-channel from python
|
||||||
@@ -100,7 +98,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* DONE fix setch-fast in python tool
|
* DONE fix setch-fast in python tool
|
||||||
* age out pendingrequests in the python API
|
* age out pendingrequests in the python API
|
||||||
* DONE stress test channel download from python, sometimes it seems like we don't get all replies, bug was due to simultaneous android connection
|
* DONE stress test channel download from python, sometimes it seems like we don't get all replies, bug was due to simultaneous android connection
|
||||||
* DONE combine acks and responses in a single message if possible (do routing plugin LAST and drop ACK if someone else has already replied)
|
* DONE combine acks and responses in a single message if possible (do routing module LAST and drop ACK if someone else has already replied)
|
||||||
* DONE don't send packets we received from the phone BACK TOWARDS THE PHONE (possibly use fromnode 0 for packets the phone sends?)
|
* DONE don't send packets we received from the phone BACK TOWARDS THE PHONE (possibly use fromnode 0 for packets the phone sends?)
|
||||||
* DONE fix 1.1.50 android debug panel display
|
* DONE fix 1.1.50 android debug panel display
|
||||||
* DONE test android channel setting
|
* DONE test android channel setting
|
||||||
@@ -120,7 +118,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* use single byte 'well known' channel names for admin, gpio, etc...
|
* use single byte 'well known' channel names for admin, gpio, etc...
|
||||||
* use presence of gpio channel to enable gpio ops, same for serial etc...
|
* use presence of gpio channel to enable gpio ops, same for serial etc...
|
||||||
* DONE restrict gpio & serial & settings operations to the admin channel (unless local to the current node)
|
* DONE restrict gpio & serial & settings operations to the admin channel (unless local to the current node)
|
||||||
* DONE add channel restrictions for plugins (and restrict routing plugin to the "control" channel)
|
* DONE add channel restrictions for modules (and restrict routing module to the "control" channel)
|
||||||
* stress test multi channel
|
* stress test multi channel
|
||||||
* DONE investigate @mc-hamster report of heap corruption
|
* DONE investigate @mc-hamster report of heap corruption
|
||||||
* DONE use set-user from android
|
* DONE use set-user from android
|
||||||
@@ -136,7 +134,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* allow chaning packets in single transmission - to increase airtime efficiency and amortize packet overhead
|
* allow chaning packets in single transmission - to increase airtime efficiency and amortize packet overhead
|
||||||
* DONE move most parts of meshpacket into the Data packet, so that we can chain multiple Data for sending when they all have a common destination and key.
|
* DONE move most parts of meshpacket into the Data packet, so that we can chain multiple Data for sending when they all have a common destination and key.
|
||||||
* when selecting a MeshPacket for transmit, scan the TX queue for any Data packets we can merge together as a WirePayload. In the low level send/rx code expand that into multiple MeshPackets as needed (thus 'hiding' from MeshPacket that over the wire we send multiple datapackets
|
* when selecting a MeshPacket for transmit, scan the TX queue for any Data packets we can merge together as a WirePayload. In the low level send/rx code expand that into multiple MeshPackets as needed (thus 'hiding' from MeshPacket that over the wire we send multiple datapackets
|
||||||
* DONE confirm we are still calling the plugins for messages inbound from the phone (or generated locally)
|
* DONE confirm we are still calling the modules for messages inbound from the phone (or generated locally)
|
||||||
* DONE confirm we are still multi hop routing flood broadcasts
|
* DONE confirm we are still multi hop routing flood broadcasts
|
||||||
* DONE confirm we are still doing resends on unicast reliable packets
|
* DONE confirm we are still doing resends on unicast reliable packets
|
||||||
* add history to routed packets: https://meshtastic.discourse.group/t/packet-source-tracking/2764/2
|
* add history to routed packets: https://meshtastic.discourse.group/t/packet-source-tracking/2764/2
|
||||||
@@ -144,7 +142,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
* DONE move acks into routing
|
* DONE move acks into routing
|
||||||
* DONE make all subpackets different versions of data
|
* DONE make all subpackets different versions of data
|
||||||
* DONE move routing control into a data packet
|
* DONE move routing control into a data packet
|
||||||
* have phoneapi done via plugin (will allow multiple simultaneous API clients - stop disabling BLE while using phone API)
|
* have phoneapi done via module (will allow multiple simultaneous API clients - stop disabling BLE while using phone API)
|
||||||
* use reference counting and dynamic sizing for meshpackets. - use https://docs.microsoft.com/en-us/cpp/cpp/how-to-create-and-use-shared-ptr-instances?view=msvc-160 (already used in arduino)
|
* use reference counting and dynamic sizing for meshpackets. - use https://docs.microsoft.com/en-us/cpp/cpp/how-to-create-and-use-shared-ptr-instances?view=msvc-160 (already used in arduino)
|
||||||
* let multiple PhoneAPI endpoints work at once
|
* let multiple PhoneAPI endpoints work at once
|
||||||
* allow multiple simultaneous bluetooth connections (create the bluetooth phoneapi instance dynamically based on client id)
|
* allow multiple simultaneous bluetooth connections (create the bluetooth phoneapi instance dynamically based on client id)
|
||||||
@@ -184,13 +182,13 @@ For app cleanup:
|
|||||||
* DONE require a recent python api to talk to these new device loads
|
* DONE require a recent python api to talk to these new device loads
|
||||||
* DONE require a recent android app to talk to these new device loads
|
* DONE require a recent android app to talk to these new device loads
|
||||||
* DONE fix handleIncomingPosition
|
* DONE fix handleIncomingPosition
|
||||||
* DONE move want_replies handling into plugins
|
* DONE move want_replies handling into modules
|
||||||
* DONE on android for received positions handle either old or new positions / user messages
|
* DONE on android for received positions handle either old or new positions / user messages
|
||||||
* DONE on android side send old or new positions as needed / user messages
|
* DONE on android side send old or new positions as needed / user messages
|
||||||
* DONE test python side handle new position/user messages
|
* DONE test python side handle new position/user messages
|
||||||
* DONE make a gpio example. --gpiowrb 4 1, --gpiord 0x444, --gpiowatch 0x3ff
|
* DONE make a gpio example. --gpiowrb 4 1, --gpiord 0x444, --gpiowatch 0x3ff
|
||||||
* DONE fix position sending to use new plugin
|
* DONE fix position sending to use new module
|
||||||
* DONE Add SinglePortNumPlugin - as the new most useful baseclass
|
* DONE Add SinglePortNumModule - as the new most useful baseclass
|
||||||
* DONE move positions into regular data packets (use new app framework)
|
* DONE move positions into regular data packets (use new app framework)
|
||||||
* DONE move user info into regular data packets (use new app framework)
|
* DONE move user info into regular data packets (use new app framework)
|
||||||
* DONE test that positions, text messages and user info still work
|
* DONE test that positions, text messages and user info still work
|
||||||
@@ -327,7 +325,7 @@ Items after the first final candidate release.
|
|||||||
- add "store and forward" support for messages, or move to the DB sync model. This would allow messages to be eventually delivered even if nodes are out of contact at the moment.
|
- add "store and forward" support for messages, or move to the DB sync model. This would allow messages to be eventually delivered even if nodes are out of contact at the moment.
|
||||||
- use variable length Strings in protobufs (instead of current fixed buffers). This would save lots of RAM
|
- use variable length Strings in protobufs (instead of current fixed buffers). This would save lots of RAM
|
||||||
- use BLEDevice::setPower to lower our BLE transmit power - extra range doesn't help us, it costs amps and it increases snoopability
|
- use BLEDevice::setPower to lower our BLE transmit power - extra range doesn't help us, it costs amps and it increases snoopability
|
||||||
- make a HAM build: just a new frequency list, a bool to say 'never do encryption' and use hte callsign as that node's unique id. -from Girts
|
- make a Ham build: just a new frequency list, a bool to say 'never do encryption' and use the callsign as that node's unique id. -from Girts
|
||||||
- don't forward redundant pings or ping responses to the phone, it just wastes phone battery
|
- don't forward redundant pings or ping responses to the phone, it just wastes phone battery
|
||||||
- don't send location packets if we haven't moved significantly
|
- don't send location packets if we haven't moved significantly
|
||||||
- scrub default radio config settings for bandwidth/range/speed
|
- scrub default radio config settings for bandwidth/range/speed
|
||||||
|
|||||||
25
geeksville-private/bl602.md
Normal file
25
geeksville-private/bl602.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
* nutcracker https://www.pine64.org/2020/10/28/nutcracker-challenge-blob-free-wifi-ble/
|
||||||
|
* https://github.com/pine64/bl_iot_sdk
|
||||||
|
* https://github.com/pine64/bl602-docs / https://pine64.github.io/bl602-docs/
|
||||||
|
* https://github.com/pine64/ArduinoCore-bouffalo
|
||||||
|
|
||||||
|
|
||||||
|
cd ~/packages
|
||||||
|
git clone --recursive https://github.com/pine64/bl_iot_sdk
|
||||||
|
|
||||||
|
https://github.com/spacemeowx2/blflash/releases
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME or BL604
|
||||||
|
cd bl_iot_sdk
|
||||||
|
export BL60X_SDK_PATH=/home/kevinh/packages/bl_iot_sdk
|
||||||
|
export CONFIG_CHIP_NAME=BL602
|
||||||
|
cd customer_app/bl602_boot2
|
||||||
|
make
|
||||||
|
|
||||||
|
* todo run hello world on hardware (check for bl604 vs bl602 first)
|
||||||
|
* build/run in the crummy arduino environment
|
||||||
|
* build in platformio
|
||||||
|
|
||||||
|
https://lupyuen.github.io/articles/lorawan2
|
||||||
51
geeksville-private/pine64.md
Normal file
51
geeksville-private/pine64.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Notes on the pine64 lora board
|
||||||
|
|
||||||
|
like before but sx1262 based?
|
||||||
|
|
||||||
|
Since both DIO3 and DIO2 not apply to PINE64 LoRa situation, I will wire SX1262 INT [DIO1] pin, contact to CS341F pin 7 INT# and pin 5.
|
||||||
|
|
||||||
|
FIX ch341 GPIO access from linux
|
||||||
|
RF95 packet RX seems busted FIX FIRST
|
||||||
|
|
||||||
|
USE ch341 devboard if needed
|
||||||
|
|
||||||
|
SX1262 BUSY seems to come out on pin 15 of the RFM90 HOPE module. The 'footprint' seems rotated on the pine64 board schematic and that becomes pin 7 on U4 which is "DIO5" on that schematic. Which goes to pin 8 on the CH341F, which that datasheet calls "IN3"
|
||||||
|
|
||||||
|
FIXME - see if possible to read BUSY from "IN3"?
|
||||||
|
|
||||||
|
on a ch341a
|
||||||
|
* - Pin 15 (D0/CS0 ) as input/output/CS (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT/CH341_PIN_MODE_CS) (confirm hooked to CS)
|
||||||
|
* - Pin 16 (D1/CS1 ) as input/output/CS (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT/CH341_PIN_MODE_CS)
|
||||||
|
* - Pin 17 (D2/CS2 ) as input/output/CS (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT/CH341_PIN_MODE_CS)
|
||||||
|
* - Pin 19 (D4/DOUT2) as input/output (CH341_PIN_MODE_IN/CH341_PIN_MODE_OUT) / gpio4 in linux driver / (FIXME: confirm hooked to IRQ also?)
|
||||||
|
* - Pin 21 (D6/DIN2 ) as input (CH341_PIN_MODE_IN) / called RTS when in UART mode
|
||||||
|
|
||||||
|
## ch341-driver
|
||||||
|
|
||||||
|
driver busted in 5.11 kernels (rf95 init fails). 5.8.0 is okay, 5.8.18 is okay. fails on 5.10.31, 5.9.16 is okay. Therefore breakage happened in 5.10 kernels! Possibly not really breakage, possibly just sloppy caching or something that is more easily caught with modern threading.
|
||||||
|
|
||||||
|
cs_change is not being set on the way into the driver!
|
||||||
|
|
||||||
|
## gpio
|
||||||
|
|
||||||
|
the new GPIO interface https://embeddedbits.org/new-linux-kernel-gpio-user-space-interface/
|
||||||
|
|
||||||
|
~/development/meshtastic/meshtastic-esp32$ gpiodetect
|
||||||
|
gpiochip0 [INT34BB:00] (312 lines)
|
||||||
|
gpiochip1 [ch341] (2 lines)
|
||||||
|
~/development/meshtastic/meshtastic-esp32$ gpioinfo 1
|
||||||
|
gpiochip1 - 2 lines:
|
||||||
|
line 0: "gpio4" unused input active-high
|
||||||
|
line 1: "gpio5" unused input active-high
|
||||||
|
gpiofind gpio4
|
||||||
|
gpiochip1 0
|
||||||
|
|
||||||
|
DO NOT "apt install libgpiod-dev" It doesn't work with kernels newer than about 5.8. Instead build and install from source: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
|
||||||
|
|
||||||
|
## Send in patch
|
||||||
|
Fix drivers/spi/spi.c transfer_once
|
||||||
|
|
||||||
|
read about spi: https://elinux.org/images/2/20/Whats_going_on_with_SPI--mark_brown.pdf
|
||||||
|
|
||||||
|
https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
|
||||||
|
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
||||||
298
platformio.ini
298
platformio.ini
@@ -11,16 +11,27 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
default_envs = tbeam
|
default_envs = tbeam
|
||||||
;default_envs = tbeam0.7
|
;default_envs = tbeam0.7
|
||||||
;default_envs = heltec
|
;default_envs = heltec-v1
|
||||||
|
;default_envs = heltec-v2.0
|
||||||
|
;default_envs = heltec-v2.1
|
||||||
|
;default_envs = tlora-v1
|
||||||
;default_envs = tlora-v1
|
;default_envs = tlora-v1
|
||||||
;default_envs = tlora_v1_3
|
;default_envs = tlora_v1_3
|
||||||
;default_envs = tlora-v2
|
;default_envs = tlora-v2
|
||||||
|
;default_envs = tlora-v2-1-1.6
|
||||||
;default_envs = lora-relay-v1 # nrf board
|
;default_envs = lora-relay-v1 # nrf board
|
||||||
;default_envs = eink
|
;default_envs = t-echo
|
||||||
;default_envs = nrf52840dk-geeksville
|
;default_envs = nrf52840dk-geeksville
|
||||||
;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here
|
;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here
|
||||||
;default_envs = rak4631
|
;default_envs = rak4631_5005
|
||||||
;default_envs = rak4630
|
;default_envs = rak4631_5005_eink
|
||||||
|
;default_envs = rak4631_19003
|
||||||
|
;default_envs = meshtastic-diy-v1
|
||||||
|
;default_envs = meshtastic-diy-v1.1
|
||||||
|
|
||||||
|
; board specific config can be moved to the respective 'variants' file.
|
||||||
|
; See https://docs.platformio.org/en/latest/projectconf/section_platformio.html#extra-configs
|
||||||
|
extra_configs = variants/*/platformio.ini
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
; common is not currently used
|
; common is not currently used
|
||||||
@@ -67,20 +78,24 @@ debug_tool = jlink
|
|||||||
; monitor adapter_khz 10000
|
; monitor adapter_khz 10000
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/meshtastic/esp8266-oled-ssd1306.git#35d796226b853b0c0ff818b2f1aa3d35e7296a96 ; ESP8266_SSD1306
|
https://github.com/meshtastic/esp8266-oled-ssd1306.git#d90231dedbb2f52bd7a32fb8ed8edec52cf4a8cb ; ESP8266_SSD1306
|
||||||
https://github.com/geeksville/OneButton.git ; OneButton library for non-blocking button debounce
|
https://github.com/meshtastic/OneButton.git#3bcba9492d01e2a8a86f46700ab16f96dd2cf1f5 ; OneButton library for non-blocking button debounce
|
||||||
1202 ; CRC32, explicitly needed because dependency is missing in the ble ota update lib
|
1202 ; CRC32, explicitly needed because dependency is missing in the ble ota update lib
|
||||||
https://github.com/meshtastic/arduino-fsm.git#829e967b8a95c094f73c60ef8dacfe66eae38940
|
https://github.com/meshtastic/arduino-fsm.git
|
||||||
https://github.com/meshtastic/SparkFun_Ublox_Arduino_Library.git#31015a55e630a2df77d9d714669c621a5bf355ad
|
https://github.com/meshtastic/SparkFun_Ublox_Arduino_Library.git#31015a55e630a2df77d9d714669c621a5bf355ad
|
||||||
https://github.com/meshtastic/RadioLib.git#07de964e929238949035fb0d5887026a3058df1a
|
https://github.com/meshtastic/RadioLib.git#5582ac30578ff3f53f20630a00b2a8a4b8f92c74
|
||||||
https://github.com/meshtastic/TinyGPSPlus.git#f0f47067ef2f67c856475933188251c1ef615e79
|
https://github.com/meshtastic/TinyGPSPlus.git#f0f47067ef2f67c856475933188251c1ef615e79
|
||||||
https://github.com/meshtastic/AXP202X_Library.git#8404abb6d4b486748636bc6ad72d2a47baaf5460
|
https://github.com/meshtastic/AXP202X_Library.git#8404abb6d4b486748636bc6ad72d2a47baaf5460
|
||||||
Wire ; explicitly needed here because the AXP202 library forgets to add it
|
Wire ; explicitly needed here because the AXP202 library forgets to add it
|
||||||
SPI
|
SPI
|
||||||
https://github.com/geeksville/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3
|
https://github.com/geeksville/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3
|
||||||
PubSubClient
|
PubSubClient
|
||||||
|
|
||||||
; Common settings for conventional (non Portduino) Ardino targets
|
; Used for the code analysis in PIO Home / Inspect
|
||||||
|
check_tool = cppcheck
|
||||||
|
check_skip_packages = yes
|
||||||
|
|
||||||
|
; Common settings for conventional (non Portduino) Arduino targets
|
||||||
[arduino_base]
|
[arduino_base]
|
||||||
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
@@ -88,10 +103,22 @@ framework = arduino
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
|
|
||||||
build_flags = ${env.build_flags} -Os
|
build_flags = ${env.build_flags} -Os
|
||||||
|
# -DRADIOLIB_GODMODE
|
||||||
|
|
||||||
src_filter = ${env.src_filter} -<portduino/>
|
src_filter = ${env.src_filter} -<portduino/>
|
||||||
|
|
||||||
|
; Common libs for environmental measurements (not included in native / portduino)
|
||||||
|
[environmental]
|
||||||
|
lib_deps =
|
||||||
|
adafruit/DHT sensor library@^1.4.1
|
||||||
|
adafruit/Adafruit Unified Sensor@^1.1.4
|
||||||
|
paulstoffregen/OneWire@^2.3.5
|
||||||
|
robtillaart/DS18B20@^0.1.11
|
||||||
|
adafruit/Adafruit BME280 Library@^2.2.2
|
||||||
|
adafruit/Adafruit BME680 Library@^2.0.1
|
||||||
|
adafruit/Adafruit MCP9808 Library@^2.0.0
|
||||||
|
|
||||||
; Common settings for ESP targes, mixin with extends = esp32_base
|
; Common settings for ESP targes, mixin with extends = esp32_base
|
||||||
[esp32_base]
|
[esp32_base]
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
@@ -100,23 +127,34 @@ src_filter =
|
|||||||
${arduino_base.src_filter} -<nrf52/>
|
${arduino_base.src_filter} -<nrf52/>
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
debug_init_break = tbreak setup
|
debug_init_break = tbreak setup
|
||||||
|
|
||||||
|
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
|
||||||
|
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
|
||||||
|
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags} -Wall -Wextra -Isrc/esp32 -Isrc/esp32-mfix-esp32-psram-cache-issue -lnimble -std=c++11
|
${arduino_base.build_flags} -Wall -Wextra -Isrc/esp32 -Isrc/esp32-mfix-esp32-psram-cache-issue -lnimble -std=c++11
|
||||||
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL
|
||||||
-DAXP_DEBUG_PORT=Serial
|
-DAXP_DEBUG_PORT=Serial
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
|
${environmental.lib_deps}
|
||||||
https://github.com/meshtastic/esp32_https_server.git
|
https://github.com/meshtastic/esp32_https_server.git
|
||||||
adafruit/DHT sensor library@^1.4.1
|
h2zero/NimBLE-Arduino@1.3.6
|
||||||
adafruit/Adafruit Unified Sensor@^1.1.4
|
tobozo/ESP32-targz@^1.1.4
|
||||||
|
arduino-libraries/NTPClient#531eff39d9fbc831f3d03f706a161739203fbe2a
|
||||||
|
lorol/LittleFS_esp32@^1.0.6
|
||||||
|
|
||||||
# Hmm - this doesn't work yet
|
# Hmm - this doesn't work yet
|
||||||
# board_build.ldscript = linker/esp32.extram.bss.ld
|
# board_build.ldscript = linker/esp32.extram.bss.ld
|
||||||
lib_ignore = segger_rtt
|
lib_ignore =
|
||||||
|
segger_rtt
|
||||||
|
ESP32 BLE Arduino
|
||||||
|
|
||||||
platform_packages =
|
platform_packages =
|
||||||
framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#4cde0f5d412d2695184f32e8a47e9bea57b45276
|
framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#4cde0f5d412d2695184f32e8a47e9bea57b45276
|
||||||
|
|
||||||
; leave this commented out to avoid breaking Windows
|
; leave this commented out to avoid breaking Windows
|
||||||
upload_port = /dev/ttyUSB0
|
;upload_port = /dev/ttyUSB0
|
||||||
;monitor_port = /dev/ttyUSB0
|
;monitor_port = /dev/ttyUSB0
|
||||||
|
|
||||||
;upload_port = /dev/cu.SLAB_USBtoUART
|
;upload_port = /dev/cu.SLAB_USBtoUART
|
||||||
@@ -133,63 +171,16 @@ board_build.partitions = partition-table.csv
|
|||||||
|
|
||||||
; -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
; -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||||
|
|
||||||
; The 1.0 release of the TBEAM board
|
|
||||||
[env:tbeam]
|
|
||||||
extends = esp32_base
|
|
||||||
board = ttgo-t-beam
|
|
||||||
lib_deps =
|
|
||||||
${esp32_base.lib_deps}
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D TBEAM_V10
|
|
||||||
|
|
||||||
; The original TBEAM board without the AXP power chip and a few other changes
|
|
||||||
; Note: I've heard reports this didn't work. Disabled until someone with a 0.7 can test and debug.
|
|
||||||
[env:tbeam0.7]
|
|
||||||
extends = esp32_base
|
|
||||||
board = ttgo-t-beam
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D TBEAM_V07
|
|
||||||
|
|
||||||
[env:heltec]
|
|
||||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
|
||||||
extends = esp32_base
|
|
||||||
board = heltec_wifi_lora_32_V2
|
|
||||||
|
|
||||||
[env:tlora-v1]
|
|
||||||
extends = esp32_base
|
|
||||||
board = ttgo-lora32-v1
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D TLORA_V1
|
|
||||||
|
|
||||||
; note: the platformio definition for lora32-v2 seems stale, it is missing a pins_arduino.h file, therefore I don't think it works
|
|
||||||
[env:tlora_v1_3]
|
|
||||||
extends = esp32_base
|
|
||||||
board = ttgo-lora32-v1
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D TLORA_V1_3
|
|
||||||
|
|
||||||
[env:tlora-v2]
|
|
||||||
extends = esp32_base
|
|
||||||
board = ttgo-lora32-v1
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D TLORA_V2
|
|
||||||
|
|
||||||
[env:tlora-v2-1-1.6]
|
|
||||||
extends = esp32_base
|
|
||||||
board = ttgo-lora32-v1
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D TLORA_V2_1_16
|
|
||||||
|
|
||||||
; The Heltec Cubecell plus
|
; The Heltec Cubecell plus
|
||||||
; IMPORTANT NOTE: This target doesn't yet work and probably won't ever work. I'm keeping it around for now.
|
; IMPORTANT NOTE: This target doesn't yet work and probably won't ever work. I'm keeping it around for now.
|
||||||
; For more details see my post in the forum.
|
; For more details see my post in the forum.
|
||||||
[env:cubecellplus]
|
;[env:cubecellplus]
|
||||||
platform = https://github.com/HelTecAutomation/platform-asrmicro650x.git ; we use top-of-tree because stable version has too many bugs - asrmicro650x
|
;platform = https://github.com/HelTecAutomation/platform-asrmicro650x.git ; we use top-of-tree because stable version has too many bugs - asrmicro650x
|
||||||
board = cubecell_board_plus
|
;board = cubecell_board_plus
|
||||||
; FIXME, bug in cubecell arduino - they are supposed to set ARDUINO
|
; FIXME, bug in cubecell arduino - they are supposed to set ARDUINO
|
||||||
build_flags = ${arduino_base.build_flags} -DARDUINO=100 -Isrc/cubecell
|
;build_flags = ${arduino_base.build_flags} -DARDUINO=100 -Isrc/cubecell
|
||||||
src_filter =
|
;src_filter =
|
||||||
${arduino_base.src_filter} -<esp32/> -<nrf52/>
|
; ${arduino_base.src_filter} -<esp32/> -<nrf52/>
|
||||||
|
|
||||||
; Common settings for NRF52 based targets
|
; Common settings for NRF52 based targets
|
||||||
[nrf52_base]
|
[nrf52_base]
|
||||||
@@ -205,13 +196,13 @@ build_flags =
|
|||||||
-Isdk-nrfxlib/crypto/nrf_oberon/include -Lsdk-nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/ -lliboberon_3.0.7
|
-Isdk-nrfxlib/crypto/nrf_oberon/include -Lsdk-nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/ -lliboberon_3.0.7
|
||||||
;-DCFG_DEBUG=3
|
;-DCFG_DEBUG=3
|
||||||
src_filter =
|
src_filter =
|
||||||
${arduino_base.src_filter} -<esp32/> -<nimble/> -<mesh/wifi/> -<mesh/http/> -<plugins/esp32> -<mqtt/>
|
${arduino_base.src_filter} -<esp32/> -<nimble/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mqtt/>
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
BluetoothOTA
|
BluetoothOTA
|
||||||
monitor_port = /dev/ttyACM1
|
; monitor_port = /dev/ttyACM1
|
||||||
|
|
||||||
# we pass in options to jlink so it can understand freertos (note: we don't use "jlink" as the tool)
|
# we pass in options to jlink so it can understand freertos (note: we don't use "jlink" as the tool)
|
||||||
debug_tool = jlink
|
;debug_tool = jlink
|
||||||
debug_port = :2331
|
debug_port = :2331
|
||||||
# Note: the ARGUMENTS MUST BE on multiple lines. Otherwise platformio/commands/debug/helpers.py misparses everything into the "executable"
|
# Note: the ARGUMENTS MUST BE on multiple lines. Otherwise platformio/commands/debug/helpers.py misparses everything into the "executable"
|
||||||
# attribute and leaves "arguments" empty
|
# attribute and leaves "arguments" empty
|
||||||
@@ -245,43 +236,21 @@ debug_init_break =
|
|||||||
[nrf52840_base]
|
[nrf52840_base]
|
||||||
; Common base class for all nrf52840 based targets
|
; Common base class for all nrf52840 based targets
|
||||||
extends = nrf52_base
|
extends = nrf52_base
|
||||||
|
; was -DTINY_USB
|
||||||
|
build_flags = ${nrf52_base.build_flags}
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
|
${environmental.lib_deps}
|
||||||
Adafruit nRFCrypto
|
Adafruit nRFCrypto
|
||||||
|
# Adafruit TinyUSB Arduino
|
||||||
# add Adafruit nRFCrypto platform IO automated scan is broken
|
# add Adafruit nRFCrypto platform IO automated scan is broken
|
||||||
|
|
||||||
[env:lora_isp4520]
|
|
||||||
extends = nrf52_base
|
|
||||||
board = lora_isp4520
|
|
||||||
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/lora_isp4520
|
|
||||||
|
|
||||||
# No screen and GPS on the board. We still need RTC.cpp for the RTC clock.
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/lora_isp4520> -<graphics> -<gps> +<gps/GPS.cpp> +<gps/RTC.cpp>
|
|
||||||
lib_ignore = ${nrf52_base.lib_ignore}
|
|
||||||
ESP8266_SSD1306
|
|
||||||
SparkFun Ublox Arduino Library
|
|
||||||
AXP202X_Library
|
|
||||||
TinyGPSPlus
|
|
||||||
|
|
||||||
upload_protocol = jlink
|
|
||||||
monitor_port = /dev/ttyUSB0
|
|
||||||
|
|
||||||
; The NRF52840-dk development board
|
; The NRF52840-dk development board
|
||||||
; Note: By default no lora device is created for this build - it uses a simulated interface
|
; Note: By default no lora device is created for this build - it uses a simulated interface
|
||||||
[env:nrf52840dk]
|
[env:nrf52840dk]
|
||||||
extends = nrf52840_base
|
extends = nrf52840_base
|
||||||
board = nrf52840_dk
|
board = nrf52840_dk
|
||||||
|
|
||||||
; The NRF52840-dk development board, but @geeksville's board - which has a busted oscilliator
|
|
||||||
[env:nrf52840dk-geeksville]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = nrf52840_dk_modified
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/pca10056-rc-clock
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/pca10056-rc-clock>
|
|
||||||
|
|
||||||
; Note: By default no lora device is created for this build - it uses a simulated interface
|
; Note: By default no lora device is created for this build - it uses a simulated interface
|
||||||
[env:feather_nrf52832]
|
[env:feather_nrf52832]
|
||||||
extends = nrf52_base
|
extends = nrf52_base
|
||||||
@@ -298,136 +267,3 @@ monitor_speed = 115200
|
|||||||
|
|
||||||
# For experimenting with RAM sizes
|
# For experimenting with RAM sizes
|
||||||
# board_build.ldscript = linker/nrf52840_s140_sim832.ld
|
# board_build.ldscript = linker/nrf52840_s140_sim832.ld
|
||||||
|
|
||||||
; The very slick RAK wireless RAK 4631 / 4630 board
|
|
||||||
[env:rak4631]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = wiscore_rak4631
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/WisCore_RAK4631_Board
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/WisCore_RAK4631_Board>
|
|
||||||
debug_tool = jlink
|
|
||||||
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
|
||||||
;upload_protocol = jlink
|
|
||||||
|
|
||||||
; THIS IS UNTESTED (I don't have this board), but other developers can use it as a starting point
|
|
||||||
[env:rak4600]
|
|
||||||
extends = nrf52_base
|
|
||||||
board = wiscore_rak4600
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/WisCore_RAK4600_Board
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/WisCore_RAK4600_Board>
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
|
|
||||||
; The PPR board
|
|
||||||
[env:ppr]
|
|
||||||
extends = nrf52_base
|
|
||||||
board = ppr
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
UC1701
|
|
||||||
|
|
||||||
; The PPR board
|
|
||||||
[env:ppr1]
|
|
||||||
extends = nrf52_base
|
|
||||||
board = ppr1
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/ppr1
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/ppr1>
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
|
|
||||||
; First prototype eink/nrf52840/sx1262 device
|
|
||||||
[env:eink]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = eink
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/eink
|
|
||||||
-DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/eink>
|
|
||||||
lib_deps =
|
|
||||||
${nrf52840_base.lib_deps}
|
|
||||||
https://github.com/geeksville/EPD_Libraries.git
|
|
||||||
TFT_eSPI
|
|
||||||
|
|
||||||
; First prototype eink/nrf52840/sx1262 device
|
|
||||||
[env:eink0.1]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = eink0.1
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/eink0.1
|
|
||||||
-DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/eink0.1>
|
|
||||||
lib_deps =
|
|
||||||
${nrf52840_base.lib_deps}
|
|
||||||
https://github.com/geeksville/EPD_Libraries.git
|
|
||||||
TFT_eSPI
|
|
||||||
|
|
||||||
; The https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay board by @BigCorvus
|
|
||||||
[env:lora-relay-v1]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = lora-relay-v1
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/lora_relay_v1
|
|
||||||
-DUSER_SETUP_LOADED
|
|
||||||
-DTFT_WIDTH=80
|
|
||||||
-DTFT_HEIGHT=160
|
|
||||||
-DST7735_GREENTAB160x80
|
|
||||||
-DST7735_DRIVER
|
|
||||||
-DTFT_CS=ST7735_CS
|
|
||||||
-DTFT_DC=ST7735_RS
|
|
||||||
-DTFT_RST=ST7735_RESET
|
|
||||||
-DSPI_FREQUENCY=27000000
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/lora_relay_v1>
|
|
||||||
lib_deps =
|
|
||||||
${nrf52840_base.lib_deps}
|
|
||||||
SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
|
|
||||||
TFT_eSPI
|
|
||||||
|
|
||||||
; The https://github.com/BigCorvus/LoRa-BLE-Relay-v2 board by @BigCorvus
|
|
||||||
[env:lora-relay-v2]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = lora-relay-v2
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library
|
|
||||||
build_flags = ${nrf52_base.build_flags} -Ivariants/lora_relay_v2
|
|
||||||
-DUSER_SETUP_LOADED
|
|
||||||
-DTFT_WIDTH=80
|
|
||||||
-DTFT_HEIGHT=160
|
|
||||||
-DST7735_GREENTAB160x80
|
|
||||||
-DST7735_DRIVER
|
|
||||||
-DTFT_CS=ST7735_CS
|
|
||||||
-DTFT_DC=ST7735_RS
|
|
||||||
-DTFT_RST=ST7735_RESET
|
|
||||||
-DSPI_FREQUENCY=27000000
|
|
||||||
-DTFT_WR=ST7735_SDA
|
|
||||||
-DTFT_SCLK=ST7735_SCK
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/lora_relay_v2>
|
|
||||||
lib_deps =
|
|
||||||
${nrf52840_base.lib_deps}
|
|
||||||
SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
|
|
||||||
TFT_eSPI
|
|
||||||
|
|
||||||
; The Portduino based sim environment on top of linux
|
|
||||||
[env:native]
|
|
||||||
platform = https://github.com/geeksville/platform-native.git
|
|
||||||
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
|
||||||
build_flags = ${arduino_base.build_flags} -O0
|
|
||||||
framework = arduino
|
|
||||||
board = native
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
rweather/Crypto
|
|
||||||
|
|
||||||
; The GenieBlocks LORA prototype board
|
|
||||||
; note: @geeksville disabled because genieblocks_lora is not checked into the boards directory, please send in a PR to add it ;-)
|
|
||||||
;[env:genieblocks_lora]
|
|
||||||
;extends = esp32_base
|
|
||||||
;board = genieblocks_lora
|
|
||||||
;build_flags =
|
|
||||||
; ${esp32_base.build_flags} -D GENIEBLOCKS
|
|
||||||
|
|||||||
2
proto
2
proto
Submodule proto updated: 157f9891dd...f6ba3722be
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
main.ino.cpp
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include "configuration.h"
|
||||||
#include "BluetoothCommon.h"
|
#include "BluetoothCommon.h"
|
||||||
|
|
||||||
// NRF52 wants these constants as byte arrays
|
// NRF52 wants these constants as byte arrays
|
||||||
|
|||||||
220
src/ButtonThread.h
Normal file
220
src/ButtonThread.h
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
#include "configuration.h"
|
||||||
|
#include "concurrency/OSThread.h"
|
||||||
|
#include "PowerFSM.h"
|
||||||
|
#include "RadioLibInterface.h"
|
||||||
|
#include "graphics/Screen.h"
|
||||||
|
#include "power.h"
|
||||||
|
#include "buzz.h"
|
||||||
|
#include <OneButton.h>
|
||||||
|
|
||||||
|
#ifndef NO_ESP32
|
||||||
|
#include "nimble/BluetoothUtil.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace concurrency
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Watch a GPIO and if we get an IRQ, wake the main thread.
|
||||||
|
* Use to add wake on button press
|
||||||
|
*/
|
||||||
|
void wakeOnIrq(int irq, int mode)
|
||||||
|
{
|
||||||
|
attachInterrupt(
|
||||||
|
irq,
|
||||||
|
[] {
|
||||||
|
BaseType_t higherWake = 0;
|
||||||
|
mainDelay.interruptFromISR(&higherWake);
|
||||||
|
},
|
||||||
|
FALLING);
|
||||||
|
}
|
||||||
|
|
||||||
|
class ButtonThread : public concurrency::OSThread
|
||||||
|
{
|
||||||
|
// Prepare for button presses
|
||||||
|
#ifdef BUTTON_PIN
|
||||||
|
OneButton userButton;
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
OneButton userButtonAlt;
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
OneButton userButtonTouch;
|
||||||
|
#endif
|
||||||
|
static bool shutdown_on_long_stop;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static uint32_t longPressTime;
|
||||||
|
|
||||||
|
// callback returns the period for the next callback invocation (or 0 if we should no longer be called)
|
||||||
|
ButtonThread() : OSThread("Button")
|
||||||
|
{
|
||||||
|
#ifdef BUTTON_PIN
|
||||||
|
userButton = OneButton(BUTTON_PIN, true, true);
|
||||||
|
#ifdef INPUT_PULLUP_SENSE
|
||||||
|
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
|
||||||
|
pinMode(BUTTON_PIN, INPUT_PULLUP_SENSE);
|
||||||
|
#endif
|
||||||
|
userButton.attachClick(userButtonPressed);
|
||||||
|
userButton.attachDuringLongPress(userButtonPressedLong);
|
||||||
|
userButton.attachDoubleClick(userButtonDoublePressed);
|
||||||
|
userButton.attachMultiClick(userButtonMultiPressed);
|
||||||
|
userButton.attachLongPressStart(userButtonPressedLongStart);
|
||||||
|
userButton.attachLongPressStop(userButtonPressedLongStop);
|
||||||
|
wakeOnIrq(BUTTON_PIN, FALLING);
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
userButtonAlt = OneButton(BUTTON_PIN_ALT, true, true);
|
||||||
|
#ifdef INPUT_PULLUP_SENSE
|
||||||
|
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
|
||||||
|
pinMode(BUTTON_PIN_ALT, INPUT_PULLUP_SENSE);
|
||||||
|
#endif
|
||||||
|
userButtonAlt.attachClick(userButtonPressed);
|
||||||
|
userButtonAlt.attachDuringLongPress(userButtonPressedLong);
|
||||||
|
userButtonAlt.attachDoubleClick(userButtonDoublePressed);
|
||||||
|
userButtonAlt.attachLongPressStart(userButtonPressedLongStart);
|
||||||
|
userButtonAlt.attachLongPressStop(userButtonPressedLongStop);
|
||||||
|
wakeOnIrq(BUTTON_PIN_ALT, FALLING);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
userButtonTouch = OneButton(BUTTON_PIN_TOUCH, true, true);
|
||||||
|
#ifdef INPUT_PULLUP_SENSE
|
||||||
|
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
|
||||||
|
pinMode(BUTTON_PIN_TOUCH, INPUT_PULLUP_SENSE);
|
||||||
|
#endif
|
||||||
|
userButtonTouch.attachClick(touchPressed);
|
||||||
|
userButtonTouch.attachDuringLongPress(touchPressedLong);
|
||||||
|
userButtonTouch.attachDoubleClick(touchDoublePressed);
|
||||||
|
userButtonTouch.attachLongPressStart(touchPressedLongStart);
|
||||||
|
userButtonTouch.attachLongPressStop(touchPressedLongStop);
|
||||||
|
wakeOnIrq(BUTTON_PIN_TOUCH, FALLING);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/// If the button is pressed we suppress CPU sleep until release
|
||||||
|
int32_t runOnce() override
|
||||||
|
{
|
||||||
|
canSleep = true; // Assume we should not keep the board awake
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN
|
||||||
|
userButton.tick();
|
||||||
|
canSleep &= userButton.isIdle();
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
userButtonAlt.tick();
|
||||||
|
canSleep &= userButtonAlt.isIdle();
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
userButtonTouch.tick();
|
||||||
|
canSleep &= userButtonTouch.isIdle();
|
||||||
|
#endif
|
||||||
|
// if (!canSleep) DEBUG_MSG("Supressing sleep!\n");
|
||||||
|
// else DEBUG_MSG("sleep ok\n");
|
||||||
|
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void touchPressed()
|
||||||
|
{
|
||||||
|
screen->forceDisplay();
|
||||||
|
DEBUG_MSG("touch press!\n");
|
||||||
|
}
|
||||||
|
static void touchDoublePressed()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("touch double press!\n");
|
||||||
|
}
|
||||||
|
static void touchPressedLong()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("touch press long!\n");
|
||||||
|
}
|
||||||
|
static void touchDoublePressedLong()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("touch double pressed!\n");
|
||||||
|
}
|
||||||
|
static void touchPressedLongStart()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("touch long press start!\n");
|
||||||
|
}
|
||||||
|
static void touchPressedLongStop()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("touch long press stop!\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void userButtonPressed()
|
||||||
|
{
|
||||||
|
// DEBUG_MSG("press!\n");
|
||||||
|
powerFSM.trigger(EVENT_PRESS);
|
||||||
|
}
|
||||||
|
static void userButtonPressedLong()
|
||||||
|
{
|
||||||
|
// DEBUG_MSG("Long press!\n");
|
||||||
|
#ifndef NRF52_SERIES
|
||||||
|
screen->adjustBrightness();
|
||||||
|
#endif
|
||||||
|
// If user button is held down for 5 seconds, shutdown the device.
|
||||||
|
if (millis() - longPressTime > 5 * 1000) {
|
||||||
|
#ifdef TBEAM_V10
|
||||||
|
if (axp192_found == true) {
|
||||||
|
setLed(false);
|
||||||
|
power->shutdown();
|
||||||
|
}
|
||||||
|
#elif NRF52_SERIES
|
||||||
|
// Do actual shutdown when button released, otherwise the button release
|
||||||
|
// may wake the board immediatedly.
|
||||||
|
if (!shutdown_on_long_stop) {
|
||||||
|
screen->startShutdownScreen();
|
||||||
|
DEBUG_MSG("Shutdown from long press");
|
||||||
|
playBeep();
|
||||||
|
ledOff(PIN_LED1);
|
||||||
|
ledOff(PIN_LED2);
|
||||||
|
shutdown_on_long_stop = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
// DEBUG_MSG("Long press %u\n", (millis() - longPressTime));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void userButtonDoublePressed()
|
||||||
|
{
|
||||||
|
#ifndef NO_ESP32
|
||||||
|
disablePin();
|
||||||
|
#elif defined(HAS_EINK)
|
||||||
|
digitalWrite(PIN_EINK_EN,digitalRead(PIN_EINK_EN) == LOW);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void userButtonMultiPressed()
|
||||||
|
{
|
||||||
|
#ifndef NO_ESP32
|
||||||
|
clearNVS();
|
||||||
|
#endif
|
||||||
|
#ifdef NRF52_SERIES
|
||||||
|
clearBonds();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void userButtonPressedLongStart()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("Long press start!\n");
|
||||||
|
longPressTime = millis();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void userButtonPressedLongStop()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("Long press stop!\n");
|
||||||
|
longPressTime = 0;
|
||||||
|
if (shutdown_on_long_stop) {
|
||||||
|
playShutdownMelody();
|
||||||
|
delay(3000);
|
||||||
|
power->shutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
61
src/DebugConfiguration.h
Normal file
61
src/DebugConfiguration.h
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
// DEBUG LED
|
||||||
|
#ifndef LED_INVERTED
|
||||||
|
#define LED_INVERTED 0 // define as 1 if LED is active low (on)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// DEBUG
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef CONSOLE_MAX_BAUD
|
||||||
|
#define SERIAL_BAUD CONSOLE_MAX_BAUD
|
||||||
|
#else
|
||||||
|
#define SERIAL_BAUD 921600 // Serial debug baud rate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "SerialConsole.h"
|
||||||
|
|
||||||
|
#define DEBUG_PORT (*console) // Serial debug port
|
||||||
|
|
||||||
|
// What platforms should use SEGGER?
|
||||||
|
#ifdef NRF52_SERIES
|
||||||
|
|
||||||
|
// Always include the SEGGER code on NRF52 - because useful for debugging
|
||||||
|
#include "SEGGER_RTT.h"
|
||||||
|
|
||||||
|
// The channel we send stdout data to
|
||||||
|
#define SEGGER_STDOUT_CH 0
|
||||||
|
|
||||||
|
// Debug printing to segger console
|
||||||
|
#define SEGGER_MSG(...) SEGGER_RTT_printf(SEGGER_STDOUT_CH, __VA_ARGS__)
|
||||||
|
|
||||||
|
// If we are not on a NRF52840 (which has built in USB-ACM serial support) and we don't have serial pins hooked up, then we MUST
|
||||||
|
// use SEGGER for debug output
|
||||||
|
#if !defined(PIN_SERIAL_RX) && !defined(NRF52840_XXAA)
|
||||||
|
// No serial ports on this board - ONLY use segger in memory console
|
||||||
|
#define USE_SEGGER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define SERIAL0_RX_GPIO 3 // Always GPIO3 on ESP32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_SEGGER
|
||||||
|
#define DEBUG_MSG(...) SEGGER_RTT_printf(0, __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#ifdef DEBUG_PORT
|
||||||
|
#define DEBUG_MSG(...) DEBUG_PORT.logDebug(__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define DEBUG_MSG(...)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// AXP192 (Rev1-specific options)
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define GPS_POWER_CTRL_CH 3
|
||||||
|
#define LORA_POWER_CTRL_CH 2
|
||||||
|
|
||||||
|
// Default Bluetooth PIN
|
||||||
|
#define defaultBLEPin 123456
|
||||||
@@ -1,21 +1,22 @@
|
|||||||
|
#include "configuration.h"
|
||||||
#include "FSCommon.h"
|
#include "FSCommon.h"
|
||||||
|
|
||||||
void fsInit()
|
void fsInit()
|
||||||
{
|
{
|
||||||
#ifdef FS
|
#ifdef FSCom
|
||||||
if (!FSBegin())
|
if (!FSBegin())
|
||||||
{
|
{
|
||||||
DEBUG_MSG("ERROR filesystem mount Failed\n");
|
DEBUG_MSG("ERROR filesystem mount Failed\n");
|
||||||
assert(0); // FIXME - report failure to phone
|
assert(0); // FIXME - report failure to phone
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_MSG("Filesystem files:\n");
|
DEBUG_MSG("Filesystem files:\n");
|
||||||
File dir = FS.open("/");
|
File dir = FSCom.open("/");
|
||||||
File f = dir.openNextFile();
|
File f = dir.openNextFile();
|
||||||
while (f) {
|
while (f) {
|
||||||
DEBUG_MSG(" %s\n", f.name());
|
DEBUG_MSG(" %s\n", f.name());
|
||||||
f.close();
|
f.close();
|
||||||
f = dir.openNextFile();
|
f = dir.openNextFile();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,22 +7,22 @@
|
|||||||
#ifdef PORTDUINO
|
#ifdef PORTDUINO
|
||||||
// Portduino version
|
// Portduino version
|
||||||
#include "PortduinoFS.h"
|
#include "PortduinoFS.h"
|
||||||
#define FS PortduinoFS
|
#define FSCom PortduinoFS
|
||||||
#define FSBegin() true
|
#define FSBegin() true
|
||||||
#define FILE_O_WRITE "w"
|
#define FILE_O_WRITE "w"
|
||||||
#define FILE_O_READ "r"
|
#define FILE_O_READ "r"
|
||||||
#elif !defined(NO_ESP32)
|
#elif !defined(NO_ESP32)
|
||||||
// ESP32 version
|
// ESP32 version
|
||||||
#include "SPIFFS.h"
|
#include "LITTLEFS.h"
|
||||||
#define FS SPIFFS
|
#define FSCom LITTLEFS
|
||||||
#define FSBegin() FS.begin(true)
|
#define FSBegin() FSCom.begin(true)
|
||||||
#define FILE_O_WRITE "w"
|
#define FILE_O_WRITE "w"
|
||||||
#define FILE_O_READ "r"
|
#define FILE_O_READ "r"
|
||||||
#else
|
#else
|
||||||
// NRF52 version
|
// NRF52 version
|
||||||
#include "InternalFileSystem.h"
|
#include "InternalFileSystem.h"
|
||||||
#define FS InternalFS
|
#define FSCom InternalFS
|
||||||
#define FSBegin() FS.begin()
|
#define FSBegin() FSCom.begin()
|
||||||
using namespace Adafruit_LittleFS_Namespace;
|
using namespace Adafruit_LittleFS_Namespace;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
136
src/GPSStatus.h
136
src/GPSStatus.h
@@ -1,8 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Status.h"
|
#include "Status.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "NodeDB.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
extern NodeDB nodeDB;
|
||||||
|
|
||||||
namespace meshtastic
|
namespace meshtastic
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -16,28 +19,39 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
bool hasLock = false; // default to false, until we complete our first read
|
bool hasLock = false; // default to false, until we complete our first read
|
||||||
bool isConnected = false; // Do we have a GPS we are talking to
|
bool isConnected = false; // Do we have a GPS we are talking to
|
||||||
int32_t latitude = 0, longitude = 0; // as an int mult by 1e-7 to get value as double
|
|
||||||
int32_t altitude = 0;
|
Position p = Position_init_default;
|
||||||
uint32_t dop = 0; // Diminution of position; PDOP where possible (UBlox), HDOP otherwise (TinyGPS) in 10^2 units (needs
|
|
||||||
// scaling before use)
|
|
||||||
uint32_t heading = 0;
|
|
||||||
uint32_t numSatellites = 0;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPSStatus() { statusType = STATUS_TYPE_GPS; }
|
GPSStatus() { statusType = STATUS_TYPE_GPS; }
|
||||||
|
|
||||||
|
// proposed for deprecation
|
||||||
GPSStatus(bool hasLock, bool isConnected, int32_t latitude, int32_t longitude, int32_t altitude, uint32_t dop,
|
GPSStatus(bool hasLock, bool isConnected, int32_t latitude, int32_t longitude, int32_t altitude, uint32_t dop,
|
||||||
uint32_t heading, uint32_t numSatellites)
|
uint32_t heading, uint32_t numSatellites)
|
||||||
: Status()
|
: Status()
|
||||||
{
|
{
|
||||||
this->hasLock = hasLock;
|
this->hasLock = hasLock;
|
||||||
this->isConnected = isConnected;
|
this->isConnected = isConnected;
|
||||||
this->latitude = latitude;
|
|
||||||
this->longitude = longitude;
|
this->p.latitude_i = latitude;
|
||||||
this->altitude = altitude;
|
this->p.longitude_i = longitude;
|
||||||
this->dop = dop;
|
this->p.altitude = altitude;
|
||||||
this->heading = heading;
|
this->p.PDOP = dop;
|
||||||
this->numSatellites = numSatellites;
|
this->p.ground_track = heading;
|
||||||
|
this->p.sats_in_view = numSatellites;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// preferred method
|
||||||
|
GPSStatus(bool hasLock, bool isConnected, const Position& pos)
|
||||||
|
: Status()
|
||||||
|
{
|
||||||
|
this->hasLock = hasLock;
|
||||||
|
this->isConnected = isConnected;
|
||||||
|
|
||||||
|
// all-in-one struct copy
|
||||||
|
this->p = pos;
|
||||||
|
}
|
||||||
|
|
||||||
GPSStatus(const GPSStatus &);
|
GPSStatus(const GPSStatus &);
|
||||||
GPSStatus &operator=(const GPSStatus &);
|
GPSStatus &operator=(const GPSStatus &);
|
||||||
|
|
||||||
@@ -47,45 +61,91 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
bool getIsConnected() const { return isConnected; }
|
bool getIsConnected() const { return isConnected; }
|
||||||
|
|
||||||
int32_t getLatitude() const { return latitude; }
|
int32_t getLatitude() const {
|
||||||
|
if (radioConfig.preferences.fixed_position){
|
||||||
|
#if GPS_EXTRAVERBOSE
|
||||||
|
DEBUG_MSG("WARNING: Using fixed latitude\n");
|
||||||
|
#endif
|
||||||
|
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
|
return node->position.latitude_i;
|
||||||
|
} else {
|
||||||
|
return p.latitude_i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int32_t getLongitude() const { return longitude; }
|
int32_t getLongitude() const {
|
||||||
|
if (radioConfig.preferences.fixed_position){
|
||||||
|
#if GPS_EXTRAVERBOSE
|
||||||
|
DEBUG_MSG("WARNING: Using fixed longitude\n");
|
||||||
|
#endif
|
||||||
|
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
|
return node->position.longitude_i;
|
||||||
|
} else {
|
||||||
|
return p.longitude_i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int32_t getAltitude() const { return altitude; }
|
int32_t getAltitude() const {
|
||||||
|
if (radioConfig.preferences.fixed_position){
|
||||||
|
#if GPS_EXTRAVERBOSE
|
||||||
|
DEBUG_MSG("WARNING: Using fixed altitude\n");
|
||||||
|
#endif
|
||||||
|
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
|
return node->position.altitude;
|
||||||
|
} else {
|
||||||
|
return p.altitude;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t getDOP() const { return dop; }
|
uint32_t getDOP() const { return p.PDOP; }
|
||||||
|
|
||||||
uint32_t getHeading() const { return heading; }
|
uint32_t getHeading() const { return p.ground_track; }
|
||||||
|
|
||||||
uint32_t getNumSatellites() const { return numSatellites; }
|
uint32_t getNumSatellites() const { return p.sats_in_view; }
|
||||||
|
|
||||||
bool matches(const GPSStatus *newStatus) const
|
bool matches(const GPSStatus *newStatus) const
|
||||||
{
|
{
|
||||||
return (newStatus->hasLock != hasLock || newStatus->isConnected != isConnected || newStatus->latitude != latitude ||
|
#if GPS_EXTRAVERBOSE
|
||||||
newStatus->longitude != longitude || newStatus->altitude != altitude || newStatus->dop != dop ||
|
DEBUG_MSG("GPSStatus.match() new pos@%x to old pos@%x\n",
|
||||||
newStatus->heading != heading || newStatus->numSatellites != numSatellites);
|
newStatus->p.pos_timestamp, p.pos_timestamp);
|
||||||
|
#endif
|
||||||
|
return (newStatus->hasLock != hasLock ||
|
||||||
|
newStatus->isConnected != isConnected ||
|
||||||
|
newStatus->p.latitude_i != p.latitude_i ||
|
||||||
|
newStatus->p.longitude_i != p.longitude_i ||
|
||||||
|
newStatus->p.altitude != p.altitude ||
|
||||||
|
newStatus->p.altitude_hae != p.altitude_hae ||
|
||||||
|
newStatus->p.PDOP != p.PDOP ||
|
||||||
|
newStatus->p.ground_track != p.ground_track ||
|
||||||
|
newStatus->p.sats_in_view != p.sats_in_view);
|
||||||
}
|
}
|
||||||
|
|
||||||
int updateStatus(const GPSStatus *newStatus)
|
int updateStatus(const GPSStatus *newStatus)
|
||||||
{
|
{
|
||||||
// Only update the status if values have actually changed
|
// Only update the status if values have actually changed
|
||||||
bool isDirty;
|
bool isDirty = matches(newStatus);
|
||||||
{
|
|
||||||
isDirty = matches(newStatus);
|
if (isDirty && p.pos_timestamp &&
|
||||||
initialized = true;
|
(newStatus->p.pos_timestamp == p.pos_timestamp)) {
|
||||||
hasLock = newStatus->hasLock;
|
// We can NEVER be in two locations at the same time! (also PR #886)
|
||||||
isConnected = newStatus->isConnected;
|
DEBUG_MSG("BUG!! positional timestamp unchanged from prev solution\n");
|
||||||
latitude = newStatus->latitude;
|
|
||||||
longitude = newStatus->longitude;
|
|
||||||
altitude = newStatus->altitude;
|
|
||||||
dop = newStatus->dop;
|
|
||||||
heading = newStatus->heading;
|
|
||||||
numSatellites = newStatus->numSatellites;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initialized = true;
|
||||||
|
hasLock = newStatus->hasLock;
|
||||||
|
isConnected = newStatus->isConnected;
|
||||||
|
|
||||||
|
p = newStatus->p;
|
||||||
|
|
||||||
if (isDirty) {
|
if (isDirty) {
|
||||||
if (hasLock)
|
if (hasLock) {
|
||||||
DEBUG_MSG("New GPS pos lat=%f, lon=%f, alt=%d, pdop=%f, heading=%f, sats=%d\n", latitude * 1e-7, longitude * 1e-7,
|
// In debug logs, identify position by @timestamp:stage (stage 3 = notify)
|
||||||
altitude, dop * 1e-2, heading * 1e-5, numSatellites);
|
DEBUG_MSG("New GPS pos@%x:3 lat=%f, lon=%f, alt=%d, pdop=%.2f, track=%.2f, sats=%d\n",
|
||||||
else
|
p.pos_timestamp,
|
||||||
|
p.latitude_i * 1e-7, p.longitude_i * 1e-7,
|
||||||
|
p.altitude, p.PDOP * 1e-2, p.ground_track * 1e-5,
|
||||||
|
p.sats_in_view);
|
||||||
|
} else
|
||||||
DEBUG_MSG("No GPS lock\n");
|
DEBUG_MSG("No GPS lock\n");
|
||||||
onNewStatus.notifyObservers(this);
|
onNewStatus.notifyObservers(this);
|
||||||
}
|
}
|
||||||
@@ -95,4 +155,4 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
} // namespace meshtastic
|
} // namespace meshtastic
|
||||||
|
|
||||||
extern meshtastic::GPSStatus *gpsStatus;
|
extern meshtastic::GPSStatus *gpsStatus;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "OSTimer.h"
|
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "OSTimer.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Schedule a callback to run. The callback must _not_ block, though it is called from regular thread level (not ISR)
|
* Schedule a callback to run. The callback must _not_ block, though it is called from regular thread level (not ISR)
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
|
#include "configuration.h"
|
||||||
#include "Observer.h"
|
#include "Observer.h"
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ template <class Callback, class T> class CallbackObserver : public Observer<T>
|
|||||||
CallbackObserver(Callback *_objPtr, ObserverCallback _method) : objPtr(_objPtr), method(_method) {}
|
CallbackObserver(Callback *_objPtr, ObserverCallback _method) : objPtr(_objPtr), method(_method) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int onNotify(T arg) { return (objPtr->*method)(arg); }
|
virtual int onNotify(T arg) override { return (objPtr->*method)(arg); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,4 +104,4 @@ template <class T> void Observer<T>::observe(Observable<T> *o)
|
|||||||
|
|
||||||
observed = o;
|
observed = o;
|
||||||
o->addObserver(this);
|
o->addObserver(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include "configuration.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "PowerFSM.h"
|
#include "PowerFSM.h"
|
||||||
@@ -42,6 +43,7 @@ Power *power;
|
|||||||
|
|
||||||
using namespace meshtastic;
|
using namespace meshtastic;
|
||||||
|
|
||||||
|
#ifndef AREF_VOLTAGE
|
||||||
#if defined(NRF52_SERIES)
|
#if defined(NRF52_SERIES)
|
||||||
/*
|
/*
|
||||||
* Internal Reference is +/-0.6V, with an adjustable gain of 1/6, 1/5, 1/4,
|
* Internal Reference is +/-0.6V, with an adjustable gain of 1/6, 1/5, 1/4,
|
||||||
@@ -56,6 +58,7 @@ using namespace meshtastic;
|
|||||||
#else
|
#else
|
||||||
#define AREF_VOLTAGE 3.3
|
#define AREF_VOLTAGE 3.3
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this board has a battery level sensor, set this to a valid implementation
|
* If this board has a battery level sensor, set this to a valid implementation
|
||||||
@@ -72,28 +75,35 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
*
|
*
|
||||||
* FIXME - use a lipo lookup table, the current % full is super wrong
|
* FIXME - use a lipo lookup table, the current % full is super wrong
|
||||||
*/
|
*/
|
||||||
virtual int getBattPercentage()
|
virtual int getBattPercentage() override
|
||||||
{
|
{
|
||||||
float v = getBattVoltage();
|
float v = getBattVoltage();
|
||||||
|
|
||||||
if (v < noBatVolt)
|
if (v < noBatVolt)
|
||||||
return -1; // If voltage is super low assume no battery installed
|
return -1; // If voltage is super low assume no battery installed
|
||||||
|
|
||||||
|
#ifndef NRF52_SERIES
|
||||||
|
// This does not work on a RAK4631 with battery connected
|
||||||
if (v > chargingVolt)
|
if (v > chargingVolt)
|
||||||
return 0; // While charging we can't report % full on the battery
|
return 0; // While charging we can't report % full on the battery
|
||||||
|
#endif
|
||||||
|
|
||||||
return 100 * (v - emptyVolt) / (fullVolt - emptyVolt);
|
return clamp((int)(100 * (v - emptyVolt) / (fullVolt - emptyVolt)), 0, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The raw voltage of the batteryin millivolts or NAN if unknown
|
* The raw voltage of the batteryin millivolts or NAN if unknown
|
||||||
*/
|
*/
|
||||||
virtual float getBattVoltage()
|
virtual float getBattVoltage() override
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef ADC_MULTIPLIER
|
#ifndef ADC_MULTIPLIER
|
||||||
#define ADC_MULTIPLIER 2.0
|
#define ADC_MULTIPLIER 2.0
|
||||||
#endif
|
#endif
|
||||||
|
// Override variant or default ADC_MULTIPLIER if we have the override pref
|
||||||
|
float operativeAdcMultiplier = radioConfig.preferences.adc_multiplier_override > 0 ?
|
||||||
|
radioConfig.preferences.adc_multiplier_override :
|
||||||
|
ADC_MULTIPLIER;
|
||||||
|
|
||||||
#ifdef BATTERY_PIN
|
#ifdef BATTERY_PIN
|
||||||
// Do not call analogRead() often.
|
// Do not call analogRead() often.
|
||||||
@@ -101,8 +111,13 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
if (millis() - last_read_time_ms > min_read_interval) {
|
if (millis() - last_read_time_ms > min_read_interval) {
|
||||||
last_read_time_ms = millis();
|
last_read_time_ms = millis();
|
||||||
uint32_t raw = analogRead(BATTERY_PIN);
|
uint32_t raw = analogRead(BATTERY_PIN);
|
||||||
float scaled = 1000.0 * ADC_MULTIPLIER * (AREF_VOLTAGE / 1024.0) * raw;
|
float scaled;
|
||||||
// DEBUG_MSG("raw val=%u scaled=%u\n", raw, (uint32_t)(scaled));
|
#ifndef VBAT_RAW_TO_SCALED
|
||||||
|
scaled = 1000.0 * operativeAdcMultiplier * (AREF_VOLTAGE / 1024.0) * raw;
|
||||||
|
#else
|
||||||
|
scaled = VBAT_RAW_TO_SCALED(raw); //defined in variant.h
|
||||||
|
#endif
|
||||||
|
// DEBUG_MSG("battery gpio %d raw val=%u scaled=%u\n", BATTERY_PIN, raw, (uint32_t)(scaled));
|
||||||
last_read_value = scaled;
|
last_read_value = scaled;
|
||||||
return scaled;
|
return scaled;
|
||||||
} else {
|
} else {
|
||||||
@@ -116,30 +131,37 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
/**
|
/**
|
||||||
* return true if there is a battery installed in this unit
|
* return true if there is a battery installed in this unit
|
||||||
*/
|
*/
|
||||||
virtual bool isBatteryConnect() { return getBattPercentage() != -1; }
|
virtual bool isBatteryConnect() override { return getBattPercentage() != -1; }
|
||||||
|
|
||||||
/// If we see a battery voltage higher than physics allows - assume charger is pumping
|
/// If we see a battery voltage higher than physics allows - assume charger is pumping
|
||||||
/// in power
|
/// in power
|
||||||
virtual bool isVBUSPlug() { return getBattVoltage() > 1000 * chargingVolt; }
|
virtual bool isVBUSPlug() override { return getBattVoltage() > chargingVolt; }
|
||||||
|
|
||||||
/// Assume charging if we have a battery and external power is connected.
|
/// Assume charging if we have a battery and external power is connected.
|
||||||
/// we can't be smart enough to say 'full'?
|
/// we can't be smart enough to say 'full'?
|
||||||
virtual bool isChargeing() { return isBatteryConnect() && isVBUSPlug(); }
|
virtual bool isChargeing() override { return isBatteryConnect() && isVBUSPlug(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// If we see a battery voltage higher than physics allows - assume charger is pumping
|
/// If we see a battery voltage higher than physics allows - assume charger is pumping
|
||||||
/// in power
|
/// in power
|
||||||
const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2100;
|
|
||||||
|
/// For heltecs with no battery connected, the measured voltage is 2204, so raising to 2230 from 2100
|
||||||
|
const float fullVolt = 4200, emptyVolt = 3270, chargingVolt = 4210, noBatVolt = 2230;
|
||||||
float last_read_value = 0.0;
|
float last_read_value = 0.0;
|
||||||
uint32_t last_read_time_ms = 0;
|
uint32_t last_read_time_ms = 0;
|
||||||
} analogLevel;
|
};
|
||||||
|
|
||||||
Power::Power() : OSThread("Power") {}
|
AnalogBatteryLevel analogLevel;
|
||||||
|
|
||||||
|
Power::Power() : OSThread("Power") {
|
||||||
|
statusHandler = {};
|
||||||
|
low_voltage_counter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool Power::analogInit()
|
bool Power::analogInit()
|
||||||
{
|
{
|
||||||
#ifdef BATTERY_PIN
|
#ifdef BATTERY_PIN
|
||||||
DEBUG_MSG("Using analog input for battery level\n");
|
DEBUG_MSG("Using analog input %d for battery level\n", BATTERY_PIN);
|
||||||
|
|
||||||
// disable any internal pullups
|
// disable any internal pullups
|
||||||
pinMode(BATTERY_PIN, INPUT);
|
pinMode(BATTERY_PIN, INPUT);
|
||||||
@@ -149,11 +171,19 @@ bool Power::analogInit()
|
|||||||
adcAttachPin(BATTERY_PIN);
|
adcAttachPin(BATTERY_PIN);
|
||||||
#endif
|
#endif
|
||||||
#ifdef NRF52_SERIES
|
#ifdef NRF52_SERIES
|
||||||
|
#ifdef VBAT_AR_INTERNAL
|
||||||
|
analogReference(VBAT_AR_INTERNAL);
|
||||||
|
#else
|
||||||
analogReference(AR_INTERNAL); // 3.6V
|
analogReference(AR_INTERNAL); // 3.6V
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BATTERY_SENSE_RESOLUTION_BITS
|
||||||
|
#define BATTERY_SENSE_RESOLUTION_BITS 10
|
||||||
|
#endif
|
||||||
|
|
||||||
// adcStart(BATTERY_PIN);
|
// adcStart(BATTERY_PIN);
|
||||||
analogReadResolution(10); // Default of 12 is not very linear. Recommended to use 10 or 11 depending on needed resolution.
|
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS); // Default of 12 is not very linear. Recommended to use 10 or 11 depending on needed resolution.
|
||||||
batteryLevel = &analogLevel;
|
batteryLevel = &analogLevel;
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
@@ -169,6 +199,7 @@ bool Power::setup()
|
|||||||
found = analogInit();
|
found = analogInit();
|
||||||
}
|
}
|
||||||
enabled = found;
|
enabled = found;
|
||||||
|
low_voltage_counter = 0;
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
@@ -208,20 +239,35 @@ void Power::readPowerStatus()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Notify any status instances that are observing us
|
// Notify any status instances that are observing us
|
||||||
const PowerStatus powerStatus =
|
const PowerStatus powerStatus2 =
|
||||||
PowerStatus(hasBattery ? OptTrue : OptFalse, batteryLevel->isVBUSPlug() ? OptTrue : OptFalse,
|
PowerStatus(hasBattery ? OptTrue : OptFalse, batteryLevel->isVBUSPlug() ? OptTrue : OptFalse,
|
||||||
batteryLevel->isChargeing() ? OptTrue : OptFalse, batteryVoltageMv, batteryChargePercent);
|
batteryLevel->isChargeing() ? OptTrue : OptFalse, batteryVoltageMv, batteryChargePercent);
|
||||||
DEBUG_MSG("Battery: usbPower=%d, isCharging=%d, batMv=%d, batPct=%d\n", powerStatus.getHasUSB(),
|
DEBUG_MSG("Battery: usbPower=%d, isCharging=%d, batMv=%d, batPct=%d\n", powerStatus2.getHasUSB(),
|
||||||
powerStatus.getIsCharging(), powerStatus.getBatteryVoltageMv(), powerStatus.getBatteryChargePercent());
|
powerStatus2.getIsCharging(), powerStatus2.getBatteryVoltageMv(), powerStatus2.getBatteryChargePercent());
|
||||||
newStatus.notifyObservers(&powerStatus);
|
newStatus.notifyObservers(&powerStatus2);
|
||||||
|
|
||||||
|
|
||||||
|
// If we have a battery at all and it is less than 10% full, force deep sleep if we have more than 3 low readings in a row
|
||||||
|
// Supect fluctuating voltage on the RAK4631 to force it to deep sleep even if battery is at 85% after only a few days
|
||||||
|
#ifdef NRF52_SERIES
|
||||||
|
if (powerStatus2.getHasBattery() && !powerStatus2.getHasUSB()){
|
||||||
|
if (batteryLevel->getBattVoltage() < MIN_BAT_MILLIVOLTS){
|
||||||
|
low_voltage_counter++;
|
||||||
|
if (low_voltage_counter>3)
|
||||||
|
powerFSM.trigger(EVENT_LOW_BATTERY);
|
||||||
|
} else {
|
||||||
|
low_voltage_counter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
// If we have a battery at all and it is less than 10% full, force deep sleep
|
// If we have a battery at all and it is less than 10% full, force deep sleep
|
||||||
if (powerStatus.getHasBattery() && !powerStatus.getHasUSB() && batteryLevel->getBattVoltage() < MIN_BAT_MILLIVOLTS)
|
if (powerStatus2.getHasBattery() && !powerStatus2.getHasUSB() && batteryLevel->getBattVoltage() < MIN_BAT_MILLIVOLTS)
|
||||||
powerFSM.trigger(EVENT_LOW_BATTERY);
|
powerFSM.trigger(EVENT_LOW_BATTERY);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// No power sensing on this board - tell everyone else we have no idea what is happening
|
// No power sensing on this board - tell everyone else we have no idea what is happening
|
||||||
const PowerStatus powerStatus = PowerStatus(OptUnknown, OptUnknown, OptUnknown, -1, -1);
|
const PowerStatus powerStatus3 = PowerStatus(OptUnknown, OptUnknown, OptUnknown, -1, -1);
|
||||||
newStatus.notifyObservers(&powerStatus);
|
newStatus.notifyObservers(&powerStatus3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#include "PowerFSM.h"
|
#include "PowerFSM.h"
|
||||||
#include "GPS.h"
|
#include "GPS.h"
|
||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
@@ -12,6 +11,11 @@
|
|||||||
/// Should we behave as if we have AC power now?
|
/// Should we behave as if we have AC power now?
|
||||||
static bool isPowered()
|
static bool isPowered()
|
||||||
{
|
{
|
||||||
|
// Completely circumvents the battery / power sensing logic and assumes constant power source
|
||||||
|
if (radioConfig.preferences.is_always_powered) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool isRouter = radioConfig.preferences.is_router;
|
bool isRouter = radioConfig.preferences.is_router;
|
||||||
|
|
||||||
// If we are not a router and we already have AC power go to POWER state after init, otherwise go to ON
|
// If we are not a router and we already have AC power go to POWER state after init, otherwise go to ON
|
||||||
@@ -28,10 +32,19 @@ static bool isPowered()
|
|||||||
|
|
||||||
static void sdsEnter()
|
static void sdsEnter()
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG("Enter state: SDS\n");
|
||||||
// FIXME - make sure GPS and LORA radio are off first - because we want close to zero current draw
|
// FIXME - make sure GPS and LORA radio are off first - because we want close to zero current draw
|
||||||
doDeepSleep(getPref_sds_secs() * 1000LL);
|
doDeepSleep(getPref_sds_secs() * 1000LL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern Power *power;
|
||||||
|
|
||||||
|
static void shutdownEnter()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("Enter state: SHUTDOWN\n");
|
||||||
|
power->shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
static uint32_t secsSlept;
|
static uint32_t secsSlept;
|
||||||
@@ -42,7 +55,7 @@ static void lsEnter()
|
|||||||
screen->setOn(false);
|
screen->setOn(false);
|
||||||
secsSlept = 0; // How long have we been sleeping this time
|
secsSlept = 0; // How long have we been sleeping this time
|
||||||
|
|
||||||
DEBUG_MSG("lsEnter end\n");
|
// DEBUG_MSG("lsEnter end\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lsIdle()
|
static void lsIdle()
|
||||||
@@ -50,7 +63,6 @@ static void lsIdle()
|
|||||||
// DEBUG_MSG("lsIdle begin ls_secs=%u\n", getPref_ls_secs());
|
// DEBUG_MSG("lsIdle begin ls_secs=%u\n", getPref_ls_secs());
|
||||||
|
|
||||||
#ifndef NO_ESP32
|
#ifndef NO_ESP32
|
||||||
esp_sleep_source_t wakeCause = ESP_SLEEP_WAKEUP_UNDEFINED;
|
|
||||||
|
|
||||||
// Do we have more sleeping to do?
|
// Do we have more sleeping to do?
|
||||||
if (secsSlept < getPref_ls_secs()) {
|
if (secsSlept < getPref_ls_secs()) {
|
||||||
@@ -60,14 +72,14 @@ static void lsIdle()
|
|||||||
// If some other service would stall sleep, don't let sleep happen yet
|
// If some other service would stall sleep, don't let sleep happen yet
|
||||||
if (doPreflightSleep()) {
|
if (doPreflightSleep()) {
|
||||||
setLed(false); // Never leave led on while in light sleep
|
setLed(false); // Never leave led on while in light sleep
|
||||||
wakeCause = doLightSleep(sleepTime * 1000LL);
|
esp_sleep_source_t wakeCause2 = doLightSleep(sleepTime * 1000LL);
|
||||||
|
|
||||||
switch (wakeCause) {
|
switch (wakeCause2) {
|
||||||
case ESP_SLEEP_WAKEUP_TIMER:
|
case ESP_SLEEP_WAKEUP_TIMER:
|
||||||
// Normal case: timer expired, we should just go back to sleep ASAP
|
// Normal case: timer expired, we should just go back to sleep ASAP
|
||||||
|
|
||||||
setLed(true); // briefly turn on led
|
setLed(true); // briefly turn on led
|
||||||
wakeCause = doLightSleep(1); // leave led on for 1ms
|
wakeCause2 = doLightSleep(1); // leave led on for 1ms
|
||||||
|
|
||||||
secsSlept += sleepTime;
|
secsSlept += sleepTime;
|
||||||
// DEBUG_MSG("sleeping, flash led!\n");
|
// DEBUG_MSG("sleeping, flash led!\n");
|
||||||
@@ -81,7 +93,7 @@ static void lsIdle()
|
|||||||
default:
|
default:
|
||||||
// We woke for some other reason (button press, device interrupt)
|
// We woke for some other reason (button press, device interrupt)
|
||||||
// uint64_t status = esp_sleep_get_ext1_wakeup_status();
|
// uint64_t status = esp_sleep_get_ext1_wakeup_status();
|
||||||
DEBUG_MSG("wakeCause %d\n", wakeCause);
|
DEBUG_MSG("wakeCause2 %d\n", wakeCause2);
|
||||||
|
|
||||||
#ifdef BUTTON_PIN
|
#ifdef BUTTON_PIN
|
||||||
bool pressed = !digitalRead(BUTTON_PIN);
|
bool pressed = !digitalRead(BUTTON_PIN);
|
||||||
@@ -113,6 +125,7 @@ static void lsIdle()
|
|||||||
|
|
||||||
static void lsExit()
|
static void lsExit()
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG("Exit state: LS\n");
|
||||||
// setGPSPower(true); // restore GPS power
|
// setGPSPower(true); // restore GPS power
|
||||||
if (gps)
|
if (gps)
|
||||||
gps->forceWake(true);
|
gps->forceWake(true);
|
||||||
@@ -120,6 +133,7 @@ static void lsExit()
|
|||||||
|
|
||||||
static void nbEnter()
|
static void nbEnter()
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG("Enter state: NB\n");
|
||||||
screen->setOn(false);
|
screen->setOn(false);
|
||||||
setBluetoothEnable(false);
|
setBluetoothEnable(false);
|
||||||
|
|
||||||
@@ -134,6 +148,7 @@ static void darkEnter()
|
|||||||
|
|
||||||
static void serialEnter()
|
static void serialEnter()
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG("Enter state: SERIAL\n");
|
||||||
setBluetoothEnable(false);
|
setBluetoothEnable(false);
|
||||||
screen->setOn(true);
|
screen->setOn(true);
|
||||||
screen->print("Serial connected\n");
|
screen->print("Serial connected\n");
|
||||||
@@ -146,6 +161,7 @@ static void serialExit()
|
|||||||
|
|
||||||
static void powerEnter()
|
static void powerEnter()
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG("Enter state: POWER\n");
|
||||||
if (!isPowered()) {
|
if (!isPowered()) {
|
||||||
// If we got here, we are in the wrong state - we should be in powered, let that state ahndle things
|
// If we got here, we are in the wrong state - we should be in powered, let that state ahndle things
|
||||||
DEBUG_MSG("Loss of power in Powered\n");
|
DEBUG_MSG("Loss of power in Powered\n");
|
||||||
@@ -175,6 +191,7 @@ static void powerExit()
|
|||||||
|
|
||||||
static void onEnter()
|
static void onEnter()
|
||||||
{
|
{
|
||||||
|
DEBUG_MSG("Enter state: ON\n");
|
||||||
screen->setOn(true);
|
screen->setOn(true);
|
||||||
setBluetoothEnable(true);
|
setBluetoothEnable(true);
|
||||||
|
|
||||||
@@ -203,8 +220,12 @@ static void screenPress()
|
|||||||
screen->onPress();
|
screen->onPress();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bootEnter() {}
|
static void bootEnter()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("Enter state: BOOT\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
State stateSHUTDOWN(shutdownEnter, NULL, NULL, "SHUTDOWN");
|
||||||
State stateSDS(sdsEnter, NULL, NULL, "SDS");
|
State stateSDS(sdsEnter, NULL, NULL, "SDS");
|
||||||
State stateLS(lsEnter, lsIdle, lsExit, "LS");
|
State stateLS(lsEnter, lsIdle, lsExit, "LS");
|
||||||
State stateNB(nbEnter, NULL, NULL, "NB");
|
State stateNB(nbEnter, NULL, NULL, "NB");
|
||||||
@@ -227,10 +248,11 @@ void PowerFSM_setup()
|
|||||||
// if we are a router node, we go to NB (no need for bluetooth) otherwise we go to DARK (so we can send message to phone)
|
// if we are a router node, we go to NB (no need for bluetooth) otherwise we go to DARK (so we can send message to phone)
|
||||||
powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_WAKE_TIMER, NULL, "Wake timer");
|
powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_WAKE_TIMER, NULL, "Wake timer");
|
||||||
|
|
||||||
// Note we don't really use this transition, because when we wake from light sleep we _always_ transition to NB or dark and
|
// We need this transition, because we might not transition if we were waiting to enter light-sleep, because when we wake from
|
||||||
// then it handles things powerFSM.add_transition(&stateLS, &stateNB, EVENT_RECEIVED_PACKET, NULL, "Received packet");
|
// light sleep we _always_ transition to NB or dark and
|
||||||
|
powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_PACKET_FOR_PHONE, NULL,
|
||||||
powerFSM.add_transition(&stateNB, &stateNB, EVENT_RECEIVED_PACKET, NULL, "Received packet, resetting win wake");
|
"Received packet, exiting light sleep");
|
||||||
|
powerFSM.add_transition(&stateNB, &stateNB, EVENT_PACKET_FOR_PHONE, NULL, "Received packet, resetting win wake");
|
||||||
|
|
||||||
// Handle press events - note: we ignore button presses when in API mode
|
// Handle press events - note: we ignore button presses when in API mode
|
||||||
powerFSM.add_transition(&stateLS, &stateON, EVENT_PRESS, NULL, "Press");
|
powerFSM.add_transition(&stateLS, &stateON, EVENT_PRESS, NULL, "Press");
|
||||||
@@ -249,11 +271,22 @@ void PowerFSM_setup()
|
|||||||
powerFSM.add_transition(&stateON, &stateSDS, EVENT_LOW_BATTERY, NULL, "LowBat");
|
powerFSM.add_transition(&stateON, &stateSDS, EVENT_LOW_BATTERY, NULL, "LowBat");
|
||||||
powerFSM.add_transition(&stateSERIAL, &stateSDS, EVENT_LOW_BATTERY, NULL, "LowBat");
|
powerFSM.add_transition(&stateSERIAL, &stateSDS, EVENT_LOW_BATTERY, NULL, "LowBat");
|
||||||
|
|
||||||
|
// Handle being told to power off
|
||||||
|
powerFSM.add_transition(&stateBOOT, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, "Shutdown");
|
||||||
|
powerFSM.add_transition(&stateLS, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, "Shutdown");
|
||||||
|
powerFSM.add_transition(&stateNB, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, "Shutdown");
|
||||||
|
powerFSM.add_transition(&stateDARK, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, "Shutdown");
|
||||||
|
powerFSM.add_transition(&stateON, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, "Shutdown");
|
||||||
|
powerFSM.add_transition(&stateSERIAL, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, "Shutdown");
|
||||||
|
|
||||||
powerFSM.add_transition(&stateDARK, &stateON, EVENT_BLUETOOTH_PAIR, NULL, "Bluetooth pairing");
|
powerFSM.add_transition(&stateDARK, &stateON, EVENT_BLUETOOTH_PAIR, NULL, "Bluetooth pairing");
|
||||||
powerFSM.add_transition(&stateON, &stateON, EVENT_BLUETOOTH_PAIR, NULL, "Bluetooth pairing");
|
powerFSM.add_transition(&stateON, &stateON, EVENT_BLUETOOTH_PAIR, NULL, "Bluetooth pairing");
|
||||||
|
|
||||||
// if we are a router we don't turn the screen on for these things
|
// if we are a router we don't turn the screen on for these things
|
||||||
if (!isRouter) {
|
if (!isRouter) {
|
||||||
|
// if any packet destined for phone arrives, turn on bluetooth at least
|
||||||
|
powerFSM.add_transition(&stateNB, &stateDARK, EVENT_PACKET_FOR_PHONE, NULL, "Packet for phone");
|
||||||
|
|
||||||
// show the latest node when we get a new node db update
|
// show the latest node when we get a new node db update
|
||||||
powerFSM.add_transition(&stateNB, &stateON, EVENT_NODEDB_UPDATED, NULL, "NodeDB update");
|
powerFSM.add_transition(&stateNB, &stateON, EVENT_NODEDB_UPDATED, NULL, "NodeDB update");
|
||||||
powerFSM.add_transition(&stateDARK, &stateON, EVENT_NODEDB_UPDATED, NULL, "NodeDB update");
|
powerFSM.add_transition(&stateDARK, &stateON, EVENT_NODEDB_UPDATED, NULL, "NodeDB update");
|
||||||
@@ -293,26 +326,35 @@ void PowerFSM_setup()
|
|||||||
powerFSM.add_transition(&stateDARK, &stateON, EVENT_FIRMWARE_UPDATE, NULL, "Got firmware update");
|
powerFSM.add_transition(&stateDARK, &stateON, EVENT_FIRMWARE_UPDATE, NULL, "Got firmware update");
|
||||||
powerFSM.add_transition(&stateON, &stateON, EVENT_FIRMWARE_UPDATE, NULL, "Got firmware update");
|
powerFSM.add_transition(&stateON, &stateON, EVENT_FIRMWARE_UPDATE, NULL, "Got firmware update");
|
||||||
|
|
||||||
powerFSM.add_transition(&stateNB, &stateDARK, EVENT_PACKET_FOR_PHONE, NULL, "Packet for phone");
|
|
||||||
|
|
||||||
powerFSM.add_timed_transition(&stateON, &stateDARK, getPref_screen_on_secs() * 1000, NULL, "Screen-on timeout");
|
powerFSM.add_timed_transition(&stateON, &stateDARK, getPref_screen_on_secs() * 1000, NULL, "Screen-on timeout");
|
||||||
|
|
||||||
// On most boards we use light-sleep to be our main state, but on NRF52 we just stay in DARK
|
// On most boards we use light-sleep to be our main state, but on NRF52 we just stay in DARK
|
||||||
State *lowPowerState = &stateLS;
|
State *lowPowerState = &stateLS;
|
||||||
|
|
||||||
|
uint32_t meshSds = 0;
|
||||||
|
|
||||||
#ifndef NRF52_SERIES
|
#ifndef NRF52_SERIES
|
||||||
// We never enter light-sleep or NB states on NRF52 (because the CPU uses so little power normally)
|
// We never enter light-sleep or NB states on NRF52 (because the CPU uses so little power normally)
|
||||||
|
|
||||||
// I don't think this transition is correct, turning off for now - @geeksville
|
// See: https://github.com/meshtastic/Meshtastic-device/issues/1071
|
||||||
// powerFSM.add_timed_transition(&stateDARK, &stateNB, getPref_phone_timeout_secs() * 1000, NULL, "Phone timeout");
|
if (isRouter || radioConfig.preferences.is_power_saving) {
|
||||||
|
|
||||||
|
// I don't think this transition is correct, turning off for now - @geeksville
|
||||||
|
// powerFSM.add_timed_transition(&stateDARK, &stateNB, getPref_phone_timeout_secs() * 1000, NULL, "Phone timeout");
|
||||||
|
powerFSM.add_timed_transition(&stateNB, &stateLS, getPref_min_wake_secs() * 1000, NULL, "Min wake timeout");
|
||||||
|
powerFSM.add_timed_transition(&stateDARK, &stateLS, getPref_wait_bluetooth_secs() * 1000, NULL, "Bluetooth timeout");
|
||||||
|
meshSds = getPref_mesh_sds_timeout_secs();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
meshSds = UINT32_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
powerFSM.add_timed_transition(&stateNB, &stateLS, getPref_min_wake_secs() * 1000, NULL, "Min wake timeout");
|
|
||||||
powerFSM.add_timed_transition(&stateDARK, &stateLS, getPref_wait_bluetooth_secs() * 1000, NULL, "Bluetooth timeout");
|
|
||||||
#else
|
#else
|
||||||
lowPowerState = &stateDARK;
|
lowPowerState = &stateDARK;
|
||||||
|
meshSds = UINT32_MAX; // Workaround for now: Don't go into deep sleep on the RAK4631
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto meshSds = getPref_mesh_sds_timeout_secs();
|
|
||||||
if (meshSds != UINT32_MAX)
|
if (meshSds != UINT32_MAX)
|
||||||
powerFSM.add_timed_transition(lowPowerState, &stateSDS, meshSds * 1000, NULL, "mesh timeout");
|
powerFSM.add_timed_transition(lowPowerState, &stateSDS, meshSds * 1000, NULL, "mesh timeout");
|
||||||
// removing for now, because some users don't even have phones
|
// removing for now, because some users don't even have phones
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#define EVENT_PRESS 1
|
#define EVENT_PRESS 1
|
||||||
#define EVENT_WAKE_TIMER 2
|
#define EVENT_WAKE_TIMER 2
|
||||||
#define EVENT_RECEIVED_PACKET 3
|
// #define EVENT_RECEIVED_PACKET 3
|
||||||
#define EVENT_PACKET_FOR_PHONE 4
|
#define EVENT_PACKET_FOR_PHONE 4
|
||||||
#define EVENT_RECEIVED_TEXT_MSG 5
|
#define EVENT_RECEIVED_TEXT_MSG 5
|
||||||
// #define EVENT_BOOT 6 // now done with a timed transition
|
// #define EVENT_BOOT 6 // now done with a timed transition
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
#define EVENT_POWER_CONNECTED 13
|
#define EVENT_POWER_CONNECTED 13
|
||||||
#define EVENT_POWER_DISCONNECTED 14
|
#define EVENT_POWER_DISCONNECTED 14
|
||||||
#define EVENT_FIRMWARE_UPDATE 15 // We just received a new firmware update packet from the phone
|
#define EVENT_FIRMWARE_UPDATE 15 // We just received a new firmware update packet from the phone
|
||||||
|
#define EVENT_SHUTDOWN 16 //force a full shutdown now (not just sleep)
|
||||||
|
|
||||||
extern Fsm powerFSM;
|
extern Fsm powerFSM;
|
||||||
extern State statePOWER, stateSERIAL;
|
extern State statePOWER, stateSERIAL;
|
||||||
|
|||||||
38
src/PowerFSMThread.h
Normal file
38
src/PowerFSMThread.h
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#include "configuration.h"
|
||||||
|
#include "concurrency/OSThread.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "PowerFSM.h"
|
||||||
|
#include "power.h"
|
||||||
|
#include "NodeDB.h"
|
||||||
|
|
||||||
|
namespace concurrency
|
||||||
|
{
|
||||||
|
/// Wrapper to convert our powerFSM stuff into a 'thread'
|
||||||
|
class PowerFSMThread : public OSThread
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// callback returns the period for the next callback invocation (or 0 if we should no longer be called)
|
||||||
|
PowerFSMThread() : OSThread("PowerFSM") {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int32_t runOnce() override
|
||||||
|
{
|
||||||
|
powerFSM.run_machine();
|
||||||
|
|
||||||
|
/// If we are in power state we force the CPU to wake every 10ms to check for serial characters (we don't yet wake
|
||||||
|
/// cpu for serial rx - FIXME)
|
||||||
|
auto state = powerFSM.getState();
|
||||||
|
canSleep = (state != &statePOWER) && (state != &stateSERIAL);
|
||||||
|
|
||||||
|
if (powerStatus->getHasUSB()) {
|
||||||
|
timeLastPowered = millis();
|
||||||
|
} else if (radioConfig.preferences.on_battery_shutdown_after_secs > 0 &&
|
||||||
|
millis() > timeLastPowered + (1000 * radioConfig.preferences.on_battery_shutdown_after_secs)) { //shutdown after 30 minutes unpowered
|
||||||
|
powerFSM.trigger(EVENT_SHUTDOWN);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
7
src/RF95Configuration.h
Normal file
7
src/RF95Configuration.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
// TODO refactor this out with better radio configuration system
|
||||||
|
#ifdef USE_RF95
|
||||||
|
#define RF95_RESET LORA_RESET
|
||||||
|
#define RF95_IRQ LORA_DIO0 // on SX1262 version this is a no connect DIO0
|
||||||
|
#define RF95_DIO1 LORA_DIO1 // Note: not really used for RF95
|
||||||
|
#define RF95_DIO2 LORA_DIO2 // Note: not really used for RF95
|
||||||
|
#endif
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user