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