Package edu.wpi.first.wpilibj.buttons

Examples of edu.wpi.first.wpilibj.buttons.JoystickButton


            }
        } catch (EnhancedIOException e) {
        }

        if (!Devmode.DEV_MODE) {
            new JoystickButton(leftStick, 1).whenPressed(new DrivetrainSetGear(false));
            new JoystickButton(leftStick, 2).whenPressed(new DrivetrainSetGear(true));
            new JoystickButton(rightStick, 1).whenPressed(new TusksExtend());
            new JoystickButton(rightStick, 2).whenPressed(new TusksRetract());
           
            // OI box switches
            new InverseDigitalIOButton(ACQUIRER_IN_SWITCH_CHANNEL).whileHeld(new AcquirerAcquire());
            new InverseDigitalIOButton(ACQUIRER_OUT_SWITCH_CHANNEL).whileHeld(new AcquirerReverse());
            new InverseDigitalIOButton(CONVEYOR_UP_SWITCH_CHANNEL).whileHeld(new ConveyManual());
            new InverseDigitalIOButton(CONVEYOR_DOWN_SWITCH_CHANNEL).whileHeld(new ConveyReverseManual());
            new InverseDigitalIOButton(SHOOTER_BUTTON_CHANNEL).whileHeld(new ConveyAutomatic());
            new InverseDigitalIOButton(STINGER_SWITCH_CHANNEL).whileHeld(new StingerExtend());
           
            new JoystickButton(shooterStick, 1).whileHeld(new ConveyManual());
            new JoystickButton(shooterStick, 4).whenPressed(new FlywheelStop());
            new JoystickButton(shooterStick, 5).whileHeld(new AcquirerReverse());
            new JoystickButton(shooterStick, 6).whileHeld(new ConveyReverseManual());
            new JoystickButton(shooterStick, 7).whileHeld(new AcquirerAcquire());
            new JoystickButton(shooterStick, 8).whileHeld(new ConveyAutomatic());

            // see getDistanceButton()
           
            // Debug box switches
            new JoystickButton(debugBox, 1).whileHeld(new FlywheelRun(Flywheel.distances[Flywheel.FENDER_INDEX], Flywheel.speedsTopHoop));
            new JoystickButton(debugBox, 2).whileHeld(new AcquirerAcquire());
            new JoystickButton(debugBox, 3).whileHeld(new ConveyAutomatic());
            new JoystickButton(debugBox, 4).whileHeld(new ConveyManual());
            // Debug box buttons
            new JoystickButton(debugBox, 5).whileHeld(new DrivetrainSetGear(false)); // low gear
            new JoystickButton(debugBox, 6).whileHeld(new DrivetrainSetGear(true)); // high gear
            new JoystickButton(debugBox, 9).whileHeld(new TusksExtend());
            new JoystickButton(debugBox, 10).whileHeld(new TusksRetract());
        }
    }
View Full Code Here

TOP

Related Classes of edu.wpi.first.wpilibj.buttons.JoystickButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.