implemented stop for BLEHandler and BikeSimulator

This commit is contained in:
shinichi
2020-10-09 11:16:51 +02:00
parent ab9180281e
commit 124eee5f12
3 changed files with 18 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ namespace Hardware
/// </summary>
public void Connect()
{
BLE bleBike = new BLE();
Thread.Sleep(1000); // We need some time to list available devices
@@ -203,5 +203,11 @@ namespace Hardware
bleBike.WriteCharacteristic("6e40fec3-b5a3-f393-e0a9-e50e24dcca9e", antMessage);
}
public void stop()
{
bleBike.SubscriptionValueChanged -= BleBike_SubscriptionValueChanged;
bleHeart.SubscriptionValueChanged -= BleBike_SubscriptionValueChanged;
}
}
}