适配速度计和踏频计
This commit is contained in:
1 parent
f14a071179
commit
29aef943b9
8 files changed
+84
-12
No files matched your search
@@ -16,7 +16,7 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
||||
public int Cadence { get => _cyclingSpeedCadenceMeasurement.Cadence; set => throw new NotImplementedException(); }
|
||||
public double Speed { get => _cyclingSpeedCadenceMeasurement.Speed; set => throw new NotImplementedException(); }
|
||||
|
||||
private double _wheelCircumference;
|
||||
private double _wheelCircumference = 2096;
|
||||
private List<BleServiceInfo> Services;
|
||||
public SpeedCadence(BlePeripheralInfo peripheralInfo, BleWinHwInterface bleWinHwInterface) : base(peripheralInfo, bleWinHwInterface, Ant.SensorType.SpeedCadence)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Assets.Scripts.Devices.Ble.Win
|
||||
{
|
||||
this.wclWatcher.StopScan();
|
||||
}
|
||||
//this.StopGattThreads();
|
||||
this.StopGattThreads();
|
||||
if (this.wclBleManager.Active)
|
||||
{
|
||||
this.wclBleManager.ManagerStatusChanged = null;
|
||||
@@ -120,7 +120,7 @@ namespace Assets.Scripts.Devices.Ble.Win
|
||||
});
|
||||
}
|
||||
|
||||
public override bool Stop()
|
||||
public void StopGattThreads()
|
||||
{
|
||||
Debug.Log("停止thread");
|
||||
foreach (var item in this.gattClients.Values)
|
||||
@@ -128,9 +128,8 @@ namespace Assets.Scripts.Devices.Ble.Win
|
||||
item.Stop();
|
||||
}
|
||||
|
||||
wclBleManager.Dispose();
|
||||
|
||||
return true;
|
||||
//wclBleManager.Dispose();
|
||||
//return true;
|
||||
}
|
||||
|
||||
public string Test()
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace Assets.Scripts.Ble
|
||||
// manager,
|
||||
// status
|
||||
//}, WclBleManager.log);
|
||||
callback(manager, status);
|
||||
callback?.Invoke(manager, status);
|
||||
}
|
||||
|
||||
// Token: 0x04001390 RID: 5008
|
||||
|
||||
Reference in new issue
Block a user