コード例 #1
0
ファイル: Robot.java プロジェクト: sudopluto/FRC2015_Java
 public void autonomousInit() {
   openLog("auto");
   resetTimer();
   autonomousCommand = new AutonomousCommand();
   // elevatorPID.down();
   // schedule the autonomous command (example)
   if (autonomousCommand != null) {
     Robot.log("starting autonomous command...");
     autonomousCommand.start();
   }
 }
コード例 #2
0
ファイル: Robot.java プロジェクト: sudopluto/FRC2015_Java
 private void setupChooser() {
   SmartDashboard.putNumber("Left-Distance", DriveToAutoZone.left);
   SmartDashboard.putNumber("Other-Distance", DriveToAutoZone.notLeft);
   chooser2 = new SendableChooser();
   chooser2.addObject("Left", location.left);
   chooser2.addObject("Right", location.right);
   chooser2.addObject("Center", location.center);
   SmartDashboard.putData("Chooser2", chooser2);
   chooser = new SendableChooser();
   chooser.addObject("Triple Play", new AutoTriplePlay());
   // chooser.addObject("Deliver Coop Crate", new AutoDeliverCoopCrate());
   chooser.addObject("Bring Crate", new AutoBringCrate());
   chooser.addObject("Bring Bin", new AutoBringBin());
   chooser.addObject("Bring Both", new AutoBringBoth());
   chooser.addObject("Drive To Auto Zone", new AutoDriveToAutoZone());
   chooser.addObject("Dance", new AutoDance());
   chooser.addObject("Stack Totes", new AutoStackLandfill());
   chooser.addObject("Get Bin (from landfill)", new AutoGetBin());
   Robot.print("setting up chooser...");
   SmartDashboard.putData("Chooser", chooser);
 }