Unity-Android-Bluetooth-Low-Energy icon indicating copy to clipboard operation
Unity-Android-Bluetooth-Low-Energy copied to clipboard

Wrong command name in BleDevice.cs

Open nadiDS2 opened this issue 1 year ago • 0 comments

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);
        }

nadiDS2 avatar Apr 25 '24 19:04 nadiDS2