Пример #1
0
 /// <summary>
 /// Callback při stisknutí tačítka pro absolutní pozicování robota
 /// </summary>
 /// <param name="absoluteControllMode">true, pokud zobrazit absolutní pozicování</param>
 private void buttonForChangeControllModePressed(bool absoluteControllMode)
 {
     robot.limitProtectionEnable(true);
     absoluteControllView.limitProtectionEnable(true);
     joystick.onOff(!absoluteControllMode);
     mainWindow.changeControllMode(absoluteControllMode);
     robot.changeControllMode(absoluteControllMode);
 }
Пример #2
0
        /// <summary>
        /// Inicializace joysticku/gamepadu
        /// </summary>
        private void inicializeJoystick()
        {
            controllView.showControlMessage(MessageTypeEnum.progress, "Probíhá inicializace ovládacího zařízení.");
            JoystickBridge joystickBridge = new JoystickBridge();

            joystick = joystickBridge.getJoystick();
            joystick.onOff(false);
            joystick.subscribeDirectMoveStickObserver(joystickDirectMoveChanged);
            joystick.subscribeMoveStickObserver(joystickMoveChanged);
            joystick.subscribeButtonMoveUpObserver(joystickButtonMoveUpChanged);
            joystick.subscribeButtonMoveDownObserver(joystickButtonMoveDownChanged);
            joystick.subscribeButtonNarrowObserver(joystickButtonNarrowChanged);
            joystick.subscribeButtonWidenObserver(joystickButtonWidenChanged);
            joystick.subscribeButtonDefaultPositionObserver(joystickButtonDefaultPositionChanged);
            joystick.subscribeButtonRotateLeftObserver(joystickButtonRotateLeftChanged);
            joystick.subscribeButtonRotateRightObserver(joystickButtonRotateRightChanged);
            joystick.subscribeButtonStopObserver(joystickButtonStopChanged);
            joystick.subscribeButtonTiltBackObserver(joystickButtonTiltBackChanged);
            joystick.subscribeButtonTiltFrontObserver(joystickButtonTiltFrontChanged);
            joystick.subscribeButtonTiltLeftObserver(joystickButtonTiltLeftChanged);
            joystick.subscribeButtonTiltRightObserver(joystickButtonTiltRightChanged);
            joystick.subscribeFrontNarrowObserver(joysticFrontNarrowChanged);
            joystick.subscribeBackNarrowObserver(joystickBackNarrowChanged);
            joystick.subscribeErrorObserver(refindJoystick);
            if (!joystickBridge.success)
            {
                gamePadChecker.Enabled = true;
                controllView.showControlMessage(MessageTypeEnum.error, joystickBridge.message);
            }
            else
            {
                controllView.showControlMessage(MessageTypeEnum.success, joystickBridge.message);
            }
        }
Пример #3
0
 /// <summary>
 /// Inicializace joysticku/gamepadu
 /// </summary>
 private void inicializeJoystick()
 {
     controllView.showControlMessage(MessageTypeEnum.progress, "Probíhá inicializace ovládacího zařízení.");
     JoystickBridge joystickBridge = new JoystickBridge();
     joystick = joystickBridge.getJoystick();
     joystick.onOff(false);
     joystick.subscribeDirectMoveStickObserver(joystickDirectMoveChanged);
     joystick.subscribeMoveStickObserver(joystickMoveChanged);
     joystick.subscribeButtonMoveUpObserver(joystickButtonMoveUpChanged);
     joystick.subscribeButtonMoveDownObserver(joystickButtonMoveDownChanged);
     joystick.subscribeButtonNarrowObserver(joystickButtonNarrowChanged);
     joystick.subscribeButtonWidenObserver(joystickButtonWidenChanged);
     joystick.subscribeButtonDefaultPositionObserver(joystickButtonDefaultPositionChanged);
     joystick.subscribeButtonRotateLeftObserver(joystickButtonRotateLeftChanged);
     joystick.subscribeButtonRotateRightObserver(joystickButtonRotateRightChanged);
     joystick.subscribeButtonStopObserver(joystickButtonStopChanged);
     joystick.subscribeButtonTiltBackObserver(joystickButtonTiltBackChanged);
     joystick.subscribeButtonTiltFrontObserver(joystickButtonTiltFrontChanged);
     joystick.subscribeButtonTiltLeftObserver(joystickButtonTiltLeftChanged);
     joystick.subscribeButtonTiltRightObserver(joystickButtonTiltRightChanged);
     joystick.subscribeFrontNarrowObserver(joysticFrontNarrowChanged);
     joystick.subscribeBackNarrowObserver(joystickBackNarrowChanged);
     joystick.subscribeErrorObserver(refindJoystick);
     if (!joystickBridge.success)
     {
         gamePadChecker.Enabled = true;
         controllView.showControlMessage(MessageTypeEnum.error, joystickBridge.message);
     }
     else
     {
         controllView.showControlMessage(MessageTypeEnum.success, joystickBridge.message);
     }
 }