예제 #1
0
        private void ListenTello()
        {
            // TODO handle timeouts
            Task.Run(async() =>
            {
                while (true)
                {
                    var received    = await TelloClient.ReceiveAsync();
                    var receivedStr = Encoding.ASCII.GetString(received.Buffer);

                    if (receivedStr.StartsWith("conn_ack"))
                    {
                        _isConnected = true;
                        ConnectionStatusHandler(this, new ConnectionStatusEventArgs(ConnectionStatus.Connected));
                    }
                }
            });
        }