Unity-Android-Bluetooth-Low-Energy
Unity-Android-Bluetooth-Low-Energy copied to clipboard
Wrong command name in BleDevice.cs
Branch refactor/project-overhaul
Commit 811b3250
In BleDevice.cs, RequestMtuSize() sends the wrong task:
/// <summary>
/// Request the <see cref="BleDevice"/>'s MTU Size to be bigger or smaller.
/// <para>[Calls: <see href="https://developer.android.com/reference/android/bluetooth/BluetoothGatt#requestMtu(int)"/>]</para>
/// </summary>
/// <param name="mtuSize">The requested size that the MTU buffer should be.</param>
/// <param name="onMtuSizeChanged">A callback that returns the MTU size that the <see cref="BleDevice"/> has after your request.</param>
public void RequestMtuSize(int mtuSize, OnMtuSizeChanged onMtuSizeChanged = null)
{
_onMtuSizeChanged = onMtuSizeChanged;
BleTask task = new BleTask("changeMtuSize", MacAddress, mtuSize); /// NEW
/// OLD BleTask task = new BleTask("requestMtuSize", MacAddress, mtuSize);
BleManager.Instance.SendTask(task, this);
}