Software can read HMC5883L
Fork of BLE_API by
Revision 1185:a16103dfb50c, committed 2016-04-06
- Comitter:
- vcoubard
- Date:
- Wed Apr 06 19:15:38 2016 +0100
- Parent:
- 1184:246cbece99c2
- Child:
- 1186:61ac7e01586f
- Commit message:
- Synchronized with git rev 20da58ff
Author: Vincent Coubard
Merge pull request #170 from andresag01/fix-gap-state
Update Gap state in startAdvertising()
Changed in this revision
ble/Gap.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ble/Gap.h Wed Apr 06 19:15:37 2016 +0100 +++ b/ble/Gap.h Wed Apr 06 19:15:38 2016 +0100 @@ -939,8 +939,12 @@ * @return BLE_ERROR_NONE if the device started advertising successfully. */ ble_error_t startAdvertising(void) { + ble_error_t rc; setAdvertisingData(); /* Update the underlying stack. */ - return startAdvertising(_advParams); + if ((rc = startAdvertising(_advParams)) == BLE_ERROR_NONE) { + state.advertising = 1; + } + return rc; } /**