Skip to content

Conversation

@leon0399
Copy link
Member

@leon0399 leon0399 commented Jul 26, 2025

What has been done

  • Fixed compatibility with both NimBLE <= v1.4.0 and >= 2.0.0
  • CI updated to test NimBLE v1.4.0 and 2.3.2

Todo

  • Bump library.json and library.properties version

@leon0399 leon0399 force-pushed the feature/ci-versions branch 6 times, most recently from 141469d to 8e26152 Compare July 26, 2025 23:32
@leon0399 leon0399 force-pushed the feature/ci-versions branch 11 times, most recently from 72b0adc to ec5a40c Compare July 27, 2025 01:33
@leon0399 leon0399 force-pushed the feature/ci-versions branch from ec5a40c to 68d4f4d Compare July 27, 2025 01:49
@leon0399 leon0399 force-pushed the feature/ci-versions branch from 9ebbb07 to 042e31f Compare July 27, 2025 01:59
@leon0399 leon0399 marked this pull request as ready for review July 27, 2025 02:02
@leon0399 leon0399 requested a review from Copilot July 27, 2025 02:02

This comment was marked as outdated.

@leon0399 leon0399 requested a review from Copilot July 27, 2025 02:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the BLE Serial library to compile with C++17, enabling Class Template Argument Deduction (CTAD) and adds support for NimBLE version 2. The changes improve C++ standard compliance and expand compatibility with different BLE library versions.

Key Changes:

  • Adds automatic NimBLE version detection and conditional compilation for version 1 and 2
  • Updates examples to use CTAD syntax with fallback comments for older compilers
  • Modifies CI workflows to compile with C++17 standard and test multiple BLE library versions

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/BLESerial.h Adds NimBLE version detection logic and conditional method signatures for different BLE library versions
library.properties Updates library version from 1.1.3 to 1.2.0
library.json Updates version and changes dependency from "ESP32 BLE Arduino" to "BLE"
examples/SerialToSerialBLE_TransparentUART/SerialToSerialBLE_TransparentUART.ino New example file using CTAD syntax with fallback documentation
examples/SerialToSerialBLE_TransparentUART-NimBLE/SerialToSerialBLE_TransparentUART-NimBLE.ino New NimBLE-specific example with proper property constants
examples/SerialToSerialBLE/SerialToSerialBLE.ino Updates to use CTAD syntax with improved documentation
README.md Fixes badge description from "PlatformIO CI" to "Arduino CI"
.github/workflows/platformio-ci.yml Adds C++17 compilation flags and matrix testing for different NimBLE versions
.github/workflows/arduino-ci.yml Updates to test specific NimBLE versions and improved conditional library inclusion

},
"dependencies": {
"ESP32 BLE Arduino": "^2.0.0"
"BLE": "^2.0.0"
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency name change from "ESP32 BLE Arduino" to "BLE" may break existing installations and could be ambiguous. Consider keeping the specific library name or providing migration documentation.

Suggested change
"BLE": "^2.0.0"
"ESP32 BLE Arduino": "^2.0.0"

Copilot uses AI. Check for mistakes.
pio ci --lib="." --board=${{ join(matrix.boards, ' --board=') }} ${{ matrix.nimble && format('--project-option="lib_deps=h2zero/NimBLE-Arduino@{0}"', matrix.nimble) || '' }}
env:
PLATFORMIO_CI_SRC: "./examples/${{ matrix.example }}/*.ino"
PLATFORMIO_BUILD_UNFLAGS: |
Copy link

Copilot AI Jul 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PLATFORMIO_BUILD_UNFLAGS environment variable appears to be incorrectly indented and may not be properly associated with the build step. It should be indented at the same level as PLATFORMIO_CI_SRC.

Copilot uses AI. Check for mistakes.
@leon0399 leon0399 merged commit 1780ced into main Jul 27, 2025
15 checks passed
@leon0399 leon0399 deleted the feature/ci-versions branch July 27, 2025 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants