-
Notifications
You must be signed in to change notification settings - Fork 3
💚 (GitHub): compile PlatformIO with C++17 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
141469d to
8e26152
Compare
72b0adc to
ec5a40c
Compare
ec5a40c to
68d4f4d
Compare
9ebbb07 to
042e31f
Compare
There was a problem hiding this 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" |
Copilot
AI
Jul 27, 2025
There was a problem hiding this comment.
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.
| "BLE": "^2.0.0" | |
| "ESP32 BLE Arduino": "^2.0.0" |
| 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: | |
Copilot
AI
Jul 27, 2025
There was a problem hiding this comment.
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.
What has been done
Todo
library.jsonandlibrary.propertiesversion