本文整理汇总了Java中edu.wpi.first.wpilibj.buttons.DigitalIOButton类的典型用法代码示例。如果您正苦于以下问题:Java DigitalIOButton类的具体用法?Java DigitalIOButton怎么用?Java DigitalIOButton使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DigitalIOButton类属于edu.wpi.first.wpilibj.buttons包,在下文中一共展示了DigitalIOButton类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ShooterSubsystem
import edu.wpi.first.wpilibj.buttons.DigitalIOButton; //导入依赖的package包/类
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);
}
示例2: Pont
import edu.wpi.first.wpilibj.buttons.DigitalIOButton; //导入依赖的package包/类
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);
}
示例3: ReserveBallon
import edu.wpi.first.wpilibj.buttons.DigitalIOButton; //导入依赖的package包/类
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;
}
示例4: OI
import edu.wpi.first.wpilibj.buttons.DigitalIOButton; //导入依赖的package包/类
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());
}