BLE Handling
This commit is contained in:
@@ -105,11 +105,8 @@ static ssize_t write_lasertag_val(struct bt_conn *conn, const struct bt_gatt_att
|
||||
if (bt_uuid_cmp(attr->uuid, BT_UUID_LT_PROV_NAME_CHAR) == 0)
|
||||
{
|
||||
rc = lasertag_set_device_name(buf, len);
|
||||
if (rc == 0 && adv_enabled) {
|
||||
LOG_INF("Stopping advertising to update device name");
|
||||
ble_mgmt_adv_stop();
|
||||
LOG_INF("Restarting advertising with new device name");
|
||||
ble_mgmt_adv_start();
|
||||
if (rc == 0 ) {
|
||||
bt_set_name(lasertag_get_device_name());
|
||||
}
|
||||
}
|
||||
else if (bt_uuid_cmp(attr->uuid, BT_UUID_LT_PROV_PANID_CHAR) == 0)
|
||||
|
||||
Reference in New Issue
Block a user