Skip to content

Commit eb0ae0d

Browse files
author
Michael Haberler
committed
switch back to arduino3
m5unified works lovyan is broken - i2c issue espressif/arduino-esp32#8056
1 parent 4c11da8 commit eb0ae0d

File tree

8 files changed

+24
-17
lines changed

8 files changed

+24
-17
lines changed

Diff for: libraries.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ lib_deps =
2020

2121
[libs_nimble]
2222
lib_deps =
23-
https://github.com/h2zero/NimBLE-Arduino.git#1.4.1
24-
; https://github.com/h2zero/esp-nimble-cpp.git
23+
;https://github.com/h2zero/NimBLE-Arduino.git#1.4.1
24+
https://github.com/h2zero/esp-nimble-cpp.git
2525

2626
[libs_lovyangfx]
2727
lib_deps =
2828
https://github.com/lovyan03/LovyanGFX.git#develop
29-
;https://github.com/lovyan03/LovyanGFX.git#esp32-3.x.x
29+
; https://github.com/lovyan03/LovyanGFX.git#esp32-3.x.x
3030
;https://github.com/mhaberler/LovyanGFX.git#esp32-3.x.x-mah
3131
; /Users/mah/Ballon/src/BalloonWare/graphics/LovyanGFX#esp32-3.x.x-mah
3232

Diff for: lvgl-glue/lv_setup.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define LGFX_AUTODETECT
4545
#include <M5Core2.h>
4646
#include <LovyanGFX.hpp>
47-
#include <LGFX_AUTODETECT.hpp> // クラス"LGFX"を準備
47+
#include <LGFX_AUTODETECT.hpp>
4848
#define SCREEN_WIDTH 320
4949
#define SCREEN_HEIGHT 240
5050
#endif

Diff for: platformio.ini

+4-3
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ board_build.filesystem = littlefs
6363

6464
; bleeding edge Arduino 3.0 alpha -
6565
; see https://github.com/platformio/platform-espressif32/issues/1211#issuecomment-1770625276
66-
;platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
67-
platform = espressif32 @ ^6.5.0
66+
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
67+
;platform = espressif32 @ ^6.5.0
6868
framework = arduino
6969

7070
build_flags =
@@ -93,4 +93,5 @@ build_flags =
9393
; -Wformat
9494
; -Wnonnull
9595
; -Wno-volatile -> scripts/cc_flags.py
96-
96+
97+

Diff for: src/buildinfo.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
#define GIT_REPO_PRESENT 1
55

6-
const char *GIT_REV = "b36eed4-dirty";
6+
const char *GIT_REV = "4c11da8-dirty";
77
const char *GIT_AUTHOR = "Michael Haberler";
8-
const char *GIT_SUBJECT = "NFC needs lvgl locking around nfc ops";
8+
const char *GIT_SUBJECT = "color-unswapped Squareline export";
99
const char *GIT_BRANCH = "lvgl8-observer";
10-
const char *GIT_COMMIT_DATE = "Sun, 11 Feb 2024 06:34:04 +0100";
10+
const char *GIT_COMMIT_DATE = "Sun, 11 Feb 2024 07:08:37 +0100";
1111

1212
#endif

Diff for: src/nfcreader.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ analyseTag(NfcTag &tag, JsonDocument &doc) {
136136
}
137137

138138
void nfc_setup(void) {
139+
#ifdef NFC_NEEDS_LVGL_LOCK
140+
lvgl_acquire();
141+
#endif
139142
#ifdef USE_I2C
140143
#ifdef I2C0_SDA
141144
Wire.begin(I2C0_SDA, I2C0_SCL, I2C0_SPEED);
@@ -150,7 +153,9 @@ void nfc_setup(void) {
150153
nfc.setMifareKey(&key);
151154
MFRC522Debug::PCD_DumpVersionToSerial(
152155
mfrc522, Serial); // Show version of PCD - MFRC522 Card Reader.
153-
156+
#ifdef NFC_NEEDS_LVGL_LOCK
157+
lvgl_release();
158+
#endif
154159
}
155160

156161
void nfc_loop(void) {

Diff for: tags/content/oe-sox-2-tanks.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"id":"5020/16","ut":1,"dsc":"KKS","cap":82.5,"tar":24.5,"full":65,"hgt":1137,"col":"#FF0000","rem":"OE-SOX 2 Tanks","sensors":[{"st":2,"mac":"D8:C6:11:CA:12:55","min":100,"max":857},{"st":3,"mac":"80:EA:CA:11:79:6F"}]},{"id":"5020/27","ut":1,"dsc":"KKS","cap":82.5,"tar":24.5,"ful":65,"hght":1137,"col":"#454C5D","rem":"grau","sensors":[{"st":2,"mac":"C7:D8:88:F2:EB:44","min":100,"max":857},{"st":3,"mac":"82:EA:CA:31:78:C8"}]},{"id":"env","ut":3,"sensors":[{"st":1,"mac":"E6:91:DF:7B:E5:4D"}]},{"id":"oair","ut":4,"sensors":[{"st":1,"mac":"DD:79:C6:8F:BD:A2"}]}]

