Skip to content
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

Merged
merged 2 commits into from
Feb 16, 2016
Merged

Fix for compilation errors with S110 softdevice in btle.cpp #109

merged 2 commits into from
Feb 16, 2016

Conversation

ddavidebor
Copy link
Contributor

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

… 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'
@ciarmcom
Copy link
Member

Automatic CI verification build not done, please verify manually.

1 similar comment
@ciarmcom
Copy link
Member

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)

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.

Copy link
Contributor Author

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.

Copy link

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

Copy link
Contributor Author

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.

@ciarmcom
Copy link
Member

ciarmcom commented Feb 2, 2016

Automatic CI verification build not done, please verify manually.

1 similar comment
@ciarmcom
Copy link
Member

ciarmcom commented Feb 2, 2016

Automatic CI verification build not done, please verify manually.

@ddavidebor
Copy link
Contributor Author

@zskdan we've fixed the same issue

@zskdan
Copy link

zskdan commented Feb 2, 2016

@ddavidebor sorry i didn't check before opening a pull request.

@ddavidebor
Copy link
Contributor Author

No worries i should have updated the pool request sooner

@pan-
Copy link
Member

pan- commented Feb 12, 2016

Hi Davide,

I would be happy to merge your PR, but you have to sign our contributor licence agreements first:
https://www.mbed.com/en/about-mbed/contributor-license-agreements/

Once this is done, I will merge it.

Thanks

@bearsh
Copy link

bearsh commented Feb 12, 2016

😆 for a 2 line contribution like this? this seems to much of bureaucracy...

@ddavidebor
Copy link
Contributor Author

Fairly annoying, but i will send it as soon as possible.

@pan-
Copy link
Member

pan- commented Feb 12, 2016

Yes, we know, that it seems too much especially for such a tiny trivial fix.
I'm sorry about this but contributor has to sign this agreement to have their contribution merged.

@ddavidebor
Copy link
Contributor Author

Signed and sent, feel free to merge.

@pan-
Copy link
Member

pan- commented Feb 16, 2016

Thanks, I merge it.

pan- added a commit that referenced this pull request Feb 16, 2016
Fix for compilation errors with S110 softdevice in btle.cpp
@pan- pan- merged commit 7583927 into ARMmbed:develop Feb 16, 2016
@ciarmcom
Copy link
Member

Automatic CI verification build not done, please verify manually.

@ddavidebor ddavidebor deleted the develop branch February 16, 2016 20:53
@ddavidebor ddavidebor restored the develop branch February 16, 2016 20:53
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.

None yet

6 participants