Skip to content

Commit 799c9bc

Browse files
committed
Merge branch 'develop'
2 parents 05c3b01 + 05a53a7 commit 799c9bc

File tree

15 files changed

+83
-70
lines changed

15 files changed

+83
-70
lines changed
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: 9 additions & 8 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

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

Lines changed: 9 additions & 8 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

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

Lines changed: 9 additions & 8 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

.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: 9 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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ HEART RATE HAT is a blood oxygen heart rate sensor. Integrate MAX30102 to provid
2121
## Related Link
2222
See also examples using conventional methods here.
2323

24-
- [Unit HEART & Datasheet](https://docs.m5stack.com/ja/unit/heart)
24+
- [Unit Heart & Datasheet](https://docs.m5stack.com/ja/unit/heart)
2525
- [Hat Heart & Datasheet](https://docs.m5stack.com/en/hat/hat_heart_rate)
2626

2727
## Required Libraries:

examples/UnitUnified/HatHeart/PlotToSerial/main/PlotToSerial.cpp

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,6 @@ void setup()
9393
hat.writeLEDCurrent(1, 0x1F); // IR if (A), Red if (B)
9494
hat.startPeriodicMeasurement();
9595
}
96-
97-
#if 0
98-
uint8_t v{};
99-
hat.readRegister8((uint8_t)0x09, v, 0, false);
100-
M5_LOGI("Mode:%X", v);
101-
hat.readRegister8((uint8_t)0x0A, v, 0, false);
102-
M5_LOGI("SpO2:%X", v);
103-
hat.readRegister8((uint8_t)0x08, v, 0, false);
104-
M5_LOGI("FIFO:%X", v);
105-
hat.readRegister8((uint8_t)0x0C, v, 0, false);
106-
M5_LOGI("LED1:%X", v);
107-
hat.readRegister8((uint8_t)0x0D, v, 0, false);
108-
M5_LOGI("LED2:%X", v);
109-
hat.readRegister8((uint8_t)0x11, v, 0, false);
110-
M5_LOGI("SLOT12:%X", v);
111-
#endif
112-
11396
lcd.clear(TFT_DARKGREEN);
11497

11598
monitor.setSamplingRate(hat.caluculateSamplingRate());
@@ -130,21 +113,21 @@ void loop()
130113
bool beat{};
131114
// MAX30102 is equipped with a FIFO, so multiple data may be stored
132115
while (hat.available()) {
133-
M5.Log.printf("\n>IR:%u\n>RED:%u", hat.ir(), hat.red());
116+
M5.Log.printf(">IR:%u\n>RED:%u\n", hat.ir(), hat.red());
134117
monitor.push_back(hat.ir(), hat.red()); // Push back the oldest data
135-
M5.Log.printf("\n>MIR:%f", monitor.latestIR());
118+
M5.Log.printf(">MIR:%f\n", monitor.latestIR());
136119
monitor.update();
137120
beat |= monitor.isBeat();
138121
hat.discard(); // Discard the oldest data
139122
}
140-
M5.Log.printf("\n>BPM:%f\n>SpO2:%f\n>BEAT:%u\n", monitor.bpm(), monitor.SpO2(), beat);
123+
M5.Log.printf(">BPM:%f\n>SpO2:%f\n>BEAT:%u\n", monitor.bpm(), monitor.SpO2(), beat);
141124
}
142125

143126
// Measure tempeature
144127
if (M5.BtnA.wasClicked()) {
145128
TemperatureData td{};
146129
if (hat.measureTemperatureSingleshot(td)) {
147-
M5.Log.printf("\n>Temp:%f", td.celsius());
130+
M5.Log.printf(">Temp:%f\n", td.celsius());
148131
}
149132
}
150133
}

examples/UnitUnified/UnitHeart/PlotToSerial/main/PlotToSerial.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@ void loop()
8383
bool beat{};
8484
// MAX30100 is equipped with a FIFO, so multiple data may be stored
8585
while (unit.available()) {
86-
M5.Log.printf("\n>IR:%u\n>RED:%u", unit.ir(), unit.red());
86+
M5.Log.printf(">IR:%u\n>RED:%u\n", unit.ir(), unit.red());
8787
monitor.push_back(unit.ir(), unit.red()); // Push back the oldest data
88-
M5.Log.printf("\n>MIR:%f", monitor.latestIR());
88+
M5.Log.printf(">MIR:%f\n", monitor.latestIR());
8989
monitor.update();
9090
beat |= monitor.isBeat();
9191
unit.discard(); // Discard the oldest data
9292
}
93-
M5.Log.printf("\n>BPM:%f\n>SpO2:%f\n>BEAT:%u\n", monitor.bpm(), monitor.SpO2(), beat);
93+
M5.Log.printf(">BPM:%f\n>SpO2:%f\n>BEAT:%u\n", monitor.bpm(), monitor.SpO2(), beat);
9494
}
9595

9696
// Measure tempeature
9797
if (M5.BtnA.wasClicked()) {
9898
TemperatureData td{};
9999
if (unit.measureTemperatureSingleshot(td)) {
100-
M5.Log.printf("\n>Temp:%f", td.celsius());
100+
M5.Log.printf(">Temp:%f\n", td.celsius());
101101
}
102102
}
103103
}

0 commit comments

Comments
 (0)