Ejemplo n.º 1
0
        private static void Connect()
        {
            //Console.WriteLine("Connecting to tello.");
            client = UdpUser.ConnectTo("192.168.10.1", 8889);

            ConnectionState = ConnectionState.Connecting;

            byte[] connectPacket = Encoding.UTF8.GetBytes("conn_req:\x00\x00");
            connectPacket[connectPacket.Length - 2] = 0x96;
            connectPacket[connectPacket.Length - 1] = 0x17;
            client.Send(connectPacket);
        }
Ejemplo n.º 2
0
        private static void connect(string IP)
        {
            //Console.WriteLine("Connecting to tello.");
            client = UdpUser.ConnectTo(IP, 8889);

            connectionState = ConnectionState.Connecting;
            //send event
            onConnection(connectionState);

            byte[] connectPacket = Encoding.UTF8.GetBytes("conn_req:\x00\x00");
            connectPacket[connectPacket.Length - 2] = 0x96;
            connectPacket[connectPacket.Length - 1] = 0x17;
            client.Send(connectPacket);
        }
Ejemplo n.º 3
0
        private void Connect()
        {
            //Console.WriteLine("Connecting to tello.");
            _client = UdpUser.ConnectTo("192.168.10.1", 8889);

            Messages  = new Messages(_client);
            _handlers = new CommandHandlers(State, Messages, OnUpdate);

            SetConnectionState(ConnectionState.Connecting);

            var connectPacket = Encoding.UTF8.GetBytes("conn_req:\x00\x00");

            connectPacket[connectPacket.Length - 2] = 0x96;
            connectPacket[connectPacket.Length - 1] = 0x17;
            _client.Send(connectPacket);
        }
Ejemplo n.º 4
0
        private static void connect()
        {
            tick = 0;

            //Debug.Log("Connecting to tello.");
            client = UdpUser.ConnectTo("192.168.10.1", 8889);

            connectionState = ConnectionState.Connecting;
            //send event
            onConnection(connectionState);

            byte[] connectPacket = Encoding.UTF8.GetBytes("conn_req:\x00\x00");
            //byte[] connectPacket = Encoding.UTF8.GetBytes("conn_req:\x96\x17"); // connect with video stream
            connectPacket[connectPacket.Length - 2] = 0x96;
            connectPacket[connectPacket.Length - 1] = 0x17;
            client.Send(connectPacket);
        }