From e22de77e88d681d046749265cc0f21506df894b8 Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 16 Oct 2024 23:35:22 +0900 Subject: [PATCH 01/19] Fixes syntax error --- .github/workflows/clang-format-check.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 0b6b959..6add079 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -13,7 +13,9 @@ on: - '**.c' - '**.inl' - '**clang-format-check.yml' - pull_request: + - '**.clang-format' + pull_request: + paths: - '**.ino' - '**.cpp' - '**.hpp' @@ -21,6 +23,8 @@ on: - '**.c' - '**.inl' - '**clang-format-check.yml' + - '**.clang-format' + workflow_dispatch: jobs: formatting-check: @@ -29,15 +33,15 @@ jobs: strategy: matrix: path: - #- check: './' # path to include - # exclude: '' # path to exclude - check: 'src' + exclude: '' - check: 'test' + exclude: '' - check: 'examples' - # exclude: '(Fonts)' # Exclude file paths containing "Fonts" + exclude: '' steps: - - name: Checkout # When pull_request is used, include it in the checkout https://zenn.dev/hkusu/articles/c731862051438b + - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} From c4a74c078b3387d1267e1f6c6d1d17aba63444c9 Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 16 Oct 2024 23:35:47 +0900 Subject: [PATCH 02/19] Fixes conditions --- .github/workflows/ArduinoBuild_2.yml | 65 +++++++++++++++------------ .github/workflows/ArduinoBuild_3.yml | 64 ++++++++++++++------------ .github/workflows/PlatformioBuild.yml | 57 +++++++++++++++-------- 3 files changed, 109 insertions(+), 77 deletions(-) diff --git a/.github/workflows/ArduinoBuild_2.yml b/.github/workflows/ArduinoBuild_2.yml index 7c08da6..e8464e5 100644 --- a/.github/workflows/ArduinoBuild_2.yml +++ b/.github/workflows/ArduinoBuild_2.yml @@ -8,20 +8,40 @@ env: on: push: + tags-ignore: + - '*.*.*' + branches: + - '*' paths: - - '**.ino' - - '**.cpp' - - '**.hpp' - - '**.h' - - '**.c' + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' - '**ArduinoBuild_2.yml' pull_request: paths: - - '**.ino' - - '**.cpp' - - '**.hpp' - - '**.h' - - '**.c' + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' - '**ArduinoBuild_2.yml' workflow_dispatch: @@ -63,19 +83,6 @@ jobs: - esp32 steps: - - - name: Running on GitHub Actions - if: env.ACT != 'true' - run: echo "This is running on GitHub Actions." - - - name: Running locally with act - if: env.ACT == 'true' - run: echo "This is running locally with act." - -# - name: Configure git for authentication (Until each repository is published) -# run: | -# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/" - - name: Checkout uses: actions/checkout@v4 with: @@ -85,28 +92,28 @@ jobs: # Note that dependent libraries are not automatically installed. - name: Checkout M5Utility - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: m5stack/M5Utility ref: ${{ env.M5UNITUNIFIED_BRANCH }} path: CustomLibrary_M5Utility # must contain string "Custom" - token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo + #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - name: Checkout M5HAL - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: m5stack/M5HAL ref: ${{ env.M5UNITUNIFIED_BRANCH }} path: CustomLibrary_M5HAL # must contain string "Custom" - token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo + #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - name: Checkout M5UnitUnified - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: m5stack/M5UnitUnified ref: ${{ env.M5UNITUNIFIED_BRANCH }} path: CustomLibrary_M5UnitUnified - token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo + #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo # Build - name: Compile examples diff --git a/.github/workflows/ArduinoBuild_3.yml b/.github/workflows/ArduinoBuild_3.yml index 455614e..ec69cc6 100644 --- a/.github/workflows/ArduinoBuild_3.yml +++ b/.github/workflows/ArduinoBuild_3.yml @@ -3,25 +3,45 @@ name: ArduinoBuild(platform-version 3.x) env: SKETCH_NAMES_FIND_START: ./examples/UnitUnified REQUIRED_LIBRARIES: M5Unified -# M5UNITUNIFIED_BRANCH: main - M5UNITUNIFIED_BRANCH: develop + M5UNITUNIFIED_BRANCH: main +# M5UNITUNIFIED_BRANCH: develop on: push: + tags-ignore: + - '*.*.*' + branches: + - '*' paths: - - '**.ino' - - '**.cpp' - - '**.hpp' - - '**.h' - - '**.c' + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' - '**ArduinoBuild_3.yml' pull_request: paths: - - '**.ino' - - '**.cpp' - - '**.hpp' - - '**.h' - - '**.c' + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' - '**ArduinoBuild_3.yml' workflow_dispatch: @@ -69,19 +89,6 @@ jobs: - esp32 steps: - - - name: Running on GitHub Actions - if: env.ACT != 'true' - run: echo "This is running on GitHub Actions." - - - name: Running locally with act - if: env.ACT == 'true' - run: echo "This is running locally with act." - -# - name: Configure git for authentication (Until each repository is published) -# run: | -# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/" - - name: Checkout uses: actions/checkout@v4 with: @@ -90,14 +97,13 @@ jobs: # Checkout library from specific URL and branch # Note that dependent libraries are not automatically installed. - - name: Checkout M5Utility uses: actions/checkout@v3 with: repository: m5stack/M5Utility ref: ${{ env.M5UNITUNIFIED_BRANCH }} path: CustomLibrary_M5Utility # must contain string "Custom" - token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo + #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - name: Checkout M5HAL uses: actions/checkout@v3 @@ -105,7 +111,7 @@ jobs: repository: m5stack/M5HAL ref: ${{ env.M5UNITUNIFIED_BRANCH }} path: CustomLibrary_M5HAL # must contain string "Custom" - token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo + #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - name: Checkout M5UnitUnified uses: actions/checkout@v3 @@ -113,7 +119,7 @@ jobs: repository: m5stack/M5UnitUnified ref: ${{ env.M5UNITUNIFIED_BRANCH }} path: CustomLibrary_M5UnitUnified - token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo + #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo # Build - name: Compile examples diff --git a/.github/workflows/PlatformioBuild.yml b/.github/workflows/PlatformioBuild.yml index 5ef30a7..ac6a3f4 100644 --- a/.github/workflows/PlatformioBuild.yml +++ b/.github/workflows/PlatformioBuild.yml @@ -2,29 +2,48 @@ name: PlatformIOBuild on: push: + tags-ignore: + - '*.*.*' + branches: + - '*' paths: - - '**.ino' - - '**.cpp' - - '**.hpp' - - '**.h' - - '**.c' - - '**PlatformioBuild.yml' - - '**platformio.ini' + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' + - '**PlatformioBuild.yml' + - '**platformio.ini' pull_request: paths: - - '**.ino' - - '**.cpp' - - '**.hpp' - - '**.h' - - '**.c' - - '**PlatformioBuild.yml' - - '**platformio.ini' + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' + - '**PlatformioBuild.yml' + - '**platformio.ini' workflow_dispatch: jobs: build: name: ${{ matrix.unit }}:${{ matrix.example }}:${{ matrix.board }}:${{ matrix.framework }}@${{ matrix.espressif32 }} -# name: ${{ matrix.unit }}_${{ matrix.example }}_${{ matrix.board }}_${{ matrix.framework }}_${{ matrix.espressif32 }} runs-on: ubuntu-latest strategy: @@ -96,9 +115,9 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Configure git for authentication (Until each repository is published) - run: | - git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/" +# - name: Configure git for authentication (Until each repository is published) +# run: | +# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/" - name: Build examples uses: karniv00l/platformio-run-action@v1 @@ -109,5 +128,5 @@ jobs: project-conf: "./platformio.ini" #jobs: 6 #silent: false - #verbose: truee + verbose: true #disable-auto-clean: false From 72d11de6b44fbf11342cccabf065cdf9b6bd8cdd Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 16 Oct 2024 23:36:22 +0900 Subject: [PATCH 03/19] Add GitHub Pages URL --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 585aa38..4b8f493 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,14 @@ See also examples using conventional methods here. ## License -- [M5Unit-METER- MIT](LICENSE) +- [M5Unit-METER - MIT](LICENSE) ## Examples See also [examples/UnitUnified](examples/UnitUnified) ## Doxygen document +[GitHub Pages](https://m5stack.github.io/M5Unit-METER/) + If you want to generate documents on your local machine, execute the following command ``` From ce2aaf4bc500cdbf2677f66b8c2e5989b7f3ffda Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 16 Oct 2024 23:37:02 +0900 Subject: [PATCH 04/19] Some tweaks --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index bf28d98..60d8c99 100644 --- a/library.properties +++ b/library.properties @@ -3,7 +3,7 @@ version=0.0.1 author=M5Stack maintainer=M5Stack sentence=Library for M5Stack UNIT METER using M5UnitUnified -paragraph= +paragraph=See more on http://M5Stack.com category=Device Control url=https://github.com/m5stack/M5Unit-METER architectures=esp32 From 926437d53ab11790283ea263676535fae62649a2 Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 16 Oct 2024 23:37:28 +0900 Subject: [PATCH 05/19] Some tweaks --- src/unit/unit_KmeterISO.cpp | 2 +- test/embedded/avmeter_template.hpp | 3 --- test/embedded/test_kmeterISO/kmeterISO_test.cpp | 8 ++++++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/unit/unit_KmeterISO.cpp b/src/unit/unit_KmeterISO.cpp index 08f83dc..88bad32 100644 --- a/src/unit/unit_KmeterISO.cpp +++ b/src/unit/unit_KmeterISO.cpp @@ -160,8 +160,8 @@ bool UnitKmeterISO::changeI2CAddress(const uint8_t i2c_address) bool done{}; auto timeout_at = m5::utility::millis() + 1000; do { - done = readRegister8(I2C_ADDRESS_REG, v, 0) && v == i2c_address; m5::utility::delay(1); + done = readRegister8(I2C_ADDRESS_REG, v, 0) && v == i2c_address; } while (!done && m5::utility::millis() <= timeout_at); return done; } diff --git a/test/embedded/avmeter_template.hpp b/test/embedded/avmeter_template.hpp index ed37471..2c72201 100644 --- a/test/embedded/avmeter_template.hpp +++ b/test/embedded/avmeter_template.hpp @@ -6,9 +6,6 @@ /* UnitTest for UnitADS111x */ - -// Move to each libarry - #include #include #include diff --git a/test/embedded/test_kmeterISO/kmeterISO_test.cpp b/test/embedded/test_kmeterISO/kmeterISO_test.cpp index 2c36c5d..faf3c46 100644 --- a/test/embedded/test_kmeterISO/kmeterISO_test.cpp +++ b/test/embedded/test_kmeterISO/kmeterISO_test.cpp @@ -148,6 +148,8 @@ TEST_P(TestKmeterISO, I2CAddress) EXPECT_TRUE(unit->changeI2CAddress(0x08)); EXPECT_TRUE(unit->readI2CAddress(addr)); EXPECT_EQ(addr, 0x08); + EXPECT_EQ(unit->address(), 0x08); + EXPECT_TRUE(unit->readFirmwareVersion(ver)); EXPECT_NE(ver, 0x00); EXPECT_TRUE(unit->measureSingleshot(d)); @@ -156,6 +158,8 @@ TEST_P(TestKmeterISO, I2CAddress) EXPECT_TRUE(unit->changeI2CAddress(0x77)); EXPECT_TRUE(unit->readI2CAddress(addr)); EXPECT_EQ(addr, 0x77); + EXPECT_EQ(unit->address(), 0x77); + EXPECT_TRUE(unit->readFirmwareVersion(ver)); EXPECT_NE(ver, 0x00); EXPECT_TRUE(unit->measureSingleshot(d)); @@ -164,6 +168,8 @@ TEST_P(TestKmeterISO, I2CAddress) EXPECT_TRUE(unit->changeI2CAddress(0x52)); EXPECT_TRUE(unit->readI2CAddress(addr)); EXPECT_EQ(addr, 0x52); + EXPECT_EQ(unit->address(), 0528); + EXPECT_TRUE(unit->readFirmwareVersion(ver)); EXPECT_NE(ver, 0x00); EXPECT_TRUE(unit->measureSingleshot(d)); @@ -172,6 +178,8 @@ TEST_P(TestKmeterISO, I2CAddress) EXPECT_TRUE(unit->changeI2CAddress(UnitKmeterISO::DEFAULT_ADDRESS)); EXPECT_TRUE(unit->readI2CAddress(addr)); EXPECT_EQ(addr, +UnitKmeterISO::DEFAULT_ADDRESS); + EXPECT_EQ(unit->address(), +UnitKmeterISO::DEFAULT_ADDRESS); + EXPECT_TRUE(unit->readFirmwareVersion(ver)); EXPECT_NE(ver, 0x00); EXPECT_TRUE(unit->measureSingleshot(d)); From 05d6f6be0e1035ee738ee8151004370f18ac24ed Mon Sep 17 00:00:00 2001 From: GOB Date: Thu, 17 Oct 2024 00:06:02 +0900 Subject: [PATCH 06/19] Fixes wrong path and use checkout@v4 --- .github/workflows/ArduinoBuild_3.yml | 6 +++--- .github/workflows/PlatformioBuild.yml | 2 +- .../PlotToSerial/PlotToSerial.ino | 0 .../PlotToSerial/main/PlotToSerial.cpp | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename examples/UnitUnified/{UnitKMeterISO => UnitKmeterISO}/PlotToSerial/PlotToSerial.ino (100%) rename examples/UnitUnified/{UnitKMeterISO => UnitKmeterISO}/PlotToSerial/main/PlotToSerial.cpp (100%) diff --git a/.github/workflows/ArduinoBuild_3.yml b/.github/workflows/ArduinoBuild_3.yml index ec69cc6..2e33b2c 100644 --- a/.github/workflows/ArduinoBuild_3.yml +++ b/.github/workflows/ArduinoBuild_3.yml @@ -98,7 +98,7 @@ jobs: # Note that dependent libraries are not automatically installed. - name: Checkout M5Utility - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: m5stack/M5Utility ref: ${{ env.M5UNITUNIFIED_BRANCH }} @@ -106,7 +106,7 @@ jobs: #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - name: Checkout M5HAL - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: m5stack/M5HAL ref: ${{ env.M5UNITUNIFIED_BRANCH }} @@ -114,7 +114,7 @@ jobs: #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - name: Checkout M5UnitUnified - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: m5stack/M5UnitUnified ref: ${{ env.M5UNITUNIFIED_BRANCH }} diff --git a/.github/workflows/PlatformioBuild.yml b/.github/workflows/PlatformioBuild.yml index ac6a3f4..a0bdb8d 100644 --- a/.github/workflows/PlatformioBuild.yml +++ b/.github/workflows/PlatformioBuild.yml @@ -128,5 +128,5 @@ jobs: project-conf: "./platformio.ini" #jobs: 6 #silent: false - verbose: true + #verbose: true #disable-auto-clean: false diff --git a/examples/UnitUnified/UnitKMeterISO/PlotToSerial/PlotToSerial.ino b/examples/UnitUnified/UnitKmeterISO/PlotToSerial/PlotToSerial.ino similarity index 100% rename from examples/UnitUnified/UnitKMeterISO/PlotToSerial/PlotToSerial.ino rename to examples/UnitUnified/UnitKmeterISO/PlotToSerial/PlotToSerial.ino diff --git a/examples/UnitUnified/UnitKMeterISO/PlotToSerial/main/PlotToSerial.cpp b/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp similarity index 100% rename from examples/UnitUnified/UnitKMeterISO/PlotToSerial/main/PlotToSerial.cpp rename to examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp From cd610bda27c1a8778d6f7c11592bb5722c210f3b Mon Sep 17 00:00:00 2001 From: GOB Date: Thu, 17 Oct 2024 00:13:29 +0900 Subject: [PATCH 07/19] Fixes unit name --- .github/workflows/ArduinoBuild_2.yml | 2 +- .github/workflows/ArduinoBuild_3.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ArduinoBuild_2.yml b/.github/workflows/ArduinoBuild_2.yml index e8464e5..ca7afc0 100644 --- a/.github/workflows/ArduinoBuild_2.yml +++ b/.github/workflows/ArduinoBuild_2.yml @@ -60,7 +60,7 @@ jobs: unit: - UnitAmeter - UnitVmeter - - UnitKMeterISO + - UnitKmeterISO sketch: - PlotToSerial diff --git a/.github/workflows/ArduinoBuild_3.yml b/.github/workflows/ArduinoBuild_3.yml index 2e33b2c..2fba2de 100644 --- a/.github/workflows/ArduinoBuild_3.yml +++ b/.github/workflows/ArduinoBuild_3.yml @@ -60,7 +60,7 @@ jobs: unit: - UnitAmeter - UnitVmeter - - UnitKMeterISO + - UnitKmeterISO sketch: - PlotToSerial From f596656f8dc6cb9e776827be9158e686db0eb5c7 Mon Sep 17 00:00:00 2001 From: GOB Date: Thu, 17 Oct 2024 12:25:58 +0900 Subject: [PATCH 08/19] Fixes conditions --- .github/workflows/clang-format-check.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 6add079..13f125f 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -5,6 +5,11 @@ env: on: push: + tags-ignore: + - '*.*.*' + - 'v*.*.*' + branches: + - '*' paths: - '**.ino' - '**.cpp' From 31a83072e1eedea1c936e39ccdb3ec0e27a4a9bf Mon Sep 17 00:00:00 2001 From: GOB Date: Thu, 17 Oct 2024 16:54:50 +0900 Subject: [PATCH 09/19] Fixes depends libraries and cosmetic change --- .github/workflows/ArduinoBuild_2.yml | 31 +-------------------------- .github/workflows/ArduinoBuild_3.yml | 31 +-------------------------- .github/workflows/PlatformioBuild.yml | 4 ---- 3 files changed, 2 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ArduinoBuild_2.yml b/.github/workflows/ArduinoBuild_2.yml index ca7afc0..3dbbc79 100644 --- a/.github/workflows/ArduinoBuild_2.yml +++ b/.github/workflows/ArduinoBuild_2.yml @@ -2,9 +2,7 @@ name: ArduinoBuild(platform-version 2.x) env: SKETCH_NAMES_FIND_START: ./examples/UnitUnified - REQUIRED_LIBRARIES: M5Unified - M5UNITUNIFIED_BRANCH: main -# M5UNITUNIFIED_BRANCH: develop + REQUIRED_LIBRARIES: M5Unified,M5UnitUnified on: push: @@ -88,33 +86,6 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - # Checkout library from specific URL and branch - # Note that dependent libraries are not automatically installed. - - - name: Checkout M5Utility - uses: actions/checkout@v4 - with: - repository: m5stack/M5Utility - ref: ${{ env.M5UNITUNIFIED_BRANCH }} - path: CustomLibrary_M5Utility # must contain string "Custom" - #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - - - name: Checkout M5HAL - uses: actions/checkout@v4 - with: - repository: m5stack/M5HAL - ref: ${{ env.M5UNITUNIFIED_BRANCH }} - path: CustomLibrary_M5HAL # must contain string "Custom" - #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - - - name: Checkout M5UnitUnified - uses: actions/checkout@v4 - with: - repository: m5stack/M5UnitUnified - ref: ${{ env.M5UNITUNIFIED_BRANCH }} - path: CustomLibrary_M5UnitUnified - #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - # Build - name: Compile examples uses: ArminJo/arduino-test-compile@master diff --git a/.github/workflows/ArduinoBuild_3.yml b/.github/workflows/ArduinoBuild_3.yml index 2fba2de..ba8eb81 100644 --- a/.github/workflows/ArduinoBuild_3.yml +++ b/.github/workflows/ArduinoBuild_3.yml @@ -2,9 +2,7 @@ name: ArduinoBuild(platform-version 3.x) env: SKETCH_NAMES_FIND_START: ./examples/UnitUnified - REQUIRED_LIBRARIES: M5Unified - M5UNITUNIFIED_BRANCH: main -# M5UNITUNIFIED_BRANCH: develop + REQUIRED_LIBRARIES: M5Unified,M5UnitUnified on: push: @@ -94,33 +92,6 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - # Checkout library from specific URL and branch - # Note that dependent libraries are not automatically installed. - - - name: Checkout M5Utility - uses: actions/checkout@v4 - with: - repository: m5stack/M5Utility - ref: ${{ env.M5UNITUNIFIED_BRANCH }} - path: CustomLibrary_M5Utility # must contain string "Custom" - #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - - - name: Checkout M5HAL - uses: actions/checkout@v4 - with: - repository: m5stack/M5HAL - ref: ${{ env.M5UNITUNIFIED_BRANCH }} - path: CustomLibrary_M5HAL # must contain string "Custom" - #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - - - name: Checkout M5UnitUnified - uses: actions/checkout@v4 - with: - repository: m5stack/M5UnitUnified - ref: ${{ env.M5UNITUNIFIED_BRANCH }} - path: CustomLibrary_M5UnitUnified - #token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo - # Build - name: Compile examples uses: ArminJo/arduino-test-compile@master diff --git a/.github/workflows/PlatformioBuild.yml b/.github/workflows/PlatformioBuild.yml index a0bdb8d..1ad15cb 100644 --- a/.github/workflows/PlatformioBuild.yml +++ b/.github/workflows/PlatformioBuild.yml @@ -115,10 +115,6 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} -# - name: Configure git for authentication (Until each repository is published) -# run: | -# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/" - - name: Build examples uses: karniv00l/platformio-run-action@v1 with: From ddc939ff4f2319145a39f586cdeb18f3e0d34bf1 Mon Sep 17 00:00:00 2001 From: GOB Date: Thu, 17 Oct 2024 17:50:03 +0900 Subject: [PATCH 10/19] Fixes wrong settings --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index c94b126..7e57bd3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -493,7 +493,7 @@ extends=Core, option_release, arduino_5_4_0 build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> [env:UnitKmeterISO_PlotToSerial_Core_Arduino_4_4_0] -extends=Core, option_release, arduino_5_4_0 +extends=Core, option_release, arduino_4_4_0 build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> [env:UnitKmeterISO_PlotToSerial_Core2_Arduino_latest] From cc8eea33430fb6a8402e334bbd653b2e9917e119 Mon Sep 17 00:00:00 2001 From: GOB Date: Fri, 18 Oct 2024 16:26:07 +0900 Subject: [PATCH 11/19] Rename and fixes conditions --- ...d_2.yml => arduino-esp-v2-build-check.yml} | 23 ++-- ...d_3.yml => arduino-esp-v3-build-check.yml} | 36 ++++-- .github/workflows/arduino-m5-build-check.yml | 121 ++++++++++++++++++ 3 files changed, 159 insertions(+), 21 deletions(-) rename .github/workflows/{ArduinoBuild_2.yml => arduino-esp-v2-build-check.yml} (89%) rename .github/workflows/{ArduinoBuild_3.yml => arduino-esp-v3-build-check.yml} (81%) create mode 100644 .github/workflows/arduino-m5-build-check.yml diff --git a/.github/workflows/ArduinoBuild_2.yml b/.github/workflows/arduino-esp-v2-build-check.yml similarity index 89% rename from .github/workflows/ArduinoBuild_2.yml rename to .github/workflows/arduino-esp-v2-build-check.yml index 3dbbc79..2b9d9ef 100644 --- a/.github/workflows/ArduinoBuild_2.yml +++ b/.github/workflows/arduino-esp-v2-build-check.yml @@ -1,4 +1,4 @@ -name: ArduinoBuild(platform-version 2.x) +name: Build(arduino-esp32:2.x) env: SKETCH_NAMES_FIND_START: ./examples/UnitUnified @@ -24,7 +24,7 @@ on: - 'examples/UnitUnified/**.hpp' - 'examples/UnitUnified/**.h' - 'examples/UnitUnified/**.c' - - '**ArduinoBuild_2.yml' + - '**arduino-esp-v2-build-check.yml' pull_request: paths: - 'src/unit/**.cpp' @@ -40,7 +40,7 @@ on: - 'examples/UnitUnified/**.hpp' - 'examples/UnitUnified/**.h' - 'examples/UnitUnified/**.c' - - '**ArduinoBuild_2.yml' + - '**arduino-esp-v2-build-check.yml' workflow_dispatch: jobs: @@ -55,23 +55,28 @@ jobs: platform-url: - https://espressif.github.io/arduino-esp32/package_esp32_index.json + sketch: + - PlotToSerial + unit: - UnitAmeter - UnitVmeter - UnitKmeterISO - sketch: - - PlotToSerial - board: + - m5stack-atom + - m5stack-atoms3 - m5stack-core-esp32 - m5stack-core2 - - m5stack-atoms3 +# - m5stack-coreink - m5stack-cores3 +# - m5stack-fire +# - m5stack-station +# - m5stack-timer-cam +# - m5stamp-pico +# - m5stick-c platform-version: - #- 2.0.15 - #- 2.0.16 - 2.0.17 platform: diff --git a/.github/workflows/ArduinoBuild_3.yml b/.github/workflows/arduino-esp-v3-build-check.yml similarity index 81% rename from .github/workflows/ArduinoBuild_3.yml rename to .github/workflows/arduino-esp-v3-build-check.yml index ba8eb81..91ca330 100644 --- a/.github/workflows/ArduinoBuild_3.yml +++ b/.github/workflows/arduino-esp-v3-build-check.yml @@ -1,4 +1,4 @@ -name: ArduinoBuild(platform-version 3.x) +name: Build(arduino-esp32:3.x) env: SKETCH_NAMES_FIND_START: ./examples/UnitUnified @@ -24,7 +24,7 @@ on: - 'examples/UnitUnified/**.hpp' - 'examples/UnitUnified/**.h' - 'examples/UnitUnified/**.c' - - '**ArduinoBuild_3.yml' + - '**arduino-esp-v3-build-check.yml' pull_request: paths: - 'src/unit/**.cpp' @@ -40,7 +40,7 @@ on: - 'examples/UnitUnified/**.hpp' - 'examples/UnitUnified/**.h' - 'examples/UnitUnified/**.c' - - '**ArduinoBuild_3.yml' + - '**arduino-esp-v3-build-check.yml' workflow_dispatch: jobs: @@ -55,29 +55,42 @@ jobs: platform-url: - https://espressif.github.io/arduino-esp32/package_esp32_index.json + sketch: + - PlotToSerial + unit: - UnitAmeter - UnitVmeter - UnitKmeterISO - sketch: - - PlotToSerial - board: + - m5stack_atom + - m5stack_atoms3 + - m5stack_capsule +# - m5stack_cardputer - m5stack_core - m5stack_core2 - - m5stack_atoms3 +# - m5stack_coreink - m5stack_cores3 - m5stack_dial +# - m5stack_dinmeter + - m5stack_fire - m5stack_nanoc6 - m5stack_paper +# - m5stack_poe_cam +# - m5stack_stamp_c3 +# - m5stack_stamp_pico + - m5stack_stamp_s3 +# - m5stack_station +# - m5stack_stickc - m5stack_stickc_plus + - m5stack_stickc_plus2 +# - m5stack_timer_cam +# - m5stack_tough +# - m5stack_unit_cam +# - m5stack_unit_cams3 platform-version: - #- 3.0.0 - #- 3.0.1 - #- 3.0.2 - #- 3.0.3 - 3.0.4 platform: @@ -105,4 +118,3 @@ jobs: sketch-names: ${{ matrix.sketch }}.ino sketch-names-find-start: ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }} #sketches-exclude: ${{ matrix.sketches-exclude }} - diff --git a/.github/workflows/arduino-m5-build-check.yml b/.github/workflows/arduino-m5-build-check.yml new file mode 100644 index 0000000..5a1ffd1 --- /dev/null +++ b/.github/workflows/arduino-m5-build-check.yml @@ -0,0 +1,121 @@ +name: Build(arduino-m5stack) + +env: + SKETCH_NAMES_FIND_START: ./examples/UnitUnified + REQUIRED_LIBRARIES: M5Unified,M5UnitUnified + +on: + push: + tags-ignore: + - '*.*.*' + branches: + - '*' + paths: + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' + - '**arduino-m5-build-check.yml' + pull_request: + paths: + - 'src/unit/**.cpp' + - 'src/unit/**.hpp' + - 'src/unit/**.h' + - 'src/unit/**.c' + - 'test/**.cpp' + - 'test/**.hpp' + - 'test/**.h' + - 'test/**.c' + - 'examples/UnitUnified/**.ino' + - 'examples/UnitUnified/**.cpp' + - 'examples/UnitUnified/**.hpp' + - 'examples/UnitUnified/**.h' + - 'examples/UnitUnified/**.c' + - '**arduino-m5-build-check.yml' + workflow_dispatch: + +jobs: + build: + name: ${{ matrix.unit }}:${{ matrix.sketch }}:${{matrix.board}}@${{matrix.platform-version}} + runs-on: ubuntu-latest + + strategy: + fail-fast: false +# max-parallel: 1 + matrix: + platform-url: + - https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json + + sketch: + - PlotToSerial + + unit: + - UnitAmeter + - UnitVmeter + - UnitKmeterISO + + board: + - m5stack_atom + - m5stack_atoms3 + - m5stack_atoms3r + - m5stack_capsule +# - m5stack_cardputer + - m5stack_core + - m5stack_core2 +# - m5stack_coreink + - m5stack_cores3 + - m5stack_dial +# - m5stack_dinmeter + - m5stack_fire + - m5stack_paper +# - m5stack_poe_cam +# - m5stack_stamp_c3 +# - m5stack_stamp_pico + - m5stack_stamp_s3 +# - m5stack_station +# - m5stack_stickc + - m5stack_stickc_plus + - m5stack_stickc_plus2 +# - m5stack_timer_cam +# - m5stack_tough +# - m5stack_unit_cam +# - m5stack_unit_cams3 + + platform-version: + - 2.1.2 + + platform: + - m5stack + + archi: + - esp32 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + # Build + - name: Compile examples + uses: ArminJo/arduino-test-compile@master + with: + arduino-board-fqbn: ${{ matrix.platform }}:${{ matrix.archi }}:${{ matrix.board }} + arduino-platform: ${{ matrix.platform }}:${{ matrix.archi }}@${{ matrix.platform-version }} + platform-url: ${{ matrix.platform-url }} + required-libraries: ${{ env.REQUIRED_LIBRARIES }} + extra-arduino-cli-args: ${{ matrix.cli-args }} + #build-properties: ${{ toJson(matrix.build-properties) }} + sketch-names: ${{ matrix.sketch }}.ino + sketch-names-find-start: ${{ env.SKETCH_NAMES_FIND_START }}/${{ matrix.unit }} + #sketches-exclude: ${{ matrix.sketches-exclude }} + From 8cb83b13c7da017c69225815e0fb916ecf63e0f0 Mon Sep 17 00:00:00 2001 From: GOB Date: Fri, 18 Oct 2024 16:28:54 +0900 Subject: [PATCH 12/19] Fixes conditions --- .github/workflows/arduino-esp-v2-build-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arduino-esp-v2-build-check.yml b/.github/workflows/arduino-esp-v2-build-check.yml index 2b9d9ef..38f1bc0 100644 --- a/.github/workflows/arduino-esp-v2-build-check.yml +++ b/.github/workflows/arduino-esp-v2-build-check.yml @@ -70,7 +70,7 @@ jobs: - m5stack-core2 # - m5stack-coreink - m5stack-cores3 -# - m5stack-fire + - m5stack-fire # - m5stack-station # - m5stack-timer-cam # - m5stamp-pico From 75a4a3c9d88d88b006fced8b558b7dd29c1deff9 Mon Sep 17 00:00:00 2001 From: GOB Date: Mon, 21 Oct 2024 19:16:17 +0900 Subject: [PATCH 13/19] Add supported cores --- .../workflows/arduino-esp-v2-build-check.yml | 7 +- .../workflows/arduino-esp-v3-build-check.yml | 5 +- .github/workflows/arduino-m5-build-check.yml | 12 +- ...ioBuild.yml => platformio-build-check.yml} | 98 ++++++------ boards/m5stack-atoms3r.json | 41 +++++ boards/m5stick-cplus2.json | 40 +++++ .../PlotToSerial/main/PlotToSerial.cpp | 7 - platformio.ini | 148 +++++++++++++++++- .../test_kmeterISO/kmeterISO_test.cpp | 2 +- 9 files changed, 288 insertions(+), 72 deletions(-) rename .github/workflows/{PlatformioBuild.yml => platformio-build-check.yml} (51%) create mode 100644 boards/m5stack-atoms3r.json create mode 100644 boards/m5stick-cplus2.json diff --git a/.github/workflows/arduino-esp-v2-build-check.yml b/.github/workflows/arduino-esp-v2-build-check.yml index 38f1bc0..67584b4 100644 --- a/.github/workflows/arduino-esp-v2-build-check.yml +++ b/.github/workflows/arduino-esp-v2-build-check.yml @@ -8,6 +8,7 @@ on: push: tags-ignore: - '*.*.*' + - 'v*.*.*' branches: - '*' paths: @@ -68,13 +69,9 @@ jobs: - m5stack-atoms3 - m5stack-core-esp32 - m5stack-core2 -# - m5stack-coreink + - m5stack-coreink - m5stack-cores3 - m5stack-fire -# - m5stack-station -# - m5stack-timer-cam -# - m5stamp-pico -# - m5stick-c platform-version: - 2.0.17 diff --git a/.github/workflows/arduino-esp-v3-build-check.yml b/.github/workflows/arduino-esp-v3-build-check.yml index 91ca330..bcbdf3f 100644 --- a/.github/workflows/arduino-esp-v3-build-check.yml +++ b/.github/workflows/arduino-esp-v3-build-check.yml @@ -3,11 +3,11 @@ name: Build(arduino-esp32:3.x) env: SKETCH_NAMES_FIND_START: ./examples/UnitUnified REQUIRED_LIBRARIES: M5Unified,M5UnitUnified - on: push: tags-ignore: - '*.*.*' + - 'v*.*.*' branches: - '*' paths: @@ -70,10 +70,9 @@ jobs: # - m5stack_cardputer - m5stack_core - m5stack_core2 -# - m5stack_coreink + - m5stack_coreink - m5stack_cores3 - m5stack_dial -# - m5stack_dinmeter - m5stack_fire - m5stack_nanoc6 - m5stack_paper diff --git a/.github/workflows/arduino-m5-build-check.yml b/.github/workflows/arduino-m5-build-check.yml index 5a1ffd1..5c5ba87 100644 --- a/.github/workflows/arduino-m5-build-check.yml +++ b/.github/workflows/arduino-m5-build-check.yml @@ -8,6 +8,7 @@ on: push: tags-ignore: - '*.*.*' + - 'v*.*.*' branches: - '*' paths: @@ -59,9 +60,10 @@ jobs: - PlotToSerial unit: - - UnitAmeter - - UnitVmeter - - UnitKmeterISO + - UnitCO2 + - UnitENVIII + - UnitTVOC + - UnitENVPro board: - m5stack_atom @@ -71,10 +73,10 @@ jobs: # - m5stack_cardputer - m5stack_core - m5stack_core2 -# - m5stack_coreink + - m5stack_coreink - m5stack_cores3 - m5stack_dial -# - m5stack_dinmeter + - m5stack_dinmeter - m5stack_fire - m5stack_paper # - m5stack_poe_cam diff --git a/.github/workflows/PlatformioBuild.yml b/.github/workflows/platformio-build-check.yml similarity index 51% rename from .github/workflows/PlatformioBuild.yml rename to .github/workflows/platformio-build-check.yml index 1ad15cb..4b60ae5 100644 --- a/.github/workflows/PlatformioBuild.yml +++ b/.github/workflows/platformio-build-check.yml @@ -1,9 +1,10 @@ -name: PlatformIOBuild +name: Build(platformio) on: push: tags-ignore: - '*.*.*' + - 'v*.*.*' branches: - '*' paths: @@ -43,7 +44,7 @@ on: jobs: build: - name: ${{ matrix.unit }}:${{ matrix.example }}:${{ matrix.board }}:${{ matrix.framework }}@${{ matrix.espressif32 }} + name: ${{ matrix.unit }}:${{ matrix.example }}@${{ matrix.board }}:${{ matrix.framework }}:${{ matrix.espressif32 }} runs-on: ubuntu-latest strategy: @@ -51,63 +52,68 @@ jobs: #max-parallel: 1 matrix: - unit: - - UnitAmeter - - UnitVmeter - - UnitKmeterISO - example: - PlotToSerial + unit: + - UnitCO2 + - UnitENVIII + - UnitTVOC + - UnitENVPro + board: - Core - Core2 - CoreS3 + - Fire - StampS3 - - AtomS3 - Dial + - AtomMatrix + - AtomS3 + - AtomS3R - NanoC6 - StickCPlus + - StickCPlus2 - Paper - - Fire + - Corelink framework: - Arduino espressif32: - latest - - '5_4_0' - - '4_4_0' +# - '5_4_0' +# - '4_4_0' - exclude: - - board: CoreS3 - espressif32: '5_4_0' - - board: CoreS3 - espressif32: '4_4_0' - - board: StampS3 - espressif32: '5_4_0' - - board: StampS3 - espressif32: '4_4_0' - - board: AtomS3 - espressif32: '5_4_0' - - board: AtomS3 - espressif32: '4_4_0' - - board: Dial - espressif32: '5_4_0' - - board: Dial - espressif32: '4_4_0' - - board: NanoC6 - espressif32: '5_4_0' - - board: NanoC6 - espressif32: '4_4_0' - - board: StickCPlus - espressif32: '5_4_0' - - board: StickCPlus - espressif32: '4_4_0' - - board: Paper - espressif32: '5_4_0' - - board: Paper - espressif32: '4_4_0' +# exclude: +# - board: CoreS3 +# espressif32: '5_4_0' +# - board: CoreS3 +# espressif32: '4_4_0' +# - board: StampS3 +# espressif32: '5_4_0' +# - board: StampS3 +# espressif32: '4_4_0' +# - board: AtomS3 +# espressif32: '5_4_0' +# - board: AtomS3 +# espressif32: '4_4_0' +# - board: Dial +# espressif32: '5_4_0' +# - board: Dial +# espressif32: '4_4_0' +# - board: NanoC6 +# espressif32: '5_4_0' +# - board: NanoC6 +# espressif32: '4_4_0' +# - board: StickCPlus +# espressif32: '5_4_0' +# - board: StickCPlus +# espressif32: '4_4_0' +# - board: Paper +# espressif32: '5_4_0' +# - board: Paper +# espressif32: '4_4_0' steps: - name: Checkout @@ -118,11 +124,11 @@ jobs: - name: Build examples uses: karniv00l/platformio-run-action@v1 with: - environments: ${{ matrix.unit }}_${{ matrix.example }}_${{ matrix.board }}_${{ matrix.framework }}_${{ matrix.espressif32 }} - #targets: + environments: ${{ matrix.unit != '' && format('{0}_{1}_{2}_{3}_{4}', matrix.unit, matrix.example, matrix.board, matrix.framework, matrix.espressif32) || format('{0}_{1}_{2}_{3}', matrix.example, matrix.board, matrix.framework, matrix.espressif32) }} +# targets: project-dir: "./" project-conf: "./platformio.ini" - #jobs: 6 - #silent: false - #verbose: true - #disable-auto-clean: false +# jobs: 6 +# silent: false +# verbose: true +# disable-auto-clean: false diff --git a/boards/m5stack-atoms3r.json b/boards/m5stack-atoms3r.json new file mode 100644 index 0000000..fcac372 --- /dev/null +++ b/boards/m5stack-atoms3r.json @@ -0,0 +1,41 @@ +{ + "build": { + "arduino": { + "memory_type": "qio_opi", + "ldscript": "esp32s3_out.ld", + "partitions": "default_8MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DARDUINO_M5Stack_ATOMS3R", + "-DBOARD_HAS_PSRAM", + "-DARDUINO_USB_MODE=1", + "-DARDUINO_USB_CDC_ON_BOOT=1", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "dio", + "mcu": "esp32s3", + "variant": "m5stack_atoms3" + }, + "connectivity": [ + "bluetooth", + "wifi" + ], + "frameworks": [ + "arduino", + "espidf" + ], + "name": "M5Stack AtomS3R", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 327680, + "maximum_size": 8388608, + "require_upload_port": true, + "speed": 460800 + }, + "url": "https://docs.m5stack.com/en/core/AtomS3R", + "vendor": "M5Stack" +} diff --git a/boards/m5stick-cplus2.json b/boards/m5stick-cplus2.json new file mode 100644 index 0000000..88d492d --- /dev/null +++ b/boards/m5stick-cplus2.json @@ -0,0 +1,40 @@ +{ + "build": { + "arduino":{ + "ldscript": "esp32_out.ld", + "partitions": "default_8MB.csv" + }, + "core": "esp32", + "extra_flags": [ + "-DM5STACK_M5Stick_CPlus2", + "-DBOARD_HAS_PSRAM", + "-mfix-esp32-psram-cache-issue", + "-mfix-esp32-psram-cache-strategy=memw", + "-DARDUINO_RUNNING_CORE=1", + "-DARDUINO_EVENT_RUNNING_CORE=1" + ], + "f_cpu": "240000000L", + "f_flash": "80000000L", + "flash_mode": "dio", + "mcu": "esp32", + "variant": "m5stick_c" + }, + "connectivity": [ + "wifi", + "bluetooth" + ], + "frameworks": [ + "arduino", + "espidf" + ], + "name": "M5Stick-CPlus2", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 327680, + "maximum_size": 8388608, + "require_upload_port": true, + "speed": 1500000 + }, + "url": "https://docs.m5stack.com/en/core/M5StickC%20PLUS2", + "vendor": "M5Stack" +} diff --git a/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp b/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp index 67bdab3..1e867cf 100644 --- a/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp +++ b/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp @@ -51,13 +51,6 @@ void setup() #pragma message "Using Wire" // Using TwoWire Wire.begin(pin_num_sda, pin_num_scl, 100000U); - for (int i = 0; i < 10; ++i) { - Wire.beginTransmission(unit.address()); - auto wret = Wire.endTransmission(); - M5_LOGW(">>%d", wret); - delay(10); - } - if (!Units.add(unit, Wire) || !Units.begin()) { M5_LOGE("Failed to begin"); lcd.clear(TFT_RED); diff --git a/platformio.ini b/platformio.ini index 7e57bd3..487c4af 100644 --- a/platformio.ini +++ b/platformio.ini @@ -3,9 +3,6 @@ ; For UnitTest and examples (Using M5UnitUnified) ;----------------------------------------------------------------------- [platformio] -;default_envs = test_Ameter_Core, test_Ameter_Core2, test_Ameter_CoreS3, test_Ameter_Fire, test_Ameter_StampS3, test_Ameter_Dial, test_Ameter_AtomS3, test_Ameter_NanoC6, test_Ameter_StickCPlus, test_Ameter_Paper, test_Vmeter_Core, test_Vmeter_Core2, test_Vmeter_CoreS3, test_Vmeter_Fire, test_Vmeter_StampS3, test_Vmeter_Dial, test_Vmeter_AtomS3, test_Vmeter_NanoC6, test_Vmeter_StickCPlus, test_Vmeter_Paper, test_UnitKmeterISO_Core, test_UnitKmeterISO_Core2, test_UnitKmeterISO_CoreS3, test_UnitKmeterISO_Fire, test_UnitKmeterISO_StampS3, test_UnitKmeterISO_Dial, test_UnitKmeterISO_AtomS3, test_UnitKmeterISO_NanoC6, test_UnitKmeterISO_StickCPlus, test_UnitKmeterISO_Paper -;default_envs = UnitAmeter_PlotToSerial_Core_Arduino_latest, UnitAmeter_PlotToSerial_Core_Arduino_5_4_0, UnitAmeter_PlotToSerial_Core_Arduino_4_4_0, UnitAmeter_PlotToSerial_Core2_Arduino_latest, UnitAmeter_PlotToSerial_Core2_Arduino_5_4_0, UnitAmeter_PlotToSerial_Core2_Arduino_4_4_0, UnitAmeter_PlotToSerial_CoreS3_Arduino_latest, UnitAmeter_PlotToSerial_StampS3_Arduino_latest, UnitAmeter_PlotToSerial_AtomS3_Arduino_latest, UnitAmeter_PlotToSerial_Dial_Arduino_latest, UnitAmeter_PlotToSerial_NanoC6_Arduino_latest, UnitAmeter_PlotToSerial_StickCPlus_Arduino_latest, UnitAmeter_PlotToSerial_Paper_Arduino_latest, UnitAmeter_PlotToSerial_Fire_Arduino_latest, UnitAmeter_PlotToSerial_Fire_Arduino_5_4_0, UnitAmeter_PlotToSerial_Fire_Arduino_4_4_0, UnitVmeter_PlotToSerial_Core_Arduino_latest, UnitVmeter_PlotToSerial_Core_Arduino_5_4_0, UnitVmeter_PlotToSerial_Core_Arduino_4_4_0, UnitVmeter_PlotToSerial_Core2_Arduino_latest, UnitVmeter_PlotToSerial_Core2_Arduino_5_4_0, UnitVmeter_PlotToSerial_Core2_Arduino_4_4_0, UnitVmeter_PlotToSerial_CoreS3_Arduino_latest, UnitVmeter_PlotToSerial_StampS3_Arduino_latest, UnitVmeter_PlotToSerial_AtomS3_Arduino_latest, UnitVmeter_PlotToSerial_Dial_Arduino_latest, UnitVmeter_PlotToSerial_NanoC6_Arduino_latest, UnitVmeter_PlotToSerial_StickCPlus_Arduino_latest, UnitVmeter_PlotToSerial_Paper_Arduino_latest, UnitVmeter_PlotToSerial_Fire_Arduino_latest, UnitVmeter_PlotToSerial_Fire_Arduino_5_4_0, UnitVmeter_PlotToSerial_Fire_Arduino_4_4_0, UnitKmeterISO_PlotToSerial_Core_Arduino_latest, UnitKmeterISO_PlotToSerial_Core_Arduino_5_4_0, UnitKmeterISO_PlotToSerial_Core_Arduino_4_4_0, UnitKmeterISO_PlotToSerial_Core2_Arduino_latest, UnitKmeterISO_PlotToSerial_Core2_Arduino_5_4_0, UnitKmeterISO_PlotToSerial_Core2_Arduino_4_4_0, UnitKmeterISO_PlotToSerial_CoreS3_Arduino_latest, UnitKmeterISO_PlotToSerial_StampS3_Arduino_latest, UnitKmeterISO_PlotToSerial_AtomS3_Arduino_latest, UnitKmeterISO_PlotToSerial_Dial_Arduino_latest, UnitKmeterISO_PlotToSerial_NanoC6_Arduino_latest, UnitKmeterISO_PlotToSerial_StickCPlus_Arduino_latest, UnitKmeterISO_PlotToSerial_Paper_Arduino_latest, UnitKmeterISO_PlotToSerial_Fire_Arduino_latest, UnitKmeterISO_PlotToSerial_Fire_Arduino_5_4_0, UnitKmeterISO_PlotToSerial_Fire_Arduino_4_4_0 - [env] build_flags =-Wall -Wextra -Wreturn-local-addr -Werror=format -Werror=return-local-addr @@ -46,7 +43,7 @@ board = m5stack-fire lib_deps = ${env.lib_deps} [StampS3] -;include M5Capsule +;include M5Capsule, DinMeter extends = m5base board = m5stack-stamps3 lib_deps = ${env.lib_deps} @@ -57,11 +54,22 @@ board = m5stack-stamps3 lib_deps = ${env.lib_deps} m5stack/M5Dial +[AtomMatrix] +extends = m5base +board = m5stack-atom +lib_deps = ${env.lib_deps} + [AtomS3] extends = m5base board = m5stack-atoms3 lib_deps = ${env.lib_deps} +; Using ./boards/m5stack-atoms3r.json +[AtomS3R] +extends = m5base +board = m5stack-atoms3r +lib_deps = ${env.lib_deps} + ; Using ./boards/m5stack-nanoc6.json [NanoC6] extends = m5base @@ -78,10 +86,20 @@ extends = m5base board = m5stick-c lib_deps = ${env.lib_deps} +; Using ./boards/m5stick-cplus2.json +[StickCPlus2] +extends = m5base +board = m5stick-cplus2 +lib_deps = ${env.lib_deps} + [Paper] extends = m5base board = m5stack-fire -; Using M5Fire instead of the M5Paper(Noting...) +lib_deps = ${env.lib_deps} + +[Corelink] +extends = m5base +board = m5stack-coreink lib_deps = ${env.lib_deps} [sdl] @@ -204,12 +222,24 @@ lib_deps = ${Dial.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_ameter +[env:test_Ameter_AtomMatrix] +extends=AtomMatrix, option_release, arduino_latest +lib_deps = ${AtomMatrix.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_ameter + [env:test_Ameter_AtomS3] extends=AtomS3, option_release, arduino_latest lib_deps = ${AtomS3.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_ameter +[env:test_Ameter_AtomS3R] +extends=AtomS3R, option_release, arduino_latest +lib_deps = ${AtomS3R.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_ameter + [env:test_Ameter_NanoC6] extends=NanoC6, option_release, arduino_latest lib_deps = ${NanoC6.lib_deps} @@ -222,12 +252,24 @@ lib_deps = ${StickCPlus.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_ameter +[env:test_Ameter_StickCPlus2] +extends=StickCPlus2, option_release, arduino_latest +lib_deps = ${StickCPlus2.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_ameter + [env:test_Ameter_Paper] extends=Paper, option_release, arduino_latest lib_deps = ${Paper.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_ameter +[env:test_Ameter_Corelink] +extends=Corelink, option_release, arduino_latest +lib_deps = ${Corelink.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_ameter + ; Vmeter [env:test_Vmeter_Core] extends=Core, option_release, arduino_latest @@ -265,12 +307,24 @@ lib_deps = ${Dial.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_vmeter +[env:test_Vmeter_AtomMatrix] +extends=AtomMatrix, option_release, arduino_latest +lib_deps = ${AtomMatrix.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_vmeter + [env:test_Vmeter_AtomS3] extends=AtomS3, option_release, arduino_latest lib_deps = ${AtomS3.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_vmeter +[env:test_Vmeter_AtomS3R] +extends=AtomS3R, option_release, arduino_latest +lib_deps = ${AtomS3R.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_vmeter + [env:test_Vmeter_NanoC6] extends=NanoC6, option_release, arduino_latest lib_deps = ${NanoC6.lib_deps} @@ -283,12 +337,24 @@ lib_deps = ${StickCPlus.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_vmeter +[env:test_Vmeter_StickCPlus2] +extends=StickCPlus2, option_release, arduino_latest +lib_deps = ${StickCPlus2.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_vmeter + [env:test_Vmeter_Paper] extends=Paper, option_release, arduino_latest lib_deps = ${Paper.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_vmeter +[env:test_Vmeter_Corelink] +extends=Corelink, option_release, arduino_latest +lib_deps = ${Corelink.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_vmeter + ; KMeterISO [env:test_UnitKmeterISO_Core] extends=Core, option_release, arduino_latest @@ -326,12 +392,24 @@ lib_deps = ${Dial.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_kmeterISO +[env:test_UnitKmeterISO_AtomMatrix] +extends=AtomMatrix, option_release, arduino_latest +lib_deps = ${AtomMatrix.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_kmeterISO + [env:test_UnitKmeterISO_AtomS3] extends=AtomS3, option_release, arduino_latest lib_deps = ${AtomS3.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_kmeterISO +[env:test_UnitKmeterISO_AtomS3R] +extends=AtomS3R, option_release, arduino_latest +lib_deps = ${AtomS3R.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_kmeterISO + [env:test_UnitKmeterISO_NanoC6] extends=NanoC6, option_release, arduino_latest lib_deps = ${NanoC6.lib_deps} @@ -344,12 +422,24 @@ lib_deps = ${StickCPlus.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_kmeterISO +[env:test_UnitKmeterISO_StickCPlus2] +extends=StickCPlus2, option_release, arduino_latest +lib_deps = ${StickCPlus2.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_kmeterISO + [env:test_UnitKmeterISO_Paper] extends=Paper, option_release, arduino_latest lib_deps = ${Paper.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_kmeterISO +[env:test_UnitKmeterISO_Corelink] +extends=Corelink, option_release, arduino_latest +lib_deps = ${Corelink.lib_deps} + ${test_fw.lib_deps} +test_filter= embedded/test_kmeterISO + ; -------------------------------- ;Examples by M5UnitUnified ; -------------------------------- @@ -386,10 +476,18 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/P extends=StampS3, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> +[env:UnitAmeter_PlotToSerial_AtomMatrix_Arduino_latest] +extends=AtomMatrix, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> + [env:UnitAmeter_PlotToSerial_AtomS3_Arduino_latest] extends=AtomS3, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> +[env:UnitAmeter_PlotToSerial_AtomS3R_Arduino_latest] +extends=AtomS3R, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> + [env:UnitAmeter_PlotToSerial_Dial_Arduino_latest] extends=Dial, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> @@ -402,10 +500,18 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/P extends=StickCPlus, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> +[env:UnitAmeter_PlotToSerial_StickCPlus2_Arduino_latest] +extends=StickCPlus2, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> + [env:UnitAmeter_PlotToSerial_Paper_Arduino_latest] extends=Paper, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> +[env:UnitAmeter_PlotToSerial_Corelink_Arduino_latest] +extends=Corelink, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> + [env:UnitAmeter_PlotToSerial_Fire_Arduino_latest] extends=Fire, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> @@ -451,10 +557,18 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/P extends=StampS3, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> +[env:UnitVmeter_PlotToSerial_AtomMatrix_Arduino_latest] +extends=AtomMatrix, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> + [env:UnitVmeter_PlotToSerial_AtomS3_Arduino_latest] extends=AtomS3, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> +[env:UnitVmeter_PlotToSerial_AtomS3R_Arduino_latest] +extends=AtomS3R, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> + [env:UnitVmeter_PlotToSerial_Dial_Arduino_latest] extends=Dial, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> @@ -467,10 +581,18 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/P extends=StickCPlus, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> +[env:UnitVmeter_PlotToSerial_StickCPlus2_Arduino_latest] +extends=StickCPlus2, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> + [env:UnitVmeter_PlotToSerial_Paper_Arduino_latest] extends=Paper, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> +[env:UnitVmeter_PlotToSerial_Corelink_Arduino_latest] +extends=Corelink, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> + [env:UnitVmeter_PlotToSerial_Fire_Arduino_latest] extends=Fire, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> @@ -516,10 +638,18 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterIS extends=StampS3, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> +[env:UnitKmeterISO_PlotToSerial_AtomMatrix_Arduino_latest] +extends=AtomMatrix, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> + [env:UnitKmeterISO_PlotToSerial_AtomS3_Arduino_latest] extends=AtomS3, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> +[env:UnitKmeterISO_PlotToSerial_AtomS3R_Arduino_latest] +extends=AtomS3R, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> + [env:UnitKmeterISO_PlotToSerial_Dial_Arduino_latest] extends=Dial, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> @@ -532,10 +662,18 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterIS extends=StickCPlus, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> +[env:UnitKmeterISO_PlotToSerial_StickCPlus2_Arduino_latest] +extends=StickCPlus2, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> + [env:UnitKmeterISO_PlotToSerial_Paper_Arduino_latest] extends=Paper, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> +[env:UnitKmeterISO_PlotToSerial_Corelink_Arduino_latest] +extends=Corelink, option_release, arduino_latest +build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> + [env:UnitKmeterISO_PlotToSerial_Fire_Arduino_latest] extends=Fire, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> diff --git a/test/embedded/test_kmeterISO/kmeterISO_test.cpp b/test/embedded/test_kmeterISO/kmeterISO_test.cpp index faf3c46..d2f8d01 100644 --- a/test/embedded/test_kmeterISO/kmeterISO_test.cpp +++ b/test/embedded/test_kmeterISO/kmeterISO_test.cpp @@ -168,7 +168,7 @@ TEST_P(TestKmeterISO, I2CAddress) EXPECT_TRUE(unit->changeI2CAddress(0x52)); EXPECT_TRUE(unit->readI2CAddress(addr)); EXPECT_EQ(addr, 0x52); - EXPECT_EQ(unit->address(), 0528); + EXPECT_EQ(unit->address(), 0x52); EXPECT_TRUE(unit->readFirmwareVersion(ver)); EXPECT_NE(ver, 0x00); From b7074044ab7518db63e4c6693f1be3512b32a274 Mon Sep 17 00:00:00 2001 From: GOB Date: Mon, 21 Oct 2024 19:18:59 +0900 Subject: [PATCH 14/19] Fixes wrong settings --- .github/workflows/arduino-m5-build-check.yml | 7 +++---- .github/workflows/platformio-build-check.yml | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/arduino-m5-build-check.yml b/.github/workflows/arduino-m5-build-check.yml index 5c5ba87..9bd03ff 100644 --- a/.github/workflows/arduino-m5-build-check.yml +++ b/.github/workflows/arduino-m5-build-check.yml @@ -60,10 +60,9 @@ jobs: - PlotToSerial unit: - - UnitCO2 - - UnitENVIII - - UnitTVOC - - UnitENVPro + - UnitAmeter + - UnitVmeter + - UnitKmeterISO board: - m5stack_atom diff --git a/.github/workflows/platformio-build-check.yml b/.github/workflows/platformio-build-check.yml index 4b60ae5..a2e5ace 100644 --- a/.github/workflows/platformio-build-check.yml +++ b/.github/workflows/platformio-build-check.yml @@ -56,10 +56,9 @@ jobs: - PlotToSerial unit: - - UnitCO2 - - UnitENVIII - - UnitTVOC - - UnitENVPro + - UnitAmeter + - UnitVmeter + - UnitKmeterISO board: - Core From 3824c07da38e756456dbbdf3494a6b629e88ffe1 Mon Sep 17 00:00:00 2001 From: GOB Date: Mon, 21 Oct 2024 19:21:04 +0900 Subject: [PATCH 15/19] Fixes conditions --- .github/workflows/platformio-build-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/platformio-build-check.yml b/.github/workflows/platformio-build-check.yml index a2e5ace..b2551e6 100644 --- a/.github/workflows/platformio-build-check.yml +++ b/.github/workflows/platformio-build-check.yml @@ -21,7 +21,7 @@ on: - 'examples/UnitUnified/**.hpp' - 'examples/UnitUnified/**.h' - 'examples/UnitUnified/**.c' - - '**PlatformioBuild.yml' + - '/platformio-build-check.yml' - '**platformio.ini' pull_request: paths: @@ -38,7 +38,7 @@ on: - 'examples/UnitUnified/**.hpp' - 'examples/UnitUnified/**.h' - 'examples/UnitUnified/**.c' - - '**PlatformioBuild.yml' + - '**/platformio-build-check.yml' - '**platformio.ini' workflow_dispatch: From 785aa6d45da3636277c7a27aefba17e367038901 Mon Sep 17 00:00:00 2001 From: GOB Date: Mon, 21 Oct 2024 19:54:06 +0900 Subject: [PATCH 16/19] Fixes wrong board name --- .github/workflows/platformio-build-check.yml | 2 +- platformio.ini | 32 ++++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/platformio-build-check.yml b/.github/workflows/platformio-build-check.yml index b2551e6..f1b9b53 100644 --- a/.github/workflows/platformio-build-check.yml +++ b/.github/workflows/platformio-build-check.yml @@ -74,7 +74,7 @@ jobs: - StickCPlus - StickCPlus2 - Paper - - Corelink + - CoreInk framework: - Arduino diff --git a/platformio.ini b/platformio.ini index 487c4af..020c846 100644 --- a/platformio.ini +++ b/platformio.ini @@ -97,7 +97,7 @@ extends = m5base board = m5stack-fire lib_deps = ${env.lib_deps} -[Corelink] +[CoreInk] extends = m5base board = m5stack-coreink lib_deps = ${env.lib_deps} @@ -264,9 +264,9 @@ lib_deps = ${Paper.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_ameter -[env:test_Ameter_Corelink] -extends=Corelink, option_release, arduino_latest -lib_deps = ${Corelink.lib_deps} +[env:test_Ameter_CoreInk] +extends=CoreInk, option_release, arduino_latest +lib_deps = ${CoreInk.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_ameter @@ -349,9 +349,9 @@ lib_deps = ${Paper.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_vmeter -[env:test_Vmeter_Corelink] -extends=Corelink, option_release, arduino_latest -lib_deps = ${Corelink.lib_deps} +[env:test_Vmeter_CoreInk] +extends=CoreInk, option_release, arduino_latest +lib_deps = ${CoreInk.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_vmeter @@ -434,9 +434,9 @@ lib_deps = ${Paper.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_kmeterISO -[env:test_UnitKmeterISO_Corelink] -extends=Corelink, option_release, arduino_latest -lib_deps = ${Corelink.lib_deps} +[env:test_UnitKmeterISO_CoreInk] +extends=CoreInk, option_release, arduino_latest +lib_deps = ${CoreInk.lib_deps} ${test_fw.lib_deps} test_filter= embedded/test_kmeterISO @@ -508,8 +508,8 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/P extends=Paper, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> -[env:UnitAmeter_PlotToSerial_Corelink_Arduino_latest] -extends=Corelink, option_release, arduino_latest +[env:UnitAmeter_PlotToSerial_CoreInk_Arduino_latest] +extends=CoreInk, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitAmeter/PlotToSerial> [env:UnitAmeter_PlotToSerial_Fire_Arduino_latest] @@ -589,8 +589,8 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/P extends=Paper, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> -[env:UnitVmeter_PlotToSerial_Corelink_Arduino_latest] -extends=Corelink, option_release, arduino_latest +[env:UnitVmeter_PlotToSerial_CoreInk_Arduino_latest] +extends=CoreInk, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitVmeter/PlotToSerial> [env:UnitVmeter_PlotToSerial_Fire_Arduino_latest] @@ -670,8 +670,8 @@ build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterIS extends=Paper, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> -[env:UnitKmeterISO_PlotToSerial_Corelink_Arduino_latest] -extends=Corelink, option_release, arduino_latest +[env:UnitKmeterISO_PlotToSerial_CoreInk_Arduino_latest] +extends=CoreInk, option_release, arduino_latest build_src_filter = +<*> -<.git/> -<.svn/> +<../examples/UnitUnified/UnitKmeterISO/PlotToSerial> [env:UnitKmeterISO_PlotToSerial_Fire_Arduino_latest] From 6e67da0d62d22cb27f55110b7732d2a2c1baf11b Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 23 Oct 2024 16:17:44 +0900 Subject: [PATCH 17/19] Change definition to uppercase --- boards/m5stack-atoms3r.json | 2 +- boards/m5stack-nanoc6.json | 2 +- boards/m5stick-cplus2.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/m5stack-atoms3r.json b/boards/m5stack-atoms3r.json index fcac372..1c9ecce 100644 --- a/boards/m5stack-atoms3r.json +++ b/boards/m5stack-atoms3r.json @@ -7,7 +7,7 @@ }, "core": "esp32", "extra_flags": [ - "-DARDUINO_M5Stack_ATOMS3R", + "-DARDUINO_M5STACK_ATOMS3R", "-DBOARD_HAS_PSRAM", "-DARDUINO_USB_MODE=1", "-DARDUINO_USB_CDC_ON_BOOT=1", diff --git a/boards/m5stack-nanoc6.json b/boards/m5stack-nanoc6.json index cae742e..ddaad65 100644 --- a/boards/m5stack-nanoc6.json +++ b/boards/m5stack-nanoc6.json @@ -2,7 +2,7 @@ "build": { "core": "esp32", "extra_flags": [ - "-DARDUINO_M5Stack_NanoC6" + "-DARDUINO_M5STACK_NANOC6" ], "f_cpu": "160000000L", "f_flash": "80000000L", diff --git a/boards/m5stick-cplus2.json b/boards/m5stick-cplus2.json index 88d492d..91fa2ca 100644 --- a/boards/m5stick-cplus2.json +++ b/boards/m5stick-cplus2.json @@ -6,7 +6,7 @@ }, "core": "esp32", "extra_flags": [ - "-DM5STACK_M5Stick_CPlus2", + "-DM5STACK_M5STICK_CPLUS2", "-DBOARD_HAS_PSRAM", "-mfix-esp32-psram-cache-issue", "-mfix-esp32-psram-cache-strategy=memw", From e919fcde2508a3edf0c20d362d28e6f9be36fa0c Mon Sep 17 00:00:00 2001 From: GOB Date: Wed, 23 Oct 2024 16:18:08 +0900 Subject: [PATCH 18/19] Some tweaks --- .../UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp b/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp index 1e867cf..db503c7 100644 --- a/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp +++ b/examples/UnitUnified/UnitKmeterISO/PlotToSerial/main/PlotToSerial.cpp @@ -26,8 +26,6 @@ void setup() { M5.begin(); - m5::utility::delay(3000); - auto pin_num_sda = M5.getPin(m5::pin_name_t::port_a_sda); auto pin_num_scl = M5.getPin(m5::pin_name_t::port_a_scl); M5_LOGI("getPin: SDA:%u SCL:%u", pin_num_sda, pin_num_scl); From 36d71f9fbca31eed2251570321db29edc532e29d Mon Sep 17 00:00:00 2001 From: GOB Date: Fri, 25 Oct 2024 16:00:40 +0900 Subject: [PATCH 19/19] Raise version --- library.json | 7 +++---- library.properties | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/library.json b/library.json index 60005f3..3e80f18 100644 --- a/library.json +++ b/library.json @@ -13,7 +13,7 @@ "dependencies": { "M5UnitUnified": "https://github.com/m5stack/M5UnitUnified.git" }, - "version": "0.0.1", + "version": "0.0.2", "frameworks": [ "arduino" ], @@ -23,9 +23,8 @@ "headers": "M5UnitUnifiedMETER.h", "license": "MIT", "export": { - "exclude": - [ + "exclude": [ "docs/html" ] } -} +} \ No newline at end of file diff --git a/library.properties b/library.properties index 60d8c99..c3382d2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=M5Unit-METER -version=0.0.1 +version=0.0.2 author=M5Stack maintainer=M5Stack sentence=Library for M5Stack UNIT METER using M5UnitUnified