Diff for: tags/nfctools/oe-sox-2-tanks.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ntgui_version":17,"data":[{"kRecordDescription":"https://static.mah.priv.at/bv/?serial=oe-sox-2-tanks","kRecordSelection":2,"kRecordField1":"https://static.mah.priv.at/bv/?serial=oe-sox-2-tanks","kRecordSize":45,"kRecordObject":{"kTnf":1,"kChunked":false,"kType":[85],"kId":[],"kPayload":[4,115,116,97,116,105,99,46,109,97,104,46,112,114,105,118,46,97,116,47,98,118,47,63,115,101,114,105,97,108,61,111,101,45,115,111,120,45,50,45,116,97,110,107,115]}},{"kRecordDescription":"bw\n[{\"id\":\"5020/16\",\"ut\":1,\"dsc\":\"KKS\",\"cap\":82.5,\"tar\":24.5,\"full\":65,\"hgt\":1137,\"col\":\"#FF0000\",\"rem\":\"OE-SOX 2 Tanks\",\"sensors\":[{\"st\":2,\"mac\":\"D8:C6:11:CA:12:55\",\"min\":100,\"max\":857},{\"st\":3,\"mac\":\"80:EA:CA:11:79:6F\"}]},{\"id\":\"5020/27\",\"ut\":1,\"dsc\":\"KKS\",\"cap\":82.5,\"tar\":24.5,\"ful\":65,\"hght\":1137,\"col\":\"#454C5D\",\"rem\":\"grau\",\"sensors\":[{\"st\":2,\"mac\":\"C7:D8:88:F2:EB:44\",\"min\":100,\"max\":857},{\"st\":3,\"mac\":\"82:EA:CA:31:78:C8\"}]},{\"id\":\"env\",\"ut\":3,\"sensors\":[{\"st\":1,\"mac\":\"E6:91:DF:7B:E5:4D\"}]},{\"id\":\"oair\",\"ut\":4,\"sensors\":[{\"st\":1,\"mac\":\"DD:79:C6:8F:BD:A2\"}]}]","kRecordField2":"[{\"id\":\"5020/16\",\"ut\":1,\"dsc\":\"KKS\",\"cap\":82.5,\"tar\":24.5,\"full\":65,\"hgt\":1137,\"col\":\"#FF0000\",\"rem\":\"OE-SOX 2 Tanks\",\"sensors\":[{\"st\":2,\"mac\":\"D8:C6:11:CA:12:55\",\"min\":100,\"max\":857},{\"st\":3,\"mac\":\"80:EA:CA:11:79:6F\"}]},{\"id\":\"5020/27\",\"ut\":1,\"dsc\":\"KKS\",\"cap\":82.5,\"tar\":24.5,\"ful\":65,\"hght\":1137,\"col\":\"#454C5D\",\"rem\":\"grau\",\"sensors\":[{\"st\":2,\"mac\":\"C7:D8:88:F2:EB:44\",\"min\":100,\"max\":857},{\"st\":3,\"mac\":\"82:EA:CA:31:78:C8\"}]},{\"id\":\"env\",\"ut\":3,\"sensors\":[{\"st\":1,\"mac\":\"E6:91:DF:7B:E5:4D\"}]},{\"id\":\"oair\",\"ut\":4,\"sensors\":[{\"st\":1,\"mac\":\"DD:79:C6:8F:BD:A2\"}]}]","kRecordSelection":9,"kRecordField1":"bw","kRecordSize":566,"kRecordObject":{"kTnf":2,"kChunked":false,"kType":[98,119],"kId":[],"kPayload":[91,123,34,105,100,34,58,34,53,48,50,48,47,49,54,34,44,34,117,116,34,58,49,44,34,100,115,99,34,58,34,75,75,83,34,44,34,99,97,112,34,58,56,50,46,53,44,34,116,97,114,34,58,50,52,46,53,44,34,102,117,108,108,34,58,54,53,44,34,104,103,116,34,58,49,49,51,55,44,34,99,111,108,34,58,34,35,70,70,48,48,48,48,34,44,34,114,101,109,34,58,34,79,69,45,83,79,88,32,50,32,84,97,110,107,115,34,44,34,115,101,110,115,111,114,115,34,58,91,123,34,115,116,34,58,50,44,34,109,97,99,34,58,34,68,56,58,67,54,58,49,49,58,67,65,58,49,50,58,53,53,34,44,34,109,105,110,34,58,49,48,48,44,34,109,97,120,34,58,56,53,55,125,44,123,34,115,116,34,58,51,44,34,109,97,99,34,58,34,56,48,58,69,65,58,67,65,58,49,49,58,55,57,58,54,70,34,125,93,125,44,123,34,105,100,34,58,34,53,48,50,48,47,50,55,34,44,34,117,116,34,58,49,44,34,100,115,99,34,58,34,75,75,83,34,44,34,99,97,112,34,58,56,50,46,53,44,34,116,97,114,34,58,50,52,46,53,44,34,102,117,108,34,58,54,53,44,34,104,103,104,116,34,58,49,49,51,55,44,34,99,111,108,34,58,34,35,52,53,52,67,53,68,34,44,34,114,101,109,34,58,34,103,114,97,117,34,44,34,115,101,110,115,111,114,115,34,58,91,123,34,115,116,34,58,50,44,34,109,97,99,34,58,34,67,55,58,68,56,58,56,56,58,70,50,58,69,66,58,52,52,34,44,34,109,105,110,34,58,49,48,48,44,34,109,97,120,34,58,56,53,55,125,44,123,34,115,116,34,58,51,44,34,109,97,99,34,58,34,56,50,58,69,65,58,67,65,58,51,49,58,55,56,58,67,56,34,125,93,125,44,123,34,105,100,34,58,34,101,110,118,34,44,34,117,116,34,58,51,44,34,115,101,110,115,111,114,115,34,58,91,123,34,115,116,34,58,49,44,34,109,97,99,34,58,34,69,54,58,57,49,58,68,70,58,55,66,58,69,53,58,52,68,34,125,93,125,44,123,34,105,100,34,58,34,111,97,105,114,34,44,34,117,116,34,58,52,44,34,115,101,110,115,111,114,115,34,58,91,123,34,115,116,34,58,49,44,34,109,97,99,34,58,34,68,68,58,55,57,58,67,54,58,56,70,58,66,68,58,65,50,34,125,93,125,93]}}]}

