Skip to content

Commit

Permalink
doc: Add license headers to Xamarin Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
qdot committed Jun 30, 2019
1 parent 3df9a53 commit 13b890b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// <copyright file="XamarinBlutoothDeviceInterface.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>

using Buttplug.Core;
using Buttplug.Core.Logging;
using Buttplug.Devices;
Expand Down
19 changes: 15 additions & 4 deletions Buttplug.Server.Managers.XamarinManager/XamarinBluetoothManager.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
using Buttplug.Core.Logging;
// <copyright file="XamarinBlutoothManager.cs" company="Nonpolynomial Labs LLC">
// Buttplug C# Source Code File - Visit https://buttplug.io for more info about the project.
// Copyright (c) Nonpolynomial Labs LLC. All rights reserved.
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root for full license information.
// </copyright>

using Buttplug.Core.Logging;
using Buttplug.Devices;
using Buttplug.Devices.Configuration;
using JetBrains.Annotations;
using Plugin.BLE;
using Plugin.BLE.Abstractions.Contracts;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;

namespace Buttplug.Server.Managers.XamarinManager
Expand Down Expand Up @@ -48,10 +55,14 @@ private async void _adapter_DeviceAdvertised(object sender, Plugin.BLE.Abstracti
if (_seenAddresses.Contains(btAddr))
{
BpLogger.Trace($"Ignoring advertisement for already connecting device: {btAddr}");
return;
//return;
}
_seenAddresses.Add(btAddr);
BpLogger.Trace("BLE device found: " + advertName);
else
{
_seenAddresses.Add(btAddr);
}

Debug.WriteLine("BLE device found: " + advertName);

// We always need a name to match against.
if (string.IsNullOrEmpty(advertName))
Expand Down

0 comments on commit 13b890b

Please sign in to comment.