Skip to content

Commit 15cef96

Browse files
authored
Merge pull request #229 from LMESTM/FIX_Button_advertising
BLE_Button: Fix advertising settings
2 parents d2d2c3d + 0fba3ec commit 15cef96

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

BLE_Button/source/main.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,9 @@ class BatteryDemo : ble::Gap::EventHandler {
7575
ble::adv_interval_t(ble::millisecond_t(1000))
7676
);
7777

78-
uint8_t adv_buffer[ble::LEGACY_ADVERTISING_MAX_SIZE];
79-
80-
ble::AdvertisingDataBuilder adv_data_builder(adv_buffer);
81-
82-
adv_data_builder.setFlags();
83-
adv_data_builder.setLocalServiceList(mbed::make_Span(&_button_uuid, 1));
84-
adv_data_builder.setName(DEVICE_NAME);
78+
_adv_data_builder.setFlags();
79+
_adv_data_builder.setLocalServiceList(mbed::make_Span(&_button_uuid, 1));
80+
_adv_data_builder.setName(DEVICE_NAME);
8581

8682
/* Setup advertising */
8783

0 commit comments

Comments
 (0)