Diff for: working.ini

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build_flags =
1111
${lovyangfx_demo.build_flags}
1212
-DTEST_SPDLOG
1313
-DTEST_NIMBLE
14-
-DNIMBLE_OLDAPI ; needs Nimble-Arduino 1.4.1 on Arduino2
14+
; -DNIMBLE_OLDAPI ; needs Nimble-Arduino 1.4.1 on Arduino2
1515
lib_deps =
1616
h2zero/NimBLE-Arduino@^1.4.1
1717
${libs_lovyangfx.lib_deps}
@@ -151,7 +151,7 @@ build_flags =
151151
${lvgl8_observer_demo_lovyan.build_flags}
152152
; -DTEST_SPDLOG
153153
-DTEST_NIMBLE
154-
-DNIMBLE_OLDAPI
154+
; -DNIMBLE_OLDAPI
155155
; -DNFC_NEEDS_LVGL_LOCK ; does not fix '[Wire.cpp:513] requestFrom(): i2cRead returned Error 263'
156156
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=1
157157
-O0 -g -ggdb
@@ -161,7 +161,7 @@ build_flags =
161161
-DUSE_I2C
162162
-DI2C0_SDA=2
163163
-DI2C0_SCL=1
164-
-DI2C0_SPEED=100000UL
164+
-DI2C0_SPEED=100000L
165165
; -DNDEF_USE_SERIAL=0
166166
; -DNDEF_DEBUG=0
167167
; -DMIFARE_CLASSIC_DEBUG=0
@@ -183,7 +183,7 @@ build_flags =
183183
${lvgl8_observer_demo_m5unfied.build_flags}
184184
; -DTEST_SPDLOG
185185
-DTEST_NIMBLE
186-
-DNIMBLE_OLDAPI
186+
; -DNIMBLE_OLDAPI
187187
-O0 -g -ggdb
188188
-DLV_CONF_PATH='${platformio.src_dir}/../lvgl-glue/lv_conf.h'
189189
; -DLV_PARANOIA=1
@@ -311,9 +311,8 @@ build_flags =
311311
${lvgl_demo_t4s3.build_flags}
312312
; -DTEST_SPDLOG
313313
; -DTRACE_TOUCH
314-
315314
-DTEST_NIMBLE
316-
-DNIMBLE_OLDAPI
315+
; -DNIMBLE_OLDAPI
317316
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=1
318317
-O0 -g -ggdb
319318
-DLV_CONF_PATH='${platformio.src_dir}/../lvgl-glue/lv_conf.h'

0 commit comments

Comments
 (0)