edu.wpi.first.wpilibj.buttons.DigitalIOButton的实例源码

项目:RobotCode2014    文件ShooterSubsystem.java   
public ShooterSubsystem() {
    winchSafety = new WinchSafetyThread();
    initalizeCANJaguar();
    firedLimit = new DigitalIOButton(RobotMap.SHOOTER_FIRED_LIMIT);
    canLimitBottom = new CANLimitButton(false);
    firedLimit.whenpressed(new LogToBlackBox("CAN Button hit top"));
    canLimitBottom.whenpressed(new LogToBlackBox("CAN Button hit bottom"));
    latch = new Solenoid(RobotMap.SHOOTER_LATCH);
    compressor = new Compressor(RobotMap.COMPRESSOR_SWITCH,RobotMap.COMPRESSOR_RELAY);
    compressor.start();
    SmartDashboard.putNumber("P",P);
    SmartDashboard.putNumber("I",I);
    SmartDashboard.putNumber("D",D);
}
项目:Hyperion3360-2012    文件Pont.java   
public Pont() {
    mjControl = JoystickDevice.Getcopilot();
    mjDroite = JoystickDevice.GetTankDriveDroite();
    msBrasDown = new Solenoid(SolenoidDevice.mBrasDown);
    msBrasUp = new Solenoid(SolenoidDevice.mBrasUp);
    msBrasLock = new Solenoid(SolenoidDevice.mBrasLock);
    msBrasUnlock = new Solenoid(SolenoidDevice.mBrasUnlock);
    mdLimitLock = new DigitalIOButton(DigitalDevice.mBrasLimiteLock);

    msBrasLock.set(false);
    msBrasUnlock.set(true);
    msBrasDown.set(false);
    msBrasUp.set(true);
}
项目:Hyperion3360-2012    文件ReserveBallon.java   
public ReserveBallon() {
    mElevator = new Relay(RelayDevice.mReserveBallon);

    mjGauche = JoystickDevice.GetTankDriveGauche();
    mjControl = JoystickDevice.Getcopilot();

    limitSwitchBallonHaut = new DigitalIOButton(DigitalDevice.mReserveBallonPresenceHaut);
    limitSwitchBallonBas = new DigitalIOButton(DigitalDevice.mReserveBallonPresenceBas);
    mElevator.setDirection(Relay.Direction.kForward);

    count = 0;
}
项目:HyperionRobot2014    文件OI.java   
public OI() {
    driverRightJoystick = new Joystick(2);
    driverLeftJoystick = new Joystick(1);

    Button_Canon_SetAngleWhiteZone = new DigitalIOButton(3);
    Button_Canon_SetAngleWhiteZone.whileHeld(new Canon_copilotSetAngleZone());
    Button_Canon_SetAngleWhiteZone.whenReleased(new Canon_CancelPreparetopGoal());
    Button_Canon_SetAngleWhiteZone.whenReleased(new CanonAngle_HandleManualMode());

    Button_DriverCanon_PreparetopGoal = new JoystickButton(driverLeftJoystick,1);
    Button_DriverCanon_PreparetopGoal.whileHeld(new CanonSpinner_PreparetopGoal());
    Button_DriverCanon_PreparetopGoal.whenReleased(new Canon_CancelPreparetopGoal());

    Button_DriverCanon_Shoot = new JoystickButton(driverLeftJoystick,7);
    Button_DriverCanon_Shoot.whenpressed(new CanonShooter_Shoot());

    Button_Canon_PilotShootAuto = new JoystickButton(driverRightJoystick,1);
    Button_Canon_PilotShootAuto.whileHeld(new Canon_ShoottopGoalTeleop());
    Button_Canon_PilotShootAuto.whenInactive(new CanonAngle_HandleManualMode());

    Button_DriveTrain_Moveto = new JoystickButton(driverRightJoystick,9);
    Button_DriveTrain_Moveto.whenpressed(new DriveTrain_Moveto(2));

    Button_Canon_copilotGrab = new JoystickButton(driverLeftJoystick,2);
    Button_Canon_copilotGrab.whileHeld(new Canon_copilotGrab());
    Button_Canon_copilotGrab.whenInactive(new CanonAngle_HandleManualMode());

    Button_CanonShooter_Shoot = new DigitalIOButton(1);
    Button_CanonShooter_Shoot.whenpressed(new CanonShooter_Shoot());

    Button_CanonSpinner_ShootSpeed = new DigitalIOButton(2);
    Button_CanonSpinner_ShootSpeed.whileHeld(new CanonSpinner_PreparetopGoal());

    Button_CanonSpinner_CatchSpeed = new DigitalIOButton(4);
    Button_CanonSpinner_CatchSpeed.whileHeld(new CanonSpinner_ReceivePass());

    Button_CanonSpinner_SetManualMode = new DigitalIOButton(8);
    Button_CanonSpinner_SetManualMode.whenInactive(new CanonSpinner_HandlePresetMode());
    Button_CanonSpinner_SetManualMode.whileHeld(new CanonSpinner_HandleManualMode());

    Button_ResetShooterMIN = new JoystickButton(driverRightJoystick,6);
    Button_ResetShooterMIN.whileHeld(new CanonAngle_SetShooterangle(8));
    Button_ResetShooterMIN.whenReleased(new CanonAngle_Cancel());

    Button_ResetShooterMAX = new JoystickButton(driverRightJoystick,11);
    Button_ResetShooterMAX.whileHeld(new CanonAngle_SetShooterangle(90));
    Button_ResetShooterMAX.whenReleased(new CanonAngle_Cancel());

}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...