mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-22 09:47:28 +00:00
Compare commits
469 Commits
v1.2.50.41
...
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 | ||
|
|
654558abcd |
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.
|
|
||||||
39
.github/actions/initbuild/action.yml
vendored
39
.github/actions/initbuild/action.yml
vendored
@@ -1,39 +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
|
|
||||||
|
|
||||||
# Don't cache for now because I want to be lazy with portuino updates githashes
|
|
||||||
# - 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
|
|
||||||
|
|
||||||
|
|
||||||
97
.github/workflows/main.yml
vendored
97
.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..."
|
|
||||||
|
|
||||||
ci-build:
|
ci-check:
|
||||||
# needs: setup
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -23,6 +13,12 @@ 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
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
@@ -36,9 +32,42 @@ jobs:
|
|||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip
|
key: ${{ runner.os }}-pip
|
||||||
|
|
||||||
#- name: Install linux apt packages
|
- name: Upgrade python tools and install platformio
|
||||||
# run: |
|
run: |
|
||||||
# sudo apt-get install -y libgpiod-dev
|
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
|
||||||
|
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
|
- name: Upgrade python tools
|
||||||
# We actually want to run this every time
|
# We actually want to run this every time
|
||||||
@@ -81,22 +110,23 @@ 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: Get release version string
|
||||||
|
run: echo "::set-output name=version::$(./bin/buildinfo.py long)"
|
||||||
|
id: version
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
- 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
|
- name: Store debugging elf files as an artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
@@ -104,3 +134,18 @@ jobs:
|
|||||||
name: debug-elfs
|
name: debug-elfs
|
||||||
path: release/archive/elfs-*.zip
|
path: release/archive/elfs-*.zip
|
||||||
retention-days: 7
|
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
|
||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
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 run if version.properties is bumped in master
|
# Only want to run if version.properties is bumped in master
|
||||||
@@ -37,7 +37,7 @@ 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: |
|
||||||
|
|||||||
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
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -23,3 +23,9 @@ flash.uf2
|
|||||||
cmake-build*
|
cmake-build*
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
venv/
|
||||||
|
release/
|
||||||
|
|||||||
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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
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
|
||||||
|
|
||||||
@@ -1,11 +1,18 @@
|
|||||||
# Meshtastic-device
|
# Meshtastic-device
|
||||||
[](https://open.vscode.dev/meshtastic/Meshtastic-device)
|
[](https://open.vscode.dev/meshtastic/Meshtastic-device)
|
||||||
|
[](https://github.com/meshtastic/Meshtastic-device/actions/workflows/main.yml)
|
||||||
|

|
||||||
|
|
||||||
## This repository contains the device firmware used in the [Meshtastic](https://meshtastic.org) project.
|
## This repository contains the device firmware used in the [Meshtastic](https://meshtastic.org) project.
|
||||||
|
|
||||||
Update Instructions
|
Update Instructions
|
||||||
|
|
||||||
|
[Using Meshtastic Flasher](https://meshtastic.org/docs/getting-started/meshtastic-flasher)
|
||||||
|
|
||||||
|
Manual Method
|
||||||
|
|
||||||
[For ESP32 devices click here](https://meshtastic.org/docs/getting-started/flashing-esp32)
|
[For ESP32 devices click here](https://meshtastic.org/docs/getting-started/flashing-esp32)
|
||||||
|
|
||||||
[For nRF52 devices click here](https://meshtastic.org/docs/getting-started/flashing-nrf52)
|
[For nRF52 devices click here](https://meshtastic.org/docs/getting-started/flashing-nrf52)
|
||||||
|
|
||||||
For developer information and specific building instructions, please see the [developer doccumentation](https://meshtastic.org/docs/developers)
|
For developer information and specific building instructions, please see the [developer documentation](https://meshtastic.org/docs/developers)
|
||||||
|
|||||||
Binary file not shown.
@@ -1,15 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=`bin/buildinfo.py long`
|
VERSION=`bin/buildinfo.py long`
|
||||||
SHORT_VERSION=`bin/buildinfo.py short`
|
SHORT_VERSION=`bin/buildinfo.py short`
|
||||||
|
|
||||||
BOARDS_ESP32="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1"
|
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_5005 rak4631_19003 t-echo"
|
BOARDS_NRF52="rak4631_5005 rak4631_5005_eink rak4631_19003 t-echo"
|
||||||
#BOARDS_NRF52=""
|
#BOARDS_NRF52=""
|
||||||
|
|
||||||
OUTDIR=release/latest
|
OUTDIR=release/latest
|
||||||
@@ -28,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
|
||||||
@@ -59,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
|
||||||
}
|
}
|
||||||
@@ -75,12 +76,12 @@ do_boards "$BOARDS_NRF52" "true"
|
|||||||
pio run --environment native
|
pio run --environment native
|
||||||
cp .pio/build/native/program $OUTDIR/bins/universal/meshtasticd_linux_amd64
|
cp .pio/build/native/program $OUTDIR/bins/universal/meshtasticd_linux_amd64
|
||||||
|
|
||||||
echo "Building SPIFFS for ESP32 targets"
|
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
|
||||||
@@ -102,9 +103,9 @@ 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.* $OUTDIR/bins/universal/meshtasticd* images/system-info.bin bin/device-install.* bin/device-update.*
|
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
|
echo Generating $ARCHIVEDIR/elfs-$VERSION.zip
|
||||||
rm -f $ARCHIVEDIR/elfs-$VERSION.zip
|
rm -f $ARCHIVEDIR/elfs-$VERSION.zip
|
||||||
zip --junk-paths $ARCHIVEDIR/elfs-$VERSION.zip $OUTDIR/elfs/universal/firmware-*-$VERSION.*
|
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
|
||||||
|
|
||||||
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
|
||||||
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
|
||||||
@@ -30,7 +30,7 @@ IF EXIST %FILENAME% (
|
|||||||
echo Trying to flash update %FILENAME%, but first erasing and writing system information"
|
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 erase_flash
|
||||||
%PYTHON% -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
%PYTHON% -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
||||||
for %%f in (spiffs-*.bin) do (
|
for %%f in (littlefs-*.bin) do (
|
||||||
%PYTHON% -m esptool --baud 921600 write_flash 0x00390000 %%f
|
%PYTHON% -m esptool --baud 921600 write_flash 0x00390000 %%f
|
||||||
)
|
)
|
||||||
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
%PYTHON% -m esptool --baud 921600 write_flash 0x10000 %FILENAME%
|
||||||
|
|||||||
@@ -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 erase_flash
|
"$PYTHON" -m esptool erase_flash
|
||||||
$PYTHON -m esptool write_flash 0x1000 system-info.bin
|
"$PYTHON" -m esptool write_flash 0x1000 system-info.bin
|
||||||
$PYTHON -m esptool write_flash 0x00390000 spiffs-*.bin
|
"$PYTHON" -m esptool write_flash 0x00390000 littlefs-*.bin
|
||||||
$PYTHON -m esptool 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
|
||||||
|
|||||||
@@ -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,6 +6,13 @@ 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"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "This script is only for developers who are publishing new builds on github. Most users don't need it"
|
echo "This script is only for developers who are publishing new builds on github. Most users don't need 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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -12,4 +12,4 @@ cd 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
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Starting simulator"
|
echo "Starting simulator"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "building for t-echo"
|
echo "building for t-echo"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "Converting to uf2 for NRF52 Adafruit bootloader"
|
echo "Converting to uf2 for NRF52 Adafruit bootloader"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
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"
|
||||||
|
}
|
||||||
@@ -63,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
|
||||||
@@ -71,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
|
||||||
@@ -79,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
|
||||||
@@ -98,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
|
||||||
@@ -118,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
|
||||||
@@ -134,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
|
||||||
@@ -142,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)
|
||||||
@@ -182,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
|
||||||
|
|||||||
304
platformio.ini
304
platformio.ini
@@ -11,17 +11,27 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
default_envs = tbeam
|
default_envs = tbeam
|
||||||
;default_envs = tbeam0.7
|
;default_envs = tbeam0.7
|
||||||
|
;default_envs = heltec-v1
|
||||||
;default_envs = heltec-v2.0
|
;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 = t-echo
|
;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
|
||||||
|
;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
|
||||||
@@ -68,7 +78,7 @@ 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/meshtastic/OneButton.git#3bcba9492d01e2a8a86f46700ab16f96dd2cf1f5 ; 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
|
https://github.com/meshtastic/arduino-fsm.git
|
||||||
@@ -80,8 +90,12 @@ lib_deps =
|
|||||||
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
|
||||||
@@ -94,6 +108,17 @@ build_flags = ${env.build_flags} -Os
|
|||||||
|
|
||||||
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
|
||||||
@@ -102,18 +127,23 @@ 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
|
||||||
paulstoffregen/OneWire@^2.3.5
|
arduino-libraries/NTPClient#531eff39d9fbc831f3d03f706a161739203fbe2a
|
||||||
robtillaart/DS18B20@^0.1.11
|
lorol/LittleFS_esp32@^1.0.6
|
||||||
h2zero/NimBLE-Arduino@1.3.1
|
|
||||||
# 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 =
|
lib_ignore =
|
||||||
@@ -141,71 +171,6 @@ 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-v2.0]
|
|
||||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
|
||||||
extends = esp32_base
|
|
||||||
board = heltec_wifi_lora_32_V2
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D HELTEC_V2_0
|
|
||||||
|
|
||||||
[env:heltec-v2.1]
|
|
||||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
|
||||||
extends = esp32_base
|
|
||||||
board = heltec_wifi_lora_32_V2
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags} -D HELTEC_V2_1
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
; Meshtastic DIY v1 by Nano VHF Schematic based on ESP32-WROOM-32 (38 pins) devkit & EBYTE E22 SX1262/SX1268 module
|
|
||||||
[env:meshtastic-diy-v1]
|
|
||||||
extends = esp32_base
|
|
||||||
board = esp32doit-devkit-v1
|
|
||||||
build_flags =
|
|
||||||
${esp32_base.build_flags}
|
|
||||||
-D DIY_V1
|
|
||||||
-D EBYTE_E22
|
|
||||||
|
|
||||||
; 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.
|
||||||
@@ -231,7 +196,7 @@ 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
|
||||||
@@ -275,42 +240,17 @@ extends = nrf52_base
|
|||||||
build_flags = ${nrf52_base.build_flags}
|
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
|
# 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
|
||||||
@@ -327,161 +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_5005]
|
|
||||||
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 = ${nrf52840_base.build_flags} -Ivariants/WisCore_RAK4631_Board -D RAK_BASE_5005
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/WisCore_RAK4631_Board>
|
|
||||||
debug_tool = jlink
|
|
||||||
|
|
||||||
[env:rak4631_19003]
|
|
||||||
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 = ${nrf52840_base.build_flags} -Ivariants/WisCore_RAK4631_Board -D RAK_BASE_19003
|
|
||||||
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
|
|
||||||
|
|
||||||
; Note, this board is not yet supported! It will not work without futher development.
|
|
||||||
; 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:t-echo]
|
|
||||||
extends = nrf52840_base
|
|
||||||
board = t-echo
|
|
||||||
debug_tool = jlink
|
|
||||||
upload_protocol = jlink
|
|
||||||
# add our variants files to the include and src paths
|
|
||||||
# define build flags for the TFT_eSPI library - NOTE: WE NOT LONGER USE TFT_eSPI, it was for an earlier version of the TTGO eink screens
|
|
||||||
# -DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30
|
|
||||||
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
|
|
||||||
build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo
|
|
||||||
src_filter = ${nrf52_base.src_filter} +<../variants/t-echo>
|
|
||||||
lib_deps =
|
|
||||||
${nrf52840_base.lib_deps}
|
|
||||||
https://github.com/geeksville/GxEPD2.git
|
|
||||||
adafruit/Adafruit BusIO
|
|
||||||
;upload_protocol = fs
|
|
||||||
|
|
||||||
; First prototype eink/nrf52840/sx1262 device (removed from build because didn't ship in quantity)
|
|
||||||
;[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 = ${nrf52840_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 = ${nrf52840_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 any host OS, all hardware will be simulated
|
|
||||||
[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 = cross_platform
|
|
||||||
lib_deps =
|
|
||||||
${arduino_base.lib_deps}
|
|
||||||
rweather/Crypto
|
|
||||||
|
|
||||||
; The Portduino based sim environment on top of a linux OS and touching linux hardware devices
|
|
||||||
[env:linux]
|
|
||||||
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 -lgpiod
|
|
||||||
framework = arduino
|
|
||||||
board = linux_hardware
|
|
||||||
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: 1d3b4806ab...f6ba3722be
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
|
||||||
@@ -3,20 +3,20 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class GPSStatus : public Status
|
|||||||
}
|
}
|
||||||
|
|
||||||
// preferred method
|
// preferred method
|
||||||
GPSStatus(bool hasLock, bool isConnected, Position pos)
|
GPSStatus(bool hasLock, bool isConnected, const Position& pos)
|
||||||
: Status()
|
: Status()
|
||||||
{
|
{
|
||||||
this->hasLock = hasLock;
|
this->hasLock = hasLock;
|
||||||
@@ -63,7 +63,9 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
int32_t getLatitude() const {
|
int32_t getLatitude() const {
|
||||||
if (radioConfig.preferences.fixed_position){
|
if (radioConfig.preferences.fixed_position){
|
||||||
|
#if GPS_EXTRAVERBOSE
|
||||||
DEBUG_MSG("WARNING: Using fixed latitude\n");
|
DEBUG_MSG("WARNING: Using fixed latitude\n");
|
||||||
|
#endif
|
||||||
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
return node->position.latitude_i;
|
return node->position.latitude_i;
|
||||||
} else {
|
} else {
|
||||||
@@ -73,7 +75,9 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
int32_t getLongitude() const {
|
int32_t getLongitude() const {
|
||||||
if (radioConfig.preferences.fixed_position){
|
if (radioConfig.preferences.fixed_position){
|
||||||
|
#if GPS_EXTRAVERBOSE
|
||||||
DEBUG_MSG("WARNING: Using fixed longitude\n");
|
DEBUG_MSG("WARNING: Using fixed longitude\n");
|
||||||
|
#endif
|
||||||
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
return node->position.longitude_i;
|
return node->position.longitude_i;
|
||||||
} else {
|
} else {
|
||||||
@@ -83,7 +87,9 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
int32_t getAltitude() const {
|
int32_t getAltitude() const {
|
||||||
if (radioConfig.preferences.fixed_position){
|
if (radioConfig.preferences.fixed_position){
|
||||||
|
#if GPS_EXTRAVERBOSE
|
||||||
DEBUG_MSG("WARNING: Using fixed altitude\n");
|
DEBUG_MSG("WARNING: Using fixed altitude\n");
|
||||||
|
#endif
|
||||||
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
return node->position.altitude;
|
return node->position.altitude;
|
||||||
} else {
|
} else {
|
||||||
@@ -149,4 +155,4 @@ class GPSStatus : public Status
|
|||||||
|
|
||||||
} // namespace meshtastic
|
} // namespace meshtastic
|
||||||
|
|
||||||
extern meshtastic::GPSStatus *gpsStatus;
|
extern meshtastic::GPSStatus *gpsStatus;
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ 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();
|
||||||
|
|
||||||
@@ -94,12 +94,16 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -109,7 +113,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
uint32_t raw = analogRead(BATTERY_PIN);
|
uint32_t raw = analogRead(BATTERY_PIN);
|
||||||
float scaled;
|
float scaled;
|
||||||
#ifndef VBAT_RAW_TO_SCALED
|
#ifndef VBAT_RAW_TO_SCALED
|
||||||
scaled = 1000.0 * ADC_MULTIPLIER * (AREF_VOLTAGE / 1024.0) * raw;
|
scaled = 1000.0 * operativeAdcMultiplier * (AREF_VOLTAGE / 1024.0) * raw;
|
||||||
#else
|
#else
|
||||||
scaled = VBAT_RAW_TO_SCALED(raw); //defined in variant.h
|
scaled = VBAT_RAW_TO_SCALED(raw); //defined in variant.h
|
||||||
#endif
|
#endif
|
||||||
@@ -127,15 +131,15 @@ 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() > 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
|
||||||
@@ -149,7 +153,10 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
|
|
||||||
AnalogBatteryLevel analogLevel;
|
AnalogBatteryLevel analogLevel;
|
||||||
|
|
||||||
Power::Power() : OSThread("Power") {}
|
Power::Power() : OSThread("Power") {
|
||||||
|
statusHandler = {};
|
||||||
|
low_voltage_counter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool Power::analogInit()
|
bool Power::analogInit()
|
||||||
{
|
{
|
||||||
@@ -232,18 +239,18 @@ 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
|
// 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
|
// 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
|
#ifdef NRF52_SERIES
|
||||||
if (powerStatus.getHasBattery() && !powerStatus.getHasUSB()){
|
if (powerStatus2.getHasBattery() && !powerStatus2.getHasUSB()){
|
||||||
if (batteryLevel->getBattVoltage() < MIN_BAT_MILLIVOLTS){
|
if (batteryLevel->getBattVoltage() < MIN_BAT_MILLIVOLTS){
|
||||||
low_voltage_counter++;
|
low_voltage_counter++;
|
||||||
if (low_voltage_counter>3)
|
if (low_voltage_counter>3)
|
||||||
@@ -254,13 +261,13 @@ void Power::readPowerStatus()
|
|||||||
}
|
}
|
||||||
#else
|
#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
|
#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,8 +1,8 @@
|
|||||||
#include "configuration.h"
|
|
||||||
#include "PowerFSM.h"
|
#include "PowerFSM.h"
|
||||||
#include "GPS.h"
|
#include "GPS.h"
|
||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
|
#include "configuration.h"
|
||||||
#include "graphics/Screen.h"
|
#include "graphics/Screen.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
@@ -15,7 +15,7 @@ static bool isPowered()
|
|||||||
if (radioConfig.preferences.is_always_powered) {
|
if (radioConfig.preferences.is_always_powered) {
|
||||||
return true;
|
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
|
||||||
@@ -63,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()) {
|
||||||
@@ -73,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");
|
||||||
@@ -94,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);
|
||||||
@@ -221,7 +220,8 @@ static void screenPress()
|
|||||||
screen->onPress();
|
screen->onPress();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bootEnter() {
|
static void bootEnter()
|
||||||
|
{
|
||||||
DEBUG_MSG("Enter state: BOOT\n");
|
DEBUG_MSG("Enter state: BOOT\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,8 +248,10 @@ 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");
|
||||||
|
|
||||||
// We need this transition, because we might not transition if we were waiting to enter light-sleep, 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
|
||||||
powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_PACKET_FOR_PHONE, NULL, "Received packet, exiting light sleep");
|
// light sleep we _always_ transition to NB or dark and
|
||||||
|
powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_PACKET_FOR_PHONE, NULL,
|
||||||
|
"Received packet, exiting light sleep");
|
||||||
powerFSM.add_transition(&stateNB, &stateNB, EVENT_PACKET_FOR_PHONE, NULL, "Received packet, resetting win wake");
|
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
|
||||||
@@ -334,15 +336,23 @@ void PowerFSM_setup()
|
|||||||
#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");
|
|
||||||
meshSds = getPref_mesh_sds_timeout_secs();
|
|
||||||
#else
|
#else
|
||||||
lowPowerState = &stateDARK;
|
lowPowerState = &stateDARK;
|
||||||
meshSds = UINT32_MAX; //Workaround for now: Don't go into deep sleep on the RAK4631
|
meshSds = UINT32_MAX; // Workaround for now: Don't go into deep sleep on the RAK4631
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (meshSds != UINT32_MAX)
|
if (meshSds != UINT32_MAX)
|
||||||
|
|||||||
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
|
||||||
@@ -22,7 +22,7 @@ class RedirectablePrint : public Print
|
|||||||
volatile bool inDebugPrint = false;
|
volatile bool inDebugPrint = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RedirectablePrint(Print *_dest) : dest(_dest) {}
|
explicit RedirectablePrint(Print *_dest) : dest(_dest) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a new destination
|
* Set a new destination
|
||||||
@@ -56,4 +56,4 @@ class NoopPrint : public Print
|
|||||||
/**
|
/**
|
||||||
* A printer that doesn't go anywhere
|
* A printer that doesn't go anywhere
|
||||||
*/
|
*/
|
||||||
extern NoopPrint noopPrint;
|
extern NoopPrint noopPrint;
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ class SerialConsole : public StreamAPI, public RedirectablePrint
|
|||||||
* we override this to notice when we've received a protobuf over the serial stream. Then we shunt off
|
* we override this to notice when we've received a protobuf over the serial stream. Then we shunt off
|
||||||
* debug serial output.
|
* debug serial output.
|
||||||
*/
|
*/
|
||||||
virtual bool handleToRadio(const uint8_t *buf, size_t len);
|
virtual bool handleToRadio(const uint8_t *buf, size_t len) override;
|
||||||
|
|
||||||
virtual size_t write(uint8_t c)
|
virtual size_t write(uint8_t c) override
|
||||||
{
|
{
|
||||||
if (c == '\n') // prefix any newlines with carriage return
|
if (c == '\n') // prefix any newlines with carriage return
|
||||||
RedirectablePrint::write('\r');
|
RedirectablePrint::write('\r');
|
||||||
@@ -27,7 +27,7 @@ class SerialConsole : public StreamAPI, public RedirectablePrint
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
/// Check the current underlying physical link to see if the client is currently connected
|
/// Check the current underlying physical link to see if the client is currently connected
|
||||||
virtual bool checkIsConnected();
|
virtual bool checkIsConnected() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
// A simple wrapper to allow non class aware code write to the console
|
// A simple wrapper to allow non class aware code write to the console
|
||||||
|
|||||||
@@ -2,21 +2,20 @@
|
|||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
|
AirTime *airTime = NULL;
|
||||||
AirTime *airTime;
|
|
||||||
|
|
||||||
// Don't read out of this directly. Use the helper functions.
|
// Don't read out of this directly. Use the helper functions.
|
||||||
|
|
||||||
|
|
||||||
void AirTime::logAirtime(reportTypes reportType, uint32_t airtime_ms)
|
void AirTime::logAirtime(reportTypes reportType, uint32_t airtime_ms)
|
||||||
{
|
{
|
||||||
|
|
||||||
// TODO: Is the airtimes array still necessary? It's now in myNodeInfo anyway
|
|
||||||
|
|
||||||
if (reportType == TX_LOG) {
|
if (reportType == TX_LOG) {
|
||||||
DEBUG_MSG("AirTime - Packet transmitted : %ums\n", airtime_ms);
|
DEBUG_MSG("AirTime - Packet transmitted : %ums\n", airtime_ms);
|
||||||
this->airtimes.periodTX[0] = this->airtimes.periodTX[0] + airtime_ms;
|
this->airtimes.periodTX[0] = this->airtimes.periodTX[0] + airtime_ms;
|
||||||
myNodeInfo.air_period_tx[0] = myNodeInfo.air_period_tx[0] + airtime_ms;
|
myNodeInfo.air_period_tx[0] = myNodeInfo.air_period_tx[0] + airtime_ms;
|
||||||
|
|
||||||
|
this->utilizationTX[this->getPeriodUtilHour()] = this->utilizationTX[this->getPeriodUtilHour()] + airtime_ms;
|
||||||
|
|
||||||
} else if (reportType == RX_LOG) {
|
} else if (reportType == RX_LOG) {
|
||||||
DEBUG_MSG("AirTime - Packet received : %ums\n", airtime_ms);
|
DEBUG_MSG("AirTime - Packet received : %ums\n", airtime_ms);
|
||||||
this->airtimes.periodRX[0] = this->airtimes.periodRX[0] + airtime_ms;
|
this->airtimes.periodRX[0] = this->airtimes.periodRX[0] + airtime_ms;
|
||||||
@@ -26,8 +25,8 @@ void AirTime::logAirtime(reportTypes reportType, uint32_t airtime_ms)
|
|||||||
this->airtimes.periodRX_ALL[0] = this->airtimes.periodRX_ALL[0] + airtime_ms;
|
this->airtimes.periodRX_ALL[0] = this->airtimes.periodRX_ALL[0] + airtime_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t channelUtilPeriod = (getSecondsSinceBoot() / 10) % CHANNEL_UTILIZATION_PERIODS;
|
// Log all airtime type for channel utilization
|
||||||
this->channelUtilization[channelUtilPeriod] = channelUtilization[channelUtilPeriod] + airtime_ms;
|
this->channelUtilization[this->getPeriodUtilMinute()] = channelUtilization[this->getPeriodUtilMinute()] + airtime_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t AirTime::currentPeriodIndex()
|
uint8_t AirTime::currentPeriodIndex()
|
||||||
@@ -35,21 +34,29 @@ uint8_t AirTime::currentPeriodIndex()
|
|||||||
return ((getSecondsSinceBoot() / SECONDS_PER_PERIOD) % PERIODS_TO_LOG);
|
return ((getSecondsSinceBoot() / SECONDS_PER_PERIOD) % PERIODS_TO_LOG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t AirTime::getPeriodUtilMinute() {
|
||||||
|
return (getSecondsSinceBoot() / 10) % CHANNEL_UTILIZATION_PERIODS;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t AirTime::getPeriodUtilHour() {
|
||||||
|
return (getSecondsSinceBoot() / 60) % MINUTES_IN_HOUR;
|
||||||
|
}
|
||||||
|
|
||||||
void AirTime::airtimeRotatePeriod()
|
void AirTime::airtimeRotatePeriod()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (this->airtimes.lastPeriodIndex != currentPeriodIndex()) {
|
if (this->airtimes.lastPeriodIndex != this->currentPeriodIndex()) {
|
||||||
DEBUG_MSG("Rotating airtimes to a new period = %u\n", currentPeriodIndex());
|
DEBUG_MSG("Rotating airtimes to a new period = %u\n", this->currentPeriodIndex());
|
||||||
|
|
||||||
for (int i = PERIODS_TO_LOG - 2; i >= 0; --i) {
|
for (int i = PERIODS_TO_LOG - 2; i >= 0; --i) {
|
||||||
this->airtimes.periodTX[i + 1] = this->airtimes.periodTX[i];
|
this->airtimes.periodTX[i + 1] = this->airtimes.periodTX[i];
|
||||||
this->airtimes.periodRX[i + 1] = this->airtimes.periodRX[i];
|
this->airtimes.periodRX[i + 1] = this->airtimes.periodRX[i];
|
||||||
this->airtimes.periodRX_ALL[i + 1] = this->airtimes.periodRX_ALL[i];
|
this->airtimes.periodRX_ALL[i + 1] = this->airtimes.periodRX_ALL[i];
|
||||||
|
|
||||||
myNodeInfo.air_period_tx[i + 1] = myNodeInfo.air_period_tx[i];
|
myNodeInfo.air_period_tx[i + 1] = this->airtimes.periodTX[i];
|
||||||
myNodeInfo.air_period_rx[i + 1] = myNodeInfo.air_period_rx[i];
|
myNodeInfo.air_period_rx[i + 1] = this->airtimes.periodRX[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
this->airtimes.periodTX[0] = 0;
|
this->airtimes.periodTX[0] = 0;
|
||||||
this->airtimes.periodRX[0] = 0;
|
this->airtimes.periodRX[0] = 0;
|
||||||
this->airtimes.periodRX_ALL[0] = 0;
|
this->airtimes.periodRX_ALL[0] = 0;
|
||||||
@@ -57,7 +64,7 @@ void AirTime::airtimeRotatePeriod()
|
|||||||
myNodeInfo.air_period_tx[0] = 0;
|
myNodeInfo.air_period_tx[0] = 0;
|
||||||
myNodeInfo.air_period_rx[0] = 0;
|
myNodeInfo.air_period_rx[0] = 0;
|
||||||
|
|
||||||
this->airtimes.lastPeriodIndex = currentPeriodIndex();
|
this->airtimes.lastPeriodIndex = this->currentPeriodIndex();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,25 +107,53 @@ float AirTime::channelUtilizationPercent()
|
|||||||
return (float(sum) / float(CHANNEL_UTILIZATION_PERIODS * 10 * 1000)) * 100;
|
return (float(sum) / float(CHANNEL_UTILIZATION_PERIODS * 10 * 1000)) * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
AirTime::AirTime() : concurrency::OSThread("AirTime") {}
|
float AirTime::utilizationTXPercent()
|
||||||
|
{
|
||||||
|
uint32_t sum = 0;
|
||||||
|
for (uint32_t i = 0; i < MINUTES_IN_HOUR; i++) {
|
||||||
|
sum += this->utilizationTX[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return (float(sum) / float(MS_IN_HOUR)) * 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
AirTime::AirTime() : concurrency::OSThread("AirTime"),airtimes({}) {
|
||||||
|
}
|
||||||
|
|
||||||
int32_t AirTime::runOnce()
|
int32_t AirTime::runOnce()
|
||||||
{
|
{
|
||||||
secSinceBoot++;
|
secSinceBoot++;
|
||||||
|
|
||||||
uint8_t utilPeriod = (getSecondsSinceBoot() / 10) % CHANNEL_UTILIZATION_PERIODS;
|
uint8_t utilPeriod = this->getPeriodUtilMinute();
|
||||||
|
uint8_t utilPeriodTX = this->getPeriodUtilHour();
|
||||||
|
|
||||||
if (firstTime) {
|
if (firstTime) {
|
||||||
airtimeRotatePeriod();
|
|
||||||
|
|
||||||
|
// Init utilizationTX window to all 0
|
||||||
|
for (uint32_t i = 0; i < MINUTES_IN_HOUR; i++) {
|
||||||
|
this->utilizationTX[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Init channelUtilization window to all 0
|
||||||
for (uint32_t i = 0; i < CHANNEL_UTILIZATION_PERIODS; i++) {
|
for (uint32_t i = 0; i < CHANNEL_UTILIZATION_PERIODS; i++) {
|
||||||
this->channelUtilization[i] = 0;
|
this->channelUtilization[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Init airtime windows to all 0
|
||||||
|
for (int i = 0; i < myNodeInfo.air_period_rx_count; i++) {
|
||||||
|
this->airtimes.periodTX[i] = 0;
|
||||||
|
this->airtimes.periodRX[i] = 0;
|
||||||
|
this->airtimes.periodRX_ALL[i] = 0;
|
||||||
|
|
||||||
|
// myNodeInfo.air_period_tx[i] = 0;
|
||||||
|
// myNodeInfo.air_period_rx[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
firstTime = false;
|
firstTime = false;
|
||||||
lastUtilPeriod = utilPeriod;
|
lastUtilPeriod = utilPeriod;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
this->airtimeRotatePeriod();
|
||||||
|
|
||||||
// Reset the channelUtilization window when we roll over
|
// Reset the channelUtilization window when we roll over
|
||||||
if (lastUtilPeriod != utilPeriod) {
|
if (lastUtilPeriod != utilPeriod) {
|
||||||
@@ -127,9 +162,26 @@ int32_t AirTime::runOnce()
|
|||||||
this->channelUtilization[utilPeriod] = 0;
|
this->channelUtilization[utilPeriod] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lastUtilPeriodTX != utilPeriodTX) {
|
||||||
|
lastUtilPeriodTX = utilPeriodTX;
|
||||||
|
|
||||||
|
this->utilizationTX[utilPeriodTX] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Update channel_utilization every second.
|
// Update channel_utilization every second.
|
||||||
myNodeInfo.channel_utilization = airTime->channelUtilizationPercent();
|
myNodeInfo.channel_utilization = airTime->channelUtilizationPercent();
|
||||||
}
|
|
||||||
|
|
||||||
|
// Update channel_utilization every second.
|
||||||
|
myNodeInfo.air_util_tx = airTime->utilizationTXPercent();
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
DEBUG_MSG("utilPeriodTX %d TX Airtime %3.2f%\n", utilPeriodTX, airTime->utilizationTXPercent());
|
||||||
|
for (uint32_t i = 0; i < MINUTES_IN_HOUR; i++) {
|
||||||
|
DEBUG_MSG(
|
||||||
|
"%d,", this->utilizationTX[i]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
DEBUG_MSG("\n");
|
||||||
|
*/
|
||||||
return (1000 * 1);
|
return (1000 * 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,10 @@
|
|||||||
|
|
||||||
#define CHANNEL_UTILIZATION_PERIODS 6
|
#define CHANNEL_UTILIZATION_PERIODS 6
|
||||||
#define SECONDS_PER_PERIOD 3600
|
#define SECONDS_PER_PERIOD 3600
|
||||||
#define PERIODS_TO_LOG 24
|
#define PERIODS_TO_LOG 8
|
||||||
|
#define MINUTES_IN_HOUR 60
|
||||||
|
#define SECONDS_IN_MINUTE 60
|
||||||
|
#define MS_IN_HOUR (MINUTES_IN_HOUR * SECONDS_IN_MINUTE * 1000)
|
||||||
|
|
||||||
|
|
||||||
enum reportTypes { TX_LOG, RX_LOG, RX_ALL_LOG };
|
enum reportTypes { TX_LOG, RX_LOG, RX_ALL_LOG };
|
||||||
@@ -43,9 +46,12 @@ class AirTime : private concurrency::OSThread
|
|||||||
|
|
||||||
void logAirtime(reportTypes reportType, uint32_t airtime_ms);
|
void logAirtime(reportTypes reportType, uint32_t airtime_ms);
|
||||||
float channelUtilizationPercent();
|
float channelUtilizationPercent();
|
||||||
uint32_t channelUtilization[CHANNEL_UTILIZATION_PERIODS];
|
float utilizationTXPercent();
|
||||||
|
|
||||||
|
float UtilizationPercentTX();
|
||||||
|
uint32_t channelUtilization[CHANNEL_UTILIZATION_PERIODS] = {0};
|
||||||
|
uint32_t utilizationTX[MINUTES_IN_HOUR] = {0};
|
||||||
|
|
||||||
uint8_t currentPeriodIndex();
|
|
||||||
void airtimeRotatePeriod();
|
void airtimeRotatePeriod();
|
||||||
uint8_t getPeriodsToLog();
|
uint8_t getPeriodsToLog();
|
||||||
uint32_t getSecondsPerPeriod();
|
uint32_t getSecondsPerPeriod();
|
||||||
@@ -55,6 +61,7 @@ class AirTime : private concurrency::OSThread
|
|||||||
private:
|
private:
|
||||||
bool firstTime = true;
|
bool firstTime = true;
|
||||||
uint8_t lastUtilPeriod = 0;
|
uint8_t lastUtilPeriod = 0;
|
||||||
|
uint8_t lastUtilPeriodTX = 0;
|
||||||
uint32_t secSinceBoot = 0;
|
uint32_t secSinceBoot = 0;
|
||||||
|
|
||||||
struct airtimeStruct {
|
struct airtimeStruct {
|
||||||
@@ -64,8 +71,12 @@ class AirTime : private concurrency::OSThread
|
|||||||
uint8_t lastPeriodIndex;
|
uint8_t lastPeriodIndex;
|
||||||
} airtimes;
|
} airtimes;
|
||||||
|
|
||||||
|
uint8_t getPeriodUtilMinute();
|
||||||
|
uint8_t getPeriodUtilHour();
|
||||||
|
uint8_t currentPeriodIndex();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int32_t runOnce() override;
|
virtual int32_t runOnce() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern AirTime *airTime;
|
extern AirTime *airTime;
|
||||||
|
|||||||
@@ -13,4 +13,5 @@ enum class Cmd {
|
|||||||
STOP_BLUETOOTH_PIN_SCREEN,
|
STOP_BLUETOOTH_PIN_SCREEN,
|
||||||
STOP_BOOT_SCREEN,
|
STOP_BOOT_SCREEN,
|
||||||
PRINT,
|
PRINT,
|
||||||
|
START_SHUTDOWN_SCREEN,
|
||||||
};
|
};
|
||||||
@@ -7,9 +7,8 @@
|
|||||||
namespace concurrency
|
namespace concurrency
|
||||||
{
|
{
|
||||||
|
|
||||||
BinarySemaphoreFreeRTOS::BinarySemaphoreFreeRTOS()
|
BinarySemaphoreFreeRTOS::BinarySemaphoreFreeRTOS() : semaphore(xSemaphoreCreateBinary())
|
||||||
{
|
{
|
||||||
semaphore = xSemaphoreCreateBinary();
|
|
||||||
assert(semaphore);
|
assert(semaphore);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,4 +37,4 @@ IRAM_ATTR void BinarySemaphoreFreeRTOS::giveFromISR(BaseType_t *pxHigherPriority
|
|||||||
|
|
||||||
} // namespace concurrency
|
} // namespace concurrency
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ namespace concurrency
|
|||||||
{
|
{
|
||||||
|
|
||||||
#ifdef HAS_FREE_RTOS
|
#ifdef HAS_FREE_RTOS
|
||||||
Lock::Lock()
|
Lock::Lock() : handle(xSemaphoreCreateBinary())
|
||||||
{
|
{
|
||||||
handle = xSemaphoreCreateBinary();
|
|
||||||
assert(handle);
|
assert(handle);
|
||||||
assert(xSemaphoreGive(handle));
|
assert(xSemaphoreGive(handle));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace concurrency {
|
|||||||
class LockGuard
|
class LockGuard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LockGuard(Lock *lock);
|
explicit LockGuard(Lock *lock);
|
||||||
~LockGuard();
|
~LockGuard();
|
||||||
|
|
||||||
LockGuard(const LockGuard &) = delete;
|
LockGuard(const LockGuard &) = delete;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class NotifiedWorkerThread : public OSThread
|
|||||||
virtual void onNotify(uint32_t notification) = 0;
|
virtual void onNotify(uint32_t notification) = 0;
|
||||||
|
|
||||||
/// just calls checkNotification()
|
/// just calls checkNotification()
|
||||||
virtual int32_t runOnce();
|
virtual int32_t runOnce() override;
|
||||||
|
|
||||||
/// Sometimes we might want to check notifications independently of when our thread was getting woken up (i.e. if we are about to change
|
/// Sometimes we might want to check notifications independently of when our thread was getting woken up (i.e. if we are about to change
|
||||||
/// radio transmit/receive modes we want to handle any pending interrupts first). You can call this method and if any notifications are currently
|
/// radio transmit/receive modes we want to handle any pending interrupts first). You can call this method and if any notifications are currently
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Periodic : public OSThread
|
|||||||
Periodic(const char *name, int32_t (*_callback)()) : OSThread(name), callback(_callback) {}
|
Periodic(const char *name, int32_t (*_callback)()) : OSThread(name), callback(_callback) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int32_t runOnce() { return callback(); }
|
int32_t runOnce() override { return callback(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace concurrency
|
} // namespace concurrency
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// If we are using the JTAG port for debugging, some pins must be left free for that (and things like GPS have to be disabled)
|
// If we are using the JTAG port for debugging, some pins must be left free for that (and things like GPS have to be disabled)
|
||||||
// we don't support jtag on the ttgo - access to gpio 12 is a PITA
|
// we don't support jtag on the ttgo - access to gpio 12 is a PITA
|
||||||
#ifdef ARDUINO_HELTEC_WIFI_LORA_32_V2
|
|
||||||
//#define USE_JTAG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define REQUIRE_RADIO true // If true, we will fail to start if the radio is not found
|
#define REQUIRE_RADIO true // If true, we will fail to start if the radio is not found
|
||||||
|
|
||||||
/// Convert a preprocessor name into a quoted string
|
/// Convert a preprocessor name into a quoted string
|
||||||
@@ -84,17 +80,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define BUTTON_PIN_ALT PIN_BUTTON2
|
#define BUTTON_PIN_ALT PIN_BUTTON2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// FIXME, use variant.h defs for all of this!!! (even on the ESP32 targets)
|
#ifdef PIN_BUTTON_TOUCH
|
||||||
#elif defined(CubeCell_BoardPlus)
|
#define BUTTON_PIN_TOUCH PIN_BUTTON_TOUCH
|
||||||
|
#endif
|
||||||
//
|
|
||||||
// Standard definitions for CubeCell targets
|
|
||||||
//
|
|
||||||
|
|
||||||
#define NO_ESP32 // Don't use ESP32 libs (mainly bluetooth)
|
|
||||||
|
|
||||||
#define LED_PIN -1 // FIXME totally bogus
|
|
||||||
#define BUTTON_PIN -1
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -165,302 +153,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_TBEAM
|
#define HW_VENDOR HardwareModel_TBEAM
|
||||||
|
|
||||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
|
||||||
|
|
||||||
#define I2C_SDA 21
|
|
||||||
#define I2C_SCL 22
|
|
||||||
|
|
||||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
|
||||||
//#define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented anywhere.
|
|
||||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
|
|
||||||
|
|
||||||
#define LED_INVERTED 1
|
|
||||||
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
|
|
||||||
|
|
||||||
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
|
||||||
// not found then probe for SX1262
|
|
||||||
#define USE_RF95
|
|
||||||
#define USE_SX1262
|
|
||||||
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 23
|
|
||||||
#define LORA_DIO1 33 // SX1262 IRQ
|
|
||||||
#define LORA_DIO2 32 // SX1262 BUSY
|
|
||||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
|
||||||
|
|
||||||
#ifdef USE_SX1262
|
|
||||||
#define SX126X_CS RF95_NSS // FIXME - we really should define LORA_CS instead
|
|
||||||
#define SX126X_DIO1 LORA_DIO1
|
|
||||||
#define SX126X_BUSY LORA_DIO2
|
|
||||||
#define SX126X_RESET LORA_RESET
|
|
||||||
#define SX126X_E22 // Not really an E22 but TTGO seems to be trying to clone that
|
|
||||||
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
|
||||||
// code)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
|
||||||
// and waking from light sleep
|
|
||||||
// #define PMU_IRQ 35
|
|
||||||
#define AXP192_SLAVE_ADDRESS 0x34
|
|
||||||
|
|
||||||
#elif defined(TBEAM_V07)
|
#elif defined(TBEAM_V07)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_TBEAM0p7
|
#define HW_VENDOR HardwareModel_TBEAM0p7
|
||||||
|
|
||||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
|
||||||
|
|
||||||
#define I2C_SDA 21
|
|
||||||
#define I2C_SCL 22
|
|
||||||
|
|
||||||
#define BUTTON_PIN 39
|
|
||||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
|
||||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 23
|
|
||||||
#define LORA_DIO1 33 // Not really used
|
|
||||||
#define LORA_DIO2 32 // Not really used
|
|
||||||
|
|
||||||
// This board has different GPS pins than all other boards
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 12
|
|
||||||
#define GPS_TX_PIN 15
|
|
||||||
|
|
||||||
#elif defined(DIY_V1)
|
#elif defined(DIY_V1)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_DIY_V1
|
#define HW_VENDOR HardwareModel_DIY_V1
|
||||||
|
|
||||||
// For OLED LCD
|
#elif defined(RAK_11200)
|
||||||
#define I2C_SDA 21
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define I2C_SCL 22
|
#define HW_VENDOR HardwareModel_RAK11200
|
||||||
|
|
||||||
// GPS
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#define GPS_RX_PIN 15
|
|
||||||
//#undef GPS_TX_PIN
|
|
||||||
//#define GPS_TX_PIN 12 // not connected
|
|
||||||
|
|
||||||
#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
|
|
||||||
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Plugin (#975).
|
|
||||||
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262/SX1268 module
|
|
||||||
#define LORA_RESET 23 // RST for SX1276, and for SX1262/SX1268
|
|
||||||
#define LORA_DIO1 33 // IRQ for SX1262/SX1268
|
|
||||||
#define LORA_DIO2 32 // BUSY for SX1262/SX1268
|
|
||||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled
|
|
||||||
|
|
||||||
#define RF95_SCK 5
|
|
||||||
#define RF95_MISO 19
|
|
||||||
#define RF95_MOSI 27
|
|
||||||
#define RF95_NSS 18
|
|
||||||
|
|
||||||
// supported modules list
|
|
||||||
#define USE_SX1262
|
|
||||||
#define USE_SX1268
|
|
||||||
#define USE_LLCC68
|
|
||||||
|
|
||||||
// common pinouts for SX126X modules
|
|
||||||
#define SX126X_CS 18 // NSS for SX126X
|
|
||||||
#define SX126X_DIO1 LORA_DIO1
|
|
||||||
#define SX126X_BUSY LORA_DIO2
|
|
||||||
#define SX126X_RESET LORA_RESET
|
|
||||||
#define SX126X_RXEN 14
|
|
||||||
#define SX126X_TXEN 13
|
|
||||||
|
|
||||||
#ifdef EBYTE_E22
|
|
||||||
// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch
|
|
||||||
// (which is the default for the sx1262interface code)
|
|
||||||
#define SX126X_E22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
|
#elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
|
||||||
|
|
||||||
// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.
|
|
||||||
// Tested on Neo6m module.
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 36
|
|
||||||
#define GPS_TX_PIN 37
|
|
||||||
|
|
||||||
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
|
|
||||||
#define I2C_SDA 4 // I2C pins for this board
|
|
||||||
#define I2C_SCL 15
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
|
||||||
|
|
||||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
|
||||||
#define LED_PIN 25 // If defined we will blink this LED
|
|
||||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#ifndef USE_JTAG
|
|
||||||
#define LORA_RESET 14
|
|
||||||
#endif
|
|
||||||
#define LORA_DIO1 35 // Not really used
|
|
||||||
#define LORA_DIO2 34 // Not really used
|
|
||||||
|
|
||||||
// ratio of voltage divider = 3.20 (R1=100k, R2=220k)
|
|
||||||
#define ADC_MULTIPLIER 3.2
|
|
||||||
|
|
||||||
#ifdef HELTEC_V2_0
|
#ifdef HELTEC_V2_0
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_HELTEC_V2_0
|
#define HW_VENDOR HardwareModel_HELTEC_V2_0
|
||||||
|
|
||||||
#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HELTEC_V2_1
|
#ifdef HELTEC_V2_1
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_HELTEC_V2_1
|
#define HW_VENDOR HardwareModel_HELTEC_V2_1
|
||||||
|
|
||||||
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
|
||||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#elif defined(ARDUINO_HELTEC_WIFI_LORA_32)
|
||||||
|
|
||||||
|
#define HW_VENDOR HardwareModel_HELTEC_V1
|
||||||
|
|
||||||
#elif defined(TLORA_V1)
|
#elif defined(TLORA_V1)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
|
||||||
#define HW_VENDOR HardwareModel_TLORA_V1
|
#define HW_VENDOR HardwareModel_TLORA_V1
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 36
|
|
||||||
#define GPS_TX_PIN 37
|
|
||||||
|
|
||||||
#define I2C_SDA 4 // I2C pins for this board
|
|
||||||
#define I2C_SCL 15
|
|
||||||
|
|
||||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
|
||||||
|
|
||||||
// #define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
|
||||||
#define LED_PIN 2 // If defined we will blink this LED
|
|
||||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 14
|
|
||||||
#define LORA_DIO1 35 // Not really used
|
|
||||||
#define LORA_DIO2 34 // Not really used
|
|
||||||
|
|
||||||
#elif defined(TLORA_V2)
|
#elif defined(TLORA_V2)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_TLORA_V2
|
#define HW_VENDOR HardwareModel_TLORA_V2
|
||||||
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 36
|
|
||||||
#define GPS_TX_PIN 13 // per @eugene
|
|
||||||
|
|
||||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
|
||||||
|
|
||||||
#define I2C_SDA 21 // I2C pins for this board
|
|
||||||
#define I2C_SCL 22
|
|
||||||
|
|
||||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
|
||||||
|
|
||||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
|
||||||
#define LED_PIN 25 // If defined we will blink this LED
|
|
||||||
#define BUTTON_PIN \
|
|
||||||
0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one
|
|
||||||
// between this pin and ground
|
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 14
|
|
||||||
#define LORA_DIO1 35 // Not really used
|
|
||||||
#define LORA_DIO2 34 // Not really used
|
|
||||||
|
|
||||||
#elif defined(TLORA_V1_3)
|
#elif defined(TLORA_V1_3)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_TLORA_V1_1p3
|
#define HW_VENDOR HardwareModel_TLORA_V1_1p3
|
||||||
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 36
|
|
||||||
#define GPS_TX_PIN 13 // per @eugene
|
|
||||||
|
|
||||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
|
||||||
|
|
||||||
#define I2C_SDA 4 // I2C pins for this board
|
|
||||||
#define I2C_SCL 15
|
|
||||||
|
|
||||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
|
||||||
|
|
||||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
|
||||||
#define LED_PIN 25 // If defined we will blink this LED
|
|
||||||
#define BUTTON_PIN 36
|
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 14
|
|
||||||
#define LORA_DIO1 35 // Not really used
|
|
||||||
#define LORA_DIO2 34 // Not really used
|
|
||||||
|
|
||||||
#elif defined(TLORA_V2_1_16)
|
#elif defined(TLORA_V2_1_16)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_TLORA_V2_1_1p6
|
#define HW_VENDOR HardwareModel_TLORA_V2_1_1p6
|
||||||
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 15 // per @der_bear on the forum, 36 is incorrect for this board type and 15 is a better pick
|
|
||||||
#define GPS_TX_PIN 13
|
|
||||||
|
|
||||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
|
||||||
|
|
||||||
#define I2C_SDA 21 // I2C pins for this board
|
|
||||||
#define I2C_SCL 22
|
|
||||||
|
|
||||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
|
||||||
|
|
||||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
|
||||||
#define LED_PIN 25 // If defined we will blink this LED
|
|
||||||
#define BUTTON_PIN 12 // If defined, this will be used for user button presses,
|
|
||||||
|
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 14
|
|
||||||
#define LORA_DIO1 35 // Not really used
|
|
||||||
#define LORA_DIO2 34 // Not really used
|
|
||||||
|
|
||||||
#elif defined(GENIEBLOCKS)
|
#elif defined(GENIEBLOCKS)
|
||||||
// This string must exactly match the case used in release file names or the android updater won't work
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
#define HW_VENDOR HardwareModel_GENIEBLOCKS
|
#define HW_VENDOR HardwareModel_GENIEBLOCKS
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
#define GPS_RX_PIN 5
|
|
||||||
#define GPS_TX_PIN 18
|
|
||||||
#define GPS_RESET_N 10
|
|
||||||
#define GPS_EXTINT 23 // On MAX-M8 module pin name is EXTINT. On L70 module pin name is STANDBY.
|
|
||||||
|
|
||||||
#define BATTERY_PIN 39 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
#elif defined(PRIVATE_HW)
|
||||||
#define BATTERY_EN_PIN 14 // Voltage voltage divider enable pin connected to mosfet
|
// This string must exactly match the case used in release file names or the android updater won't work
|
||||||
|
#define HW_VENDOR HardwareModel_PRIVATE_HW
|
||||||
#define I2C_SDA 4 // I2C pins for this board
|
|
||||||
#define I2C_SCL 2
|
|
||||||
|
|
||||||
#define LED_PIN 12 // If defined we will blink this LED
|
|
||||||
//#define BUTTON_PIN 36 // If defined, this will be used for user button presses (ToDo problem on that line on debug screen -->
|
|
||||||
// Long press start!) #define BUTTON_NEED_PULLUP //GPIOs 34 to 39 are GPIs – input only pins. These pins don’t have internal
|
|
||||||
// pull-ups or pull-down resistors.
|
|
||||||
|
|
||||||
#define USE_RF95
|
|
||||||
#define LORA_DIO0 38 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 9
|
|
||||||
|
|
||||||
#define RF95_SCK 22
|
|
||||||
#define RF95_MISO 19
|
|
||||||
#define RF95_MOSI 13
|
|
||||||
#define RF95_NSS 21
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -493,100 +238,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define HW_VENDOR HardwareModel_PORTDUINO
|
#define HW_VENDOR HardwareModel_PORTDUINO
|
||||||
|
|
||||||
#define USE_SIM_RADIO
|
|
||||||
|
|
||||||
// Pine64 uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
|
||||||
// not found then probe for SX1262. Currently the RF95 code is disabled because I think the RF95 module won't need to ship.
|
|
||||||
// #define USE_RF95
|
|
||||||
#define USE_SX1262
|
|
||||||
|
|
||||||
// Fake SPI device selections
|
|
||||||
#define RF95_SCK 5
|
|
||||||
#define RF95_MISO 19
|
|
||||||
#define RF95_MOSI 27
|
|
||||||
#define RF95_NSS RADIOLIB_NC // the ch341f spi controller does CS for us
|
|
||||||
|
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
|
||||||
#define LORA_RESET 14
|
|
||||||
#define LORA_DIO1 33 // SX1262 IRQ, called DIO0 on pinelora schematic, pin 7 on ch341f "ack" - FIXME, enable hwints in linux
|
|
||||||
#define LORA_DIO2 32 // SX1262 BUSY, actually connected to "DIO5" on pinelora schematic, pin 8 on ch341f "slct"
|
|
||||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
|
||||||
|
|
||||||
#ifdef USE_SX1262
|
|
||||||
#define SX126X_CS 20 // CS0 on pinelora schematic, hooked to gpio D0 on ch341f
|
|
||||||
#define SX126X_DIO1 LORA_DIO1
|
|
||||||
#define SX126X_BUSY LORA_DIO2
|
|
||||||
#define SX126X_RESET LORA_RESET
|
|
||||||
// HOPE RFM90 does not have a TCXO therefore not SX126X_E22
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#include "variant.h"
|
||||||
|
#include "RF95Configuration.h"
|
||||||
// DEBUG LED
|
#include "DebugConfiguration.h"
|
||||||
#ifndef LED_INVERTED
|
|
||||||
#define LED_INVERTED 0 // define as 1 if LED is active low (on)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// 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
|
|
||||||
19
src/debug/axpDebug.h
Normal file
19
src/debug/axpDebug.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#if 0
|
||||||
|
// Turn off for now
|
||||||
|
uint32_t axpDebugRead()
|
||||||
|
{
|
||||||
|
axp.debugCharging();
|
||||||
|
DEBUG_MSG("vbus current %f\n", axp.getVbusCurrent());
|
||||||
|
DEBUG_MSG("charge current %f\n", axp.getBattChargeCurrent());
|
||||||
|
DEBUG_MSG("bat voltage %f\n", axp.getBattVoltage());
|
||||||
|
DEBUG_MSG("batt pct %d\n", axp.getBattPercentage());
|
||||||
|
DEBUG_MSG("is battery connected %d\n", axp.isBatteryConnect());
|
||||||
|
DEBUG_MSG("is USB connected %d\n", axp.isVBUSPlug());
|
||||||
|
DEBUG_MSG("is charging %d\n", axp.isChargeing());
|
||||||
|
|
||||||
|
return 30 * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
Periodic axpDebugOutput(axpDebugRead);
|
||||||
|
axpDebugOutput.setup();
|
||||||
|
#endif
|
||||||
44
src/debug/i2cScan.h
Normal file
44
src/debug/i2cScan.h
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#include "../configuration.h"
|
||||||
|
#include "../main.h"
|
||||||
|
#include <Wire.h>
|
||||||
|
|
||||||
|
#ifndef NO_WIRE
|
||||||
|
void scanI2Cdevice(void)
|
||||||
|
{
|
||||||
|
byte err, addr;
|
||||||
|
int nDevices = 0;
|
||||||
|
for (addr = 1; addr < 127; addr++) {
|
||||||
|
Wire.beginTransmission(addr);
|
||||||
|
err = Wire.endTransmission();
|
||||||
|
if (err == 0) {
|
||||||
|
DEBUG_MSG("I2C device found at address 0x%x\n", addr);
|
||||||
|
|
||||||
|
nDevices++;
|
||||||
|
|
||||||
|
if (addr == SSD1306_ADDRESS) {
|
||||||
|
screen_found = addr;
|
||||||
|
DEBUG_MSG("ssd1306 display found\n");
|
||||||
|
}
|
||||||
|
if (addr == ST7567_ADDRESS) {
|
||||||
|
screen_found = addr;
|
||||||
|
DEBUG_MSG("st7567 display found\n");
|
||||||
|
}
|
||||||
|
#ifdef AXP192_SLAVE_ADDRESS
|
||||||
|
if (addr == AXP192_SLAVE_ADDRESS) {
|
||||||
|
axp192_found = true;
|
||||||
|
DEBUG_MSG("axp192 PMU found\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} else if (err == 4) {
|
||||||
|
DEBUG_MSG("Unknow error at address 0x%x\n", addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nDevices == 0)
|
||||||
|
DEBUG_MSG("No I2C devices found\n");
|
||||||
|
else
|
||||||
|
DEBUG_MSG("done\n");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void scanI2Cdevice(void) {}
|
||||||
|
#endif
|
||||||
@@ -58,7 +58,7 @@ int update_size_callback(uint16_t conn_handle, uint16_t attr_handle, struct ble_
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_BLOCKSIZE 512
|
#define MAX_BLOCKSIZE_FOR_BT 512
|
||||||
|
|
||||||
/// Handle writes to data
|
/// Handle writes to data
|
||||||
int update_data_callback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg)
|
int update_data_callback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg)
|
||||||
@@ -66,7 +66,7 @@ int update_data_callback(uint16_t conn_handle, uint16_t attr_handle, struct ble_
|
|||||||
concurrency::LockGuard g(updateLock);
|
concurrency::LockGuard g(updateLock);
|
||||||
|
|
||||||
static uint8_t
|
static uint8_t
|
||||||
data[MAX_BLOCKSIZE]; // we temporarily copy here because I'm worried that a fast sender might be able overwrite srcbuf
|
data[MAX_BLOCKSIZE_FOR_BT]; // we temporarily copy here because I'm worried that a fast sender might be able overwrite srcbuf
|
||||||
|
|
||||||
uint16_t len = 0;
|
uint16_t len = 0;
|
||||||
|
|
||||||
@@ -104,8 +104,8 @@ int update_crc32_callback(uint16_t conn_handle, uint16_t attr_handle, struct ble
|
|||||||
} else {
|
} else {
|
||||||
if (Update.end()) {
|
if (Update.end()) {
|
||||||
if (update_region == U_SPIFFS) {
|
if (update_region == U_SPIFFS) {
|
||||||
DEBUG_MSG("SPIFFS updated!\n");
|
DEBUG_MSG("Filesystem updated!\n");
|
||||||
nodeDB.saveToDisk(); // Since we just wiped spiffs, we need to save our current state
|
nodeDB.saveToDisk(); // Since we just wiped the filesystem, we need to save our current state
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("Appload updated, rebooting in 5 seconds!\n");
|
DEBUG_MSG("Appload updated, rebooting in 5 seconds!\n");
|
||||||
rebootAtMsec = millis() + 5000;
|
rebootAtMsec = millis() + 5000;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class ESP32CryptoEngine : public CryptoEngine
|
|||||||
* @param bytes a _static_ buffer that will remain valid for the life of this crypto instance (i.e. this class will cache the
|
* @param bytes a _static_ buffer that will remain valid for the life of this crypto instance (i.e. this class will cache the
|
||||||
* provided pointer)
|
* provided pointer)
|
||||||
*/
|
*/
|
||||||
virtual void setKey(const CryptoKey &k)
|
virtual void setKey(const CryptoKey &k) override
|
||||||
{
|
{
|
||||||
CryptoEngine::setKey(k);
|
CryptoEngine::setKey(k);
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ class ESP32CryptoEngine : public CryptoEngine
|
|||||||
*
|
*
|
||||||
* @param bytes is updated in place
|
* @param bytes is updated in place
|
||||||
*/
|
*/
|
||||||
virtual void encrypt(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes)
|
virtual void encrypt(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes) override
|
||||||
{
|
{
|
||||||
if (key.length > 0) {
|
if (key.length > 0) {
|
||||||
uint8_t stream_block[16];
|
uint8_t stream_block[16];
|
||||||
@@ -66,7 +66,7 @@ class ESP32CryptoEngine : public CryptoEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void decrypt(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes)
|
virtual void decrypt(uint32_t fromNode, uint64_t packetNum, size_t numBytes, uint8_t *bytes) override
|
||||||
{
|
{
|
||||||
// DEBUG_MSG("ESP32 decrypt!\n");
|
// DEBUG_MSG("ESP32 decrypt!\n");
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
class SimpleAllocator
|
class SimpleAllocator
|
||||||
{
|
{
|
||||||
uint8_t bytes[POOL_SIZE];
|
uint8_t bytes[POOL_SIZE] = {};
|
||||||
|
|
||||||
uint32_t nextFree;
|
uint32_t nextFree = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SimpleAllocator();
|
SimpleAllocator();
|
||||||
@@ -37,6 +37,6 @@ void *operator new(size_t size, SimpleAllocator &p);
|
|||||||
*/
|
*/
|
||||||
class AllocatorScope {
|
class AllocatorScope {
|
||||||
public:
|
public:
|
||||||
AllocatorScope(SimpleAllocator &a);
|
explicit AllocatorScope(SimpleAllocator &a);
|
||||||
~AllocatorScope();
|
~AllocatorScope();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ void esp32Setup()
|
|||||||
nvs_stats_t nvs_stats;
|
nvs_stats_t nvs_stats;
|
||||||
auto res = nvs_get_stats(NULL, &nvs_stats);
|
auto res = nvs_get_stats(NULL, &nvs_stats);
|
||||||
assert(res == ESP_OK);
|
assert(res == ESP_OK);
|
||||||
DEBUG_MSG("NVS: UsedEntries %d, FreeEntries %d, AllEntries %d\n", nvs_stats.used_entries, nvs_stats.free_entries,
|
DEBUG_MSG("NVS: UsedEntries %d, FreeEntries %d, AllEntries %d, NameSpaces %d\n", nvs_stats.used_entries, nvs_stats.free_entries,
|
||||||
nvs_stats.total_entries);
|
nvs_stats.total_entries, nvs_stats.namespace_count);
|
||||||
|
|
||||||
DEBUG_MSG("Setup Preferences in Flash Storage\n");
|
DEBUG_MSG("Setup Preferences in Flash Storage\n");
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ class Air530GPS : public NMEAGPS
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
/// If possible force the GPS into sleep/low power mode
|
/// If possible force the GPS into sleep/low power mode
|
||||||
virtual void sleep();
|
virtual void sleep() override;
|
||||||
|
|
||||||
/// wake the GPS into normal operation mode
|
/// wake the GPS into normal operation mode
|
||||||
virtual void wake();
|
virtual void wake() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Send a NMEA cmd with checksum
|
/// Send a NMEA cmd with checksum
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class GPS : private concurrency::OSThread
|
|||||||
*/
|
*/
|
||||||
void publishUpdate();
|
void publishUpdate();
|
||||||
|
|
||||||
virtual int32_t runOnce();
|
virtual int32_t runOnce() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Creates an instance of the GPS class.
|
// Creates an instance of the GPS class.
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void GeoCoord::latLongToMGRS(const double lat, const double lon, MGRS &mgrs) {
|
|||||||
* Based on: https://www.movable-type.co.uk/scripts/latlong-os-gridref.html
|
* Based on: https://www.movable-type.co.uk/scripts/latlong-os-gridref.html
|
||||||
*/
|
*/
|
||||||
void GeoCoord::latLongToOSGR(const double lat, const double lon, OSGR &osgr) {
|
void GeoCoord::latLongToOSGR(const double lat, const double lon, OSGR &osgr) {
|
||||||
char letter[] = "ABCDEFGHJKLMNOPQRSTUVWXYZ"; // No 'I' in OSGR
|
const char letter[] = "ABCDEFGHJKLMNOPQRSTUVWXYZ"; // No 'I' in OSGR
|
||||||
double a = 6377563.396; // Airy 1830 semi-major axis
|
double a = 6377563.396; // Airy 1830 semi-major axis
|
||||||
double b = 6356256.909; // Airy 1830 semi-minor axis
|
double b = 6356256.909; // Airy 1830 semi-minor axis
|
||||||
double f0 = 0.9996012717; // National Grid point scale factor on the central meridian
|
double f0 = 0.9996012717; // National Grid point scale factor on the central meridian
|
||||||
@@ -419,12 +419,12 @@ float GeoCoord::rangeRadiansToMeters(double range_radians) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find distance from point to passed in point
|
// Find distance from point to passed in point
|
||||||
int32_t GeoCoord::distanceTo(GeoCoord pointB) {
|
int32_t GeoCoord::distanceTo(const GeoCoord& pointB) {
|
||||||
return latLongToMeter(this->getLatitude() * 1e-7, this->getLongitude() * 1e-7, pointB.getLatitude() * 1e-7, pointB.getLongitude() * 1e-7);
|
return latLongToMeter(this->getLatitude() * 1e-7, this->getLongitude() * 1e-7, pointB.getLatitude() * 1e-7, pointB.getLongitude() * 1e-7);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find bearing from point to passed in point
|
// Find bearing from point to passed in point
|
||||||
int32_t GeoCoord::bearingTo(GeoCoord pointB) {
|
int32_t GeoCoord::bearingTo(const GeoCoord& pointB) {
|
||||||
return bearing(this->getLatitude() * 1e-7, this->getLongitude() * 1e-7, pointB.getLatitude() * 1e-7, pointB.getLongitude() * 1e-7);
|
return bearing(this->getLatitude() * 1e-7, this->getLongitude() * 1e-7, pointB.getLatitude() * 1e-7, pointB.getLongitude() * 1e-7);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,4 +447,4 @@ std::shared_ptr<GeoCoord> GeoCoord::pointAtDistance(double bearing, double range
|
|||||||
|
|
||||||
return std::make_shared<GeoCoord>(double(lat), double(lon), this->getAltitude());
|
return std::make_shared<GeoCoord>(double(lat), double(lon), this->getAltitude());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,11 +86,11 @@ class GeoCoord {
|
|||||||
int32_t _longitude = 0;
|
int32_t _longitude = 0;
|
||||||
int32_t _altitude = 0;
|
int32_t _altitude = 0;
|
||||||
|
|
||||||
DMS _dms;
|
DMS _dms = {};
|
||||||
UTM _utm;
|
UTM _utm = {};
|
||||||
MGRS _mgrs;
|
MGRS _mgrs = {};
|
||||||
OSGR _osgr;
|
OSGR _osgr = {};
|
||||||
OLC _olc;
|
OLC _olc = {};
|
||||||
|
|
||||||
bool _dirty = true;
|
bool _dirty = true;
|
||||||
|
|
||||||
@@ -119,8 +119,8 @@ class GeoCoord {
|
|||||||
static float rangeMetersToRadians(double range_meters);
|
static float rangeMetersToRadians(double range_meters);
|
||||||
|
|
||||||
// Point to point conversions
|
// Point to point conversions
|
||||||
int32_t distanceTo(GeoCoord pointB);
|
int32_t distanceTo(const GeoCoord& pointB);
|
||||||
int32_t bearingTo(GeoCoord pointB);
|
int32_t bearingTo(const GeoCoord& pointB);
|
||||||
std::shared_ptr<GeoCoord> pointAtDistance(double bearing, double range);
|
std::shared_ptr<GeoCoord> pointAtDistance(double bearing, double range);
|
||||||
|
|
||||||
// Lat lon alt getters
|
// Lat lon alt getters
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ class NMEAGPS : public GPS
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool setupGPS();
|
virtual bool setupGPS() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Subclasses should look for serial rx characters here and feed it to their GPS parser
|
/** Subclasses should look for serial rx characters here and feed it to their GPS parser
|
||||||
*
|
*
|
||||||
* Return true if we received a valid message from the GPS
|
* Return true if we received a valid message from the GPS
|
||||||
*/
|
*/
|
||||||
virtual bool whileIdle();
|
virtual bool whileIdle() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
||||||
@@ -38,7 +38,7 @@ class NMEAGPS : public GPS
|
|||||||
*
|
*
|
||||||
* @return true if we've acquired a time
|
* @return true if we've acquired a time
|
||||||
*/
|
*/
|
||||||
virtual bool lookForTime();
|
virtual bool lookForTime() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
||||||
@@ -46,7 +46,7 @@ class NMEAGPS : public GPS
|
|||||||
*
|
*
|
||||||
* @return true if we've acquired a new location
|
* @return true if we've acquired a new location
|
||||||
*/
|
*/
|
||||||
virtual bool lookForLocation();
|
virtual bool lookForLocation() override;
|
||||||
|
|
||||||
virtual bool hasLock();
|
virtual bool hasLock() override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,8 +11,11 @@ enum RTCQuality {
|
|||||||
/// Some other node gave us a time we can use
|
/// Some other node gave us a time we can use
|
||||||
RTCQualityFromNet = 1,
|
RTCQualityFromNet = 1,
|
||||||
|
|
||||||
|
/// Our time is based on NTP
|
||||||
|
RTCQualityNTP= 2,
|
||||||
|
|
||||||
/// Our time is based on our own GPS
|
/// Our time is based on our own GPS
|
||||||
RTCQualityGPS = 2
|
RTCQualityGPS = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
RTCQuality getRTCQuality();
|
RTCQuality getRTCQuality();
|
||||||
|
|||||||
@@ -22,22 +22,22 @@ class UBloxGPS : public GPS
|
|||||||
*
|
*
|
||||||
* @return true for success
|
* @return true for success
|
||||||
*/
|
*/
|
||||||
bool factoryReset();
|
bool factoryReset() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Returns true if we succeeded
|
* Returns true if we succeeded
|
||||||
*/
|
*/
|
||||||
virtual bool setupGPS();
|
virtual bool setupGPS() override;
|
||||||
|
|
||||||
/** Subclasses should look for serial rx characters here and feed it to their GPS parser
|
/** Subclasses should look for serial rx characters here and feed it to their GPS parser
|
||||||
*
|
*
|
||||||
* Return true if we received a valid message from the GPS
|
* Return true if we received a valid message from the GPS
|
||||||
*/
|
*/
|
||||||
virtual bool whileIdle();
|
virtual bool whileIdle() override;
|
||||||
|
|
||||||
/** Idle processing while GPS is looking for lock */
|
/** Idle processing while GPS is looking for lock */
|
||||||
virtual void whileActive();
|
virtual void whileActive() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
||||||
@@ -45,7 +45,7 @@ class UBloxGPS : public GPS
|
|||||||
*
|
*
|
||||||
* @return true if we've acquired a time
|
* @return true if we've acquired a time
|
||||||
*/
|
*/
|
||||||
virtual bool lookForTime();
|
virtual bool lookForTime() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
|
||||||
@@ -53,12 +53,12 @@ class UBloxGPS : public GPS
|
|||||||
*
|
*
|
||||||
* @return true if we've acquired a new location
|
* @return true if we've acquired a new location
|
||||||
*/
|
*/
|
||||||
virtual bool lookForLocation();
|
virtual bool lookForLocation() override;
|
||||||
virtual bool hasLock();
|
virtual bool hasLock() override;
|
||||||
|
|
||||||
/// If possible force the GPS into sleep/low power mode
|
/// If possible force the GPS into sleep/low power mode
|
||||||
virtual void sleep();
|
virtual void sleep() override;
|
||||||
virtual void wake();
|
virtual void wake() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Attempt to connect to our GPS, returns false if no gps is present
|
/// Attempt to connect to our GPS, returns false if no gps is present
|
||||||
|
|||||||
@@ -9,14 +9,45 @@
|
|||||||
#define COLORED GxEPD_BLACK
|
#define COLORED GxEPD_BLACK
|
||||||
#define UNCOLORED GxEPD_WHITE
|
#define UNCOLORED GxEPD_WHITE
|
||||||
|
|
||||||
|
#if defined(TTGO_T_ECHO)
|
||||||
#define TECHO_DISPLAY_MODEL GxEPD2_154_D67
|
#define TECHO_DISPLAY_MODEL GxEPD2_154_D67
|
||||||
|
#elif defined(RAK4630)
|
||||||
|
|
||||||
|
//GxEPD2_213_B74 - RAK14000 2.13 inch b/w 250x128
|
||||||
|
#define TECHO_DISPLAY_MODEL GxEPD2_213_B74
|
||||||
|
|
||||||
|
//4.2 inch 300x400 - GxEPD2_420_M01
|
||||||
|
//#define TECHO_DISPLAY_MODEL GxEPD2_420_M01
|
||||||
|
|
||||||
|
//2.9 inch 296x128 - GxEPD2_290_T5D
|
||||||
|
//#define TECHO_DISPLAY_MODEL GxEPD2_290_T5D
|
||||||
|
|
||||||
|
//1.54 inch 200x200 - GxEPD2_154_M09
|
||||||
|
//#define TECHO_DISPLAY_MODEL GxEPD2_154_M09
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT> *adafruitDisplay;
|
GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT> *adafruitDisplay;
|
||||||
|
|
||||||
EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl)
|
EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl)
|
||||||
{
|
{
|
||||||
|
#if defined(TTGO_T_ECHO)
|
||||||
setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT);
|
setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT);
|
||||||
|
#elif defined(RAK4630)
|
||||||
|
|
||||||
|
//GxEPD2_213_B74 - RAK14000 2.13 inch b/w 250x128
|
||||||
|
setGeometry(GEOMETRY_RAWMODE, 250, 122);
|
||||||
|
|
||||||
|
//GxEPD2_420_M01
|
||||||
|
//setGeometry(GEOMETRY_RAWMODE, 300, 400);
|
||||||
|
|
||||||
|
//GxEPD2_290_T5D
|
||||||
|
//setGeometry(GEOMETRY_RAWMODE, 296, 128);
|
||||||
|
|
||||||
|
//GxEPD2_154_M09
|
||||||
|
//setGeometry(GEOMETRY_RAWMODE, 200, 200);
|
||||||
|
|
||||||
|
#endif
|
||||||
// setGeometry(GEOMETRY_RAWMODE, 128, 64); // old resolution
|
// setGeometry(GEOMETRY_RAWMODE, 128, 64); // old resolution
|
||||||
// setGeometry(GEOMETRY_128_64); // We originally used this because I wasn't sure if rawmode worked - it does
|
// setGeometry(GEOMETRY_128_64); // We originally used this because I wasn't sure if rawmode worked - it does
|
||||||
}
|
}
|
||||||
@@ -40,8 +71,8 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit)
|
|||||||
|
|
||||||
// FIXME - only draw bits have changed (use backbuf similar to the other displays)
|
// FIXME - only draw bits have changed (use backbuf similar to the other displays)
|
||||||
// tft.drawBitmap(0, 0, buffer, 128, 64, TFT_YELLOW, TFT_BLACK);
|
// tft.drawBitmap(0, 0, buffer, 128, 64, TFT_YELLOW, TFT_BLACK);
|
||||||
for (uint8_t y = 0; y < displayHeight; y++) {
|
for (uint64_t y = 0; y < displayHeight; y++) {
|
||||||
for (uint8_t x = 0; x < displayWidth; x++) {
|
for (uint64_t x = 0; x < displayWidth; x++) {
|
||||||
|
|
||||||
// get src pixel in the page based ordering the OLED lib uses FIXME, super inefficent
|
// get src pixel in the page based ordering the OLED lib uses FIXME, super inefficent
|
||||||
auto b = buffer[x + (y / 8) * displayWidth];
|
auto b = buffer[x + (y / 8) * displayWidth];
|
||||||
@@ -50,9 +81,28 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_MSG("Updating eink... ");
|
#if defined(TTGO_T_ECHO)
|
||||||
|
DEBUG_MSG("Updating T-ECHO E-Paper... ");
|
||||||
|
#elif defined(RAK4630)
|
||||||
|
DEBUG_MSG("Updating RAK4361_5005 E-Paper... ");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(TTGO_T_ECHO)
|
||||||
// ePaper.Reset(); // wake the screen from sleep
|
// ePaper.Reset(); // wake the screen from sleep
|
||||||
adafruitDisplay->display(false); // FIXME, use partial update mode
|
adafruitDisplay->display(false); // FIXME, use partial update mode
|
||||||
|
#elif defined(RAK4630)
|
||||||
|
|
||||||
|
//RAK14000 2.13 inch b/w 250x122 does not support partial updates
|
||||||
|
adafruitDisplay->display(false); // FIXME, use partial update mode
|
||||||
|
|
||||||
|
//Only enable for e-Paper with support for partial updates and comment out above adafruitDisplay->display(false);
|
||||||
|
// 1.54 inch 200x200 - GxEPD2_154_M09
|
||||||
|
// 2.9 inch 296x128 - GxEPD2_290_T5D
|
||||||
|
// 4.2 inch 300x400 - GxEPD2_420_M01
|
||||||
|
//adafruitDisplay->nextPage();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// Put screen to sleep to save power (possibly not necessary because we already did poweroff inside of display)
|
// Put screen to sleep to save power (possibly not necessary because we already did poweroff inside of display)
|
||||||
adafruitDisplay->hibernate();
|
adafruitDisplay->hibernate();
|
||||||
DEBUG_MSG("done\n");
|
DEBUG_MSG("done\n");
|
||||||
@@ -97,14 +147,33 @@ bool EInkDisplay::connect()
|
|||||||
pinMode(PIN_EINK_EN, OUTPUT);
|
pinMode(PIN_EINK_EN, OUTPUT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS,
|
|
||||||
PIN_EINK_DC,
|
#if defined(TTGO_T_ECHO)
|
||||||
PIN_EINK_RES,
|
{
|
||||||
PIN_EINK_BUSY, SPI1);
|
auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, SPI1);
|
||||||
|
|
||||||
adafruitDisplay = new GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT>(*lowLevel);
|
adafruitDisplay = new GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT>(*lowLevel);
|
||||||
adafruitDisplay->init();
|
adafruitDisplay->init();
|
||||||
adafruitDisplay->setRotation(3);
|
adafruitDisplay->setRotation(3);
|
||||||
|
}
|
||||||
|
#elif defined(RAK4630)
|
||||||
|
{
|
||||||
|
auto lowLevel = new TECHO_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);
|
||||||
|
|
||||||
|
adafruitDisplay = new GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT>(*lowLevel);
|
||||||
|
|
||||||
|
adafruitDisplay->init(115200, true, 10, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0));
|
||||||
|
|
||||||
|
//RAK14000 2.13 inch b/w 250x122 does not support partial updates
|
||||||
|
adafruitDisplay->setRotation(3);
|
||||||
|
//For 1.54, 2.9 and 4.2
|
||||||
|
//adafruitDisplay->setRotation(1);
|
||||||
|
|
||||||
|
adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//adafruitDisplay->setFullWindow();
|
//adafruitDisplay->setFullWindow();
|
||||||
//adafruitDisplay->fillScreen(UNCOLORED);
|
//adafruitDisplay->fillScreen(UNCOLORED);
|
||||||
//adafruitDisplay->drawCircle(100, 100, 20, COLORED);
|
//adafruitDisplay->drawCircle(100, 100, 20, COLORED);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class EInkDisplay : public OLEDDisplay
|
|||||||
EInkDisplay(uint8_t address, int sda, int scl);
|
EInkDisplay(uint8_t address, int sda, int scl);
|
||||||
|
|
||||||
// Write the buffer to the display memory (for eink we only do this occasionally)
|
// Write the buffer to the display memory (for eink we only do this occasionally)
|
||||||
virtual void display(void);
|
virtual void display(void) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force a display update if we haven't drawn within the specified msecLimit
|
* Force a display update if we haven't drawn within the specified msecLimit
|
||||||
@@ -36,13 +36,13 @@ class EInkDisplay : public OLEDDisplay
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the header size of the buffer used, e.g. for the SPI command header
|
// the header size of the buffer used, e.g. for the SPI command header
|
||||||
virtual int getBufferOffset(void) { return 0; }
|
virtual int getBufferOffset(void) override { return 0; }
|
||||||
|
|
||||||
// Send a command to the display (low level function)
|
// Send a command to the display (low level function)
|
||||||
virtual void sendCommand(uint8_t com);
|
virtual void sendCommand(uint8_t com) override;
|
||||||
|
|
||||||
// Connect to the display
|
// Connect to the display
|
||||||
virtual bool connect();
|
virtual bool connect() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
#include "fonts.h"
|
|
||||||
#include "gps/GeoCoord.h"
|
#include "gps/GeoCoord.h"
|
||||||
#include "gps/RTC.h"
|
#include "gps/RTC.h"
|
||||||
#include "graphics/images.h"
|
#include "graphics/images.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "mesh-pb-constants.h"
|
#include "mesh-pb-constants.h"
|
||||||
#include "mesh/Channels.h"
|
#include "mesh/Channels.h"
|
||||||
#include "plugins/TextMessagePlugin.h"
|
#include "modules/TextMessageModule.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@@ -68,9 +67,9 @@ uint8_t imgBattery[16] = {0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
|
|||||||
// Threshold values for the GPS lock accuracy bar display
|
// Threshold values for the GPS lock accuracy bar display
|
||||||
uint32_t dopThresholds[5] = {2000, 1000, 500, 200, 100};
|
uint32_t dopThresholds[5] = {2000, 1000, 500, 200, 100};
|
||||||
|
|
||||||
// At some point, we're going to ask all of the plugins if they would like to display a screen frame
|
// At some point, we're going to ask all of the modules if they would like to display a screen frame
|
||||||
// we'll need to hold onto pointers for the plugins that can draw a frame.
|
// we'll need to hold onto pointers for the modules that can draw a frame.
|
||||||
std::vector<MeshPlugin *> pluginFrames;
|
std::vector<MeshPlugin *> moduleFrames;
|
||||||
|
|
||||||
// Stores the last 4 of our hardware ID, to make finding the device for pairing easier
|
// Stores the last 4 of our hardware ID, to make finding the device for pairing easier
|
||||||
static char ourId[5];
|
static char ourId[5];
|
||||||
@@ -177,9 +176,9 @@ static void drawSleepScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void drawPluginFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
static void drawModuleFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
uint8_t plugin_frame;
|
uint8_t module_frame;
|
||||||
// there's a little but in the UI transition code
|
// there's a little but in the UI transition code
|
||||||
// where it invokes the function at the correct offset
|
// where it invokes the function at the correct offset
|
||||||
// in the array of "drawScreen" functions; however,
|
// in the array of "drawScreen" functions; however,
|
||||||
@@ -188,14 +187,14 @@ static void drawPluginFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int
|
|||||||
if (state->frameState == IN_TRANSITION && state->transitionFrameRelationship == INCOMING) {
|
if (state->frameState == IN_TRANSITION && state->transitionFrameRelationship == INCOMING) {
|
||||||
// if we're transitioning from the end of the frame list back around to the first
|
// if we're transitioning from the end of the frame list back around to the first
|
||||||
// frame, then we want this to be `0`
|
// frame, then we want this to be `0`
|
||||||
plugin_frame = state->transitionFrameTarget;
|
module_frame = state->transitionFrameTarget;
|
||||||
} else {
|
} else {
|
||||||
// otherwise, just display the plugin frame that's aligned with the current frame
|
// otherwise, just display the module frame that's aligned with the current frame
|
||||||
plugin_frame = state->currentFrame;
|
module_frame = state->currentFrame;
|
||||||
// DEBUG_MSG("Screen is not in transition. Frame: %d\n\n", plugin_frame);
|
// DEBUG_MSG("Screen is not in transition. Frame: %d\n\n", module_frame);
|
||||||
}
|
}
|
||||||
// DEBUG_MSG("Drawing Plugin Frame %d\n\n", plugin_frame);
|
// DEBUG_MSG("Drawing Module Frame %d\n\n", module_frame);
|
||||||
MeshPlugin &pi = *pluginFrames.at(plugin_frame);
|
MeshPlugin &pi = *moduleFrames.at(module_frame);
|
||||||
pi.drawFrame(display, state, x, y);
|
pi.drawFrame(display, state, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,6 +218,14 @@ static void drawFrameBluetooth(OLEDDisplay *display, OLEDDisplayUiState *state,
|
|||||||
display->drawString(64 + x, 48 + y, buf);
|
display->drawString(64 + x, 48 + y, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void drawFrameShutdown(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
|
{
|
||||||
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
|
|
||||||
|
display->setFont(FONT_MEDIUM);
|
||||||
|
display->drawString(64 + x, 26 + y, "Shutting down...");
|
||||||
|
}
|
||||||
|
|
||||||
static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
@@ -252,11 +259,11 @@ static void drawCriticalFaultFrame(OLEDDisplay *display, OLEDDisplayUiState *sta
|
|||||||
display->drawString(0 + x, FONT_HEIGHT_MEDIUM + y, "For help, please post on\nmeshtastic.discourse.group");
|
display->drawString(0 + x, FONT_HEIGHT_MEDIUM + y, "For help, please post on\nmeshtastic.discourse.group");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore messages orginating from phone (from the current node 0x0) unless range test or store and forward plugin are enabled
|
// Ignore messages orginating from phone (from the current node 0x0) unless range test or store and forward module are enabled
|
||||||
static bool shouldDrawMessage(const MeshPacket *packet)
|
static bool shouldDrawMessage(const MeshPacket *packet)
|
||||||
{
|
{
|
||||||
return packet->from != 0 && !radioConfig.preferences.range_test_plugin_enabled &&
|
return packet->from != 0 && !radioConfig.preferences.range_test_module_enabled &&
|
||||||
!radioConfig.preferences.store_forward_plugin_enabled;
|
!radioConfig.preferences.store_forward_module_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Draw the last text message we received
|
/// Draw the last text message we received
|
||||||
@@ -442,10 +449,10 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const
|
|||||||
if (gpsFormat == GpsCoordinateFormat_GpsFormatDec) { // Decimal Degrees
|
if (gpsFormat == GpsCoordinateFormat_GpsFormatDec) { // Decimal Degrees
|
||||||
sprintf(coordinateLine, "%f %f", geoCoord.getLatitude() * 1e-7, geoCoord.getLongitude() * 1e-7);
|
sprintf(coordinateLine, "%f %f", geoCoord.getLatitude() * 1e-7, geoCoord.getLongitude() * 1e-7);
|
||||||
} else if (gpsFormat == GpsCoordinateFormat_GpsFormatUTM) { // Universal Transverse Mercator
|
} else if (gpsFormat == GpsCoordinateFormat_GpsFormatUTM) { // Universal Transverse Mercator
|
||||||
sprintf(coordinateLine, "%2i%1c %06i %07i", geoCoord.getUTMZone(), geoCoord.getUTMBand(),
|
sprintf(coordinateLine, "%2i%1c %06u %07u", geoCoord.getUTMZone(), geoCoord.getUTMBand(),
|
||||||
geoCoord.getUTMEasting(), geoCoord.getUTMNorthing());
|
geoCoord.getUTMEasting(), geoCoord.getUTMNorthing());
|
||||||
} else if (gpsFormat == GpsCoordinateFormat_GpsFormatMGRS) { // Military Grid Reference System
|
} else if (gpsFormat == GpsCoordinateFormat_GpsFormatMGRS) { // Military Grid Reference System
|
||||||
sprintf(coordinateLine, "%2i%1c %1c%1c %05i %05i", geoCoord.getMGRSZone(), geoCoord.getMGRSBand(),
|
sprintf(coordinateLine, "%2i%1c %1c%1c %05u %05u", geoCoord.getMGRSZone(), geoCoord.getMGRSBand(),
|
||||||
geoCoord.getMGRSEast100k(), geoCoord.getMGRSNorth100k(), geoCoord.getMGRSEasting(),
|
geoCoord.getMGRSEast100k(), geoCoord.getMGRSNorth100k(), geoCoord.getMGRSEasting(),
|
||||||
geoCoord.getMGRSNorthing());
|
geoCoord.getMGRSNorthing());
|
||||||
} else if (gpsFormat == GpsCoordinateFormat_GpsFormatOLC) { // Open Location Code
|
} else if (gpsFormat == GpsCoordinateFormat_GpsFormatOLC) { // Open Location Code
|
||||||
@@ -454,7 +461,7 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const
|
|||||||
if (geoCoord.getOSGRE100k() == 'I' || geoCoord.getOSGRN100k() == 'I') // OSGR is only valid around the UK region
|
if (geoCoord.getOSGRE100k() == 'I' || geoCoord.getOSGRN100k() == 'I') // OSGR is only valid around the UK region
|
||||||
sprintf(coordinateLine, "%s", "Out of Boundary");
|
sprintf(coordinateLine, "%s", "Out of Boundary");
|
||||||
else
|
else
|
||||||
sprintf(coordinateLine, "%1c%1c %05i %05i", geoCoord.getOSGRE100k(), geoCoord.getOSGRN100k(),
|
sprintf(coordinateLine, "%1c%1c %05u %05u", geoCoord.getOSGRE100k(), geoCoord.getOSGRN100k(),
|
||||||
geoCoord.getOSGREasting(), geoCoord.getOSGRNorthing());
|
geoCoord.getOSGREasting(), geoCoord.getOSGRNorthing());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,9 +479,9 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const
|
|||||||
} else {
|
} else {
|
||||||
char latLine[22];
|
char latLine[22];
|
||||||
char lonLine[22];
|
char lonLine[22];
|
||||||
sprintf(latLine, "%2i° %2i' %2.4f\" %1c", geoCoord.getDMSLatDeg(), geoCoord.getDMSLatMin(), geoCoord.getDMSLatSec(),
|
sprintf(latLine, "%2i° %2i' %2u\" %1c", geoCoord.getDMSLatDeg(), geoCoord.getDMSLatMin(), geoCoord.getDMSLatSec(),
|
||||||
geoCoord.getDMSLatCP());
|
geoCoord.getDMSLatCP());
|
||||||
sprintf(lonLine, "%3i° %2i' %2.4f\" %1c", geoCoord.getDMSLonDeg(), geoCoord.getDMSLonMin(), geoCoord.getDMSLonSec(),
|
sprintf(lonLine, "%3i° %2i' %2u\" %1c", geoCoord.getDMSLonDeg(), geoCoord.getDMSLonMin(), geoCoord.getDMSLonSec(),
|
||||||
geoCoord.getDMSLonCP());
|
geoCoord.getDMSLonCP());
|
||||||
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(latLine))) / 2, y - FONT_HEIGHT_SMALL * 1, latLine);
|
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(latLine))) / 2, y - FONT_HEIGHT_SMALL * 1, latLine);
|
||||||
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(lonLine))) / 2, y, lonLine);
|
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(lonLine))) / 2, y, lonLine);
|
||||||
@@ -644,7 +651,6 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_
|
|||||||
|
|
||||||
static char distStr[20];
|
static char distStr[20];
|
||||||
strcpy(distStr, "? km"); // might not have location data
|
strcpy(distStr, "? km"); // might not have location data
|
||||||
float headingRadian;
|
|
||||||
NodeInfo *ourNode = nodeDB.getNode(nodeDB.getNodeNum());
|
NodeInfo *ourNode = nodeDB.getNode(nodeDB.getNodeNum());
|
||||||
const char *fields[] = {username, distStr, signalStr, lastStr, NULL};
|
const char *fields[] = {username, distStr, signalStr, lastStr, NULL};
|
||||||
|
|
||||||
@@ -672,7 +678,7 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_
|
|||||||
// it. currently we don't do this and instead draw north up only.
|
// it. currently we don't do this and instead draw north up only.
|
||||||
float bearingToOther =
|
float bearingToOther =
|
||||||
GeoCoord::bearing(DegD(p.latitude_i), DegD(p.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i));
|
GeoCoord::bearing(DegD(p.latitude_i), DegD(p.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i));
|
||||||
headingRadian = bearingToOther - myHeading;
|
float headingRadian = bearingToOther - myHeading;
|
||||||
drawNodeHeading(display, compassX, compassY, headingRadian);
|
drawNodeHeading(display, compassX, compassY, headingRadian);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -818,8 +824,11 @@ void Screen::setup()
|
|||||||
powerStatusObserver.observe(&powerStatus->onNewStatus);
|
powerStatusObserver.observe(&powerStatus->onNewStatus);
|
||||||
gpsStatusObserver.observe(&gpsStatus->onNewStatus);
|
gpsStatusObserver.observe(&gpsStatus->onNewStatus);
|
||||||
nodeStatusObserver.observe(&nodeStatus->onNewStatus);
|
nodeStatusObserver.observe(&nodeStatus->onNewStatus);
|
||||||
if (textMessagePlugin)
|
if (textMessageModule)
|
||||||
textMessageObserver.observe(textMessagePlugin);
|
textMessageObserver.observe(textMessageModule);
|
||||||
|
|
||||||
|
// Modules can notify screen about refresh
|
||||||
|
MeshPlugin::observeUIEvents(&uiFrameEventObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::forceDisplay()
|
void Screen::forceDisplay()
|
||||||
@@ -878,6 +887,9 @@ int32_t Screen::runOnce()
|
|||||||
handlePrint(cmd.print_text);
|
handlePrint(cmd.print_text);
|
||||||
free(cmd.print_text);
|
free(cmd.print_text);
|
||||||
break;
|
break;
|
||||||
|
case Cmd::START_SHUTDOWN_SCREEN:
|
||||||
|
handleShutdownScreen();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
DEBUG_MSG("BUG: invalid cmd\n");
|
DEBUG_MSG("BUG: invalid cmd\n");
|
||||||
}
|
}
|
||||||
@@ -930,20 +942,20 @@ int32_t Screen::runOnce()
|
|||||||
|
|
||||||
void Screen::drawDebugInfoTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
void Screen::drawDebugInfoTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
Screen *screen = reinterpret_cast<Screen *>(state->userData);
|
Screen *screen2 = reinterpret_cast<Screen *>(state->userData);
|
||||||
screen->debugInfo.drawFrame(display, state, x, y);
|
screen2->debugInfo.drawFrame(display, state, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::drawDebugInfoSettingsTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
void Screen::drawDebugInfoSettingsTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
Screen *screen = reinterpret_cast<Screen *>(state->userData);
|
Screen *screen2 = reinterpret_cast<Screen *>(state->userData);
|
||||||
screen->debugInfo.drawFrameSettings(display, state, x, y);
|
screen2->debugInfo.drawFrameSettings(display, state, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::drawDebugInfoWiFiTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
void Screen::drawDebugInfoWiFiTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
Screen *screen = reinterpret_cast<Screen *>(state->userData);
|
Screen *screen2 = reinterpret_cast<Screen *>(state->userData);
|
||||||
screen->debugInfo.drawFrameWiFi(display, state, x, y);
|
screen2->debugInfo.drawFrameWiFi(display, state, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* show a message that the SSL cert is being built
|
/* show a message that the SSL cert is being built
|
||||||
@@ -964,9 +976,9 @@ void Screen::setFrames()
|
|||||||
DEBUG_MSG("showing standard frames\n");
|
DEBUG_MSG("showing standard frames\n");
|
||||||
showingNormalScreen = true;
|
showingNormalScreen = true;
|
||||||
|
|
||||||
pluginFrames = MeshPlugin::GetMeshPluginsWithUIFrames();
|
moduleFrames = MeshPlugin::GetMeshModulesWithUIFrames();
|
||||||
DEBUG_MSG("Showing %d plugin frames\n", pluginFrames.size());
|
DEBUG_MSG("Showing %d module frames\n", moduleFrames.size());
|
||||||
int totalFrameCount = MAX_NUM_NODES + NUM_EXTRA_FRAMES + pluginFrames.size();
|
int totalFrameCount = MAX_NUM_NODES + NUM_EXTRA_FRAMES + moduleFrames.size();
|
||||||
DEBUG_MSG("Total frame count: %d\n", totalFrameCount);
|
DEBUG_MSG("Total frame count: %d\n", totalFrameCount);
|
||||||
|
|
||||||
// We don't show the node info our our node (if we have it yet - we should)
|
// We don't show the node info our our node (if we have it yet - we should)
|
||||||
@@ -976,23 +988,23 @@ void Screen::setFrames()
|
|||||||
|
|
||||||
size_t numframes = 0;
|
size_t numframes = 0;
|
||||||
|
|
||||||
// put all of the plugin frames first.
|
// put all of the module frames first.
|
||||||
// this is a little bit of a dirty hack; since we're going to call
|
// this is a little bit of a dirty hack; since we're going to call
|
||||||
// the same drawPluginFrame handler here for all of these plugin frames
|
// the same drawModuleFrame handler here for all of these module frames
|
||||||
// and then we'll just assume that the state->currentFrame value
|
// and then we'll just assume that the state->currentFrame value
|
||||||
// is the same offset into the pluginFrames vector
|
// is the same offset into the moduleFrames vector
|
||||||
// so that we can invoke the plugin's callback
|
// so that we can invoke the module's callback
|
||||||
for (auto i = pluginFrames.begin(); i != pluginFrames.end(); ++i) {
|
for (auto i = moduleFrames.begin(); i != moduleFrames.end(); ++i) {
|
||||||
normalFrames[numframes++] = drawPluginFrame;
|
normalFrames[numframes++] = drawModuleFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_MSG("Added plugins. numframes: %d\n", numframes);
|
DEBUG_MSG("Added modules. numframes: %d\n", numframes);
|
||||||
|
|
||||||
// If we have a critical fault, show it first
|
// If we have a critical fault, show it first
|
||||||
if (myNodeInfo.error_code)
|
if (myNodeInfo.error_code)
|
||||||
normalFrames[numframes++] = drawCriticalFaultFrame;
|
normalFrames[numframes++] = drawCriticalFaultFrame;
|
||||||
|
|
||||||
// If we have a text message - show it next, unless it's a phone message and we aren't using any special plugins
|
// If we have a text message - show it next, unless it's a phone message and we aren't using any special modules
|
||||||
if (devicestate.has_rx_text_message && shouldDrawMessage(&devicestate.rx_text_message)) {
|
if (devicestate.has_rx_text_message && shouldDrawMessage(&devicestate.rx_text_message)) {
|
||||||
normalFrames[numframes++] = drawTextMessageFrame;
|
normalFrames[numframes++] = drawTextMessageFrame;
|
||||||
}
|
}
|
||||||
@@ -1037,13 +1049,25 @@ void Screen::handleStartBluetoothPinScreen(uint32_t pin)
|
|||||||
|
|
||||||
static FrameCallback btFrames[] = {drawFrameBluetooth};
|
static FrameCallback btFrames[] = {drawFrameBluetooth};
|
||||||
|
|
||||||
snprintf(btPIN, sizeof(btPIN), "%06lu", pin);
|
snprintf(btPIN, sizeof(btPIN), "%06u", pin);
|
||||||
|
|
||||||
ui.disableAllIndicators();
|
ui.disableAllIndicators();
|
||||||
ui.setFrames(btFrames, 1);
|
ui.setFrames(btFrames, 1);
|
||||||
setFastFramerate();
|
setFastFramerate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Screen::handleShutdownScreen()
|
||||||
|
{
|
||||||
|
DEBUG_MSG("showing shutdown screen\n");
|
||||||
|
showingNormalScreen = false;
|
||||||
|
|
||||||
|
static FrameCallback shutdownFrames[] = {drawFrameShutdown};
|
||||||
|
|
||||||
|
ui.disableAllIndicators();
|
||||||
|
ui.setFrames(shutdownFrames, 1);
|
||||||
|
setFastFramerate();
|
||||||
|
}
|
||||||
|
|
||||||
void Screen::handleStartFirmwareUpdateScreen()
|
void Screen::handleStartFirmwareUpdateScreen()
|
||||||
{
|
{
|
||||||
DEBUG_MSG("showing firmware screen\n");
|
DEBUG_MSG("showing firmware screen\n");
|
||||||
@@ -1457,4 +1481,23 @@ int Screen::handleTextMessage(const MeshPacket *packet)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Screen::handleUIFrameEvent(const UIFrameEvent *event)
|
||||||
|
{
|
||||||
|
if (showingNormalScreen) {
|
||||||
|
if (event->frameChanged)
|
||||||
|
{
|
||||||
|
setFrames(); // Regen the list of screens (will show new text message)
|
||||||
|
}
|
||||||
|
else if (event->needRedraw)
|
||||||
|
{
|
||||||
|
setFastFramerate();
|
||||||
|
// TODO: We might also want switch to corresponding frame,
|
||||||
|
// but we don't know the exact frame number.
|
||||||
|
//ui.switchToFrame(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class Screen
|
|||||||
#include "concurrency/OSThread.h"
|
#include "concurrency/OSThread.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "mesh/MeshPlugin.h"
|
||||||
|
|
||||||
// 0 to 255, though particular variants might define different defaults
|
// 0 to 255, though particular variants might define different defaults
|
||||||
#ifndef BRIGHTNESS_DEFAULT
|
#ifndef BRIGHTNESS_DEFAULT
|
||||||
@@ -90,9 +91,11 @@ class Screen : public concurrency::OSThread
|
|||||||
CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleStatusUpdate);
|
CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleStatusUpdate);
|
||||||
CallbackObserver<Screen, const MeshPacket *> textMessageObserver =
|
CallbackObserver<Screen, const MeshPacket *> textMessageObserver =
|
||||||
CallbackObserver<Screen, const MeshPacket *>(this, &Screen::handleTextMessage);
|
CallbackObserver<Screen, const MeshPacket *>(this, &Screen::handleTextMessage);
|
||||||
|
CallbackObserver<Screen, const UIFrameEvent *> uiFrameEventObserver =
|
||||||
|
CallbackObserver<Screen, const UIFrameEvent *>(this, &Screen::handleUIFrameEvent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Screen(uint8_t address, int sda = -1, int scl = -1);
|
explicit Screen(uint8_t address, int sda = -1, int scl = -1);
|
||||||
|
|
||||||
Screen(const Screen &) = delete;
|
Screen(const Screen &) = delete;
|
||||||
Screen &operator=(const Screen &) = delete;
|
Screen &operator=(const Screen &) = delete;
|
||||||
@@ -148,6 +151,12 @@ class Screen : public concurrency::OSThread
|
|||||||
enqueueCmd(cmd);
|
enqueueCmd(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void startShutdownScreen()
|
||||||
|
{
|
||||||
|
ScreenCmd cmd;
|
||||||
|
cmd.cmd = Cmd::START_SHUTDOWN_SCREEN;
|
||||||
|
enqueueCmd(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
/// Stops showing the bluetooth PIN screen.
|
/// Stops showing the bluetooth PIN screen.
|
||||||
void stopBluetoothPinScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BLUETOOTH_PIN_SCREEN}); }
|
void stopBluetoothPinScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BLUETOOTH_PIN_SCREEN}); }
|
||||||
@@ -218,6 +227,7 @@ class Screen : public concurrency::OSThread
|
|||||||
|
|
||||||
int handleStatusUpdate(const meshtastic::Status *arg);
|
int handleStatusUpdate(const meshtastic::Status *arg);
|
||||||
int handleTextMessage(const MeshPacket *arg);
|
int handleTextMessage(const MeshPacket *arg);
|
||||||
|
int handleUIFrameEvent(const UIFrameEvent *arg);
|
||||||
|
|
||||||
/// Used to force (super slow) eink displays to draw critical frames
|
/// Used to force (super slow) eink displays to draw critical frames
|
||||||
void forceDisplay();
|
void forceDisplay();
|
||||||
@@ -258,7 +268,7 @@ class Screen : public concurrency::OSThread
|
|||||||
void handleStartBluetoothPinScreen(uint32_t pin);
|
void handleStartBluetoothPinScreen(uint32_t pin);
|
||||||
void handlePrint(const char *text);
|
void handlePrint(const char *text);
|
||||||
void handleStartFirmwareUpdateScreen();
|
void handleStartFirmwareUpdateScreen();
|
||||||
|
void handleShutdownScreen();
|
||||||
/// Rebuilds our list of frames (screens) to default ones.
|
/// Rebuilds our list of frames (screens) to default ones.
|
||||||
void setFrames();
|
void setFrames();
|
||||||
|
|
||||||
@@ -303,4 +313,4 @@ class Screen : public concurrency::OSThread
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ class TFTDisplay : public OLEDDisplay
|
|||||||
TFTDisplay(uint8_t address, int sda, int scl);
|
TFTDisplay(uint8_t address, int sda, int scl);
|
||||||
|
|
||||||
// Write the buffer to the display memory
|
// Write the buffer to the display memory
|
||||||
virtual void display(void);
|
virtual void display(void) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the header size of the buffer used, e.g. for the SPI command header
|
// the header size of the buffer used, e.g. for the SPI command header
|
||||||
virtual int getBufferOffset(void) { return 0; }
|
virtual int getBufferOffset(void) override { return 0; }
|
||||||
|
|
||||||
// Send a command to the display (low level function)
|
// Send a command to the display (low level function)
|
||||||
virtual void sendCommand(uint8_t com);
|
virtual void sendCommand(uint8_t com) override;
|
||||||
|
|
||||||
// Connect to the display
|
// Connect to the display
|
||||||
virtual bool connect();
|
virtual bool connect() override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,425 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
const uint8_t Custom_ArialMT_Plain_10[] PROGMEM = {
|
|
||||||
0x0A, // Width: 10
|
|
||||||
0x0A, // Height: 10
|
|
||||||
0x20, // First Char: 32
|
|
||||||
0xE0, // Numbers of Chars: 224
|
|
||||||
|
|
||||||
// Jump Table:
|
|
||||||
0xFF, 0xFF, 0x00, 0x03, // 32:65535
|
|
||||||
0x00, 0x00, 0x04, 0x03, // 33:0
|
|
||||||
0x00, 0x04, 0x05, 0x04, // 34:4
|
|
||||||
0x00, 0x09, 0x09, 0x06, // 35:9
|
|
||||||
0x00, 0x12, 0x0A, 0x06, // 36:18
|
|
||||||
0x00, 0x1C, 0x10, 0x09, // 37:28
|
|
||||||
0x00, 0x2C, 0x0E, 0x07, // 38:44
|
|
||||||
0x00, 0x3A, 0x01, 0x02, // 39:58
|
|
||||||
0x00, 0x3B, 0x06, 0x03, // 40:59
|
|
||||||
0x00, 0x41, 0x06, 0x03, // 41:65
|
|
||||||
0x00, 0x47, 0x05, 0x04, // 42:71
|
|
||||||
0x00, 0x4C, 0x09, 0x06, // 43:76
|
|
||||||
0x00, 0x55, 0x04, 0x03, // 44:85
|
|
||||||
0x00, 0x59, 0x03, 0x03, // 45:89
|
|
||||||
0x00, 0x5C, 0x04, 0x03, // 46:92
|
|
||||||
0x00, 0x60, 0x05, 0x03, // 47:96
|
|
||||||
0x00, 0x65, 0x0A, 0x06, // 48:101
|
|
||||||
0x00, 0x6F, 0x08, 0x06, // 49:111
|
|
||||||
0x00, 0x77, 0x0A, 0x06, // 50:119
|
|
||||||
0x00, 0x81, 0x0A, 0x06, // 51:129
|
|
||||||
0x00, 0x8B, 0x0B, 0x06, // 52:139
|
|
||||||
0x00, 0x96, 0x0A, 0x06, // 53:150
|
|
||||||
0x00, 0xA0, 0x0A, 0x06, // 54:160
|
|
||||||
0x00, 0xAA, 0x09, 0x06, // 55:170
|
|
||||||
0x00, 0xB3, 0x0A, 0x06, // 56:179
|
|
||||||
0x00, 0xBD, 0x0A, 0x06, // 57:189
|
|
||||||
0x00, 0xC7, 0x04, 0x03, // 58:199
|
|
||||||
0x00, 0xCB, 0x04, 0x03, // 59:203
|
|
||||||
0x00, 0xCF, 0x0A, 0x06, // 60:207
|
|
||||||
0x00, 0xD9, 0x09, 0x06, // 61:217
|
|
||||||
0x00, 0xE2, 0x09, 0x06, // 62:226
|
|
||||||
0x00, 0xEB, 0x0B, 0x06, // 63:235
|
|
||||||
0x00, 0xF6, 0x14, 0x0A, // 64:246
|
|
||||||
0x01, 0x0A, 0x0E, 0x07, // 65:266
|
|
||||||
0x01, 0x18, 0x0C, 0x07, // 66:280
|
|
||||||
0x01, 0x24, 0x0C, 0x07, // 67:292
|
|
||||||
0x01, 0x30, 0x0B, 0x07, // 68:304
|
|
||||||
0x01, 0x3B, 0x0C, 0x07, // 69:315
|
|
||||||
0x01, 0x47, 0x09, 0x06, // 70:327
|
|
||||||
0x01, 0x50, 0x0D, 0x08, // 71:336
|
|
||||||
0x01, 0x5D, 0x0C, 0x07, // 72:349
|
|
||||||
0x01, 0x69, 0x04, 0x03, // 73:361
|
|
||||||
0x01, 0x6D, 0x08, 0x05, // 74:365
|
|
||||||
0x01, 0x75, 0x0E, 0x07, // 75:373
|
|
||||||
0x01, 0x83, 0x0C, 0x06, // 76:387
|
|
||||||
0x01, 0x8F, 0x10, 0x08, // 77:399
|
|
||||||
0x01, 0x9F, 0x0C, 0x07, // 78:415
|
|
||||||
0x01, 0xAB, 0x0E, 0x08, // 79:427
|
|
||||||
0x01, 0xB9, 0x0B, 0x07, // 80:441
|
|
||||||
0x01, 0xC4, 0x0E, 0x08, // 81:452
|
|
||||||
0x01, 0xD2, 0x0C, 0x07, // 82:466
|
|
||||||
0x01, 0xDE, 0x0C, 0x07, // 83:478
|
|
||||||
0x01, 0xEA, 0x0B, 0x06, // 84:490
|
|
||||||
0x01, 0xF5, 0x0C, 0x07, // 85:501
|
|
||||||
0x02, 0x01, 0x0D, 0x07, // 86:513
|
|
||||||
0x02, 0x0E, 0x11, 0x09, // 87:526
|
|
||||||
0x02, 0x1F, 0x0E, 0x07, // 88:543
|
|
||||||
0x02, 0x2D, 0x0D, 0x07, // 89:557
|
|
||||||
0x02, 0x3A, 0x0C, 0x06, // 90:570
|
|
||||||
0x02, 0x46, 0x06, 0x03, // 91:582
|
|
||||||
0x02, 0x4C, 0x06, 0x03, // 92:588
|
|
||||||
0x02, 0x52, 0x04, 0x03, // 93:594
|
|
||||||
0x02, 0x56, 0x09, 0x05, // 94:598
|
|
||||||
0x02, 0x5F, 0x0C, 0x06, // 95:607
|
|
||||||
0x02, 0x6B, 0x03, 0x03, // 96:619
|
|
||||||
0x02, 0x6E, 0x0A, 0x06, // 97:622
|
|
||||||
0x02, 0x78, 0x0A, 0x06, // 98:632
|
|
||||||
0x02, 0x82, 0x0A, 0x05, // 99:642
|
|
||||||
0x02, 0x8C, 0x0A, 0x06, // 100:652
|
|
||||||
0x02, 0x96, 0x0A, 0x06, // 101:662
|
|
||||||
0x02, 0xA0, 0x05, 0x03, // 102:672
|
|
||||||
0x02, 0xA5, 0x0A, 0x06, // 103:677
|
|
||||||
0x02, 0xAF, 0x0A, 0x06, // 104:687
|
|
||||||
0x02, 0xB9, 0x04, 0x02, // 105:697
|
|
||||||
0x02, 0xBD, 0x04, 0x02, // 106:701
|
|
||||||
0x02, 0xC1, 0x08, 0x05, // 107:705
|
|
||||||
0x02, 0xC9, 0x04, 0x02, // 108:713
|
|
||||||
0x02, 0xCD, 0x10, 0x08, // 109:717
|
|
||||||
0x02, 0xDD, 0x0A, 0x06, // 110:733
|
|
||||||
0x02, 0xE7, 0x0A, 0x06, // 111:743
|
|
||||||
0x02, 0xF1, 0x0A, 0x06, // 112:753
|
|
||||||
0x02, 0xFB, 0x0A, 0x06, // 113:763
|
|
||||||
0x03, 0x05, 0x05, 0x03, // 114:773
|
|
||||||
0x03, 0x0A, 0x08, 0x05, // 115:778
|
|
||||||
0x03, 0x12, 0x06, 0x03, // 116:786
|
|
||||||
0x03, 0x18, 0x0A, 0x06, // 117:792
|
|
||||||
0x03, 0x22, 0x09, 0x05, // 118:802
|
|
||||||
0x03, 0x2B, 0x0E, 0x07, // 119:811
|
|
||||||
0x03, 0x39, 0x0A, 0x05, // 120:825
|
|
||||||
0x03, 0x43, 0x09, 0x05, // 121:835
|
|
||||||
0x03, 0x4C, 0x0A, 0x05, // 122:844
|
|
||||||
0x03, 0x56, 0x06, 0x03, // 123:854
|
|
||||||
0x03, 0x5C, 0x04, 0x03, // 124:860
|
|
||||||
0x03, 0x60, 0x05, 0x03, // 125:864
|
|
||||||
0x03, 0x65, 0x09, 0x06, // 126:869
|
|
||||||
0xFF, 0xFF, 0x00, 0x00, // 127:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 128:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 129:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 130:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 131:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 132:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 133:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 134:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 135:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 136:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 137:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 138:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 139:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 140:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 141:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 142:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 143:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 144:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 145:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 146:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 147:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 148:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 149:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 150:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 151:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 152:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 153:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 154:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 155:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 156:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 157:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 158:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x0A, // 159:65535
|
|
||||||
0xFF, 0xFF, 0x00, 0x03, // 160:65535
|
|
||||||
0x03, 0x6E, 0x04, 0x03, // 161:878
|
|
||||||
0x03, 0x72, 0x0A, 0x06, // 162:882
|
|
||||||
0x03, 0x7C, 0x0C, 0x06, // 163:892
|
|
||||||
0x03, 0x88, 0x0A, 0x06, // 164:904
|
|
||||||
0x03, 0x92, 0x0A, 0x06, // 165:914
|
|
||||||
0x03, 0x9C, 0x04, 0x03, // 166:924
|
|
||||||
0x03, 0xA0, 0x0A, 0x06, // 167:928
|
|
||||||
0x03, 0xAA, 0x05, 0x03, // 168:938
|
|
||||||
0x03, 0xAF, 0x0D, 0x07, // 169:943
|
|
||||||
0x03, 0xBC, 0x07, 0x04, // 170:956
|
|
||||||
0x03, 0xC3, 0x0A, 0x06, // 171:963
|
|
||||||
0x03, 0xCD, 0x09, 0x06, // 172:973
|
|
||||||
0x03, 0xD6, 0x03, 0x03, // 173:982
|
|
||||||
0x03, 0xD9, 0x0D, 0x07, // 174:985
|
|
||||||
0x03, 0xE6, 0x0B, 0x06, // 175:998
|
|
||||||
0x03, 0xF1, 0x07, 0x04, // 176:1009
|
|
||||||
0x03, 0xF8, 0x0A, 0x05, // 177:1016
|
|
||||||
0x04, 0x02, 0x05, 0x03, // 178:1026
|
|
||||||
0x04, 0x07, 0x05, 0x03, // 179:1031
|
|
||||||
0x04, 0x0C, 0x05, 0x03, // 180:1036
|
|
||||||
0x04, 0x11, 0x0A, 0x06, // 181:1041
|
|
||||||
0x04, 0x1B, 0x09, 0x05, // 182:1051
|
|
||||||
0x04, 0x24, 0x03, 0x03, // 183:1060
|
|
||||||
0x04, 0x27, 0x06, 0x03, // 184:1063
|
|
||||||
0x04, 0x2D, 0x05, 0x03, // 185:1069
|
|
||||||
0x04, 0x32, 0x07, 0x04, // 186:1074
|
|
||||||
0x04, 0x39, 0x0A, 0x06, // 187:1081
|
|
||||||
0x04, 0x43, 0x10, 0x08, // 188:1091
|
|
||||||
0x04, 0x53, 0x10, 0x08, // 189:1107
|
|
||||||
0x04, 0x63, 0x10, 0x08, // 190:1123
|
|
||||||
0x04, 0x73, 0x0A, 0x06, // 191:1139
|
|
||||||
0x04, 0x7D, 0x0E, 0x07, // 192:1149
|
|
||||||
0x04, 0x8B, 0x0E, 0x07, // 193:1163
|
|
||||||
0x04, 0x99, 0x0E, 0x07, // 194:1177
|
|
||||||
0x04, 0xA7, 0x0E, 0x07, // 195:1191
|
|
||||||
0x04, 0xB5, 0x0E, 0x07, // 196:1205
|
|
||||||
0x04, 0xC3, 0x0E, 0x07, // 197:1219
|
|
||||||
0x04, 0xD1, 0x12, 0x0A, // 198:1233
|
|
||||||
0x04, 0xE3, 0x0C, 0x07, // 199:1251
|
|
||||||
0x04, 0xEF, 0x0C, 0x07, // 200:1263
|
|
||||||
0x04, 0xFB, 0x0C, 0x07, // 201:1275
|
|
||||||
0x05, 0x07, 0x0C, 0x07, // 202:1287
|
|
||||||
0x05, 0x13, 0x0C, 0x07, // 203:1299
|
|
||||||
0x05, 0x1F, 0x05, 0x03, // 204:1311
|
|
||||||
0x05, 0x24, 0x04, 0x03, // 205:1316
|
|
||||||
0x05, 0x28, 0x04, 0x03, // 206:1320
|
|
||||||
0x05, 0x2C, 0x05, 0x03, // 207:1324
|
|
||||||
0x05, 0x31, 0x0B, 0x07, // 208:1329
|
|
||||||
0x05, 0x3C, 0x0C, 0x07, // 209:1340
|
|
||||||
0x05, 0x48, 0x0E, 0x08, // 210:1352
|
|
||||||
0x05, 0x56, 0x0E, 0x08, // 211:1366
|
|
||||||
0x05, 0x64, 0x0E, 0x08, // 212:1380
|
|
||||||
0x05, 0x72, 0x0E, 0x08, // 213:1394
|
|
||||||
0x05, 0x80, 0x0E, 0x08, // 214:1408
|
|
||||||
0x05, 0x8E, 0x0A, 0x06, // 215:1422
|
|
||||||
0x05, 0x98, 0x0D, 0x08, // 216:1432
|
|
||||||
0x05, 0xA5, 0x0C, 0x07, // 217:1445
|
|
||||||
0x05, 0xB1, 0x0C, 0x07, // 218:1457
|
|
||||||
0x05, 0xBD, 0x0C, 0x07, // 219:1469
|
|
||||||
0x05, 0xC9, 0x0C, 0x07, // 220:1481
|
|
||||||
0x05, 0xD5, 0x0D, 0x07, // 221:1493
|
|
||||||
0x05, 0xE2, 0x0B, 0x07, // 222:1506
|
|
||||||
0x05, 0xED, 0x0C, 0x06, // 223:1517
|
|
||||||
0x05, 0xF9, 0x0A, 0x06, // 224:1529
|
|
||||||
0x06, 0x03, 0x0A, 0x06, // 225:1539
|
|
||||||
0x06, 0x0D, 0x0A, 0x06, // 226:1549
|
|
||||||
0x06, 0x17, 0x0A, 0x06, // 227:1559
|
|
||||||
0x06, 0x21, 0x0A, 0x06, // 228:1569
|
|
||||||
0x06, 0x2B, 0x0A, 0x06, // 229:1579
|
|
||||||
0x06, 0x35, 0x10, 0x09, // 230:1589
|
|
||||||
0x06, 0x45, 0x0A, 0x05, // 231:1605
|
|
||||||
0x06, 0x4F, 0x0A, 0x06, // 232:1615
|
|
||||||
0x06, 0x59, 0x0A, 0x06, // 233:1625
|
|
||||||
0x06, 0x63, 0x0A, 0x06, // 234:1635
|
|
||||||
0x06, 0x6D, 0x0A, 0x06, // 235:1645
|
|
||||||
0x06, 0x77, 0x05, 0x03, // 236:1655
|
|
||||||
0x06, 0x7C, 0x04, 0x03, // 237:1660
|
|
||||||
0x06, 0x80, 0x05, 0x03, // 238:1664
|
|
||||||
0x06, 0x85, 0x05, 0x03, // 239:1669
|
|
||||||
0x06, 0x8A, 0x0A, 0x06, // 240:1674
|
|
||||||
0x06, 0x94, 0x0A, 0x06, // 241:1684
|
|
||||||
0x06, 0x9E, 0x0A, 0x06, // 242:1694
|
|
||||||
0x06, 0xA8, 0x0A, 0x06, // 243:1704
|
|
||||||
0x06, 0xB2, 0x0A, 0x06, // 244:1714
|
|
||||||
0x06, 0xBC, 0x0A, 0x06, // 245:1724
|
|
||||||
0x06, 0xC6, 0x0A, 0x06, // 246:1734
|
|
||||||
0x06, 0xD0, 0x09, 0x05, // 247:1744
|
|
||||||
0x06, 0xD9, 0x0A, 0x06, // 248:1753
|
|
||||||
0x06, 0xE3, 0x0A, 0x06, // 249:1763
|
|
||||||
0x06, 0xED, 0x0A, 0x06, // 250:1773
|
|
||||||
0x06, 0xF7, 0x0A, 0x06, // 251:1783
|
|
||||||
0x07, 0x01, 0x0A, 0x06, // 252:1793
|
|
||||||
0x07, 0x0B, 0x09, 0x05, // 253:1803
|
|
||||||
0x07, 0x14, 0x0A, 0x06, // 254:1812
|
|
||||||
0x07, 0x1E, 0x09, 0x05, // 255:1822
|
|
||||||
|
|
||||||
// Font Data:
|
|
||||||
0x00, 0x00, 0xF8, 0x02, // 33
|
|
||||||
0x38, 0x00, 0x00, 0x00, 0x38, // 34
|
|
||||||
0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8, // 35
|
|
||||||
0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01, // 36
|
|
||||||
0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01, // 37
|
|
||||||
0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02, // 38
|
|
||||||
0x38, // 39
|
|
||||||
0xE0, 0x03, 0x10, 0x04, 0x08, 0x08, // 40
|
|
||||||
0x08, 0x08, 0x10, 0x04, 0xE0, 0x03, // 41
|
|
||||||
0x28, 0x00, 0x18, 0x00, 0x28, // 42
|
|
||||||
0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40, // 43
|
|
||||||
0x00, 0x00, 0x00, 0x06, // 44
|
|
||||||
0x80, 0x00, 0x80, // 45
|
|
||||||
0x00, 0x00, 0x00, 0x02, // 46
|
|
||||||
0x00, 0x03, 0xE0, 0x00, 0x18, // 47
|
|
||||||
0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, // 48
|
|
||||||
0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03, // 49
|
|
||||||
0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02, // 50
|
|
||||||
0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01, // 51
|
|
||||||
0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80, // 52
|
|
||||||
0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01, // 53
|
|
||||||
0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01, // 54
|
|
||||||
0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08, // 55
|
|
||||||
0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01, // 56
|
|
||||||
0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01, // 57
|
|
||||||
0x00, 0x00, 0x20, 0x02, // 58
|
|
||||||
0x00, 0x00, 0x20, 0x06, // 59
|
|
||||||
0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01, // 60
|
|
||||||
0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, // 61
|
|
||||||
0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40, // 62
|
|
||||||
0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30, // 63
|
|
||||||
0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0, 0x04, // 64
|
|
||||||
0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02, // 65
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01, // 66
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, // 67
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0, // 68
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, // 69
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08, // 70
|
|
||||||
0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0, // 71
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03, // 72
|
|
||||||
0x00, 0x00, 0xF8, 0x03, // 73
|
|
||||||
0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01, // 74
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02, // 75
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, // 76
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03, // 77
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03, // 78
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, // 79
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30, // 80
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02, // 81
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03, // 82
|
|
||||||
0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01, // 83
|
|
||||||
0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, // 84
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01, // 85
|
|
||||||
0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08, // 86
|
|
||||||
0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18, // 87
|
|
||||||
0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02, // 88
|
|
||||||
0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08, // 89
|
|
||||||
0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02, // 90
|
|
||||||
0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08, // 91
|
|
||||||
0x18, 0x00, 0xE0, 0x00, 0x00, 0x03, // 92
|
|
||||||
0x08, 0x08, 0xF8, 0x0F, // 93
|
|
||||||
0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40, // 94
|
|
||||||
0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, // 95
|
|
||||||
0x08, 0x00, 0x10, // 96
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03, // 97
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 98
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01, // 99
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03, // 100
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02, // 101
|
|
||||||
0x20, 0x00, 0xF0, 0x03, 0x28, // 102
|
|
||||||
0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07, // 103
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 104
|
|
||||||
0x00, 0x00, 0xE8, 0x03, // 105
|
|
||||||
0x00, 0x08, 0xE8, 0x07, // 106
|
|
||||||
0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02, // 107
|
|
||||||
0x00, 0x00, 0xF8, 0x03, // 108
|
|
||||||
0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 109
|
|
||||||
0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 110
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 111
|
|
||||||
0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 112
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F, // 113
|
|
||||||
0x00, 0x00, 0xE0, 0x03, 0x20, // 114
|
|
||||||
0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01, // 115
|
|
||||||
0x20, 0x00, 0xF8, 0x03, 0x20, 0x02, // 116
|
|
||||||
0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, // 117
|
|
||||||
0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, // 118
|
|
||||||
0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01, // 119
|
|
||||||
0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02, // 120
|
|
||||||
0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20, // 121
|
|
||||||
0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02, // 122
|
|
||||||
0x80, 0x00, 0x78, 0x0F, 0x08, 0x08, // 123
|
|
||||||
0x00, 0x00, 0xF8, 0x0F, // 124
|
|
||||||
0x08, 0x08, 0x78, 0x0F, 0x80, // 125
|
|
||||||
0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0, // 126
|
|
||||||
0x00, 0x00, 0xA0, 0x0F, // 161
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0xA0, 0x0F, 0x78, 0x02, 0x40, 0x01, // 162
|
|
||||||
0x40, 0x02, 0x70, 0x03, 0xC8, 0x02, 0x48, 0x02, 0x08, 0x02, 0x10, 0x02, // 163
|
|
||||||
0x00, 0x00, 0xE0, 0x01, 0x20, 0x01, 0x20, 0x01, 0xE0, 0x01, // 164
|
|
||||||
0x48, 0x01, 0x70, 0x01, 0xC0, 0x03, 0x70, 0x01, 0x48, 0x01, // 165
|
|
||||||
0x00, 0x00, 0x38, 0x0F, // 166
|
|
||||||
0xD0, 0x04, 0x28, 0x09, 0x48, 0x09, 0x48, 0x0A, 0x90, 0x05, // 167
|
|
||||||
0x08, 0x00, 0x00, 0x00, 0x08, // 168
|
|
||||||
0xE0, 0x00, 0x10, 0x01, 0x48, 0x02, 0xA8, 0x02, 0xA8, 0x02, 0x10, 0x01, 0xE0, // 169
|
|
||||||
0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x78, // 170
|
|
||||||
0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, // 171
|
|
||||||
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0, // 172
|
|
||||||
0x80, 0x00, 0x80, // 173
|
|
||||||
0xE0, 0x00, 0x10, 0x01, 0xE8, 0x02, 0x68, 0x02, 0xC8, 0x02, 0x10, 0x01, 0xE0, // 174
|
|
||||||
0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, // 175
|
|
||||||
0x00, 0x00, 0x38, 0x00, 0x28, 0x00, 0x38, // 176
|
|
||||||
0x40, 0x02, 0x40, 0x02, 0xF0, 0x03, 0x40, 0x02, 0x40, 0x02, // 177
|
|
||||||
0x48, 0x00, 0x68, 0x00, 0x58, // 178
|
|
||||||
0x48, 0x00, 0x58, 0x00, 0x68, // 179
|
|
||||||
0x00, 0x00, 0x10, 0x00, 0x08, // 180
|
|
||||||
0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, // 181
|
|
||||||
0x70, 0x00, 0xF8, 0x0F, 0x08, 0x00, 0xF8, 0x0F, 0x08, // 182
|
|
||||||
0x00, 0x00, 0x40, // 183
|
|
||||||
0x00, 0x00, 0x00, 0x14, 0x00, 0x18, // 184
|
|
||||||
0x00, 0x00, 0x10, 0x00, 0x78, // 185
|
|
||||||
0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30, // 186
|
|
||||||
0x00, 0x00, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, // 187
|
|
||||||
0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0xC0, 0x00, 0x20, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01, // 188
|
|
||||||
0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0x80, 0x00, 0x60, 0x00, 0x50, 0x02, 0x48, 0x03, 0xC0, 0x02, // 189
|
|
||||||
0x48, 0x00, 0x58, 0x00, 0x68, 0x03, 0x80, 0x00, 0x60, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01, // 190
|
|
||||||
0x00, 0x00, 0x00, 0x06, 0x00, 0x09, 0xA0, 0x09, 0x00, 0x04, // 191
|
|
||||||
0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 192
|
|
||||||
0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02, // 193
|
|
||||||
0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 194
|
|
||||||
0x00, 0x02, 0xC2, 0x01, 0xB1, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02, // 195
|
|
||||||
0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x88, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 196
|
|
||||||
0x00, 0x02, 0xC0, 0x01, 0xBE, 0x00, 0x8A, 0x00, 0xBE, 0x00, 0xC0, 0x01, 0x00, 0x02, // 197
|
|
||||||
0x00, 0x03, 0xC0, 0x00, 0xE0, 0x00, 0x98, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, // 198
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x16, 0x08, 0x1A, 0x10, 0x01, // 199
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02, // 200
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x48, 0x02, // 201
|
|
||||||
0x00, 0x00, 0xFA, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02, // 202
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x4A, 0x02, 0x48, 0x02, 0x4A, 0x02, 0x48, 0x02, // 203
|
|
||||||
0x00, 0x00, 0xF9, 0x03, 0x02, // 204
|
|
||||||
0x02, 0x00, 0xF9, 0x03, // 205
|
|
||||||
0x01, 0x00, 0xFA, 0x03, // 206
|
|
||||||
0x02, 0x00, 0xF8, 0x03, 0x02, // 207
|
|
||||||
0x40, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x10, 0x01, 0xE0, // 208
|
|
||||||
0x00, 0x00, 0xFA, 0x03, 0x31, 0x00, 0x42, 0x00, 0x81, 0x01, 0xF8, 0x03, // 209
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01, // 210
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x08, 0x02, 0xF0, 0x01, // 211
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0xF0, 0x01, // 212
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x09, 0x02, 0xF0, 0x01, // 213
|
|
||||||
0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x08, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01, // 214
|
|
||||||
0x10, 0x01, 0xA0, 0x00, 0xE0, 0x00, 0xA0, 0x00, 0x10, 0x01, // 215
|
|
||||||
0x00, 0x00, 0xF0, 0x02, 0x08, 0x03, 0xC8, 0x02, 0x28, 0x02, 0x18, 0x03, 0xE8, // 216
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0xF8, 0x01, // 217
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x00, 0x02, 0xF8, 0x01, // 218
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0xF8, 0x01, // 219
|
|
||||||
0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0xF8, 0x01, // 220
|
|
||||||
0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC2, 0x03, 0x21, 0x00, 0x10, 0x00, 0x08, // 221
|
|
||||||
0x00, 0x00, 0xF8, 0x03, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xE0, // 222
|
|
||||||
0x00, 0x00, 0xF0, 0x03, 0x08, 0x01, 0x48, 0x02, 0xB0, 0x02, 0x80, 0x01, // 223
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE0, 0x03, // 224
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE0, 0x03, // 225
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE8, 0x03, // 226
|
|
||||||
0x00, 0x00, 0x08, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE4, 0x03, // 227
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA0, 0x02, 0xE8, 0x03, // 228
|
|
||||||
0x00, 0x00, 0x00, 0x03, 0xAE, 0x02, 0xAA, 0x02, 0xEE, 0x03, // 229
|
|
||||||
0x00, 0x00, 0x40, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02, // 230
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x20, 0x16, 0x20, 0x1A, 0x40, 0x01, // 231
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0xA4, 0x02, 0xA8, 0x02, 0xC0, 0x02, // 232
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC0, 0x02, // 233
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC8, 0x02, // 234
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA0, 0x02, 0xC8, 0x02, // 235
|
|
||||||
0x00, 0x00, 0xE4, 0x03, 0x08, // 236
|
|
||||||
0x08, 0x00, 0xE4, 0x03, // 237
|
|
||||||
0x08, 0x00, 0xE4, 0x03, 0x08, // 238
|
|
||||||
0x08, 0x00, 0xE0, 0x03, 0x08, // 239
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x38, 0x02, 0xE0, 0x01, // 240
|
|
||||||
0x00, 0x00, 0xE8, 0x03, 0x24, 0x00, 0x28, 0x00, 0xC4, 0x03, // 241
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC0, 0x01, // 242
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC0, 0x01, // 243
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC8, 0x01, // 244
|
|
||||||
0x00, 0x00, 0xC8, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC4, 0x01, // 245
|
|
||||||
0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x20, 0x02, 0xC8, 0x01, // 246
|
|
||||||
0x40, 0x00, 0x40, 0x00, 0x50, 0x01, 0x40, 0x00, 0x40, // 247
|
|
||||||
0x00, 0x00, 0xC0, 0x02, 0xA0, 0x03, 0x60, 0x02, 0xA0, 0x01, // 248
|
|
||||||
0x00, 0x00, 0xE0, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03, // 249
|
|
||||||
0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x04, 0x02, 0xE0, 0x03, // 250
|
|
||||||
0x00, 0x00, 0xE8, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03, // 251
|
|
||||||
0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x00, 0x02, 0xE8, 0x03, // 252
|
|
||||||
0x20, 0x00, 0xC0, 0x09, 0x08, 0x06, 0xC4, 0x01, 0x20, // 253
|
|
||||||
0x00, 0x00, 0xF8, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 254
|
|
||||||
0x20, 0x00, 0xC8, 0x09, 0x00, 0x06, 0xC8, 0x01, 0x20 // 255
|
|
||||||
};
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user