Compare commits
646 Commits
vesc_contr
...
ssl
Author | SHA1 | Date | |
---|---|---|---|
98b32847ec | |||
4104cafb59 | |||
1830df26fd | |||
2a56f59d86 | |||
8074f63578 | |||
78a1734133 | |||
01841f11a1 | |||
5f26d607eb | |||
95ae227a97 | |||
0adb55c668 | |||
f8a14414e2 | |||
c7420afd9c | |||
05af290420 | |||
ba694f0fcf | |||
ab7052b52c | |||
eb55b20511 | |||
cad8ce5d3c | |||
17540b7a1e | |||
25f0494ab7 | |||
2110624880 | |||
d44fb8ec9a | |||
b084839ba8 | |||
e0f3ceee7c | |||
058745abd5 | |||
b3299c8325 | |||
872a7e45fa | |||
868b9dd6d4 | |||
b55b649b10 | |||
be53c39ebf | |||
04515eecb5 | |||
a1946e2e02 | |||
3ae6721402 | |||
8210c57dff | |||
514f993b9c | |||
a86f27748f | |||
b721341210 | |||
53aaa9dc43 | |||
562b5d25ac | |||
2ec19d2def | |||
304ce9925f | |||
09431cc305 | |||
599965f0bd | |||
f6c3e95f9d | |||
13cef1a32d | |||
d6198d5320 | |||
6c9581bb78 | |||
db19e574c0 | |||
155f56863e | |||
a9798713ed | |||
80d141a109 | |||
9c80aa4250 | |||
49bda3f88d | |||
40d85d81cd | |||
b5c6823a80 | |||
444df158e9 | |||
2c28cf9107 | |||
7611613ca7 | |||
a7d7448c52 | |||
03932c5683 | |||
217e45de6a | |||
abb76a29b9 | |||
023986b827 | |||
81d5a3bc95 | |||
d3e2323c74 | |||
56b3e8cdd1 | |||
55d9f432d7 | |||
e6d4133d2e | |||
8780ab8c7c | |||
cce5dc38da | |||
df6e0e55f5 | |||
13fe185ac1 | |||
f47bf772ef | |||
93556a00fe | |||
cef961c174 | |||
a4d80c640d | |||
9ddf246805 | |||
b48648f3e2 | |||
bcfbb98362 | |||
6492531183 | |||
8bd5b21436 | |||
d91b6cb6e1 | |||
180e3fbaa8 | |||
16ebdfc795 | |||
5903fc21b1 | |||
b59d9dff9f | |||
92f41a0ce1 | |||
4f109d4d08 | |||
4a2254df0b | |||
6adca753aa | |||
595a508d93 | |||
647f86906b | |||
42067b1a3b | |||
66e40248fe | |||
5d424a4377 | |||
24607b3a0c | |||
aabae8b8b6 | |||
02999bcde1 | |||
27019b7d75 | |||
0e3053a45b | |||
e07cb9d373 | |||
f9bc8b341d | |||
c50787ba84 | |||
24e8543ff3 | |||
4357f1c7a5 | |||
c6f2392289 | |||
c1a4058a22 | |||
9f18bd980c | |||
2616af5a30 | |||
d4955349a8 | |||
60a960429e | |||
02aae7120c | |||
13d35d50a1 | |||
bb06fe6ba6 | |||
31210150cf | |||
e4b171c90f | |||
508c90800a | |||
70382088a0 | |||
bd9fdeac7b | |||
169d5434da | |||
0c33f3668a | |||
47d4492925 | |||
2a41155f77 | |||
5ca42235ba | |||
50c251d679 | |||
1f9a53dd7e | |||
f2e5478106 | |||
c6bfc4b77a | |||
24db6a7ce5 | |||
7761f415a5 | |||
64ac74ea5d | |||
38470629b8 | |||
b8172e7b63 | |||
583bd4992f | |||
57fe5b14b7 | |||
a611ad3db4 | |||
f1053cd3b5 | |||
8caf8789dd | |||
98641cfc04 | |||
e4b3a594f4 | |||
cc0a23802f | |||
b899b0a503 | |||
f99562f9bc | |||
24224079bd | |||
0837333731 | |||
bc9c7c22a8 | |||
f548a14b5d | |||
cf498db01e | |||
7051bd756f | |||
3db575f9f7 | |||
36265be595 | |||
b831d282d9 | |||
14d74a5846 | |||
5dff47f437 | |||
ddf0d27137 | |||
c291752b46 | |||
2101077f42 | |||
0df45e74f2 | |||
d32b46ed3f | |||
0ab293ee07 | |||
c5b9a0ab51 | |||
8bf7b7e39e | |||
b52d6c61d7 | |||
51e38fb6df | |||
c2d8042182 | |||
704109f0d0 | |||
09c098f54a | |||
574017ef0c | |||
6a29776bd4 | |||
aee7a35362 | |||
244a955c4b | |||
46fa8cba05 | |||
546d3041bc | |||
e67dc15b70 | |||
06530beab0 | |||
01a31e445e | |||
97d06c3b20 | |||
22ae359534 | |||
dea02804bd | |||
9a879ec842 | |||
4411a82348 | |||
eb7f5a0523 | |||
99811324e2 | |||
fb3fe7b3c0 | |||
562fc167bc | |||
d4325f2983 | |||
740ca4680a | |||
54166bb693 | |||
6cdccb285e | |||
341ef11536 | |||
9c4ffb3482 | |||
3c45cc1742 | |||
b1c1cfa7ec | |||
f91e722a36 | |||
1982a4551a | |||
16820b09e8 | |||
d3000ed5f7 | |||
34feb842c1 | |||
d4a20d70a6 | |||
4e1f1f1c98 | |||
517d4f7fb3 | |||
9ffaea39bc | |||
242bc6c255 | |||
bb7c0bf019 | |||
98949cd411 | |||
3d13cd9946 | |||
4302b8bf5e | |||
7af77dd452 | |||
cd1f503bc7 | |||
5208f7382e | |||
e7a6a2d506 | |||
79bbd16371 | |||
9173ab272d | |||
c94a3af910 | |||
5a642593c8 | |||
6baa17d584 | |||
e49eae2322 | |||
a92b2bed2c | |||
0c693544ac | |||
bd1307e156 | |||
6076f2a57d | |||
71be39556d | |||
55674ef079 | |||
74a3723ea7 | |||
c64e6abd01 | |||
63acd0c3ab | |||
e2bf4c579f | |||
2eaedb00fb | |||
b39ad41380 | |||
1a4dbc5907 | |||
c32007bc3b | |||
6ffa4580d8 | |||
24cc9c9f25 | |||
5e7f286d84 | |||
6a3372b2d4 | |||
6a529e5dca | |||
52564a74ff | |||
7bc486bc3f | |||
ebcbdeb18c | |||
ffbb710429 | |||
ead878ffd9 | |||
19b79fe441 | |||
89c3de03d3 | |||
1b3c17c55d | |||
a43bca4bab | |||
b7bf6d22a9 | |||
c335822cb9 | |||
61a8b00231 | |||
6e1c2d2aea | |||
8565f3ba20 | |||
b922c5779e | |||
f0b7db5667 | |||
befb51d499 | |||
467962efeb | |||
4db09fda31 | |||
33d273bbad | |||
f9083d44b4 | |||
8b0b0760e2 | |||
711896d20b | |||
b8acf12fd1 | |||
ed51591489 | |||
28a4933928 | |||
646e7ef51c | |||
e8b1269621 | |||
d2487d9c7d | |||
4e2022212c | |||
652788a89e | |||
297e5f4626 | |||
ab6aa16e0b | |||
7667128d71 | |||
0daba8d4eb | |||
f928b38541 | |||
0338e3b123 | |||
a18854659d | |||
5ea2423bd3 | |||
ce1cd04497 | |||
819ab57306 | |||
386a8aacce | |||
63baa21a28 | |||
2e2db854e6 | |||
ef02ce40fb | |||
eb663a8fd6 | |||
a6651c1cd1 | |||
cd669c03aa | |||
e2c3699eb9 | |||
1c18aa2dd7 | |||
64fb51aba7 | |||
46f30911bd | |||
76e8adcce3 | |||
be05e42303 | |||
be41e8018e | |||
b9e1509a87 | |||
1b4498b2ca | |||
88d7697b10 | |||
bcb8b9809a | |||
c79313fe11 | |||
7a62df1615 | |||
b311f1f377 | |||
249ab13d73 | |||
b81afae5be | |||
bce722eec0 | |||
2afff40f87 | |||
afc7af9ffb | |||
ebb1141863 | |||
34135f01b1 | |||
b739244320 | |||
6643fd7bc4 | |||
d1b4c72ce6 | |||
7e9559fde3 | |||
627c11326b | |||
cd7f08c147 | |||
faf4083806 | |||
2b0329bcfc | |||
9aa407cac9 | |||
a9ae7b964e | |||
362e7e9316 | |||
0446a40e62 | |||
e5b513297b | |||
0428a126f2 | |||
08e97debe7 | |||
fc1e277423 | |||
d70a3aa73f | |||
86a7ef66ee | |||
8dcc898244 | |||
55fe233ee7 | |||
316f74ada8 | |||
1de44c630b | |||
8c2ce911ba | |||
521a8278bf | |||
eba04b7d4d | |||
7a11708d57 | |||
5e5a256157 | |||
5bbe3fec89 | |||
a3970514b8 | |||
7e5994812b | |||
d75f226583 | |||
fd87c82580 | |||
345d8e2007 | |||
5c3ad4f891 | |||
82d63616f1 | |||
c3fd0d4d21 | |||
88a32fc2ba | |||
4ae7390d45 | |||
1448ed088a | |||
887c43da27 | |||
50e9e13e86 | |||
2010b0e2c3 | |||
f59aea0474 | |||
e9d78d8180 | |||
be98bf0965 | |||
119ff94a36 | |||
503b109c4d | |||
6ba8b897db | |||
d7e76c5a0e | |||
ea98b02d92 | |||
bc2b194acb | |||
4ea080e7f7 | |||
aa9e5b2807 | |||
cde4c4601b | |||
9c8ccf53cf | |||
1200287780 | |||
46bbfbbd01 | |||
d2e3b1647d | |||
c23fafcc21 | |||
ac80e3579d | |||
40af304083 | |||
7433b3fd7c | |||
b2b9f97dce | |||
5c657c20af | |||
595d0434cf | |||
b07d599dc2 | |||
dcdf27118c | |||
f5bdae6841 | |||
734486c822 | |||
876fc5d173 | |||
1674ae47f0 | |||
506e350179 | |||
2011d0b802 | |||
75377252a4 | |||
b9fa94e45c | |||
e460f4ff27 | |||
e7055a8508 | |||
fa01d2bcbd | |||
3b270bda3d | |||
7e7727e180 | |||
5dc794b903 | |||
8414769397 | |||
2cc1ca6ab7 | |||
acb56100d6 | |||
63c6322792 | |||
abf92f439e | |||
49138c64f1 | |||
9cc69afd5d | |||
b3eff31261 | |||
f49a8c0a09 | |||
26d91437ae | |||
a4eed77f33 | |||
d59359ad1a | |||
83e7c662fa | |||
8dc5665d5d | |||
2c77b55275 | |||
68b2b73434 | |||
ec326e9679 | |||
0b758da0f0 | |||
2e21cc5889 | |||
e6e1e7a747 | |||
763ca84ec2 | |||
b3849e3059 | |||
3bff2226c8 | |||
9b41663096 | |||
ddf5b46603 | |||
fbb2ba1905 | |||
7c8e416d66 | |||
6bb319155d | |||
f756d48232 | |||
8bbe39aae7 | |||
d02bb1adff | |||
57bbade3c8 | |||
d20b79d158 | |||
99796ab6ac | |||
53edd82fef | |||
dfcf841db4 | |||
21ba6b4d97 | |||
8aacd3d4f8 | |||
684ecc7cdd | |||
65a64e4e2a | |||
a03f0ffdb9 | |||
069382632e | |||
4f9d422d50 | |||
4613dc7259 | |||
48f8a2a422 | |||
0b0e49cf93 | |||
99f4d916d3 | |||
86ddacaaa2 | |||
fb120aa7f8 | |||
0529c85151 | |||
f7c0b18cc4 | |||
eb82f9d993 | |||
3c38348cf2 | |||
4f185fcd11 | |||
5e355feea9 | |||
2acac79173 | |||
6fa2286da5 | |||
e4b3d4cc40 | |||
c2e7d8edbf | |||
313db2ad68 | |||
958194bd2a | |||
cd6713ac92 | |||
49fe597502 | |||
f968612a60 | |||
4567eedf0d | |||
c29edfb717 | |||
0faa86cddd | |||
b766bb57db | |||
9a056f5b64 | |||
91b819a517 | |||
6856848112 | |||
525061f5bc | |||
692f3b1f38 | |||
d6217492c7 | |||
2992cbb613 | |||
f19e6b8a9e | |||
daaf4365af | |||
161abf5ddd | |||
5844af246e | |||
22cb16d3d2 | |||
c60fa5b7c0 | |||
cb0c02bc8f | |||
444366c00c | |||
08961271a4 | |||
df4957db76 | |||
15a6fc97cd | |||
b3b68e8c7a | |||
022ac06f44 | |||
defa10c76e | |||
204a45aaa4 | |||
71675f68b3 | |||
d3ed93ef5f | |||
872945d089 | |||
26740ccf86 | |||
f0192c27e8 | |||
b6f3c4c069 | |||
fe81facbdb | |||
77b6f2f013 | |||
25b9716e1f | |||
43c32d56d5 | |||
ddee574129 | |||
e68d8389a2 | |||
63ef389aaa | |||
e46e2b7e01 | |||
a1a99bd4cf | |||
290531562d | |||
db3be639df | |||
817c144bc2 | |||
32708cd428 | |||
78292a1518 | |||
d350eddad8 | |||
e9d75b973b | |||
879f4d5767 | |||
1d2c5d3b67 | |||
3570fc03a3 | |||
d199edade3 | |||
5ceabd378f | |||
162f95ab13 | |||
518c4d075d | |||
4a562d4e48 | |||
12a81c3b5d | |||
ca337ce99e | |||
b1f3a59828 | |||
a4b76623ae | |||
8e3c0b4204 | |||
e559fa8b82 | |||
e88fbfd4a7 | |||
1504fc779a | |||
d75db8e18c | |||
8f47ce7b63 | |||
673f68d2c1 | |||
c52a72f485 | |||
1bd3979241 | |||
5318554786 | |||
455f98a4a0 | |||
589f188b15 | |||
c11454ae11 | |||
8607ec28c2 | |||
5ddbc21969 | |||
5832b18775 | |||
fcf729383e | |||
5d75f266bb | |||
7bbe705331 | |||
4b9ef50d06 | |||
f146deca05 | |||
9bdd512057 | |||
8d152083aa | |||
f830579b55 | |||
27ae2aba21 | |||
56ebbe8055 | |||
67ad568de1 | |||
f93076c97b | |||
7805059bdf | |||
b0e96933ec | |||
ea3c803c4f | |||
db024a298f | |||
db10a294de | |||
ddb4859a3f | |||
d8945c9726 | |||
1d9995c90f | |||
cdaebf06a6 | |||
4eef349810 | |||
60a2f2bcaa | |||
97c68b8779 | |||
e5871d339e | |||
873f076f93 | |||
799fb1709e | |||
36079863e1 | |||
353b9202ea | |||
008f973829 | |||
9a9d9d6d64 | |||
ebbbe11980 | |||
31aedecfe2 | |||
eb73d564fa | |||
b87a3c5fbc | |||
5ae0e6314e | |||
894644001b | |||
67bb5554e4 | |||
4d641974d4 | |||
8add1a991a | |||
4109f58fd5 | |||
fba4b20c62 | |||
4453cf5d4c | |||
19f2d43cf6 | |||
a4217a66ea | |||
19cc525d04 | |||
0392517c53 | |||
72c57d28d5 | |||
38e1137e5e | |||
aad7f96adc | |||
3768015762 | |||
f833496ddf | |||
3c609d12ca | |||
1f801e5c86 | |||
cdc154528a | |||
6d20b29c38 | |||
753c55443a | |||
bcb8b8c601 | |||
c5a3a21a9b | |||
eb85dfc349 | |||
2cd7b6e448 | |||
9fb12587be | |||
83229cd5c1 | |||
d21d36585a | |||
470eea0dbe | |||
06d3df0aea | |||
b3cc352155 | |||
0ec141ae3a | |||
3526523d9e | |||
c9ec6fc537 | |||
799604874d | |||
1a04c71b5e | |||
69a01f7822 | |||
c3f298bab5 | |||
c899e5922b | |||
a306cf81ca | |||
2abddbe97b | |||
d5ff963143 | |||
1fc970d4d5 | |||
ad06ef506f | |||
db4b746743 | |||
0af50b64b2 | |||
e34f3d01c1 | |||
24b514e3f3 | |||
0198b2a2b0 | |||
885183c7c8 | |||
2309e6c1a1 | |||
8249409339 | |||
86da64d500 | |||
3a3831b367 | |||
7828b1dff5 | |||
9fd611817c | |||
bb289f6e73 | |||
8f96a32b57 | |||
f4ab8c3fbd | |||
1f26fcd3a8 | |||
b3b0a8ac72 | |||
f07a27b32a | |||
89ed8411e4 | |||
815e3367e7 | |||
18e6c49f52 | |||
b38ac72308 | |||
556185b121 | |||
afa872fff0 | |||
fb2cafb898 | |||
294c313dd6 | |||
3ec01aad89 | |||
07d1da1f91 | |||
33692fa054 | |||
8a61f2a803 | |||
6fd97d2ff1 | |||
713a714e8b | |||
bd42cb3e9e | |||
b40ee72e40 | |||
4d0efb7bd9 | |||
85a3e88876 | |||
c727d2a350 | |||
9ed99f6c50 | |||
dfba798bd7 | |||
7922452f30 | |||
9444187fb8 |
106
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
# pull_request:
|
||||
# types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "config_name"
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
SONAR_SCANNER_VERSION: 4.4.0.2170
|
||||
SONAR_SERVER_URL: "https://sonarcloud.io"
|
||||
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
||||
SONAR_CACHE_DIR: sonar_cache
|
||||
environment: deploy
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [feedc0de, comred, peter, mick]
|
||||
steps:
|
||||
|
||||
- name: Checkout (without submodules)
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
|
||||
- name: Set up JDK 11 (for Sonar)
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Download and set up sonar-scanner
|
||||
env:
|
||||
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
|
||||
run: |
|
||||
mkdir -p $HOME/.sonar
|
||||
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
|
||||
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Download and set up build-wrapper (for Sonar)
|
||||
env:
|
||||
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
|
||||
run: |
|
||||
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
|
||||
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
|
||||
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
|
||||
|
||||
- name: Checkout and install esp-idf
|
||||
uses: 0xFEEDC0DE64/checkout_install_esp_idf@main
|
||||
|
||||
- name: Fast Submodule Checkout components/arduino-esp32
|
||||
uses: 0xFEEDC0DE64/fast_submodule_checkout@main
|
||||
with:
|
||||
submodule: components/arduino-esp32
|
||||
|
||||
- name: Checkout remaining submodules
|
||||
run: git submodule update --init --recursive $(git submodule | awk '{ if ($2 != "esp-idf" && $2 != "components/arduino-esp32") print $2 }')
|
||||
|
||||
- name: Setup ccache
|
||||
uses: 0xFEEDC0DE64/setup_ccache@main
|
||||
with:
|
||||
key: ${{ runner.os }}-ccache-${{ matrix.node }}
|
||||
|
||||
|
||||
- name: Build firmware
|
||||
run: |
|
||||
export CCACHE_MAXSIZE=400M CCACHE_BASEDIR="$(pwd)"
|
||||
. export.sh
|
||||
./switchconf.sh ${{ matrix.node }}
|
||||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} idf.py --ccache build
|
||||
ccache -s
|
||||
|
||||
- name: Cache sonar
|
||||
uses: 0xFEEDC0DE64/cache-with-update@update-cache-on-cachehit
|
||||
with:
|
||||
path: ${{ env.SONAR_SERVER_URL }}
|
||||
key: ${{ runner.os }}-sonar-${{ matrix.node }}
|
||||
|
||||
- name: Run sonar-scanner
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" --define sonar.cfamily.cache.path="${{ env.SONAR_CACHE_DIR }}"
|
||||
|
||||
- name: Set outputs
|
||||
id: vars
|
||||
run: |
|
||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: bobbyquad_${{ matrix.node }}
|
||||
path: |
|
||||
build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.bin
|
||||
build_${{ matrix.node }}/bobbyquad_${{ matrix.node }}.elf
|
||||
build_${{ matrix.node }}/bootloader/bootloader.bin
|
||||
build_${{ matrix.node }}/bootloader/bootloader.elf
|
||||
build_${{ matrix.node }}/partition_table/partition-table.bin
|
16
.gitignore
vendored
@ -1,2 +1,14 @@
|
||||
.pio
|
||||
platformio.pro*
|
||||
desktop.ini
|
||||
/build
|
||||
/build_*
|
||||
/CMakeLists.txt.user*
|
||||
/cmake-build-debug
|
||||
/platformio.pro*
|
||||
/config.cmake
|
||||
/sdkconfig
|
||||
/sdkconfig.old*
|
||||
/ignore
|
||||
/.idea
|
||||
/.ccache
|
||||
/main/certs/*
|
||||
/.vscode/*
|
||||
|
66
.gitmodules
vendored
@ -1,3 +1,63 @@
|
||||
[submodule "src/bobbycar-protocol"]
|
||||
path = src/bobbycar-protocol
|
||||
url = git@github.com:bobbycar-graz/bobbycar-protocol.git
|
||||
[submodule "components/espcpputils"]
|
||||
path = components/espcpputils
|
||||
url = ../../0xFEEDC0DE64/espcpputils.git
|
||||
[submodule "esp-idf"]
|
||||
path = esp-idf
|
||||
url = ../../0xFEEDC0DE64/esp-idf.git
|
||||
[submodule "components/cpputils"]
|
||||
path = components/cpputils
|
||||
url = ../../0xFEEDC0DE64/cpputils.git
|
||||
[submodule "components/cxx-ring-buffer"]
|
||||
path = components/cxx-ring-buffer
|
||||
url = ../../0xFEEDC0DE64/cxx-ring-buffer.git
|
||||
[submodule "components/date"]
|
||||
path = components/date
|
||||
url = ../../0xFEEDC0DE64/date.git
|
||||
[submodule "components/espchrono"]
|
||||
path = components/espchrono
|
||||
url = ../../0xFEEDC0DE64/espchrono.git
|
||||
[submodule "components/ArduinoJson"]
|
||||
path = components/ArduinoJson
|
||||
url = ../../0xFEEDC0DE64/ArduinoJson.git
|
||||
[submodule "components/TFT_eSPI"]
|
||||
path = components/TFT_eSPI
|
||||
url = ../../0xFEEDC0DE64/TFT_eSPI.git
|
||||
[submodule "components/arduino-esp32"]
|
||||
path = components/arduino-esp32
|
||||
url = ../../0xFEEDC0DE64/arduino-esp32.git
|
||||
[submodule "components/expected"]
|
||||
path = components/expected
|
||||
url = ../../0xFEEDC0DE64/expected.git
|
||||
[submodule "components/bobbycar-protocol"]
|
||||
path = components/bobbycar-protocol
|
||||
url = ../../bobbycar-graz/bobbycar-protocol.git
|
||||
[submodule "components/fmt"]
|
||||
path = components/fmt
|
||||
url = ../../0xFEEDC0DE64/fmt.git
|
||||
[submodule "components/espwifistack"]
|
||||
path = components/espwifistack
|
||||
url = ../../0xFEEDC0DE64/espwifistack.git
|
||||
[submodule "components/esp-nimble-cpp"]
|
||||
path = components/esp-nimble-cpp
|
||||
url = ../../0xFEEDC0DE64/esp-nimble-cpp.git
|
||||
[submodule "components/espasyncota"]
|
||||
path = components/espasyncota
|
||||
url = ../../0xFEEDC0DE64/espasyncota.git
|
||||
[submodule "components/esphttpdutils"]
|
||||
path = components/esphttpdutils
|
||||
url = ../../0xFEEDC0DE64/esphttpdutils.git
|
||||
[submodule "components/espasynchttpreq"]
|
||||
path = components/espasynchttpreq
|
||||
url = ../../0xFEEDC0DE64/espasynchttpreq.git
|
||||
[submodule "components/FastLED-idf"]
|
||||
path = components/FastLED-idf
|
||||
url = ../../0xFEEDC0DE64/FastLED-idf.git
|
||||
[submodule "components/esp-gui-lib"]
|
||||
path = components/esp-gui-lib
|
||||
url = ../../0xFEEDC0DE64/esp-gui-lib.git
|
||||
[submodule "components/espconfiglib"]
|
||||
path = components/espconfiglib
|
||||
url = ../../0xFEEDC0DE64/espconfiglib.git
|
||||
[submodule "components/QRCode-esp32"]
|
||||
path = components/QRCode-esp32
|
||||
url = ../QRCode-esp32.git
|
||||
|
28
.travis.yml
@ -1,28 +0,0 @@
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- "~/.platformio"
|
||||
git:
|
||||
submodules: false
|
||||
|
||||
before_install:
|
||||
- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
|
||||
- git submodule update --init --recursive
|
||||
|
||||
install:
|
||||
- pip install -U platformio
|
||||
- platformio update
|
||||
|
||||
env:
|
||||
- BUILD_CONFIG=feedc0de_usb
|
||||
- BUILD_CONFIG=greyhash_usb
|
||||
- BUILD_CONFIG=aveexy_usb
|
||||
- BUILD_CONFIG=testbench_usb
|
||||
- BUILD_CONFIG=mickdermack_usb
|
||||
- BUILD_CONFIG=peter_usb
|
||||
|
||||
script:
|
||||
- platformio run -e $BUILD_CONFIG
|
39
CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
cmake_minimum_required(VERSION 3.16.3)
|
||||
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig)
|
||||
message(FATAL_ERROR "sdkconfig not found (please run ./switchconf.sh)")
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake)
|
||||
message(FATAL_ERROR "config.cmake not found (please run ./switchconf.sh)")
|
||||
endif()
|
||||
|
||||
file(READ_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig result)
|
||||
if (result STREQUAL "")
|
||||
message(FATAL_ERROR "sdkconfig is not a symlink (please run ./switchconf.sh)")
|
||||
endif()
|
||||
|
||||
file(READ_SYMLINK ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake result)
|
||||
if (result STREQUAL "")
|
||||
message(FATAL_ERROR "config.cmake is not a symlink (please run ./switchconf.sh)")
|
||||
endif()
|
||||
|
||||
include(config.cmake)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
project(${BOBBY_APP_NAME})
|
||||
|
||||
set(expected_build_folder "${CMAKE_CURRENT_SOURCE_DIR}/build")
|
||||
file(READ_SYMLINK "${expected_build_folder}" expected_build_folder_resolved)
|
||||
if(NOT IS_ABSOLUTE "${expected_build_folder_resolved}")
|
||||
get_filename_component(dir "${expected_build_folder}" DIRECTORY)
|
||||
set(expected_build_folder_resolved "${dir}/${expected_build_folder_resolved}")
|
||||
endif()
|
||||
|
||||
if (NOT PROJECT_BINARY_DIR STREQUAL "${expected_build_folder}" AND NOT PROJECT_BINARY_DIR STREQUAL "${expected_build_folder_resolved}")
|
||||
message(FATAL_ERROR "building in ${PROJECT_BINARY_DIR} is not supported, you have to build in ${expected_build_folder} or ${expected_build_folder_resolved} (please run ./switchconf.sh)")
|
||||
endif()
|
53
README.md
@ -1,13 +1,58 @@
|
||||
# bobbycar-boardcomputer-firmware
|
||||
|
||||
## How to clone and compile?
|
||||
## Build status
|
||||
|
||||
```
|
||||
| Service | Status |
|
||||
| :--- | ---: |
|
||||
| Actions |  |
|
||||
| Sonar | [](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware)<br />[](https://sonarcloud.io/summary/new_code?id=bobbycar-graz_bobbycar-boardcomputer-firmware) |
|
||||
## How to clone ? (READ THIS OR YOU WILL FAIL)
|
||||
|
||||
```bash
|
||||
git clone --recursive git@github.com:bobbycar-graz/bobbycar-boardcomputer-firmware.git
|
||||
cd bobbycar-boardcomputer-firmware/
|
||||
platformio run --environment bobbycar_usb --target upload
|
||||
./esp-idf/install.sh
|
||||
./switchconf.sh feedc0de
|
||||
```
|
||||
|
||||
## How to compile
|
||||
Also do the initialization if you use an IDE, otherwise build will fail.
|
||||
|
||||
```bash
|
||||
# before you try to build anything, always do this first:
|
||||
. export.sh
|
||||
|
||||
# if needed, switch to the right configuration for your hardware (run with --list to list available configurations)
|
||||
./switchconf.sh feedc0de
|
||||
|
||||
# flash bootloader, partition table and app (only do once)
|
||||
idf.py -p /dev/ttyUSB0 -b 921600 flash monitor
|
||||
|
||||
# flash only app (do this for development as it is much faster)
|
||||
idf.py -p /dev/ttyUSB0 -b 921600 app-flash monitor
|
||||
|
||||
# alternative commands (After '. export.sh')
|
||||
bobby-build # Builds the firmware
|
||||
bobby-flash # Flashes the firmware
|
||||
bobby-app-flash # Just flashes the app partition
|
||||
bobby-monitor # Opens the serial monitor
|
||||
bobby-coredump # Opens the coredump-utility
|
||||
open-ide # Opens qtcreator
|
||||
```
|
||||
|
||||
If you are inside monitor, hit Ctrl+T then Ctrl+X to exit.
|
||||
|
||||
Hit Ctrl+T then Ctrl+A to reflash the app and return to monitor (very handy during development)
|
||||
|
||||
## How to wire all connections?
|
||||
|
||||

|
||||

|
||||
|
||||
### -DFEATURE_DPAD
|
||||

|
||||
|
||||
### -DFEATURE_DPAD_3WIRESW
|
||||

|
||||
|
||||
### -DFEATURE_ROTARY
|
||||

|
||||
|
@ -1,6 +0,0 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
nvs, data, nvs, 0x9000, 0x5000,
|
||||
otadata, data, ota, 0xe000, 0x2000,
|
||||
app0, app, ota_0, 0x10000, 0x250000,
|
||||
app1, app, ota_1, 0x260000, 0x250000,
|
||||
spiffs, data, spiffs, 0x520000, 0x250000,
|
|
@ -1,5 +0,0 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
nvs, data, nvs, 0x9000, 0x5000,
|
||||
otadata, data, ota, 0xe000, 0x2000,
|
||||
app0, app, ota_0, 0x10000, 0x250000,
|
||||
spiffs, data, spiffs, 0x260000, 0x1a0000,
|
|
1
components/ArduinoJson
Submodule
1
components/FastLED-idf
Submodule
1
components/QRCode-esp32
Submodule
1
components/TFT_eSPI
Submodule
1
components/arduino-esp32
Submodule
1
components/bobbycar-protocol
Submodule
1
components/cpputils
Submodule
1
components/cxx-ring-buffer
Submodule
1
components/date
Submodule
1
components/esp-gui-lib
Submodule
1
components/esp-nimble-cpp
Submodule
1
components/espasynchttpreq
Submodule
1
components/espasyncota
Submodule
1
components/espchrono
Submodule
1
components/espconfiglib
Submodule
1
components/espcpputils
Submodule
1
components/esphttpdutils
Submodule
1
components/espwifistack
Submodule
1
components/expected
Submodule
1
components/fmt
Submodule
130
config_comred.cmake
Normal file
@ -0,0 +1,130 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_comred)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DLOAD_GLCD=1
|
||||
-DLOAD_FONT2=1
|
||||
-DLOAD_FONT4=1
|
||||
-DLOAD_FONT7=1
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=13
|
||||
-DTFT_SCLK=15
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=12
|
||||
-DTFT_RST=2
|
||||
-DSPI_FREQUENCY=40000000
|
||||
)
|
||||
|
||||
set(BOBBYCAR_BUILDFLAGS
|
||||
-DFEATURE_ADC_IN
|
||||
-DPINS_GAS=34
|
||||
-DPINS_BREMS=35
|
||||
-DDEFAULT_SWAPSCREENBYTES=false
|
||||
-DFEATURE_CAN
|
||||
# -DFEATURE_SERIAL
|
||||
# -DPINS_RX1=4
|
||||
# -DPINS_TX1=5
|
||||
# -DPINS_RX2=22
|
||||
# -DPINS_TX2=23
|
||||
-DDEFAULT_INVERTFRONTLEFT=false
|
||||
-DDEFAULT_INVERTFRONTRIGHT=true
|
||||
-DDEFAULT_INVERTBACKLEFT=false
|
||||
-DDEFAULT_INVERTBACKRIGHT=true
|
||||
-DDEFAULT_WHEELDIAMETER=200
|
||||
# -DFEATURE_MOSFETS
|
||||
# -DPINS_MOSFET0=18
|
||||
# -DPINS_MOSFET1=19
|
||||
# -DPINS_MOSFET2=21
|
||||
-DDEFAULT_IMOTMAX=28
|
||||
-DDEFAULT_IDCMAX=30
|
||||
-DDEFAULT_NMOTMAX=2000
|
||||
-DDEFAULT_FIELDWEAKMAX=7
|
||||
-DDEFAULT_FIELDADVMAX=40
|
||||
-DDEVICE_PREFIX=comr_bobbyquad
|
||||
-DAP_PASSWORD=Passwort_123
|
||||
-DFEATURE_WEBSERVER
|
||||
-DFEATURE_OTA
|
||||
-DOTA_USERNAME="comred"
|
||||
# -DFEATURE_DPAD_5WIRESW
|
||||
# -DPINS_DPAD_5WIRESW_OUT=4
|
||||
# -DPINS_DPAD_5WIRESW_IN1=5
|
||||
# -DPINS_DPAD_5WIRESW_IN2=27
|
||||
# -DPINS_DPAD_5WIRESW_IN3=18
|
||||
# -DPINS_DPAD_5WIRESW_IN4=19
|
||||
# -DPINS_DPAD_EXTRASW_IN5=25
|
||||
-DFEATURE_DPAD_6WIRESW
|
||||
-DPINS_DPAD_6WIRESW_OUT=4
|
||||
-DPINS_DPAD_6WIRESW_IN1=5
|
||||
-DPINS_DPAD_6WIRESW_IN2=27
|
||||
-DPINS_DPAD_6WIRESW_IN3=18
|
||||
-DPINS_DPAD_6WIRESW_IN4=19
|
||||
-DPINS_DPAD_6WIRESW_IN5=26
|
||||
|
||||
# -DDPAD_5WIRESW_UP=1
|
||||
# -DDPAD_5WIRESW_DOWN=5
|
||||
# -DDPAD_5WIRESW_CONFIRM=2
|
||||
# -DDPAD_5WIRESW_BACK=6
|
||||
# -DDPAD_5WIRESW_PROFILE0=4
|
||||
# -DDPAD_5WIRESW_PROFILE1=0
|
||||
# -DDPAD_5WIRESW_PROFILE2=7
|
||||
# -DDPAD_5WIRESW_PROFILE3=3
|
||||
# -DDPAD_5WIRESW_DEBUG
|
||||
|
||||
-DDPAD_6WIRESW_UP=1
|
||||
-DDPAD_6WIRESW_DOWN=5
|
||||
-DDPAD_6WIRESW_CONFIRM=2
|
||||
-DDPAD_6WIRESW_BACK=6
|
||||
-DDPAD_6WIRESW_PROFILE0=4
|
||||
-DDPAD_6WIRESW_PROFILE1=0
|
||||
-DDPAD_6WIRESW_PROFILE2=7
|
||||
-DDPAD_6WIRESW_PROFILE3=3
|
||||
-DDPAD_6WIRESW_BLINK_LEFT=8
|
||||
-DDPAD_6WIRESW_BLINK_RIGHT=9
|
||||
# -DDPAD_6WIRESW_DEBUG
|
||||
-DFEATURE_GSCHISSENE_DIODE
|
||||
|
||||
-DDEFAULT_GASMIN=842
|
||||
-DDEFAULT_GASMAX=2480
|
||||
-DDEFAULT_BREMSMIN=826
|
||||
-DDEFAULT_BREMSMAX=2502
|
||||
-DFEATURE_BLE
|
||||
# -DFEATURE_BLUETOOTH
|
||||
# -DFEATURE_BMS
|
||||
# -DFEATURE_GAMETRAK
|
||||
# -DPINS_GAMETRAKX=34
|
||||
# -DPINS_GAMETRAKY=39
|
||||
# -DPINS_GAMETRAKDIST=36
|
||||
# -DDEFAULT_GAMETRAKXMIN=0
|
||||
# -DDEFAULT_GAMETRAKXMAX=4095
|
||||
# -DDEFAULT_GAMETRAKYMIN=0
|
||||
# -DDEFAULT_GAMETRAKYMAX=4095
|
||||
# -DDEFAULT_GAMETRAKDISTMIN=0
|
||||
# -DDEFAULT_GAMETRAKDISTMAX=4095
|
||||
# -DFEATURE_POWERSUPPLY
|
||||
# -DFEATURE_CLOUD
|
||||
-DFEATURE_UDPCLOUD
|
||||
-DFEATURE_LEDBACKLIGHT
|
||||
-DPINS_LEDBACKLIGHT=23
|
||||
-DLEDBACKLIGHT_INVERTED
|
||||
-DFEATURE_GARAGE
|
||||
# -DFEATURE_NTP
|
||||
-DFEATURE_WIRELESS_CONFIG
|
||||
-DFEATURE_LEDSTRIP
|
||||
-DPINS_LEDSTRIP=33
|
||||
-DLEDSTRIP_LENGTH=288
|
||||
-DHEAP_LRGST_CRASH_TEXT_FIX
|
||||
# -DLEDSTRIP_WRONG_DIRECTION
|
||||
-DLEDSTRIP_ANIMATION_DEFAULT=1
|
||||
-DLEDS_PER_METER=144
|
||||
-DOLD_NVS
|
||||
-DFEATURE_DNS_NS
|
||||
-DSWITCH_BLINK
|
||||
# -DFEATURE_IS_MIR_EGAL_OB_DER_WEBSERVER_FUNKTIONIERT
|
||||
-DFEATURE_ESPNOW
|
||||
-DFEATURE_SSL
|
||||
)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
message(WARNING "Including lockscreen_plugin")
|
||||
endif()
|
106
config_feedc0de.cmake
Normal file
@ -0,0 +1,106 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_feedc0de)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DLOAD_GLCD=1
|
||||
-DLOAD_FONT2=1
|
||||
-DLOAD_FONT4=1
|
||||
-DLOAD_FONT7=1
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=13
|
||||
-DTFT_SCLK=15
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=12
|
||||
-DTFT_RST=2
|
||||
-DSPI_FREQUENCY=40000000
|
||||
)
|
||||
|
||||
set(BOBBYCAR_BUILDFLAGS
|
||||
-DFEATURE_ADC_IN
|
||||
-DPINS_GAS=34
|
||||
-DPINS_BREMS=35
|
||||
-DDEFAULT_SWAPSCREENBYTES=false
|
||||
-DFEATURE_CAN
|
||||
# -DFEATURE_SERIAL
|
||||
# -DPINS_RX1=4
|
||||
# -DPINS_TX1=5
|
||||
# -DPINS_RX2=22
|
||||
# -DPINS_TX2=23
|
||||
-DDEFAULT_INVERTFRONTLEFT=false
|
||||
-DDEFAULT_INVERTFRONTRIGHT=true
|
||||
-DDEFAULT_INVERTBACKLEFT=false
|
||||
-DDEFAULT_INVERTBACKRIGHT=true
|
||||
-DDEFAULT_WHEELDIAMETER=255
|
||||
-DFEATURE_MOSFETS
|
||||
-DPINS_MOSFET0=4
|
||||
-DPINS_MOSFET1=5
|
||||
-DPINS_MOSFET2=25
|
||||
-DDEFAULT_IMOTMAX=40
|
||||
-DDEFAULT_IDCMAX=42
|
||||
-DDEFAULT_NMOTMAX=2000
|
||||
-DDEFAULT_FIELDWEAKMAX=17
|
||||
-DDEFAULT_FIELDADVMAX=40
|
||||
-DDEVICE_PREFIX=bobbyquad
|
||||
-DAP_PASSWORD=Passwort_123
|
||||
-DFEATURE_WEBSERVER
|
||||
-DFEATURE_OTA
|
||||
-DOTA_USERNAME="feedc0de"
|
||||
-DFEATURE_DPAD_5WIRESW_2OUT
|
||||
-DPINS_DPAD_5WIRESW_OUT1=18
|
||||
-DPINS_DPAD_5WIRESW_OUT2=19
|
||||
-DPINS_DPAD_5WIRESW_IN1=27
|
||||
-DPINS_DPAD_5WIRESW_IN2=32
|
||||
-DPINS_DPAD_5WIRESW_IN3=33
|
||||
-DDPAD_5WIRESW_UP=2
|
||||
-DDPAD_5WIRESW_DOWN=11
|
||||
-DDPAD_5WIRESW_CONFIRM=5
|
||||
-DDPAD_5WIRESW_BACK=8
|
||||
-DDPAD_5WIRESW_PROFILE0=4
|
||||
-DDPAD_5WIRESW_PROFILE1=1
|
||||
-DDPAD_5WIRESW_PROFILE2=10
|
||||
-DDPAD_5WIRESW_PROFILE3=7
|
||||
-DDPAD_5WIRESW_BLINK_LEFT=9
|
||||
-DDPAD_5WIRESW_BLINK_RIGHT=0
|
||||
-DDPAD_5WIRESW_QUICKACTION_DOWN=3
|
||||
-DDPAD_5WIRESW_QUICKACTION_UP=6
|
||||
# -DDPAD_5WIRESW_DEBUG
|
||||
-DDEFAULT_GASMIN=200
|
||||
-DDEFAULT_GASMAX=1070
|
||||
-DDEFAULT_BREMSMIN=270
|
||||
-DDEFAULT_BREMSMAX=1800
|
||||
-DFEATURE_BLE
|
||||
# -DFEATURE_BLUETOOTH
|
||||
# -DFEATURE_BMS
|
||||
# -DFEATURE_GAMETRAK
|
||||
# -DPINS_GAMETRAKX=34
|
||||
# -DPINS_GAMETRAKY=39
|
||||
# -DPINS_GAMETRAKDIST=36
|
||||
# -DDEFAULT_GAMETRAKXMIN=0
|
||||
# -DDEFAULT_GAMETRAKXMAX=4095
|
||||
# -DDEFAULT_GAMETRAKYMIN=0
|
||||
# -DDEFAULT_GAMETRAKYMAX=4095
|
||||
# -DDEFAULT_GAMETRAKDISTMIN=0
|
||||
# -DDEFAULT_GAMETRAKDISTMAX=4095
|
||||
-DFEATURE_POWERSUPPLY
|
||||
-DFEATURE_CLOUD
|
||||
# -DFEATURE_UDPCLOUD
|
||||
-DFEATURE_LEDBACKLIGHT
|
||||
-DPINS_LEDBACKLIGHT=23
|
||||
-DLEDBACKLIGHT_INVERTED
|
||||
-DFEATURE_GARAGE
|
||||
-DFEATURE_NTP
|
||||
-DFEATURE_WIRELESS_CONFIG
|
||||
-DFEATURE_LEDSTRIP
|
||||
-DPINS_LEDSTRIP=26
|
||||
-DLEDSTRIP_LENGTH=200
|
||||
# -DHEAP_LRGST_CRASH_TEXT_FIX
|
||||
# -DLEDSTRIP_WRONG_DIRECTION
|
||||
-DLEDSTRIP_ANIMATION_DEFAULT=0
|
||||
-DLEDS_PER_METER=144
|
||||
-DOLD_NVS
|
||||
# -DFEATURE_DNS_NS
|
||||
# -DSWITCH_BLINK
|
||||
-DFEATURE_IS_MIR_EGAL_OB_DER_WEBSERVER_FUNKTIONIERT
|
||||
# -DFEATURE_ESPNOW
|
||||
# -DFEATURE_SSL
|
||||
)
|
98
config_greyhash.cmake
Normal file
@ -0,0 +1,98 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_greyhash)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DLOAD_GLCD=1
|
||||
-DLOAD_FONT2=1
|
||||
-DLOAD_FONT4=1
|
||||
-DLOAD_FONT7=1
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=13
|
||||
-DTFT_SCLK=15
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=12
|
||||
-DTFT_RST=2
|
||||
-DSPI_FREQUENCY=27000000
|
||||
)
|
||||
|
||||
set(BOBBYCAR_BUILDFLAGS
|
||||
-DFEATURE_ADC_IN
|
||||
-DPINS_GAS=34
|
||||
-DPINS_BREMS=35
|
||||
-DDEFAULT_SWAPSCREENBYTES=false
|
||||
# -DFEATURE_CAN
|
||||
# -DFEATURE_SERIAL
|
||||
# -DPINS_RX1=4
|
||||
# -DPINS_TX1=5
|
||||
# -DPINS_RX2=22
|
||||
# -DPINS_TX2=23
|
||||
-DDEFAULT_INVERTFRONTLEFT=false
|
||||
-DDEFAULT_INVERTFRONTRIGHT=true
|
||||
-DDEFAULT_INVERTBACKLEFT=false
|
||||
-DDEFAULT_INVERTBACKRIGHT=true
|
||||
-DDEFAULT_WHEELDIAMETER=200
|
||||
# -DFEATURE_MOSFETS
|
||||
# -DPINS_MOSFET0=18
|
||||
# -DPINS_MOSFET1=19
|
||||
# -DPINS_MOSFET2=21
|
||||
-DDEFAULT_IMOTMAX=28
|
||||
-DDEFAULT_IDCMAX=30
|
||||
-DDEFAULT_NMOTMAX=2000
|
||||
-DDEFAULT_FIELDWEAKMAX=7
|
||||
-DDEFAULT_FIELDADVMAX=40
|
||||
-DDEVICE_PREFIX=bobbyquad
|
||||
# -DAP_PASSWORD=Passwort_123
|
||||
# -DFEATURE_WEBSERVER
|
||||
# -DFEATURE_OTA
|
||||
# -DOTA_USERNAME="greyhash"
|
||||
-DFEATURE_DPAD_5WIRESW
|
||||
-DPINS_DPAD_5WIRESW_OUT=4
|
||||
-DPINS_DPAD_5WIRESW_IN1=5
|
||||
-DPINS_DPAD_5WIRESW_IN2=27
|
||||
-DPINS_DPAD_5WIRESW_IN3=18
|
||||
-DPINS_DPAD_5WIRESW_IN4=19
|
||||
-DDPAD_5WIRESW_UP=1
|
||||
-DDPAD_5WIRESW_DOWN=5
|
||||
-DDPAD_5WIRESW_CONFIRM=2
|
||||
-DDPAD_5WIRESW_BACK=6
|
||||
-DDPAD_5WIRESW_PROFILE0=4
|
||||
-DDPAD_5WIRESW_PROFILE1=0
|
||||
-DDPAD_5WIRESW_PROFILE2=7
|
||||
-DDPAD_5WIRESW_PROFILE3=3
|
||||
# -DDPAD_5WIRESW_DEBUG
|
||||
-DDEFAULT_GASMIN=842
|
||||
-DDEFAULT_GASMAX=2480
|
||||
-DDEFAULT_BREMSMIN=826
|
||||
-DDEFAULT_BREMSMAX=2502
|
||||
# -DFEATURE_BLE
|
||||
# -DFEATURE_BLUETOOTH
|
||||
# -DFEATURE_BMS
|
||||
# -DFEATURE_GAMETRAK
|
||||
# -DPINS_GAMETRAKX=34
|
||||
# -DPINS_GAMETRAKY=39
|
||||
# -DPINS_GAMETRAKDIST=36
|
||||
# -DDEFAULT_GAMETRAKXMIN=0
|
||||
# -DDEFAULT_GAMETRAKXMAX=4095
|
||||
# -DDEFAULT_GAMETRAKYMIN=0
|
||||
# -DDEFAULT_GAMETRAKYMAX=4095
|
||||
# -DDEFAULT_GAMETRAKDISTMIN=0
|
||||
# -DDEFAULT_GAMETRAKDISTMAX=4095
|
||||
# -DFEATURE_POWERSUPPLY
|
||||
# -DFEATURE_CLOUD
|
||||
# -DFEATURE_UDPCLOUD
|
||||
# -DFEATURE_LEDBACKLIGHT
|
||||
# -DPINS_LEDBACKLIGHT=23
|
||||
# -DLEDBACKLIGHT_INVERTED
|
||||
# -DFEATURE_GARAGE
|
||||
# -DFEATURE_NTP
|
||||
# -DFEATURE_WIRELESS_CONFIG
|
||||
# -DFEATURE_LEDSTRIP
|
||||
# -DPINS_LEDSTRIP=33
|
||||
# -DLEDSTRIP_LENGTH=121
|
||||
# -DLEDSTRIP_DEFAULT_BRIGHTNESS=100
|
||||
# -DLEDSTRIP_WRONG_DIRECTION
|
||||
# -DLEDSTRIP_ANIMATION_DEFAULT=0
|
||||
-DOLD_NVS
|
||||
# -DFEATURE_DNS_NS
|
||||
# -DFEATURE_SSL
|
||||
)
|
102
config_mick.cmake
Normal file
@ -0,0 +1,102 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_mick)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DLOAD_GLCD=1
|
||||
-DLOAD_FONT2=1
|
||||
-DLOAD_FONT4=1
|
||||
-DLOAD_FONT7=1
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=13
|
||||
-DTFT_SCLK=15
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=12
|
||||
-DTFT_RST=2
|
||||
-DSPI_FREQUENCY=27000000
|
||||
)
|
||||
|
||||
set(BOBBYCAR_BUILDFLAGS
|
||||
-DFEATURE_ADC_IN
|
||||
-DPINS_GAS=34
|
||||
-DPINS_BREMS=35
|
||||
-DDEFAULT_SWAPSCREENBYTES=false
|
||||
-DFEATURE_CAN
|
||||
# -DFEATURE_SERIAL
|
||||
# -DPINS_RX1=4
|
||||
# -DPINS_TX1=5
|
||||
# -DPINS_RX2=22
|
||||
# -DPINS_TX2=23
|
||||
-DDEFAULT_INVERTFRONTLEFT=false
|
||||
-DDEFAULT_INVERTFRONTRIGHT=true
|
||||
-DDEFAULT_INVERTBACKLEFT=false
|
||||
-DDEFAULT_INVERTBACKRIGHT=true
|
||||
-DDEFAULT_WHEELDIAMETER=200
|
||||
# -DFEATURE_MOSFETS
|
||||
# -DPINS_MOSFET0=18
|
||||
# -DPINS_MOSFET1=19
|
||||
# -DPINS_MOSFET2=21
|
||||
-DDEFAULT_IMOTMAX=28
|
||||
-DDEFAULT_IDCMAX=30
|
||||
-DDEFAULT_NMOTMAX=2000
|
||||
-DDEFAULT_FIELDWEAKMAX=7
|
||||
-DDEFAULT_FIELDADVMAX=40
|
||||
-DDEVICE_PREFIX=bobbyquad
|
||||
-DAP_PASSWORD=Passwort_123
|
||||
-DFEATURE_WEBSERVER
|
||||
# -DFEATURE_OTA
|
||||
-DOTA_USERNAME="mick"
|
||||
# -DFEATURE_DPAD_5WIRESW
|
||||
# -DPINS_DPAD_5WIRESW_OUT=4
|
||||
# -DPINS_DPAD_5WIRESW_IN1=5
|
||||
# -DPINS_DPAD_5WIRESW_IN2=27
|
||||
# -DPINS_DPAD_5WIRESW_IN3=18
|
||||
# -DPINS_DPAD_5WIRESW_IN4=19
|
||||
# -DDPAD_5WIRESW_UP=1
|
||||
# -DDPAD_5WIRESW_DOWN=5
|
||||
# -DDPAD_5WIRESW_CONFIRM=2
|
||||
# -DDPAD_5WIRESW_BACK=6
|
||||
# -DDPAD_5WIRESW_PROFILE0=4
|
||||
# -DDPAD_5WIRESW_PROFILE1=0
|
||||
# -DDPAD_5WIRESW_PROFILE2=7
|
||||
# -DDPAD_5WIRESW_PROFILE3=3
|
||||
# -DDPAD_5WIRESW_DEBUG
|
||||
-DDEFAULT_GASMIN=184
|
||||
-DDEFAULT_GASMAX=1329
|
||||
-DDEFAULT_BREMSMIN=28
|
||||
-DDEFAULT_BREMSMAX=500
|
||||
-DFEATURE_BLE
|
||||
# -DFEATURE_BLUETOOTH
|
||||
# -DFEATURE_BMS
|
||||
# -DFEATURE_GAMETRAK
|
||||
# -DPINS_GAMETRAKX=34
|
||||
# -DPINS_GAMETRAKY=39
|
||||
# -DPINS_GAMETRAKDIST=36
|
||||
# -DDEFAULT_GAMETRAKXMIN=0
|
||||
# -DDEFAULT_GAMETRAKXMAX=4095
|
||||
# -DDEFAULT_GAMETRAKYMIN=0
|
||||
# -DDEFAULT_GAMETRAKYMAX=4095
|
||||
# -DDEFAULT_GAMETRAKDISTMIN=0
|
||||
# -DDEFAULT_GAMETRAKDISTMAX=4095
|
||||
# -DFEATURE_POWERSUPPLY
|
||||
# -DFEATURE_CLOUD
|
||||
-DFEATURE_UDPCLOUD
|
||||
-DFEATURE_LEDBACKLIGHT
|
||||
-DPINS_LEDBACKLIGHT=23
|
||||
-DLEDBACKLIGHT_INVERTED
|
||||
# -DFEATURE_GARAGE
|
||||
# -DFEATURE_NTP
|
||||
-DFEATURE_WIRELESS_CONFIG
|
||||
-DFEATURE_LEDSTRIP
|
||||
-DLEDSTRIP_LENGTH=288
|
||||
-DPINS_LEDSTRIP=33
|
||||
# -DLEDSTRIP_WRONG_DIRECTION
|
||||
-DLEDSTRIP_ANIMATION_DEFAULT=0
|
||||
-DOLD_NVS
|
||||
-DFEATURE_DNS_NS
|
||||
# -DFEATURE_SSL
|
||||
)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
message(WARNING "Including lockscreen_plugin")
|
||||
endif()
|
107
config_peter.cmake
Normal file
@ -0,0 +1,107 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_peter)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DLOAD_GLCD=1
|
||||
-DLOAD_FONT2=1
|
||||
-DLOAD_FONT4=1
|
||||
-DLOAD_FONT7=1
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=13
|
||||
-DTFT_SCLK=15
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=12
|
||||
-DTFT_RST=2
|
||||
-DSPI_FREQUENCY=40000000
|
||||
)
|
||||
|
||||
set(BOBBYCAR_BUILDFLAGS
|
||||
-DFEATURE_ADC_IN
|
||||
-DPINS_GAS=34
|
||||
-DPINS_BREMS=35
|
||||
-DDEFAULT_SWAPSCREENBYTES=false
|
||||
-DFEATURE_CAN
|
||||
# -DFEATURE_SERIAL
|
||||
# -DPINS_RX1=4
|
||||
# -DPINS_TX1=5
|
||||
# -DPINS_RX2=22
|
||||
# -DPINS_TX2=23
|
||||
-DDEFAULT_INVERTFRONTLEFT=false
|
||||
-DDEFAULT_INVERTFRONTRIGHT=true
|
||||
-DDEFAULT_INVERTBACKLEFT=false
|
||||
-DDEFAULT_INVERTBACKRIGHT=true
|
||||
-DDEFAULT_WHEELDIAMETER=200
|
||||
# -DFEATURE_MOSFETS
|
||||
# -DPINS_MOSFET0=18
|
||||
# -DPINS_MOSFET1=19
|
||||
# -DPINS_MOSFET2=21
|
||||
-DDEFAULT_IMOTMAX=28
|
||||
-DDEFAULT_IDCMAX=30
|
||||
-DDEFAULT_NMOTMAX=2000
|
||||
-DDEFAULT_FIELDWEAKMAX=7
|
||||
-DDEFAULT_FIELDADVMAX=40
|
||||
-DDEVICE_PREFIX=peter_bobbyquad
|
||||
-DAP_PASSWORD=Passwort_123
|
||||
-DFEATURE_WEBSERVER
|
||||
-DFEATURE_OTA
|
||||
-DOTA_USERNAME="peter"
|
||||
-DFEATURE_DPAD_5WIRESW_2OUT
|
||||
-DPINS_DPAD_5WIRESW_OUT1=18
|
||||
-DPINS_DPAD_5WIRESW_OUT2=19
|
||||
-DPINS_DPAD_5WIRESW_IN1=4
|
||||
-DPINS_DPAD_5WIRESW_IN2=5
|
||||
-DPINS_DPAD_5WIRESW_IN3=27
|
||||
-DDPAD_5WIRESW_UP=4
|
||||
-DDPAD_5WIRESW_DOWN=7
|
||||
-DDPAD_5WIRESW_CONFIRM=1
|
||||
-DDPAD_5WIRESW_BACK=10
|
||||
-DDPAD_5WIRESW_PROFILE0=11
|
||||
-DDPAD_5WIRESW_PROFILE1=8
|
||||
-DDPAD_5WIRESW_PROFILE2=5
|
||||
-DDPAD_5WIRESW_PROFILE3=2
|
||||
-DDPAD_5WIRESW_BLINK_LEFT=9
|
||||
-DDPAD_5WIRESW_BLINK_RIGHT=0
|
||||
-DDPAD_5WIRESW_QUICKACTION_DOWN=3
|
||||
-DDPAD_5WIRESW_QUICKACTION_UP=6
|
||||
# -DDPAD_5WIRESW_DEBUG
|
||||
-DDEFAULT_GASMIN=842
|
||||
-DDEFAULT_GASMAX=2480
|
||||
-DDEFAULT_BREMSMIN=826
|
||||
-DDEFAULT_BREMSMAX=2502
|
||||
-DFEATURE_BLE
|
||||
# -DFEATURE_BLUETOOTH
|
||||
# -DFEATURE_BMS
|
||||
# -DFEATURE_GAMETRAK
|
||||
# -DPINS_GAMETRAKX=34
|
||||
# -DPINS_GAMETRAKY=39
|
||||
# -DPINS_GAMETRAKDIST=36
|
||||
# -DDEFAULT_GAMETRAKXMIN=0
|
||||
# -DDEFAULT_GAMETRAKXMAX=4095
|
||||
# -DDEFAULT_GAMETRAKYMIN=0
|
||||
# -DDEFAULT_GAMETRAKYMAX=4095
|
||||
# -DDEFAULT_GAMETRAKDISTMIN=0
|
||||
# -DDEFAULT_GAMETRAKDISTMAX=4095
|
||||
# -DFEATURE_POWERSUPPLY
|
||||
# -DFEATURE_CLOUD
|
||||
-DFEATURE_UDPCLOUD
|
||||
-DFEATURE_LEDBACKLIGHT
|
||||
-DPINS_LEDBACKLIGHT=23
|
||||
-DLEDBACKLIGHT_INVERTED
|
||||
-DFEATURE_GARAGE
|
||||
-DFEATURE_NTP
|
||||
-DFEATURE_WIRELESS_CONFIG
|
||||
-DFEATURE_LEDSTRIP
|
||||
-DPINS_LEDSTRIP=33
|
||||
-DLEDSTRIP_LENGTH=288
|
||||
# -DLEDSTRIP_WRONG_DIRECTION
|
||||
-DLEDSTRIP_ANIMATION_DEFAULT=2
|
||||
-DLEDS_PER_METER=144
|
||||
-DOLD_NVS
|
||||
-DFEATURE_DNS_NS
|
||||
-DFEATURE_SSL
|
||||
)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/ignore/lockscreen_plugin.cmake")
|
||||
message(WARNING "Including lockscreen_plugin")
|
||||
endif()
|
1
esp-idf
Submodule
56
export.sh
Normal file
@ -0,0 +1,56 @@
|
||||
BOBBY_ROOT="$(dirname "$BASH_SOURCE")"
|
||||
export PS1="\033[1;32m(bobby-sourced)\033[;0m$PS1"
|
||||
|
||||
if [[ ! -f "${BOBBY_ROOT}/esp-idf/export.sh" ]]
|
||||
then
|
||||
echo "esp-idf is missing, please check out all needed submodules!"
|
||||
echo "git submodule update --init --recursive"
|
||||
return
|
||||
fi
|
||||
|
||||
. ${BOBBY_ROOT}/esp-idf/export.sh
|
||||
|
||||
complete -W "$(./switchconf.sh --list)" ./switchconf.sh
|
||||
complete -W "$(./switchconf.sh --list)" switchconf
|
||||
|
||||
BOBBY_INIT_FAILED=
|
||||
|
||||
if [[ -e "build" ]] && [[ ! -L "build" ]]
|
||||
then
|
||||
echo "ERROR: build folder exists but isnt a symlink!"
|
||||
BOBBY_INIT_FAILED=1
|
||||
fi
|
||||
|
||||
if [[ -e "sdkconfig" ]]
|
||||
then
|
||||
if [[ ! -L "sdkconfig" ]]
|
||||
then
|
||||
echo "ERROR: sdkconfig exists but isnt a symlink!"
|
||||
BOBBY_INIT_FAILED=1
|
||||
fi
|
||||
else
|
||||
echo "ERROR: sdkconfig does not exist"
|
||||
BOBBY_INIT_FAILED=1
|
||||
fi
|
||||
|
||||
if [[ -e "config.cmake" ]]
|
||||
then
|
||||
if [[ ! -L "config.cmake" ]]
|
||||
then
|
||||
echo "ERROR: config.cmake exists but isnt a symlink!"
|
||||
BOBBY_INIT_FAILED=1
|
||||
fi
|
||||
else
|
||||
echo "ERROR: config.cmake does not exist"
|
||||
BOBBY_INIT_FAILED=1
|
||||
fi
|
||||
|
||||
if [[ ! -z "$BOBBY_INIT_FAILED" ]]
|
||||
then
|
||||
echo "run ./switchconf.sh to fix all listed issues"
|
||||
return
|
||||
fi
|
||||
export PATH=$PATH:$(pwd)/tools
|
||||
alias open-ide=open_ide
|
||||
alias switchconf=./switchconf.sh
|
||||
alias bobby-build="idf.py build"
|
BIN
icons/back.png
Before Width: | Height: | Size: 9.5 KiB |
BIN
icons/battery.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
icons/bobbycar.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 9.9 KiB |
BIN
icons/greenpass.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
icons/neopixel.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
icons/time.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.1 KiB |
BIN
icons/update.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
img/3wiresw.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
img/dpadsw.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
img/rotary.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
img/wiring.png
Normal file
After Width: | Height: | Size: 173 KiB |
@ -1,39 +0,0 @@
|
||||
|
||||
This directory is intended for project header files.
|
||||
|
||||
A header file is a file containing C declarations and macro definitions
|
||||
to be shared between several project source files. You request the use of a
|
||||
header file in your project source file (C, C++, etc) located in `src` folder
|
||||
by including it, with the C preprocessing directive `#include'.
|
||||
|
||||
```src/main.c
|
||||
|
||||
#include "header.h"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Including a header file produces the same results as copying the header file
|
||||
into each source file that needs it. Such copying would be time-consuming
|
||||
and error-prone. With a header file, the related declarations appear
|
||||
in only one place. If they need to be changed, they can be changed in one
|
||||
place, and programs that include the header file will automatically use the
|
||||
new version when next recompiled. The header file eliminates the labor of
|
||||
finding and changing all the copies as well as the risk that a failure to
|
||||
find one copy will result in inconsistencies within a program.
|
||||
|
||||
In C, the usual convention is to give header files names that end with `.h'.
|
||||
It is most portable to use only letters, digits, dashes, and underscores in
|
||||
header file names, and at most one dot.
|
||||
|
||||
Read more about using header files in official GCC documentation:
|
||||
|
||||
* Include Syntax
|
||||
* Include Operation
|
||||
* Once-Only Headers
|
||||
* Computed Includes
|
||||
|
||||
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
|
470
main/CMakeLists.txt
Normal file
@ -0,0 +1,470 @@
|
||||
set(headers
|
||||
accessors/globalaccessors.h
|
||||
accessors/settingsaccessors.h
|
||||
accessors/wifiaccessors.h
|
||||
actions/assertaction.h
|
||||
actions/bluetoothbeginaction.h
|
||||
actions/bluetoothbeginmasteraction.h
|
||||
actions/bluetoothconnectbmsaction.h
|
||||
actions/bluetoothdisconnectaction.h
|
||||
actions/bluetoothendaction.h
|
||||
actions/bluetoothflushaction.h
|
||||
actions/bmsturnoffchargeaction.h
|
||||
actions/bmsturnoffdischargeaction.h
|
||||
actions/bmsturnonchargeaction.h
|
||||
actions/bmsturnondischargeaction.h
|
||||
actions/dividebyzeroaction.h
|
||||
actions/erasenvsaction.h
|
||||
actions/ledstripanimationactions.h
|
||||
actions/ledstripblinkactions.h
|
||||
actions/loadsettingsaction.h
|
||||
actions/modesettingsaction.h
|
||||
actions/multiaction.h
|
||||
actions/qraction.h
|
||||
actions/rebootaction.h
|
||||
actions/savesettingsaction.h
|
||||
actions/switchprofileaction.h
|
||||
actions/tempomatmodeapplycurrentpeedaction.h
|
||||
actions/updateswapfrontbackaction.h
|
||||
actions/wifiscanaction.h
|
||||
battery.h
|
||||
ble_bobby.h
|
||||
bletexthelpers.h
|
||||
bluetooth_bobby.h
|
||||
bluetoothmode.h
|
||||
bluetoothtexthelpers.h
|
||||
bmsutils.h
|
||||
buildserver.h
|
||||
buttons.h
|
||||
can.h
|
||||
changevaluedisplay_bluetoothmode.h
|
||||
changevaluedisplay_controlmode.h
|
||||
changevaluedisplay_controltype.h
|
||||
changevaluedisplay_handbremsmode.h
|
||||
changevaluedisplay_larsmmode_mode.h
|
||||
changevaluedisplay_unifiedmodelmode.h
|
||||
changevaluedisplay_wifi_mode_t.h
|
||||
changevaluedisplay_wifi_power_t.h
|
||||
cloud.h
|
||||
cloudtexthelpers.h
|
||||
controller.h
|
||||
debugcolorhelpers.h
|
||||
debuginputhandler.h
|
||||
debugtexthelpers.h
|
||||
displays/bmsdisplay.h
|
||||
displays/calibratedisplay.h
|
||||
displays/calibratevoltagedisplay.h
|
||||
displays/qrdisplay.h
|
||||
displays/dpad5wire2outdebugdisplay.h
|
||||
displays/dpad5wiredebugdisplay.h
|
||||
displays/dpad6wiredebugdisplay.h
|
||||
displays/gameoflifedisplay.h
|
||||
displays/gametrakcalibratedisplay.h
|
||||
displays/garagedisplay.h
|
||||
displays/ledstripcolorsdisplay.h
|
||||
displays/lockscreen.h
|
||||
displays/menus/aboutmenu.h
|
||||
displays/menus/accesspointwifisettingsmenu.h
|
||||
displays/menus/batterydebugmenu.h
|
||||
displays/menus/batterymenu.h
|
||||
displays/menus/blesettingsmenu.h
|
||||
displays/menus/bluetoothsettingsmenu.h
|
||||
displays/menus/bmsmenu.h
|
||||
displays/menus/boardcomputerhardwaresettingsmenu.h
|
||||
displays/menus/buzzermenu.h
|
||||
displays/menus/cloudsettingsmenu.h
|
||||
displays/menus/commanddebugmenu.h
|
||||
displays/menus/controllerhardwaresettingsmenu.h
|
||||
displays/menus/crashmenu.h
|
||||
displays/menus/debugmenu.h
|
||||
displays/menus/defaultmodesettingsmenu.h
|
||||
displays/menus/demosmenu.h
|
||||
displays/menus/dynamicdebugmenu.h
|
||||
displays/menus/enablemenu.h
|
||||
displays/menus/espnowmenu.h
|
||||
displays/menus/espnowsettingsmenu.h
|
||||
displays/menus/feedbackdebugmenu.h
|
||||
displays/menus/gametrakmodesettingsmenu.h
|
||||
displays/menus/genericwifisettingsmenu.h
|
||||
displays/menus/graphsmenu.h
|
||||
displays/menus/greenpassmenu.h
|
||||
displays/menus/handbremssettingsmenu.h
|
||||
displays/menus/invertmenu.h
|
||||
displays/menus/larsmmodesettingsmenu.h
|
||||
displays/menus/ledstripmenu.h
|
||||
displays/menus/ledstripselectanimationmenu.h
|
||||
displays/menus/ledstripselectblinkmenu.h
|
||||
displays/menus/ledstripselectotamode.h
|
||||
displays/menus/limitssettingsmenu.h
|
||||
displays/menus/lockscreensettingsmenu.h
|
||||
displays/menus/mainmenu.h
|
||||
displays/menus/modessettingsmenu.h
|
||||
displays/menus/mosfetsmenu.h
|
||||
displays/menus/motorfeedbackdebugmenu.h
|
||||
displays/menus/motorstatedebugmenu.h
|
||||
displays/menus/motortestmodesettingsmenu.h
|
||||
displays/menus/otamenu.h
|
||||
displays/menus/presetsmenu.h
|
||||
displays/menus/profilesmenu.h
|
||||
displays/menus/selectbatterytypemenu.h
|
||||
displays/menus/selectbuildserverbranch.h
|
||||
displays/menus/selectbuildservermenu.h
|
||||
displays/menus/selectmodemenu.h
|
||||
displays/menus/selectotabuildmenu.h
|
||||
displays/menus/settingsmenu.h
|
||||
displays/menus/stationwifisettingsmenu.h
|
||||
displays/menus/statisticsmenu.h
|
||||
displays/menus/taskmanagermenu.h
|
||||
displays/menus/tempomatmodesettingsmenu.h
|
||||
displays/menus/timersmenu.h
|
||||
displays/menus/timesettingsmenu.h
|
||||
displays/menus/udpcloudsettingsmenu.h
|
||||
displays/menus/wifiscanmenu.h
|
||||
displays/menus/wifisettingsmenu.h
|
||||
displays/metersdisplay.h
|
||||
displays/pingpongdisplay.h
|
||||
displays/popups/alertdisplay.h
|
||||
displays/poweroffdisplay.h
|
||||
displays/powersupplydisplay.h
|
||||
displays/qrcodedebug.h
|
||||
displays/qrimportdisplay.h
|
||||
displays/spirodisplay.h
|
||||
displays/starfielddisplay.h
|
||||
displays/statusdisplay.h
|
||||
displays/updatedisplay.h
|
||||
dnsannounce.h
|
||||
dpad.h
|
||||
dpad3wire.h
|
||||
dpad5wire.h
|
||||
dpad5wire_2out.h
|
||||
dpad6wire.h
|
||||
drivingstatistics.h
|
||||
esptexthelpers.h
|
||||
espnowfunctions.h
|
||||
feedbackparser.h
|
||||
globals.h
|
||||
handbremse.h
|
||||
icons/alert.h
|
||||
icons/battery.h
|
||||
icons/bluetooth.h
|
||||
icons/bms.h
|
||||
icons/bobbycar.h
|
||||
icons/buzzer.h
|
||||
icons/close.h
|
||||
icons/demos.h
|
||||
icons/graph.h
|
||||
icons/greenpass.h
|
||||
icons/hardware.h
|
||||
icons/info.h
|
||||
icons/lock.h
|
||||
icons/logo.h
|
||||
icons/modes.h
|
||||
icons/neopixel.h
|
||||
icons/poweroff.h
|
||||
icons/presets.h
|
||||
icons/reboot.h
|
||||
icons/scan.h
|
||||
icons/settings.h
|
||||
icons/statistics.h
|
||||
icons/time.h
|
||||
icons/update.h
|
||||
icons/wifi.h
|
||||
ledstrip.h
|
||||
ledstripdefines.h
|
||||
macros_bobbycar.h
|
||||
modeinterface.h
|
||||
modes.h
|
||||
modes/defaultmode.h
|
||||
modes/gametrakmode.h
|
||||
modes/ignoreinputmode.h
|
||||
modes/larsmmode.h
|
||||
modes/motortestmode.h
|
||||
modes/remotecontrolmode.h
|
||||
modes/tempomatmode.h
|
||||
mosfets.h
|
||||
newsettings.h
|
||||
ota.h
|
||||
potis.h
|
||||
presets.h
|
||||
qrimport.h
|
||||
rotary.h
|
||||
screens.h
|
||||
serial_bobby.h
|
||||
settings.h
|
||||
settingspersister.h
|
||||
settingsutils.h
|
||||
sslcert.h
|
||||
statistics.h
|
||||
statustexthelper.h
|
||||
stringsettings.h
|
||||
taskmanager.h
|
||||
texts.h
|
||||
time_bobbycar.h
|
||||
types.h
|
||||
udpcloud.h
|
||||
unifiedmodelmode.h
|
||||
utils.h
|
||||
webserver.h
|
||||
webserver_displaycontrol.h
|
||||
webserver_dumpnvs.h
|
||||
webserver_lock.h
|
||||
webserver_ota.h
|
||||
webserver_settings.h
|
||||
webserver_stringsettings.h
|
||||
widgets/doubleprogressbar.h
|
||||
widgets/menudisplaywithtime.h
|
||||
wifi_bobbycar.h
|
||||
wifitexthelpers.h
|
||||
)
|
||||
|
||||
set(sources
|
||||
accessors/globalaccessors.cpp
|
||||
accessors/settingsaccessors.cpp
|
||||
accessors/wifiaccessors.cpp
|
||||
actions/assertaction.cpp
|
||||
actions/bluetoothbeginaction.cpp
|
||||
actions/bluetoothbeginmasteraction.cpp
|
||||
actions/bluetoothconnectbmsaction.cpp
|
||||
actions/bluetoothdisconnectaction.cpp
|
||||
actions/bluetoothendaction.cpp
|
||||
actions/bluetoothflushaction.cpp
|
||||
actions/bmsturnoffchargeaction.cpp
|
||||
actions/bmsturnoffdischargeaction.cpp
|
||||
actions/bmsturnonchargeaction.cpp
|
||||
actions/bmsturnondischargeaction.cpp
|
||||
actions/dividebyzeroaction.cpp
|
||||
actions/erasenvsaction.cpp
|
||||
actions/ledstripanimationactions.cpp
|
||||
actions/ledstripblinkactions.cpp
|
||||
actions/loadsettingsaction.cpp
|
||||
actions/modesettingsaction.cpp
|
||||
actions/multiaction.cpp
|
||||
actions/qraction.cpp
|
||||
actions/rebootaction.cpp
|
||||
actions/savesettingsaction.cpp
|
||||
actions/switchprofileaction.cpp
|
||||
actions/tempomatmodeapplycurrentpeedaction.cpp
|
||||
actions/updateswapfrontbackaction.cpp
|
||||
actions/wifiscanaction.cpp
|
||||
battery.cpp
|
||||
ble_bobby.cpp
|
||||
bletexthelpers.cpp
|
||||
bluetooth_bobby.cpp
|
||||
bluetoothmode.cpp
|
||||
bluetoothtexthelpers.cpp
|
||||
bmsutils.cpp
|
||||
buildserver.cpp
|
||||
buttons.cpp
|
||||
can.cpp
|
||||
changevaluedisplay_bluetoothmode.cpp
|
||||
changevaluedisplay_controlmode.cpp
|
||||
changevaluedisplay_controltype.cpp
|
||||
changevaluedisplay_handbremsmode.cpp
|
||||
changevaluedisplay_larsmmode_mode.cpp
|
||||
changevaluedisplay_unifiedmodelmode.cpp
|
||||
changevaluedisplay_wifi_mode_t.cpp
|
||||
changevaluedisplay_wifi_power_t.cpp
|
||||
cloud.cpp
|
||||
cloudtexthelpers.cpp
|
||||
controller.cpp
|
||||
debugcolorhelpers.cpp
|
||||
debuginputhandler.cpp
|
||||
debugtexthelpers.cpp
|
||||
displays/bmsdisplay.cpp
|
||||
displays/calibratedisplay.cpp
|
||||
displays/calibratevoltagedisplay.cpp
|
||||
displays/qrdisplay.cpp
|
||||
displays/dpad5wire2outdebugdisplay.cpp
|
||||
displays/dpad5wiredebugdisplay.cpp
|
||||
displays/dpad6wiredebugdisplay.cpp
|
||||
displays/gameoflifedisplay.cpp
|
||||
displays/gametrakcalibratedisplay.cpp
|
||||
displays/garagedisplay.cpp
|
||||
displays/ledstripcolorsdisplay.cpp
|
||||
displays/lockscreen.cpp
|
||||
displays/menus/aboutmenu.cpp
|
||||
displays/menus/accesspointwifisettingsmenu.cpp
|
||||
displays/menus/batterydebugmenu.cpp
|
||||
displays/menus/batterymenu.cpp
|
||||
displays/menus/blesettingsmenu.cpp
|
||||
displays/menus/bluetoothsettingsmenu.cpp
|
||||
displays/menus/bmsmenu.cpp
|
||||
displays/menus/boardcomputerhardwaresettingsmenu.cpp
|
||||
displays/menus/buzzermenu.cpp
|
||||
displays/menus/cloudsettingsmenu.cpp
|
||||
displays/menus/commanddebugmenu.cpp
|
||||
displays/menus/controllerhardwaresettingsmenu.cpp
|
||||
displays/menus/crashmenu.cpp
|
||||
displays/menus/debugmenu.cpp
|
||||
displays/menus/defaultmodesettingsmenu.cpp
|
||||
displays/menus/demosmenu.cpp
|
||||
displays/menus/dynamicdebugmenu.cpp
|
||||
displays/menus/enablemenu.cpp
|
||||
displays/menus/espnowmenu.cpp
|
||||
displays/menus/espnowsettingsmenu.cpp
|
||||
displays/menus/feedbackdebugmenu.cpp
|
||||
displays/menus/gametrakmodesettingsmenu.cpp
|
||||
displays/menus/genericwifisettingsmenu.cpp
|
||||
displays/menus/graphsmenu.cpp
|
||||
displays/menus/greenpassmenu.cpp
|
||||
displays/menus/handbremssettingsmenu.cpp
|
||||
displays/menus/invertmenu.cpp
|
||||
displays/menus/larsmmodesettingsmenu.cpp
|
||||
displays/menus/ledstripmenu.cpp
|
||||
displays/menus/ledstripselectanimationmenu.cpp
|
||||
displays/menus/ledstripselectblinkmenu.cpp
|
||||
displays/menus/ledstripselectotamode.cpp
|
||||
displays/menus/limitssettingsmenu.cpp
|
||||
displays/menus/lockscreensettingsmenu.cpp
|
||||
displays/menus/mainmenu.cpp
|
||||
displays/menus/modessettingsmenu.cpp
|
||||
displays/menus/mosfetsmenu.cpp
|
||||
displays/menus/motorfeedbackdebugmenu.cpp
|
||||
displays/menus/motorstatedebugmenu.cpp
|
||||
displays/menus/motortestmodesettingsmenu.cpp
|
||||
displays/menus/otamenu.cpp
|
||||
displays/menus/presetsmenu.cpp
|
||||
displays/menus/profilesmenu.cpp
|
||||
displays/menus/selectbatterytypemenu.cpp
|
||||
displays/menus/selectbuildserverbranch.cpp
|
||||
displays/menus/selectbuildservermenu.cpp
|
||||
displays/menus/selectmodemenu.cpp
|
||||
displays/menus/selectotabuildmenu.cpp
|
||||
displays/menus/settingsmenu.cpp
|
||||
displays/menus/stationwifisettingsmenu.cpp
|
||||
displays/menus/statisticsmenu.cpp
|
||||
displays/menus/taskmanagermenu.cpp
|
||||
displays/menus/tempomatmodesettingsmenu.cpp
|
||||
displays/menus/timersmenu.cpp
|
||||
displays/menus/timesettingsmenu.cpp
|
||||
displays/menus/udpcloudsettingsmenu.cpp
|
||||
displays/menus/wifiscanmenu.cpp
|
||||
displays/menus/wifisettingsmenu.cpp
|
||||
displays/metersdisplay.cpp
|
||||
displays/pingpongdisplay.cpp
|
||||
displays/popups/alertdisplay.cpp
|
||||
displays/poweroffdisplay.cpp
|
||||
displays/powersupplydisplay.cpp
|
||||
displays/qrcodedebug.cpp
|
||||
displays/qrimportdisplay.cpp
|
||||
displays/spirodisplay.cpp
|
||||
displays/starfielddisplay.cpp
|
||||
displays/statusdisplay.cpp
|
||||
displays/updatedisplay.cpp
|
||||
dnsannounce.cpp
|
||||
dpad.cpp
|
||||
dpad3wire.cpp
|
||||
dpad5wire.cpp
|
||||
dpad5wire_2out.cpp
|
||||
dpad6wire.cpp
|
||||
drivingstatistics.cpp
|
||||
esptexthelpers.cpp
|
||||
espnowfunctions.cpp
|
||||
feedbackparser.cpp
|
||||
globals.cpp
|
||||
handbremse.cpp
|
||||
icons/alert.cpp
|
||||
icons/battery.cpp
|
||||
icons/bluetooth.cpp
|
||||
icons/bms.cpp
|
||||
icons/bobbycar.cpp
|
||||
icons/buzzer.cpp
|
||||
icons/close.cpp
|
||||
icons/demos.cpp
|
||||
icons/graph.cpp
|
||||
icons/greenpass.cpp
|
||||
icons/hardware.cpp
|
||||
icons/info.cpp
|
||||
icons/lock.cpp
|
||||
icons/logo.cpp
|
||||
icons/modes.cpp
|
||||
icons/neopixel.cpp
|
||||
icons/poweroff.cpp
|
||||
icons/presets.cpp
|
||||
icons/reboot.cpp
|
||||
icons/scan.cpp
|
||||
icons/settings.cpp
|
||||
icons/statistics.cpp
|
||||
icons/time.cpp
|
||||
icons/update.cpp
|
||||
icons/wifi.cpp
|
||||
ledstrip.cpp
|
||||
ledstripdefines.cpp
|
||||
macros_bobbycar.cpp
|
||||
main.cpp
|
||||
modeinterface.cpp
|
||||
modes.cpp
|
||||
modes/defaultmode.cpp
|
||||
modes/gametrakmode.cpp
|
||||
modes/ignoreinputmode.cpp
|
||||
modes/larsmmode.cpp
|
||||
modes/motortestmode.cpp
|
||||
modes/remotecontrolmode.cpp
|
||||
modes/tempomatmode.cpp
|
||||
mosfets.cpp
|
||||
newsettings.cpp
|
||||
ota.cpp
|
||||
potis.cpp
|
||||
presets.cpp
|
||||
qrimport.cpp
|
||||
rotary.cpp
|
||||
screens.cpp
|
||||
serial_bobby.cpp
|
||||
settings.cpp
|
||||
settingspersister.cpp
|
||||
settingsutils.cpp
|
||||
sslcert.cpp
|
||||
statistics.cpp
|
||||
statustexthelper.cpp
|
||||
stringsettings.cpp
|
||||
taskmanager.cpp
|
||||
texts.cpp
|
||||
time_bobbycar.cpp
|
||||
types.cpp
|
||||
udpcloud.cpp
|
||||
unifiedmodelmode.cpp
|
||||
utils.cpp
|
||||
webserver.cpp
|
||||
webserver_displaycontrol.cpp
|
||||
webserver_dumpnvs.cpp
|
||||
webserver_lock.cpp
|
||||
webserver_ota.cpp
|
||||
webserver_settings.cpp
|
||||
webserver_stringsettings.cpp
|
||||
widgets/doubleprogressbar.cpp
|
||||
widgets/menudisplaywithtime.cpp
|
||||
wifi_bobbycar.cpp
|
||||
wifitexthelpers.cpp
|
||||
)
|
||||
|
||||
set(dependencies
|
||||
freertos nvs_flash esp_http_server esp_https_server esp_https_ota mdns app_update esp_system esp_websocket_client driver
|
||||
arduino-esp32 ArduinoJson esp-nimble-cpp FastLED-idf TFT_eSPI QRCode-esp32
|
||||
bobbycar-protocol cpputils cxx-ring-buffer date
|
||||
espasynchttpreq espasyncota espchrono espcpputils espconfiglib esp-gui-lib esphttpdutils espwifistack expected fmt
|
||||
)
|
||||
|
||||
idf_component_register(
|
||||
SRCS
|
||||
${headers}
|
||||
${sources}
|
||||
INCLUDE_DIRS
|
||||
.
|
||||
REQUIRES
|
||||
${dependencies}
|
||||
EMBED_TXTFILES
|
||||
certs/cert.pem
|
||||
certs/key.pem
|
||||
)
|
||||
|
||||
target_compile_options(${COMPONENT_TARGET}
|
||||
PRIVATE
|
||||
-fstack-reuse=all
|
||||
-fstack-protector-all
|
||||
-fdiagnostics-color=always
|
||||
-Wno-unused-function
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-parentheses
|
||||
${BOBBYCAR_BUILDFLAGS}
|
||||
)
|
1
main/accessors/globalaccessors.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "globalaccessors.h"
|
12
main/accessors/globalaccessors.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// local includes
|
||||
#include "accessorinterface.h"
|
||||
#include "globals.h"
|
||||
#include "modes/tempomatmode.h"
|
||||
|
||||
struct AvgSpeedAccessor : public espgui::RefAccessor<float> { float &getRef() const override { return avgSpeed; } };
|
||||
struct AvgSpeedKmhAccessor : public espgui::RefAccessor<float> { float &getRef() const override { return avgSpeedKmh; } };
|
||||
struct SumCurrentAccessor : public espgui::RefAccessor<float> { float &getRef() const override { return sumCurrent; } };
|
||||
|
||||
struct TempomatModeCruiseMotTgtAccessor : public espgui::RefAccessor<int16_t> { int16_t &getRef() const override { return modes::tempomatMode.nCruiseMotTgt; } };
|
1
main/accessors/settingsaccessors.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "settingsaccessors.h"
|
227
main/accessors/settingsaccessors.h
Normal file
@ -0,0 +1,227 @@
|
||||
#pragma once
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <accessorinterface.h>
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "utils.h"
|
||||
|
||||
//! Special type of RefAccessor that also saves settings after setValue()
|
||||
template<typename T>
|
||||
struct RefAccessorSaveSettings : public virtual espgui::RefAccessor<T>
|
||||
{
|
||||
void setValue(T value) override { espgui::RefAccessor<T>::setValue(value); saveSettings(); };
|
||||
};
|
||||
|
||||
// Bms
|
||||
#ifdef FEATURE_BMS
|
||||
struct AutoConnectBmsAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.autoConnectBms; } };
|
||||
#endif
|
||||
|
||||
// Buzzer
|
||||
struct ReverseBeepAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.buzzer.reverseBeep; } };
|
||||
struct ReverseBeepFreq0Accessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.buzzer.reverseBeepFreq0; } };
|
||||
struct ReverseBeepFreq1Accessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.buzzer.reverseBeepFreq1; } };
|
||||
struct ReverseBeepDuration0Accessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.buzzer.reverseBeepDuration0; } };
|
||||
struct ReverseBeepDuration1Accessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.buzzer.reverseBeepDuration1; } };
|
||||
|
||||
// Limits
|
||||
struct IMotMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.limits.iMotMax; } };
|
||||
struct IDcMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.limits.iDcMax; } };
|
||||
struct NMotMaxKmhAccessor : public virtual espgui::AccessorInterface<int16_t>
|
||||
{
|
||||
int16_t getValue() const override { return convertToKmh(settings.limits.nMotMax); }
|
||||
void setValue(int16_t value) override { settings.limits.nMotMax = convertFromKmh(value); saveSettings(); }
|
||||
};
|
||||
struct NMotMaxRpmAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.limits.nMotMax; } };
|
||||
struct FieldWeakMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.limits.fieldWeakMax; } };
|
||||
struct PhaseAdvMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.limits.phaseAdvMax; } };
|
||||
|
||||
// WiFi
|
||||
struct WifiStaEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.wifiSettings.wifiStaEnabled; } };
|
||||
struct WifiApEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.wifiSettings.wifiApEnabled; } };
|
||||
|
||||
// Bluetooth
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
struct AutoBluetoothModeAccessor : public RefAccessorSaveSettings<BluetoothMode> { BluetoothMode &getRef() const override { return settings.bluetoothSettings.autoBluetoothMode; } };
|
||||
#endif
|
||||
|
||||
// Bluetooth Low Energy
|
||||
#ifdef FEATURE_BLE
|
||||
struct BleEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.bleSettings.bleEnabled; } };
|
||||
#endif
|
||||
|
||||
// Cloud
|
||||
#ifdef FEATURE_CLOUD
|
||||
struct CloudEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.cloudSettings.cloudEnabled; } };
|
||||
struct CloudTransmitTimeoutAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.cloudSettings.cloudTransmitTimeout; } };
|
||||
#endif
|
||||
|
||||
// Time
|
||||
struct TimezoneOffsetAccessor : public virtual espgui::AccessorInterface<int32_t>
|
||||
{
|
||||
int32_t getValue() const override { return settings.timeSettings.timezoneOffset.count(); }
|
||||
void setValue(int32_t value) override { settings.timeSettings.timezoneOffset = espchrono::minutes32{value}; saveSettings(); }
|
||||
};
|
||||
struct DaylightSavingModeAccessor : public RefAccessorSaveSettings<espchrono::DayLightSavingMode> { espchrono::DayLightSavingMode &getRef() const override { return settings.timeSettings.daylightSavingMode; } };
|
||||
#ifdef FEATURE_NTP
|
||||
struct TimeServerEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.timeSettings.timeServerEnabled; } };
|
||||
struct TimeSyncModeAccessor : public RefAccessorSaveSettings<sntp_sync_mode_t> { sntp_sync_mode_t &getRef() const override { return settings.timeSettings.timeSyncMode; } };
|
||||
struct TimeSyncIntervalAccessor : public virtual espgui::AccessorInterface<int32_t>
|
||||
{
|
||||
int32_t getValue() const override { return settings.timeSettings.timeSyncInterval.count(); }
|
||||
void setValue(int32_t value) override { settings.timeSettings.timeSyncInterval = espchrono::milliseconds32{value}; saveSettings(); }
|
||||
};
|
||||
#endif
|
||||
|
||||
// Controller Hardware
|
||||
struct FrontLeftEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.enableFrontLeft; } };
|
||||
struct FrontRightEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.enableFrontRight; } };
|
||||
struct BackLeftEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.enableBackLeft; } };
|
||||
struct BackRightEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.enableBackRight; } };
|
||||
|
||||
struct FrontLeftInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.invertFrontLeft; } };
|
||||
struct FrontRightInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.invertFrontRight; } };
|
||||
struct BackLeftInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.invertBackLeft; } };
|
||||
struct BackRightInvertedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.invertBackRight; } };
|
||||
|
||||
struct WheelDiameterMmAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.controllerHardware.wheelDiameter; } };
|
||||
struct WheelDiameterInchAccessor : public virtual espgui::AccessorInterface<float>
|
||||
{
|
||||
float getValue() const override { return convertToInch(settings.controllerHardware.wheelDiameter); }
|
||||
void setValue(float value) override { settings.controllerHardware.wheelDiameter = convertFromInch(value); saveSettings(); }
|
||||
};
|
||||
struct NumMagnetPolesAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.controllerHardware.numMagnetPoles; } };
|
||||
struct SwapFrontBackAccessor : public RefAccessorSaveSettings<bool> {
|
||||
bool &getRef() const override { return settings.controllerHardware.swapFrontBack; }
|
||||
#ifdef FEATURE_SERIAL
|
||||
void setValue(bool value) override { RefAccessorSaveSettings<bool>::setValue(value); updateSwapFrontBack(); };
|
||||
#endif
|
||||
};
|
||||
|
||||
// CAN
|
||||
#ifdef FEATURE_CAN
|
||||
struct SendFrontCanCmdAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.sendFrontCanCmd; } };
|
||||
struct SendBackCanCmdAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.controllerHardware.sendBackCanCmd; } };
|
||||
struct CanTransmitTimeoutAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.controllerHardware.canTransmitTimeout; } };
|
||||
struct CanReceiveTimeoutAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.controllerHardware.canReceiveTimeout; } };
|
||||
#endif
|
||||
|
||||
// Input devices
|
||||
struct SampleCountAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.sampleCount; } };
|
||||
struct GasMinAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gasMin; } };
|
||||
struct GasMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gasMax; } };
|
||||
struct BremsMinAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.bremsMin; } };
|
||||
struct BremsMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.bremsMax; } };
|
||||
#if defined(FEATURE_DPAD) || defined(FEATURE_DPAD_3WIRESW) || defined(FEATURE_DPAD_5WIRESW) || defined(FEATURE_DPAD_5WIRESW_2OUT) || defined (FEATURE_DPAD_6WIRESW)
|
||||
struct DPadDebounceAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.boardcomputerHardware.dpadDebounce; } };
|
||||
#endif
|
||||
#ifdef FEATURE_GAMETRAK
|
||||
struct GametrakXMinAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gametrakXMin; } };
|
||||
struct GametrakXMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gametrakXMax; } };
|
||||
struct GametrakYMinAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gametrakYMin; } };
|
||||
struct GametrakYMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gametrakYMax; } };
|
||||
struct GametrakDistMinAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gametrakDistMin; } };
|
||||
struct GametrakDistMaxAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.gametrakDistMax; } };
|
||||
#endif
|
||||
struct StatsUpdateRateAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.timersSettings.statsUpdateRate; } };
|
||||
|
||||
// Cloud
|
||||
#ifdef FEATURE_CLOUD
|
||||
struct CloudCollectRateAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.timersSettings.cloudCollectRate; } };
|
||||
struct CloudSendRateAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.timersSettings.cloudSendRate; } };
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_UDPCLOUD
|
||||
struct UdpCloudSendIntervalAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.boardcomputerHardware.timersSettings.udpSendRateMs; } };
|
||||
struct UdpCloudEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.udpCloudSettings.udpCloudEnabled; } };
|
||||
struct CloudDebugEnableAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.udpCloudSettings.enableCloudDebug; } };
|
||||
struct UdpUseStdStringAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.udpCloudSettings.udpUseStdString; } };
|
||||
#endif
|
||||
|
||||
// DefaultMode
|
||||
struct DefaultModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return settings.defaultMode.modelMode; } };
|
||||
struct DefaultModeHybridModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return settings.hybrid.hybridMode; } };
|
||||
struct DefaultModeSquareGasAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.defaultMode.squareGas; } };
|
||||
struct DefaultModeSquareBremsAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.defaultMode.squareBrems; } };
|
||||
|
||||
struct DefaultModeEnableSmoothingUpAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.defaultMode.enableSmoothingUp; } };
|
||||
struct DefaultModeEnableSmoothingDownAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.defaultMode.enableSmoothingDown; } };
|
||||
struct DefaultModeEnableFieldWeakSmoothingUpAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.defaultMode.enableFieldWeakSmoothingUp; } };
|
||||
struct DefaultModeEnableFieldWeakSmoothingDownAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.defaultMode.enableFieldWeakSmoothingDown; } };
|
||||
struct DefaultModeEnableFieldWeakSmoothingLowerLimitAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.fwSmoothLowerLimit; } };
|
||||
|
||||
struct DefaultModeSmoothingAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.smoothing; } };
|
||||
struct DefaultModeFrontPercentageAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.frontPercentage; } };
|
||||
struct DefaultModeBackPercentageAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.backPercentage; } };
|
||||
struct DefaultModeAddSchwelleAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.add_schwelle; } };
|
||||
struct DefaultModeGas1WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.gas1_wert; } };
|
||||
struct DefaultModeGas2WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.gas2_wert; } };
|
||||
struct DefaultModeBrems1WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.brems1_wert; } };
|
||||
struct DefaultModeBrems2WertAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.defaultMode.brems2_wert; } };
|
||||
|
||||
struct DefaultModeEnableHybridAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.hybrid.enable; } };
|
||||
struct DefaultModeHybridActivationLimitAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.hybrid.activationLimit; } };
|
||||
struct DefaultModeHybridDeactivationLimitAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.hybrid.deactivationLimit; } };
|
||||
|
||||
// TempomatMode
|
||||
struct TempomatModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return settings.tempomatMode.modelMode; } };
|
||||
|
||||
// LarsmMode
|
||||
struct LarsmModeModelModeAccessor : public RefAccessorSaveSettings<UnifiedModelMode> { UnifiedModelMode &getRef() const override { return settings.larsmMode.modelMode; } };
|
||||
struct LarsmModeModeAccessor : public RefAccessorSaveSettings<LarsmModeMode> { LarsmModeMode &getRef() const override { return settings.larsmMode.mode; } };
|
||||
struct LarsmModeIterationsAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.larsmMode.iterations; } };
|
||||
|
||||
// MotortestMode
|
||||
struct MotortestModeMultiplikatorAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.motortestMode.multiplikator; } };
|
||||
struct MotortestMaxPwmAccessor : public RefAccessorSaveSettings<uint16_t> { uint16_t &getRef() const override { return settings.motortestMode.maxPwm; } };
|
||||
|
||||
// Ledstrip
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
struct EnableLedAnimationAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.enableLedAnimation; } };
|
||||
struct EnableBrakeLightsAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.enableBrakeLights; } };
|
||||
struct LedsCountAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.ledsCount; } };
|
||||
struct CenterOffsetAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.centerOffset; } };
|
||||
struct SmallOffsetAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.smallOffset; } };
|
||||
struct BigOffsetAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.bigOffset; } };
|
||||
struct DeziampereAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.deziampere; } };
|
||||
struct EnableBeepWhenBlinkAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.enableBeepWhenBlink; } };
|
||||
struct EnableFullBlinkAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.enableFullBlink; } };
|
||||
struct EnableLedstripStVOAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.enableStVO; } };
|
||||
struct LedsStVOFrontOffsetAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.stvoFrontOffset; } };
|
||||
struct LedsStVOFrontLengthAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.stvoFrontLength; } };
|
||||
struct EnableLedstripStVOFrontlight : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.stvoFrontEnable; } };
|
||||
struct AnimationMultiplierAccessor : public RefAccessorSaveSettings<int16_t> { int16_t &getRef() const override { return settings.ledstrip.animationMultiplier; } };
|
||||
struct LedstripBrightnessAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.ledstrip.brightness; } };
|
||||
struct LedstripEnableBlinkAnimationAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.ledstrip.enableAnimBlink; } };
|
||||
#ifdef FEATURE_OTA
|
||||
struct LedstripOtaAnimationAccessor : public RefAccessorSaveSettings<OtaAnimationModes> { OtaAnimationModes &getRef() const override { return settings.ledstrip.otaMode; } };
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Battery
|
||||
struct BatterySeriesCellsAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.battery.cellsSeries; } };
|
||||
struct BatteryParallelCellsAccessor : public RefAccessorSaveSettings<uint8_t> { uint8_t &getRef() const override { return settings.battery.cellsParallel; } };
|
||||
struct BatteryWHperKMAccessor : public RefAccessorSaveSettings<uint16_t> { uint16_t &getRef() const override { return settings.battery.watthoursPerKilometer; } };
|
||||
struct BatteryApplyCalibrationAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.battery.applyCalibration; } };
|
||||
|
||||
// Lockscreen
|
||||
struct LockscreenAllowPresetSwitchAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.lockscreen.allowPresetSwitch; } };
|
||||
template<uint8_t index>
|
||||
struct LockscreenPinDigitAccessor : public RefAccessorSaveSettings<int8_t> { int8_t &getRef() const override { return settings.lockscreen.pin[index]; } };
|
||||
struct LockscreenKeepLockedAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.lockscreen.keepLockedAfterReboot; } };
|
||||
|
||||
// Handbremse
|
||||
struct HandbremsEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.handbremse.enable; } };
|
||||
struct HandbremsModeAccessor : public RefAccessorSaveSettings<HandbremseMode> { HandbremseMode &getRef() const override { return settings.handbremse.mode; } };
|
||||
struct HandbremsTimeoutAccessor : public RefAccessorSaveSettings<uint16_t> { uint16_t &getRef() const override { return settings.handbremse.triggerTimeout; } };
|
||||
struct HandbremsAutomaticAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.handbremse.automatic; } };
|
||||
struct HandbremsVisualizeAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.handbremse.visualize; } };
|
||||
|
||||
// ESP Now
|
||||
#ifdef FEATURE_ESPNOW
|
||||
struct ESPNowSyncTimeEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.espnow.syncTime; } };
|
||||
struct ESPNowSyncTimeWithOthersEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.espnow.syncTimeWithOthers; } };
|
||||
struct ESPNowSyncBlinkEnabledAccessor : public RefAccessorSaveSettings<bool> { bool &getRef() const override { return settings.espnow.syncBlink; } };
|
||||
#endif
|
1
main/accessors/wifiaccessors.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "wifiaccessors.h"
|
4
main/accessors/wifiaccessors.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
// local includes
|
||||
#include "accessorinterface.h"
|
9
main/actions/assertaction.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "assertaction.h"
|
||||
|
||||
// system includes
|
||||
#include <cassert>
|
||||
|
||||
void AssertAction::triggered()
|
||||
{
|
||||
assert(0);
|
||||
}
|
10
main/actions/assertaction.h
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actioninterface.h"
|
||||
|
||||
class AssertAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
15
main/actions/bluetoothbeginaction.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "bluetoothbeginaction.h"
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
void BluetoothBeginAction::triggered()
|
||||
{
|
||||
if (!bluetoothSerial.begin(deviceName))
|
||||
{
|
||||
//Serial.println("Could not begin bluetooth");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
||||
#endif
|
12
main/actions/bluetoothbeginaction.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <actioninterface.h>
|
||||
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
class BluetoothBeginAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
||||
#endif
|
0
main/actions/bluetoothbeginmasteraction.cpp
Normal file
@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <HardwareSerial.h>
|
||||
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
class BluetoothBeginMasterAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
@ -13,9 +14,10 @@ public:
|
||||
{
|
||||
if (!bluetoothSerial.begin(deviceName, true))
|
||||
{
|
||||
Serial.println("Could not begin bluetooth master");
|
||||
//Serial.println("Could not begin bluetooth master");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
||||
};
|
||||
#endif
|
||||
}
|
0
main/actions/bluetoothconnectbmsaction.cpp
Normal file
@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <HardwareSerial.h>
|
||||
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BMS
|
||||
#if defined(FEATURE_BLUETOOTH) && defined(FEATURE_BMS)
|
||||
class BluetoothConnectBmsAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
@ -15,7 +15,7 @@ public:
|
||||
uint8_t remoteAddress[ESP_BD_ADDR_LEN] = {0xAA, 0xBB, 0xCC, 0xA1, 0x23, 0x45};
|
||||
if (!bluetoothSerial.connect(remoteAddress))
|
||||
{
|
||||
Serial.println("Could not connect bluetooth to bms");
|
||||
//Serial.println("Could not connect bluetooth to bms");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
0
main/actions/bluetoothdisconnectaction.cpp
Normal file
@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <HardwareSerial.h>
|
||||
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
class BluetoothDisconnectAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
@ -13,9 +14,10 @@ public:
|
||||
{
|
||||
if (!bluetoothSerial.disconnect())
|
||||
{
|
||||
Serial.println("Could not disconnect bluetooth");
|
||||
//Serial.println("Could not disconnect bluetooth");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
||||
};
|
||||
#endif
|
||||
}
|
0
main/actions/bluetoothendaction.cpp
Normal file
@ -3,7 +3,10 @@
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
class BluetoothEndAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
@ -12,4 +15,5 @@ public:
|
||||
bluetoothSerial.end();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
}
|
0
main/actions/bluetoothflushaction.cpp
Normal file
@ -3,7 +3,10 @@
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BLUETOOTH
|
||||
class BluetoothFlushAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
@ -12,4 +15,5 @@ public:
|
||||
bluetoothSerial.flush();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
}
|
0
main/actions/bmsturnoffchargeaction.cpp
Normal file
@ -3,6 +3,8 @@
|
||||
#include "actioninterface.h"
|
||||
#include "bmsutils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BMS
|
||||
class BmsTurnOffChargeAction : public virtual ActionInterface
|
||||
@ -12,7 +14,7 @@ public:
|
||||
{
|
||||
if (!bms::send6Bit(42405, 250, 0))
|
||||
{
|
||||
Serial.println("Could not turn off charge mosfet");
|
||||
//Serial.println("Could not turn off charge mosfet");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
0
main/actions/bmsturnoffdischargeaction.cpp
Normal file
@ -3,6 +3,8 @@
|
||||
#include "actioninterface.h"
|
||||
#include "bmsutils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BMS
|
||||
class BmsTurnOffDischargeAction : public virtual ActionInterface
|
||||
@ -12,7 +14,7 @@ public:
|
||||
{
|
||||
if (!bms::send6Bit(42405, 249, 0))
|
||||
{
|
||||
Serial.println("Could not turn off discharge mosfet");
|
||||
//Serial.println("Could not turn off discharge mosfet");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
0
main/actions/bmsturnonchargeaction.cpp
Normal file
@ -3,6 +3,8 @@
|
||||
#include "actioninterface.h"
|
||||
#include "bmsutils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BMS
|
||||
class BmsTurnOnChargeAction : public virtual ActionInterface
|
||||
@ -12,7 +14,7 @@ public:
|
||||
{
|
||||
if (!bms::send6Bit(42405, 250, 1))
|
||||
{
|
||||
Serial.println("Could not turn on charge mosfet");
|
||||
//Serial.println("Could not turn on charge mosfet");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
0
main/actions/bmsturnondischargeaction.cpp
Normal file
@ -3,6 +3,8 @@
|
||||
#include "actioninterface.h"
|
||||
#include "bmsutils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
#ifdef FEATURE_BMS
|
||||
class BmsTurnOnDischargeAction : public virtual ActionInterface
|
||||
@ -12,7 +14,7 @@ public:
|
||||
{
|
||||
if (!bms::send6Bit(42405, 249, 1))
|
||||
{
|
||||
Serial.println("Could not turn on discharge mosfet");
|
||||
//Serial.println("Could not turn on discharge mosfet");
|
||||
// TODO: better error handling
|
||||
}
|
||||
}
|
12
main/actions/dividebyzeroaction.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "dividebyzeroaction.h"
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
void DivideByZeroAction::triggered()
|
||||
{
|
||||
int i = 1;
|
||||
i--;
|
||||
int goodbye = 42 / i;
|
||||
ESP_LOGW("BOBBY", "divide by zero %i", goodbye);
|
||||
}
|
10
main/actions/dividebyzeroaction.h
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actioninterface.h"
|
||||
|
||||
class DivideByZeroAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
0
main/actions/erasenvsaction.cpp
Normal file
58
main/actions/erasenvsaction.h
Normal file
@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
// local includes
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
#include "presets.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
class EraseNvsAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override
|
||||
{
|
||||
const auto profile = settingsPersister.currentlyOpenProfileIndex();
|
||||
|
||||
if (!settingsPersister.erase())
|
||||
{
|
||||
ESP_LOGE("BOBBY", "erase() failed");
|
||||
//return;
|
||||
}
|
||||
|
||||
settings = presets::defaultSettings;
|
||||
stringSettings = presets::makeDefaultStringSettings();
|
||||
|
||||
if (!settingsPersister.openCommon())
|
||||
{
|
||||
ESP_LOGE("BOBBY", "openCommon() failed");
|
||||
//return;
|
||||
}
|
||||
|
||||
if (profile)
|
||||
{
|
||||
if (!settingsPersister.openProfile(*profile))
|
||||
{
|
||||
ESP_LOGE("BOBBY", "openProfile(%hhu) failed", *profile);
|
||||
//return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!settingsPersister.load(settings))
|
||||
{
|
||||
ESP_LOGE("BOBBY", "load() for settings failed");
|
||||
//return;
|
||||
}
|
||||
|
||||
if (!settingsPersister.load(stringSettings))
|
||||
{
|
||||
ESP_LOGE("BOBBY", "load() for stringSettings failed");
|
||||
//return;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
0
main/actions/ledstripanimationactions.cpp
Normal file
14
main/actions/ledstripanimationactions.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "actioninterface.h"
|
||||
#include "ledstrip.h"
|
||||
// #include "ledstripdefines.h"
|
||||
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
template<uint16_t type>
|
||||
class LedStripSetAnimationAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override { animation_type = type; }
|
||||
};
|
||||
#endif
|
42
main/actions/ledstripblinkactions.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
#include "ledstripblinkactions.h"
|
||||
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
#include "ledstrip.h"
|
||||
#include "ledstripdefines.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
void LedstripAnimationBlinkNoneAction::triggered()
|
||||
{
|
||||
blinkAnimation = LEDSTRIP_OVERWRITE_NONE;
|
||||
}
|
||||
|
||||
#ifndef LEDSTRIP_WRONG_DIRECTION
|
||||
void LedstripAnimationBlinkLeftAction::triggered()
|
||||
{
|
||||
blinkAnimation = LEDSTRIP_OVERWRITE_BLINKLEFT;
|
||||
}
|
||||
#else
|
||||
void LedstripAnimationBlinkLeftAction::triggered()
|
||||
{
|
||||
blinkAnimation = LEDSTRIP_OVERWRITE_BLINKRIGHT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef LEDSTRIP_WRONG_DIRECTION
|
||||
void LedstripAnimationBlinkRightAction::triggered()
|
||||
{
|
||||
blinkAnimation = LEDSTRIP_OVERWRITE_BLINKRIGHT;
|
||||
}
|
||||
#else
|
||||
void LedstripAnimationBlinkRightAction::triggered()
|
||||
{
|
||||
blinkAnimation = LEDSTRIP_OVERWRITE_BLINKLEFT;
|
||||
}
|
||||
#endif
|
||||
|
||||
void LedstripAnimationBlinkBothAction::triggered()
|
||||
{
|
||||
blinkAnimation = LEDSTRIP_OVERWRITE_BLINKBOTH;
|
||||
}
|
||||
#endif
|
37
main/actions/ledstripblinkactions.h
Normal file
@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef FEATURE_LEDSTRIP
|
||||
#include "actioninterface.h"
|
||||
|
||||
class LedstripAnimationBlinkNoneAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
||||
|
||||
class LedstripAnimationBlinkLeftAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
#ifndef LEDSTRIP_WRONG_DIRECTION
|
||||
void triggered() override;
|
||||
#else
|
||||
void triggered() override;
|
||||
#endif
|
||||
};
|
||||
|
||||
class LedstripAnimationBlinkRightAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
#ifndef LEDSTRIP_WRONG_DIRECTION
|
||||
void triggered() override;
|
||||
#else
|
||||
void triggered() override;
|
||||
#endif
|
||||
};
|
||||
|
||||
class LedstripAnimationBlinkBothAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
||||
#endif
|
0
main/actions/loadsettingsaction.cpp
Normal file
@ -3,6 +3,8 @@
|
||||
#include "actioninterface.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
class LoadSettingsAction : public virtual ActionInterface
|
||||
{
|
0
main/actions/modesettingsaction.cpp
Normal file
45
main/actions/modesettingsaction.h
Normal file
@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "actioninterface.h"
|
||||
#include "globals.h"
|
||||
#include "modes/defaultmode.h"
|
||||
#include "modes/tempomatmode.h"
|
||||
#include "modes/larsmmode.h"
|
||||
#include "modes/gametrakmode.h"
|
||||
#include "modes/motortestmode.h"
|
||||
#include "displays/menus/defaultmodesettingsmenu.h"
|
||||
#include "displays/menus/tempomatmodesettingsmenu.h"
|
||||
#include "displays/menus/larsmmodesettingsmenu.h"
|
||||
#include "displays/menus/gametrakmodesettingsmenu.h"
|
||||
#include "displays/menus/motortestmodesettingsmenu.h"
|
||||
#include "screenmanager.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
class ModeSettingsAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
||||
|
||||
void ModeSettingsAction::triggered()
|
||||
{
|
||||
if (currentMode == &modes::defaultMode)
|
||||
switchScreen<DefaultModeSettingsMenu>();
|
||||
else if (currentMode == &modes::tempomatMode)
|
||||
switchScreen<TempomatModeSettingsMenu>();
|
||||
else if (currentMode == &modes::larsmMode)
|
||||
switchScreen<LarsmModeSettingsMenu>();
|
||||
else if (currentMode == &modes::motortestMode)
|
||||
switchScreen<MotortestModeSettingsMenu>();
|
||||
#ifdef FEATURE_GAMETRAK
|
||||
else if (currentMode == &modes::gametrakMode)
|
||||
switchScreen<GametrakModeSettingsMenu>();
|
||||
#endif
|
||||
else
|
||||
{
|
||||
//Serial.println("Unknown mode, cannot open settings for it");
|
||||
}
|
||||
}
|
||||
}
|
0
main/actions/multiaction.cpp
Normal file
@ -2,6 +2,8 @@
|
||||
|
||||
#include "actioninterface.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
template<typename ...T>
|
||||
class MultiAction;
|
||||
@ -12,11 +14,8 @@ class MultiAction<T> : public virtual ActionInterface
|
||||
public:
|
||||
void triggered() override
|
||||
{
|
||||
m_action.triggered();
|
||||
T{}.triggered();
|
||||
}
|
||||
|
||||
private:
|
||||
T m_action;
|
||||
};
|
||||
|
||||
template<typename T, typename ...Tmore>
|
||||
@ -25,11 +24,8 @@ class MultiAction<T, Tmore...> : public virtual MultiAction<Tmore...>
|
||||
public:
|
||||
void triggered() override
|
||||
{
|
||||
m_action.triggered();
|
||||
T{}.triggered();
|
||||
MultiAction<Tmore...>::triggered();
|
||||
}
|
||||
|
||||
private:
|
||||
T m_action;
|
||||
};
|
||||
}
|
23
main/actions/qraction.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "qraction.h"
|
||||
|
||||
#include <actioninterface.h>
|
||||
#include <string>
|
||||
#include <screenmanager.h>
|
||||
#include "displays/qrdisplay.h"
|
||||
#include "displays/qrimportdisplay.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
SwitchQrDisplayAction::SwitchQrDisplayAction(qraction::QrMenu qrmenu) : m_msg{qrmenu.message}, m_ver{qrmenu.ver} {}
|
||||
|
||||
void SwitchQrDisplayAction::triggered()
|
||||
{
|
||||
switchScreen<QrDisplay>(m_msg, m_ver);
|
||||
}
|
||||
|
||||
SwitchQrImportDisplayAction::SwitchQrImportDisplayAction(std::string nvskey) : m_nvskey{nvskey} {}
|
||||
|
||||
void SwitchQrImportDisplayAction::triggered()
|
||||
{
|
||||
switchScreen<QrImportDisplay>(m_nvskey);
|
||||
}
|
35
main/actions/qraction.h
Normal file
@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <actioninterface.h>
|
||||
#include <string>
|
||||
|
||||
#include "actions/qraction.h"
|
||||
|
||||
namespace qraction {
|
||||
struct QrMenu {
|
||||
std::string message;
|
||||
std::string text;
|
||||
uint8_t ver;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
class SwitchQrDisplayAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
SwitchQrDisplayAction(qraction::QrMenu qrmenu);
|
||||
|
||||
void triggered() override;
|
||||
private:
|
||||
std::string m_msg;
|
||||
uint8_t m_ver;
|
||||
};
|
||||
|
||||
class SwitchQrImportDisplayAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
SwitchQrImportDisplayAction(std::string nvskey);
|
||||
|
||||
void triggered() override;
|
||||
private:
|
||||
std::string m_nvskey;
|
||||
};
|
26
main/actions/rebootaction.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "rebootaction.h"
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_system.h>
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <tftinstance.h>
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "texts.h"
|
||||
|
||||
void RebootAction::triggered()
|
||||
{
|
||||
espgui::tft.fillScreen(TFT_BLACK);
|
||||
espgui::tft.setTextColor(TFT_YELLOW);
|
||||
|
||||
espgui::tft.drawString(TEXT_REBOOT, 5, 5, 4);
|
||||
|
||||
espgui::tft.fillRect(0, 34, espgui::tft.width(), 3, TFT_WHITE);
|
||||
|
||||
espgui::tft.setTextColor(TFT_WHITE);
|
||||
espgui::tft.drawString("Rebooting now...", 0, 50, 4);
|
||||
|
||||
esp_restart();
|
||||
}
|
12
main/actions/rebootaction.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include "actioninterface.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
class RebootAction : public virtual espgui::ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override;
|
||||
};
|
0
main/actions/savesettingsaction.cpp
Normal file
@ -3,6 +3,8 @@
|
||||
#include "actioninterface.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
class SaveSettingsAction : public virtual ActionInterface
|
||||
{
|
0
main/actions/switchprofileaction.cpp
Normal file
18
main/actions/switchprofileaction.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "actioninterface.h"
|
||||
#include "settingsutils.h"
|
||||
|
||||
using namespace espgui;
|
||||
|
||||
namespace {
|
||||
template<uint8_t index>
|
||||
class SwitchProfileAction : public virtual ActionInterface
|
||||
{
|
||||
public:
|
||||
void triggered() override
|
||||
{
|
||||
settingsutils::switchProfile(index);
|
||||
}
|
||||
};
|
||||
}
|