Indoor positioning. Central unit.
Dependencies: aconno_SEGGER_RTT
Diff: tasks/tasks.cpp
- Revision:
- 1:2bdc506d8baa
- Parent:
- 0:07a75b2fae14
- Child:
- 2:1b85a28b1e68
--- a/tasks/tasks.cpp Tue Mar 06 09:52:46 2018 +0000 +++ b/tasks/tasks.cpp Tue Mar 06 15:45:34 2018 +0000 @@ -12,6 +12,11 @@ extern DigitalOut periodicLed; #endif + +// BLE global data +GapAdvertisingData adv_data = GapAdvertisingData(); + + void periodicCallback(BLE *ble) { while(true) @@ -28,6 +33,10 @@ { while(true) { + adv_data = ble->getAdvertisingData(); + adv_data.updateData(adv_data.MANUFACTURER_SPECIFIC_DATA, (uint8_t*)MSD, MSD_SIZE_b); + ble->setAdvertisingData(adv_data); + ble->gap().startAdvertising(); printf("Advertisement started.\r\n"); #if DEBUG_LED