Skip to content

Fix BLE client parameter passing and String comparison#688

Closed
doudar with Copilot wants to merge 1 commit into
ble_debugfrom
copilot/sub-pr-686
Closed

Fix BLE client parameter passing and String comparison#688
doudar with Copilot wants to merge 1 commit into
ble_debugfrom
copilot/sub-pr-686

Conversation

Copilot AI commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Addressed code review feedback for BLE client refactoring:

  • Parameter type consistency: Pass String directly to getDeviceServiceInfo() instead of .c_str() to avoid unnecessary temporary object construction
  • String comparison fix: Replace pointer equality check with content comparison when checking for duplicate device connections
// Before: compared pointer addresses
if (aDevName.c_str() == spinBLEClient.myBLEDevices[i].uniqueName.c_str())

// After: compares string contents
if (aDevName == String(spinBLEClient.myBLEDevices[i].uniqueName.c_str()))

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Refactor BLE client functionality and standardize code style Fix BLE client parameter passing and String comparison Nov 4, 2025
Copilot AI requested a review from doudar November 4, 2025 00:23
@doudar doudar closed this Nov 13, 2025
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