本文整理汇总了Java中org.usfirst.frc.team166.robot.subsystems.Drive类的典型用法代码示例。如果您正苦于以下问题:Java Drive类的具体用法?Java Drive怎么用?Java Drive使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Drive类属于org.usfirst.frc.team166.robot.subsystems包,在下文中一共展示了Drive类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: robotInit
import org.usfirst.frc.team166.robot.subsystems.Drive; //导入依赖的package包/类
/**
* This function is run when the robot is first started up and should be used for any initialization code.
*/
@Override
public void robotInit() {
drive = new Drive();
gearManipulator = new GearManipulator();
intake = new Intake();
shooter = new Shooter();
storage = new Storage();
climber = new Climber();
elevator = new Elevator();
vision = new Vision();
visionProcessing = new LiveUsbCamera();
oi = new OI();
Robot.gearManipulator.gearManipulatorUp();
chooser.addDefault("Center Gear Auto", new CenterGearAutonomous());
chooser.addObject("Base Line Autonomous", new BaseLineAutonomous());
chooser.addObject("Boiler side Blue auto", new BoilerSideBlueAuto());
chooser.addObject("Boiler side Red auto", new BoilerSideRedAuto());
chooser.addObject("Do Nothing Autonomous", null);
double speed = Preferences.getInstance().getDouble(RobotMap.centerGearAutoSpeed, 0);
double distance = Preferences.getInstance().getDouble(RobotMap.centerGearAutoDistance, 0);
SmartDashboard.putData("Auto Mode", chooser);
// xboxLeftTrigger.whileActive(new ClimberTriggerOn());
xboxRightTrigger.whileActive(new RunShooter());
visionProcessing.runUsbCamera();
}
示例2: robotInit
import org.usfirst.frc.team166.robot.subsystems.Drive; //导入依赖的package包/类
/**
* This function is run when the robot is first started up and should be used for any initialization code.
*/
@Override
public void robotInit() {
drive = new Drive();
intake = new Intake();
shooter = new Shooter();
aimShooter = new AimShooter();
vision = new Vision();
intakeRoller = new IntakeRoller();
aManipulators = new AManipulators();
shooterLock = new ShooterLock();
// autochooser
autoChooser = new SendableChooser();
oi = new OI();
// auto chooser commands
autoChooser.addObject("NOTHING", null);
autoChooser.addDefault("ONE: LOW", new FarLeftAuto());
autoChooser.addObject("MID: UP", new AllUpMidAuto());
autoChooser.addObject("MID: DOWN", new AllDownMidAuto());
autoChooser.addObject("MID: CDF", new MidCDFAuto());
autoChooser.addObject("TWO: DOWN (Untested)", new AllDownPositionTwoAuto());
autoChooser.addObject("TWO: UP (Untested)", new AllUpPositionTwoAuto());
// autoChooser.addObject("MidLeftAuto", new MidLeftAuto());
// autoChooser.addObject("MidRightAuto", new MidRightAuto());
// autoChooser.addObject("FarRightAuto", new FarRightAuto());
// autoChooser.addObject("Uber Auto", new UberAuto());
// Hard code for auto
// autonomousCommand = new FarLeftAuto();
// autonomousCommand = new AllDownAuto();
// autonomousCommand = new AllUpAuto();
// autonomousCommand = new PaperWeightAuto();
SmartDashboard.putData("Autonomous", autoChooser);
povUpTrigger.whenActive(new MoveActuatorsUp());
povDownTrigger.whenActive(new MoveActuatorsDown());
rightXBoxTrigger.whenActive(new SlowMediumRangeShot());
// leftXBoxTrigger.whenActive(new BackwardMovingShot());
}