Ejemplo n.º 1
0
 private async Task startObjectTracking()
 {
     using (ObjectTrackingController controller = new ObjectTrackingController())
     {
         controller.BlocksReceived += Controller_BlocksReceived;
         await controller.Init();
         await controller.RunAsync(50.0f);
     }
 }
Ejemplo n.º 2
0
        private async Task ObjectTrackingSmokeTest(int seconds)
        {
            using (ObjectTrackingController controller = new ObjectTrackingController())
            {
                await controller.Init();
                var task = controller.RunAsync(100.0f);

                Debug.WriteLine(string.Format("Letting object tracking run for {0} seconds", seconds));
                await Task.Delay(seconds * 1000);

                controller.Shutdown();
                bool graceful = task.Wait(3000);

                Debug.WriteLineIf(graceful, "Shutdown successfully");
                Debug.WriteLineIf(!graceful, "Shutdown timedout");
            }
        }