接入基本设备
This commit is contained in:
1 parent
2f84f70a5f
commit
7729332f41
62 files changed
+2880
-86
No files matched your search
@@ -16,7 +16,7 @@ namespace Assets.Scripts.Ble.Scan
|
||||
public BlePeripheralInfo Peripheral { get; }
|
||||
public int Rssi { get; }
|
||||
|
||||
public SensorType SensorType { get; }
|
||||
public SensorType SensorType { get; internal set; }
|
||||
public BleAdvertisementInfo(BlePeripheralInfo peripheral, int rssi, bool connectible, List<Guid> services, byte[] manufactureData, SensorType sensor)
|
||||
{
|
||||
this.Peripheral = peripheral;
|
||||
@@ -26,6 +26,8 @@ namespace Assets.Scripts.Ble.Scan
|
||||
//this.ManufactureData = manufactureData;
|
||||
|
||||
this.SensorType = sensor;
|
||||
|
||||
Index = 1;
|
||||
}
|
||||
|
||||
private readonly List<Guid> services;
|
||||
@@ -36,5 +38,14 @@ namespace Assets.Scripts.Ble.Scan
|
||||
return this.services;
|
||||
}
|
||||
}
|
||||
|
||||
public void TryAddService(Guid service)
|
||||
{
|
||||
if (this.services.Contains(service))
|
||||
return;
|
||||
this.services.Add(service);
|
||||
}
|
||||
|
||||
public int Index { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user