Java 类edu.wpi.first.wpilibj.templates.commands.CommandBase 实例源码

项目:2014-Aerial-Assist    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();

    frontLeft = new Victor(1); // Creating Victor motors
    frontRight = new Victor(2);
    rearLeft = new Victor(3);
    rearRight = new Victor(4);

    myDrive = new RobotDrive(frontLeft, frontRight);
    // myDrive = new RobotDrive(frontLeft,frontRight,rearLeft,rearRight);

    driveStick = new Joystick(1);

    gyro = new Gyro(1);

    // Initialize all subsystems
    CommandBase.init();
}
项目:bainbridgefirst    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();

    frontLeft = new Victor(1); // Creating Victor motors
    frontRight = new Victor(2);
    rearLeft = new Victor(3);
    rearRight = new Victor(4);

    myDrive = new RobotDrive(frontLeft, frontRight);
    // myDrive = new RobotDrive(frontLeft,frontRight,rearLeft,rearRight);

    driveStick = new Joystick(1);

    gyro = new Gyro(1);

    // Initialize all subsystems
    CommandBase.init();
}
项目:RKellyBot    文件:Robot.java   
public void robotInit() {
        // instantiate the command used for the autonomous period
        //autonomousCommand = new ExampleCommand();

        // Initialize all subsystems
        CommandBase.init();

        table = NetworkTable.getTable("CRIO");
        table.putBoolean("bool", true);
        table.putNumber("double", 3.1415927);
        table.putString("sring", "a string");

        LogDebugger.log("robot init!!!");

//  LiveWindow.addActuator("compressor", "alt relay", RobotMap.testCompRelay);
//  LiveWindow.addActuator("compressor", "act compressor", RobotMap.airCompressor);
//  LiveWindow.addSensor("compressor", "sensor compressor", RobotMap.airCompressor);
    }
项目:aeronautical-facilitation    文件:AeronauticalFacilitation.java   
/**
 *
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    DriveTrain = new DriveTrain();
    launchercontroller = new Launcher();
    rollerSubsystem = new Roller();
    display = DriverStationLCD.getInstance();
    compressor = new Compressor(RobotMap.PressureSwitchDigitalInput, RobotMap.CompressorRelay);
    compressor.start();

    DriveTrain.shiftHighGear();

    OI.initialize();


    autonomousCommand = new Autonomous();

    arduino = new ArduinoConnection();
    arduino.setPattern("4");
    pattern = 0;
    driverStation = DriverStation.getInstance();
    alliance = driverStation.getAlliance().value;
    digital1 = driverStation.getDigitalIn(1);
    digital2 = driverStation.getDigitalIn(2);
    digital3 = driverStation.getDigitalIn(3);
    // Initialize all subsystems.
    // Subsystems: a self-contained system within a larger system. 
    CommandBase.init();
}
项目:2014    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();
    RobotParts.compressor.start();
    RobotParts.drive.setSafetyEnabled(false);

    // Initialize all subsystems
    CommandBase.init();
}
项目:2014Robot-    文件:TestRobot.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {

    SmartDashboard.putData("Tank Drive", new SetStation(1));
    SmartDashboard.putData("Arcade Drive", new SetStation(2));
    SmartDashboard.putData("XBox Controller Tank", new SetStation(3));
    SmartDashboard.putData("XBox Controller Arcade", new SetStation(4));
    /**
     * Adds buttons to SmartDAshboard
    */        
    // instantiate the command used for the autonomous period
    autonomousCommand = new AutonomousCommand();
    prefs = Preferences.getInstance();
    prefs.putDouble("Deadband",0.1);
    prefs.putDouble("ArmDeadband", 0.1);
    prefs.putDouble("LeftPolarity", -1);
    prefs.putDouble("RightPolarity", -1);
    prefs.putDouble("Scaler", 1);
    prefs.putDouble("HueLow", 80);
    prefs.putDouble("HueHigh", 200);
    prefs.putDouble("SaturationLow",100);
    prefs.putDouble("SaturationHigh",300);
    prefs.putDouble("BrightnessLow",200);
    prefs.putDouble("BrightnessHigh", 240);
    SmartDashboard.putData(Scheduler.getInstance());
    /**
     * Adds variables to the Preferences Table in SmartDashboard,
     */
    // Initialize all subsystems
    CommandBase.init();

    System.out.println("--------------------2713-----------------------");
    System.out.println("*Awsome-sauce code produced by Fid  inc.      *");
    System.out.println("*WARNING: might not possibly work             *");
    System.out.println("-----------------TEST-ROBOT--------------------");       
}
项目:BunnyBotPIDv2    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();

    // Initialize all subsystems
    CommandBase.init();
}
项目:2014MainCode    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    teleopDriveCommand = new DriveWithJoystick();

    // Initialize all subsystems
    CommandBase.init();
}
项目:AerialAssist2014    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new AutoMode();

    // Initialize all subsystems
    CommandBase.init();
}
项目:2014FRCCode    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();

    // Initialize all subsystems
    CommandBase.init();
}
项目:MecanumDrivetrain    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    //autonomousCommand = new Autonomous();
    // Initialize all subsystems
    CommandBase.init();
    SmartDashboard.putData(Scheduler.getInstance());
    delay = new Delay(1);
    gyroOff = CommandBase.gyro.getAngle()/Timer.getFPGATimestamp();
}
项目:MecanumDrivetrain    文件:RobotTemplate.java   
public void teleopInit() {
// This makes sure that the autonomous stops running when
       // teleop starts running. If you want the autonomous to 
       // continue until interrupted by another command, remove
       // this line or comment it out.
       //autonomousCommand.cancel();
       delay = new Delay(1);
       gyroOff = CommandBase.gyro.getAngle()/Timer.getFPGATimestamp();
   }
项目:rover    文件:RoverRobot.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    getWatchdog().setEnabled(true);
    RobotMap.init();
    CommandBase.init();
    drivetrain = CommandBase.drivetrain;
    SmartDashboard.putBoolean("motorKilled", false);
}
项目:legacy    文件:RobotTemplate.java   
public void robotInit() {
    autonomousCommand = new Autonomous1();
    autoChooser = new SendableChooser();
    autoChooser.addDefault("Autonomous 1", new Autonomous1());
    SmartDashboard.putData("Autonomous Chooser", autoChooser);
    CommandBase.init();
}
项目:frc-3186    文件:DecaBot.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
   // autonomousCommand = new ExampleCommand();

    // Initialize all subsystems
    CommandBase.init();
}
项目:GearsBot    文件:GearsBot.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // Initialize the CommandBase so that everything is ready to run
    CommandBase.init();

    // instantiate the command used for the autonomous period
    // Set it so that it runs the SodaDelivery command automatically during 
    // the automous period.
    autonomousCommand = new SodaDelivery();
}
项目:2013-code-v2    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();

    // Initialize all subsystems
    CommandBase.init();
}
项目:Robot-Code-2013    文件:RobotTemplate.java   
/**
 * This function is run when the robot is first started up and should be
 * used for any initialization code.
 */
public void robotInit() {
    // instantiate the command used for the autonomous period
    autonomousCommand = new ExampleCommand();
    driveCommand = new Drive();
    shootCommand = new RunShooter();
    eccentricCommand = new EccentricWheel();
    potCommand = new Potentiometer();

    // Initialize all subsystems
    CommandBase.init();
}
项目:MecanumDrivetrain    文件:RobotTemplate.java   
public void updateStatus() {
    CommandBase.driveTrain.updateStatus();
}
项目:legacy    文件:RightDriveOutput.java   
public void pidWrite(double d) {
    CommandBase.drivetrain.setRightDrive(d);
    System.out.println("Right Drive Speed: "+d);
}
项目:legacy    文件:Transmission.java   
public void changeGears() {
    lowGear = !lowGear;
    CommandBase.drivetrain.changeGears(lowGear);
    System.out.println("Gears Changed");
}
项目:legacy    文件:LeftDriveOutput.java   
public void pidWrite(double d) {
    CommandBase.drivetrain.setLeftDrive(d);
    System.out.println("Left Drive Speed: "+d);
}
项目:frc-3186    文件:DecaBot.java   
public void updatestatus(){
    CommandBase.driveTrain.updateStatus();
}
项目:RKellyBot    文件:Robot.java   
public void updateStatus(){
       CommandBase.theScooperCollector.updateStatus();
       CommandBase.theAccelerometer.updateStatus();
CommandBase.thePizzaBoxTilt.updateStatus(); 
   }