Skip to content

Commit d9cb394

Browse files
committed
Merge branch 'develop'
2 parents d2831a1 + 1fbc43d commit d9cb394

16 files changed

Lines changed: 123 additions & 70 deletions
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
name: Arduino Lint Check
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ master, main ]
55
pull_request:
6-
branches: [ master ]
6+
branches: [ master, main ]
7+
workflow_dispatch:
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
717
jobs:
818
lint:
919
name: Lint Check
1020
runs-on: ubuntu-latest
1121
steps:
12-
- uses: actions/checkout@v2
13-
- uses: arduino/arduino-lint-action@v1
22+
- uses: actions/checkout@v4
23+
- uses: arduino/arduino-lint-action@v2
1424
with:
1525
library-manager: update
1626
compliance: strict
17-
project-type: all
27+
project-type: all

.github/workflows/arduino-esp-v2-build-check.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ on:
1616
- 'src/unit/**.hpp'
1717
- 'src/unit/**.h'
1818
- 'src/unit/**.c'
19-
- 'test/**.cpp'
20-
- 'test/**.hpp'
21-
- 'test/**.h'
22-
- 'test/**.c'
2319
- 'examples/UnitUnified/**.ino'
2420
- 'examples/UnitUnified/**.cpp'
2521
- 'examples/UnitUnified/**.hpp'
@@ -32,10 +28,6 @@ on:
3228
- 'src/unit/**.hpp'
3329
- 'src/unit/**.h'
3430
- 'src/unit/**.c'
35-
- 'test/**.cpp'
36-
- 'test/**.hpp'
37-
- 'test/**.h'
38-
- 'test/**.c'
3931
- 'examples/UnitUnified/**.ino'
4032
- 'examples/UnitUnified/**.cpp'
4133
- 'examples/UnitUnified/**.hpp'
@@ -44,10 +36,19 @@ on:
4436
- '**arduino-esp-v2-build-check.yml'
4537
workflow_dispatch:
4638

39+
defaults:
40+
run:
41+
shell: bash
42+
43+
concurrency:
44+
group: ${{ github.workflow }}-${{ github.ref }}
45+
cancel-in-progress: true
46+
4747
jobs:
4848
build:
4949
name: ${{ matrix.unit }}:${{ matrix.sketch }}:${{matrix.board}}@${{matrix.platform-version}}
5050
runs-on: ubuntu-latest
51+
timeout-minutes: 5
5152

5253
strategy:
5354
fail-fast: false
@@ -69,7 +70,7 @@ jobs:
6970
- m5stack-fire
7071

7172
include:
72-
# Specific sketches for m5stack-core-esp32 only
73+
# Specific sketches
7374
- sketch: Dump
7475
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
7576
platform: esp32

.github/workflows/arduino-esp-v3-build-check.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ on:
1616
- 'src/unit/**.hpp'
1717
- 'src/unit/**.h'
1818
- 'src/unit/**.c'
19-
- 'test/**.cpp'
20-
- 'test/**.hpp'
21-
- 'test/**.h'
22-
- 'test/**.c'
2319
- 'examples/UnitUnified/**.ino'
2420
- 'examples/UnitUnified/**.cpp'
2521
- 'examples/UnitUnified/**.hpp'
@@ -32,10 +28,6 @@ on:
3228
- 'src/unit/**.hpp'
3329
- 'src/unit/**.h'
3430
- 'src/unit/**.c'
35-
- 'test/**.cpp'
36-
- 'test/**.hpp'
37-
- 'test/**.h'
38-
- 'test/**.c'
3931
- 'examples/UnitUnified/**.ino'
4032
- 'examples/UnitUnified/**.cpp'
4133
- 'examples/UnitUnified/**.hpp'
@@ -44,10 +36,19 @@ on:
4436
- '**arduino-esp-v3-build-check.yml'
4537
workflow_dispatch:
4638

39+
defaults:
40+
run:
41+
shell: bash
42+
43+
concurrency:
44+
group: ${{ github.workflow }}-${{ github.ref }}
45+
cancel-in-progress: true
46+
4747
jobs:
4848
build:
4949
name: ${{ matrix.unit }}:${{ matrix.sketch }}:${{matrix.board}}@${{matrix.platform-version}}
5050
runs-on: ubuntu-latest
51+
timeout-minutes: 5
5152

5253
strategy:
5354
fail-fast: false
@@ -90,7 +91,7 @@ jobs:
9091

9192

9293
include:
93-
# Specific sketches for m5stack-core-esp32 only
94+
# Specific sketches
9495
- sketch: Dump
9596
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
9697
platform-version: 3.0.4

