private static void ControllerNotConnected() { DroneStateManager.SetDroneToSafe(); FrameLoadTimer.Stop(); MessageBox.Show( "Controller not connected! \n" + "Please ensure your Leap Motion device is connected" + "and the Leap service is running.", "Controller Error!"); }
public static void StartLeapInteraction() { if (Controller == null) { try { Controller = new Leap.Controller(); Thread.Sleep(1000); } catch (Exception e) { ControllerNotConnected(); return; } } if (Controller.IsConnected) { FrameLoadTimer.Start(); } else { ControllerNotConnected(); } }
public static void StopLeapInteraction() { FrameLoadTimer.Stop(); }