Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private void BLEManager_BLEEvent(object sender, BLEManagerEvent e)
}
else if (e.CurrentEvent == shimmer.Communications.BLEManagerEvent.BLEAdapterEvent.DevicePaired)
{
Console.WriteLine(((VerisenseBLEDeviceIOS)e.objMsg).Asm_uuid.ToString() + " is paired.");
Console.WriteLine(((VerisenseBLEScannedDevice)e.objMsg).Uuid.ToString() + " is paired.");
}
}
public List<VerisenseBLEScannedDevice> GetListOfScannedDevices()
Expand Down Expand Up @@ -105,11 +105,12 @@ public static bool GetBondingStatus(string id)
}
public async Task<bool> PairVerisenseDevice(object Device, IBLEPairingKeyGenerator generator)
{
var pairingResult = await ((VerisenseBLEDeviceIOS)Device).PairDeviceAsync();
VerisenseBLEDeviceIOS verisenseBLEDevice = new VerisenseBLEDeviceIOS(((VerisenseBLEScannedDevice)Device).Uuid.ToString(), "");
var pairingResult = await verisenseBLEDevice.PairDeviceAsync();
if (pairingResult)
{
if (BLEManagerEvent != null)
BLEManagerEvent.Invoke(null, new BLEManagerEvent { CurrentEvent = shimmer.Communications.BLEManagerEvent.BLEAdapterEvent.DevicePaired, objMsg = (VerisenseBLEDeviceIOS)Device, message = "Device Is Successfully Paired" });
BLEManagerEvent.Invoke(null, new BLEManagerEvent { CurrentEvent = shimmer.Communications.BLEManagerEvent.BLEAdapterEvent.DevicePaired, objMsg = (VerisenseBLEScannedDevice)Device, message = "Device Is Successfully Paired" });
}
return pairingResult;
}
Expand Down