Beispiel #1
0
        protected override void OnResume()
        {
            isPaused = false;
            base.OnResume();
            input_manager.RegisterInputDeviceListener(this, null);
            updateOnScreenJoyVisibility();
            //fix if joy was moved when paused.
            onScreenJoyL.returnHandleToCenter();
            onScreenJoyR.returnHandleToCenter();

            Tello.connectionSetPause(false);//reanable connections if paused.
        }
Beispiel #2
0
        protected override void OnPause()
        {
            //fix if joy was moved when paused.
            onScreenJoyL.returnHandleToCenter();
            onScreenJoyR.returnHandleToCenter();

            //Zero out Joy input so we don't keep flying.
            Tello.controllerState.setAxis(0, 0, 0, 0);
            Tello.sendControllerUpdate();

            isPaused = true;

            Tello.connectionSetPause(true);//pause connections (if connected).

            base.OnPause();
            input_manager.UnregisterInputDeviceListener(this);
        }