.github/workflows/arduino-m5-build-check.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ on:
1616
- 'src/unit/**.hpp'
1717
- 'src/unit/**.h'
1818
- 'src/unit/**.c'
19-
- 'test/**.cpp'
20-
- 'test/**.hpp'
21-
- 'test/**.h'
22-
- 'test/**.c'
2319
- 'examples/UnitUnified/**.ino'
2420
- 'examples/UnitUnified/**.cpp'
2521
- 'examples/UnitUnified/**.hpp'
@@ -32,10 +28,6 @@ on:
3228
- 'src/unit/**.hpp'
3329
- 'src/unit/**.h'
3430
- 'src/unit/**.c'
35-
- 'test/**.cpp'
36-
- 'test/**.hpp'
37-
- 'test/**.h'
38-
- 'test/**.c'
3931
- 'examples/UnitUnified/**.ino'
4032
- 'examples/UnitUnified/**.cpp'
4133
- 'examples/UnitUnified/**.hpp'
@@ -44,10 +36,19 @@ on:
4436
- '**arduino-m5-build-check.yml'
4537
workflow_dispatch:
4638

39+
defaults:
40+
run:
41+
shell: bash
42+
43+
concurrency:
44+
group: ${{ github.workflow }}-${{ github.ref }}
45+
cancel-in-progress: true
46+
4747
jobs:
4848
build:
4949
name: ${{ matrix.unit }}:${{ matrix.sketch }}:${{matrix.board}}@${{matrix.platform-version}}
5050
runs-on: ubuntu-latest
51+
timeout-minutes: 5
5152

5253
strategy:
5354
fail-fast: false
@@ -90,7 +91,7 @@ jobs:
9091
# - m5stack_unit_cams3
9192

9293
include:
93-
# Specific sketches for m5stack-core-esp32 only
94+
# Specific sketches
9495
- sketch: Dump
9596
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
9697
platform-version: 2.1.2

.github/workflows/clang-format-check.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ on:
3131
- '**.clang-format'
3232
workflow_dispatch:
3333

34+
defaults:
35+
run:
36+
shell: bash
37+
38+
concurrency:
39+
group: ${{ github.workflow }}-${{ github.ref }}
40+
cancel-in-progress: true
41+
3442
jobs:
3543
formatting-check:
3644
name: Formatting Check

.github/workflows/doxygen-gh-pages.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ on: [release, workflow_dispatch]
33
# branches:
44
# - main
55
# - master
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
614
jobs:
715
deploy:
816
runs-on: ubuntu-latest

.github/workflows/platformio-build-check.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
- 'src/unit/**.hpp'
1313
- 'src/unit/**.h'
1414
- 'src/unit/**.c'
15-
- 'test/**.cpp'
16-
- 'test/**.hpp'
17-
- 'test/**.h'
18-
- 'test/**.c'
1915
- 'examples/UnitUnified/**.ino'
2016
- 'examples/UnitUnified/**.cpp'
2117
- 'examples/UnitUnified/**.hpp'
@@ -29,10 +25,6 @@ on:
2925
- 'src/unit/**.hpp'
3026
- 'src/unit/**.h'
3127
- 'src/unit/**.c'
32-
- 'test/**.cpp'
33-
- 'test/**.hpp'
34-
- 'test/**.h'
35-
- 'test/**.c'
3628
- 'examples/UnitUnified/**.ino'
3729
- 'examples/UnitUnified/**.cpp'
3830
- 'examples/UnitUnified/**.hpp'
@@ -42,10 +34,19 @@ on:
4234
- '**platformio.ini'
4335
workflow_dispatch:
4436

37+
defaults:
38+
run:
39+
shell: bash
40+
41+
concurrency:
42+
group: ${{ github.workflow }}-${{ github.ref }}
43+
cancel-in-progress: true
44+
4545
jobs:
4646
build:
4747
name: ${{ matrix.unit }}:${{ matrix.example }}@${{ matrix.board }}:${{ matrix.framework }}:${{ matrix.espressif32 }}
4848
runs-on: ubuntu-latest
49+
timeout-minutes: 5
4950

5051
strategy:
5152
fail-fast: false
@@ -115,6 +116,25 @@ jobs:
115116
# - board: Paper
116117
# espressif32: '4_4_0'
117118

119+
include:
120+
# Specific sketches
121+
- example: Dump
122+
board: Core
123+
framework: Arduino
124+
espressif32: latest
125+
- example: ValueBlock
126+
board: Core
127+
framework: Arduino
128+
espressif32: latest
129+
- example: ReadWrite
130+
board: Core
131+
framework: Arduino
132+
espressif32: latest
133+
- example: NFC
134+
board: Core
135+
framework: Arduino
136+
espressif32: latest
137+
118138
steps:
119139
- name: Checkout
120140
uses: actions/checkout@v4

examples/UnitUnified/DetectDevices/main/DetectDevices.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ void setup()
2929
auto pin_num_sda = M5.getPin(m5::pin_name_t::port_a_sda);
3030
auto pin_num_scl = M5.getPin(m5::pin_name_t::port_a_scl);
3131
M5_LOGI("getPin: SDA:%u SCL:%u", pin_num_sda, pin_num_scl);
32+
Wire.end();
3233
Wire.begin(pin_num_sda, pin_num_scl, 100 * 1000U);
3334

