URIBeaconConfigService: move declarations of some local variables closer to their use.
This commit is contained in:
parent
1b265c4e3d
commit
eec3f3518f
1 changed files with 2 additions and 3 deletions
|
@ -184,9 +184,6 @@ class URIBeaconConfigService {
|
|||
/* Helper function to switch to the non-connectible normal mode for URIBeacon. This gets called after a timeout. */
|
||||
void setupURIBeaconAdvertisements()
|
||||
{
|
||||
uint8_t serviceData[SERVICE_DATA_MAX];
|
||||
unsigned serviceDataLen = 0;
|
||||
|
||||
/* Reinitialize the BLE stack. This will clear away the existing services and advertising state. */
|
||||
ble.shutdown();
|
||||
ble.init();
|
||||
|
@ -209,6 +206,8 @@ class URIBeaconConfigService {
|
|||
ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);
|
||||
ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, BEACON_UUID, sizeof(BEACON_UUID));
|
||||
|
||||
uint8_t serviceData[SERVICE_DATA_MAX];
|
||||
unsigned serviceDataLen = 0;
|
||||
serviceData[serviceDataLen++] = BEACON_UUID[0];
|
||||
serviceData[serviceDataLen++] = BEACON_UUID[1];
|
||||
serviceData[serviceDataLen++] = flags;
|
||||
|
|
Loading…
Reference in a new issue