-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix for compilation errors with S110 softdevice in btle.cpp #109
Conversation
… S110 (legacy mode) it's used This fix solves the following errors: -error: 'class nRF5xGattClient' has no member named 'characteristicDescriptorDiscoverer' -error: 'class nRF5xGattClient' has no member named 'discovery'
Automatic CI verification build not done, please verify manually. |
1 similar comment
Automatic CI verification build not done, please verify manually. |
@@ -191,8 +191,11 @@ static void btle_handler(ble_evt_t *p_ble_evt) | |||
|
|||
// Close all pending discoveries for this connection | |||
nRF5xGattClient& gattClient = ble.getGattClient(); | |||
#if defined(TARGET_MCU_NRF51_16K_S110) || defined(TARGET_MCU_NRF51_32K_S110) |
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.
Perhaps condition could follow the same pattern of the others i.e.:
#if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
/////// CODE HERE
#endif
Also, line 193 should be inside the #if
.
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.
Thank you i was not certain of a pattern that would suit both gcc and armcc
compilers.
Il giorno ven 22 gen 2016 alle 12:46 Andres Amaya Garcia <
notifications@github.com> ha scritto:
In source/btle/btle.cpp
#109 (comment):@@ -191,8 +191,11 @@ static void btle_handler(ble_evt_t *p_ble_evt)
// Close all pending discoveries for this connection nRF5xGattClient& gattClient = ble.getGattClient();
+#if defined(TARGET_MCU_NRF51_16K_S110) || defined(TARGET_MCU_NRF51_32K_S110)
Perhaps condition could follow the same pattern of the others i.e.:
#if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
/////// CODE HERE
#endif—
Reply to this email directly or view it on GitHub
https://github.com/ARMmbed/ble-nrf51822/pull/109/files#r50528604.
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.
Hi @ddavidebor
I also encountered this issue, so thanks for reporting it. would you like be so kind and update the pull request as requested (which makes it easier for the maintainer to include the fix in the tree)? otherwise I'll open a second one...
#if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
// Close all pending discoveries for this connection
nRF5xGattClient& gattClient = ble.getGattClient();
gattClient.characteristicDescriptorDiscoverer().terminate(handle, BLE_ERROR_INVALID_STATE);
gattClient.discovery().terminate(handle);
#endif
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.
@bearsh @andresag01 done 👍 Thank you for your help.
Automatic CI verification build not done, please verify manually. |
1 similar comment
Automatic CI verification build not done, please verify manually. |
@zskdan we've fixed the same issue |
@ddavidebor sorry i didn't check before opening a pull request. |
No worries i should have updated the pool request sooner |
Hi Davide, I would be happy to merge your PR, but you have to sign our contributor licence agreements first: Once this is done, I will merge it. Thanks |
😆 for a 2 line contribution like this? this seems to much of bureaucracy... |
Fairly annoying, but i will send it as soon as possible. |
Yes, we know, that it seems too much especially for such a tiny trivial fix. |
Signed and sent, feel free to merge. |
Thanks, I merge it. |
Fix for compilation errors with S110 softdevice in btle.cpp
Automatic CI verification build not done, please verify manually. |
Now methods that are exclusive to Softdevice S130 are not called when S110 (legacy mode) it's used.
This fix solves the following errors:
-error: 'class nRF5xGattClient' has no member named 'characteristicDescriptorDiscoverer'
-error: 'class nRF5xGattClient' has no member named 'discovery'
Compiled on ubuntu 14.04 with yotta on target mkit-gcc