3435
if (!Units.add(unit, Wire) || !Units.begin()) {
@@ -53,7 +54,7 @@ void setup()
5354
lcd.clear(0);
5455
lcd.setCursor(8, 0);
5556
lcd.printf("Please put the devices...");
56-
M5_LOGI("Please put the devices...");
57+
M5.Log.printf("Please put the devices...\n");
5758
}
5859

5960
void loop()
@@ -75,18 +76,18 @@ void loop()
7576
}
7677
// display / logging
7778
if (!devices.empty()) {
78-
M5_LOGI(">>--------------");
79+
M5.Log.printf(">>--------------\n");
7980
M5.Speaker.tone(1000, 20);
8081
lcd.fillRect(0, lcd.fontHeight(), lcd.width(), lcd.height() - lcd.fontHeight(), 0);
8182

8283
uint32_t idx{1};
8384
for (auto&& uid : devices) {
84-
M5_LOGI("UID:%s %s", uid.uidAsString().c_str(), uid.typeAsString().c_str());
85+
M5.Log.printf("UID:%s %s\n", uid.uidAsString().c_str(), uid.typeAsString().c_str());
8586
lcd.setCursor(8, lcd.fontHeight() * idx);
8687
lcd.printf("%s:%s", uid.uidAsString().c_str(), uid.typeAsString().c_str());
8788
++idx;
8889
}
89-
M5_LOGI("<<--------------");
90+
M5.Log.printf("<<--------------\n");
9091
}
9192
m5::utility::delay(1);
9293
}

examples/UnitUnified/Dump/main/Dump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void loop()
6464
UID uid{};
6565
if (unit.activateDevice(uid)) {
6666
M5.Speaker.tone(1000, 20);
67-
M5_LOGI("UID:%s %s", uid.uidAsString().c_str(), uid.typeAsString().c_str());
67+
M5.Log.printf("UID:%s %s\n", uid.uidAsString().c_str(), uid.typeAsString().c_str());
6868
unit.dumpDevice(uid); // Using defaukt keyA if Classic
6969
unit.deactivateDevice();
7070
}

examples/UnitUnified/NFC/main/NFC.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void setup()
5555
lcd.clear(0);
5656
lcd.setCursor(8, 0);
5757
lcd.printf("Please put the devices");
58-
M5_LOGI("Please put the devices");
58+
M5.Log.printf("Please put the devices\n");
5959
}
6060

6161
void nfc_read(const UID& uid)
@@ -103,7 +103,7 @@ void nfc_read(const UID& uid)
103103
for (auto&& r : msg.records()) {
104104
if (r.tnf() == TNF::Wellknown) {
105105
auto s = r.payloadAsString().c_str();
106-
M5_LOGI("R:%u TNF:%u T:%s [%s]", r.required(), r.tnf(), r.type(), s);
106+
M5.Log.printf("R:%u TNF:%u T:%s [%s]\n", r.required(), r.tnf(), r.type(), s);
107107
lcd.printf("T:%s [%s]\n", r.type(), s);
108108
}
109109
}
@@ -150,9 +150,9 @@ void nfc_write(const UID& uid)
150150
if (unit.nfcWriteChangeToNTAGFormat(uid)) {
151151
auto result = unit.nfcWriteDevice(uid, buf, encoded);
152152
if (result) {
153-
M5_LOGI("Write OK");
153+
M5.Log.printf("Write OK\n");
154154
} else {
155-
M5_LOGI("Write NG:%02X", result.error());
155+
M5.Log.printf("Write NG:%02X\n", result.error());
156156
}
157157
} else {
158158
M5_LOGE("Failed to changeToNTAGFormat");
@@ -256,7 +256,7 @@ void loop()
256256
UID uid{};
257257
if (unit.activateDevice(uid)) {
258258
M5.Speaker.tone(1000, 20);
259-
M5_LOGI("UID:%s %s", uid.uidAsString().c_str(), uid.typeAsString().c_str());
259+
M5.Log.printf("UID:%s %s\n", uid.uidAsString().c_str(), uid.typeAsString().c_str());
260260

261261
if (uid.canNFC()) {
262262
nfc_read(uid);
@@ -276,7 +276,7 @@ void loop()
276276
if (unit.activateDevice(uid)) {
277277
if (uid.canNFC()) {
278278
M5.Speaker.tone(2000, 20);
279-
M5_LOGI("UID:%s %s", uid.uidAsString().c_str(), uid.typeAsString().c_str());
279+
M5.Log.printf("UID:%s %s\n", uid.uidAsString().c_str(), uid.typeAsString().c_str());
280280

281281
nfc_write(uid);
282282
// nfc_write_png(uid);

0 commit comments

Comments
 (0)