Beispiel #1
0
        public ParrotClient(BluetoothDeviceInfo device)
        {
            Device          = device;
            BluetoothClient = new BluetoothClient();
            Battery         = new Battery(this);
            NoiseControl    = new NoiseControl(this);
            ConcertHall     = new ConcertHallControl(this);

            _waitingList = new Semaphore(1, 1);
        }
Beispiel #2
0
            public static async Task SetOptions(TouchOptions left, TouchOptions right)
            {
                byte[] payload = new byte[2];
                if (left == TouchOptions.NoiseControl)
                {
                    await NoiseControl.SetTouchNoiseControls(true, true, false);
                }
                if (right == TouchOptions.NoiseControl)
                {
                    await NoiseControl.SetTouchNoiseControls(true, true, false);
                }

                payload[0] = BluetoothImpl.Instance.DeviceSpec.TouchMap.ToByte(left);
                payload[1] = BluetoothImpl.Instance.DeviceSpec.TouchMap.ToByte(right);
                await BluetoothImpl.Instance.SendRequestAsync(SPPMessage.MessageIds.SET_TOUCHPAD_OPTION, payload);
            }