Skip to content

Commit

Permalink
Kinect debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andijakl committed Sep 18, 2016
1 parent aaf1392 commit bdf82db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions KissMachineKinect/KissMachineKinect.Windows/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ private async void Kinect_IsAvailableChanged(KinectSensor sender, IsAvailableCha
{
if (args.IsAvailable && !_kinectStarted && _kinectInitialized)
{
Debug.WriteLine("Found Kinect");
_kinectInitWaitTimer?.Stop();
_kinectInitWaitTimer = null;
_kinectStarted = true;
Expand All @@ -389,6 +390,7 @@ private async void Kinect_IsAvailableChanged(KinectSensor sender, IsAvailableCha
}
// If no Kinect is available, we'll only get one unavailable callback
// Wait for a few seconds, then show error info
Debug.WriteLine("Kinect not available - starting timer for error message and to give time for re-connect");
_kinectInitWaitTimer = new DispatcherTimer();
_kinectInitWaitTimer.Tick += KinectInitWaitTimerOnTick;
_kinectInitWaitTimer.Interval = TimeSpan.FromSeconds(5);
Expand All @@ -398,6 +400,7 @@ private async void Kinect_IsAvailableChanged(KinectSensor sender, IsAvailableCha

if (_kinectStarted && !args.IsAvailable && _kinectInitialized)
{
Debug.WriteLine("Kinect was already running, but is no longer available");
// Kinect was already running, but is no longer available
await ShowNoKinectAvailableMessageAsync();
}
Expand Down

0 comments on commit bdf82db

Please sign in to comment.