Пример #1
0
        public void InitializeTest()
        {
            IList <string> devices = null;

            System.Threading.Tasks.Task.Run(async() =>
            {
                devices = await Crazyflie.ScanInterfacesAsync();
                Assert.IsTrue(devices.Count >= 1);
                Crazyflie c            = new Crazyflie(devices[0]);
                CrazyflieStatus status = await c.InitializeAsync();
                Assert.IsTrue(status == CrazyflieStatus.Success);
            }).GetAwaiter().GetResult();
        }
Пример #2
0
        public void ScanInterfacesTest()
        {
            // Assuming at least once device is paired, verify it is found.
            IList <string> devices = null;

            System.Threading.Tasks.Task.Run(async() =>
            {
                devices = await Crazyflie.ScanInterfacesAsync();
            }).GetAwaiter().GetResult();
            Assert.IsTrue(devices.Count >= 1);
            Debug.WriteLine("Found devices: ");
            foreach (string device in devices)
            {
                Debug.WriteLine("ID:   " + device);
            }
        }