Java 类edu.wpi.first.wpilibj.PIDSource.PIDSourceParameter 实例源码

项目:RecycledRushDriveTrain    文件:RobotMap.java   
public static void init() {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    driveTrainleftFrontTalon0 = new TalonSRX(0);
    LiveWindow.addActuator("DriveTrain", "leftFrontTalon0", (TalonSRX) driveTrainleftFrontTalon0);

    driveTrainleftBackTalon1 = new TalonSRX(1);
    LiveWindow.addActuator("DriveTrain", "leftBackTalon1", (TalonSRX) driveTrainleftBackTalon1);

    driveTrainrightFrontTalon2 = new TalonSRX(2);
    LiveWindow.addActuator("DriveTrain", "rightFrontTalon2", (TalonSRX) driveTrainrightFrontTalon2);

    driveTrainrightBackTalon3 = new TalonSRX(3);
    LiveWindow.addActuator("DriveTrain", "rightBackTalon3", (TalonSRX) driveTrainrightBackTalon3);

    driveTrainRobotDrive = new RobotDrive(driveTrainleftFrontTalon0, driveTrainleftBackTalon1,
          driveTrainrightFrontTalon2, driveTrainrightBackTalon3);

    driveTrainRobotDrive.setSafetyEnabled(true);
    driveTrainRobotDrive.setExpiration(0.1);
    driveTrainRobotDrive.setSensitivity(0.5);
    driveTrainRobotDrive.setMaxOutput(1.0);

    driveTraingyro = new Gyro(0);
    LiveWindow.addSensor("DriveTrain", "gyro", driveTraingyro);
    driveTraingyro.setSensitivity(0.007);
    driveTrainleftFrontEncoder = new Encoder(17, 18, false, EncodingType.k4X);
    LiveWindow.addSensor("DriveTrain", "leftFrontEncoder", driveTrainleftFrontEncoder);
    driveTrainleftFrontEncoder.setDistancePerPulse(1.0);
    driveTrainleftFrontEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
    driveTrainleftBackEncoder = new Encoder(19, 20, false, EncodingType.k4X);
    LiveWindow.addSensor("DriveTrain", "leftBackEncoder", driveTrainleftBackEncoder);
    driveTrainleftBackEncoder.setDistancePerPulse(1.0);
    driveTrainleftBackEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
    driveTrainrightFrontEncoder = new Encoder(21, 22, false, EncodingType.k4X);
    LiveWindow.addSensor("DriveTrain", "rightFrontEncoder", driveTrainrightFrontEncoder);
    driveTrainrightFrontEncoder.setDistancePerPulse(1.0);
    driveTrainrightFrontEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);
    driveTrainrightBackEncoder = new Encoder(23, 24, false, EncodingType.k4X);
    LiveWindow.addSensor("DriveTrain", "rightBackEncoder", driveTrainrightBackEncoder);
    driveTrainrightBackEncoder.setDistancePerPulse(1.0);
    driveTrainrightBackEncoder.setPIDSourceParameter(PIDSourceParameter.kRate);

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
项目:RecycleRush    文件:RobotMap.java   
public static void init() {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    driveTrainleftMotor = new Talon(0);
    LiveWindow.addActuator("DriveTrain", "leftMotor", (Talon) driveTrainleftMotor);

    driveTrainrightMotor = new Talon(1);
    LiveWindow.addActuator("DriveTrain", "rightMotor", (Talon) driveTrainrightMotor);

    driveTrainMotors = new RobotDrive(driveTrainleftMotor, driveTrainrightMotor);

    driveTrainMotors.setSafetyEnabled(true);
    driveTrainMotors.setExpiration(0.1);
    driveTrainMotors.setSensitivity(0.5);
    driveTrainMotors.setMaxOutput(1.0);


    driveTrainwheelRotations = new Encoder(2, 3, false, EncodingType.k4X);
    LiveWindow.addSensor("DriveTrain", "wheelRotations", driveTrainwheelRotations);
    driveTrainwheelRotations.setDistancePerPulse(0.102);
    driveTrainwheelRotations.setPIDSourceParameter(PIDSourceParameter.kRate);
    driveTraingyro = new Gyro(0);
    LiveWindow.addSensor("DriveTrain", "gyro", driveTraingyro);
    driveTraingyro.setSensitivity(0.0015);
    driveTrainrangeFinder = new AnalogInput(1);
    LiveWindow.addSensor("DriveTrain", "rangeFinder", driveTrainrangeFinder);

    armSolenoid = new DoubleSolenoid(0, 0, 1);      
    LiveWindow.addActuator("Arms", "armSolenoid", armSolenoid);

    armWidthLimit = new DigitalInput(1);
    LiveWindow.addSensor("Arms", "armWidthLimit", armWidthLimit);

    elevatorlimitSwitch = new DigitalInput(0);
    LiveWindow.addSensor("Elevator", "limitSwitch", elevatorlimitSwitch);

    elevatorSolenoid = new DoubleSolenoid(0, 6, 7);      
    LiveWindow.addActuator("Elevator", "elevatorSolenoid", elevatorSolenoid);

    rcSolenoid = new DoubleSolenoid(0, 4, 5); 
    LiveWindow.addActuator("RC Picker Upper Sole", "rcSolenoid", rcSolenoid);

// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
项目:HolonomicDrive    文件:RobotMap.java   
public static void init()
{
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
       driveTrainLeftFront = new Talon(0);
       LiveWindow.addActuator("DriveTrain", "Left Front", (Talon) driveTrainLeftFront);

       driveTrainLeftRear = new Talon(1);
       LiveWindow.addActuator("DriveTrain", "Left Rear", (Talon) driveTrainLeftRear);

       driveTrainRightFront = new Talon(2);
       LiveWindow.addActuator("DriveTrain", "Right Front", (Talon) driveTrainRightFront);

       driveTrainRightRear = new Talon(3);
       LiveWindow.addActuator("DriveTrain", "Right Rear", (Talon) driveTrainRightRear);

       driveTrainHolonomicDrive = new RobotDrive(driveTrainLeftFront, driveTrainLeftRear,
             driveTrainRightFront, driveTrainRightRear);

       driveTrainHolonomicDrive.setSafetyEnabled(false);
       driveTrainHolonomicDrive.setExpiration(0.1);
       driveTrainHolonomicDrive.setSensitivity(0.5);
       driveTrainHolonomicDrive.setMaxOutput(1.0);

       driveTrainHolonomicDrive.setInvertedMotor(RobotDrive.MotorType.kFrontRight, true);
       driveTrainHolonomicDrive.setInvertedMotor(RobotDrive.MotorType.kRearRight, true);
       forkliftMotor = new Talon(4);
       LiveWindow.addActuator("Forklift", "Motor", (Talon) forkliftMotor);

       forkliftEncoder = new Encoder(0, 1, false, EncodingType.k4X);
       LiveWindow.addSensor("Forklift", "Encoder", forkliftEncoder);
       forkliftEncoder.setDistancePerPulse(0.012);
       forkliftEncoder.setPIDSourceParameter(PIDSourceParameter.kDistance);
       rollerMotor = new Talon(5);
       LiveWindow.addActuator("Roller", "Motor", (Talon) rollerMotor);

       stabilizerBackLeft = new Servo(6);
       LiveWindow.addActuator("Stabilizer", "Back Left", stabilizerBackLeft);

       stabilizerBackRight = new Servo(8);
       LiveWindow.addActuator("Stabilizer", "Back Right", stabilizerBackRight);

       stabilizerFrontLeft = new Servo(7);
       LiveWindow.addActuator("Stabilizer", "Front Left", stabilizerFrontLeft);

       stabilizerFrontRight = new Servo(9);
       LiveWindow.addActuator("Stabilizer", "Front Right", stabilizerFrontRight);


   // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS

       driveTrainGyro = new HVAGyro(0);
       LiveWindow.addSensor("DriveTrain", "Gyro", driveTrainGyro);
       driveTrainGyro.setSensitivity(0.007);

    powerDistributionPanel = new PowerDistributionPanel();
}
项目:CMonster2014    文件:RobotMap.java   
public static void init() {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    driveSubsystemFrontLeftJaguar = new Jaguar(1, 1);
    LiveWindow.addActuator("Drive Subsystem", "Front Left Jaguar", (Jaguar) driveSubsystemFrontLeftJaguar);

    driveSubsystemFrontRightJaguar = new Jaguar(1, 2);
    LiveWindow.addActuator("Drive Subsystem", "Front Right Jaguar", (Jaguar) driveSubsystemFrontRightJaguar);

    driveSubsystemRearLeftJaguar = new Jaguar(1, 3);
    LiveWindow.addActuator("Drive Subsystem", "Rear Left Jaguar", (Jaguar) driveSubsystemRearLeftJaguar);

    driveSubsystemRearRightJaguar = new Jaguar(1, 4);
    LiveWindow.addActuator("Drive Subsystem", "Rear Right Jaguar", (Jaguar) driveSubsystemRearRightJaguar);

    driveSubsystemRearRightEncoder = new Encoder(1, 2, 1, 3, false, EncodingType.k2X);
    LiveWindow.addSensor("Drive Subsystem", "Rear Right Encoder", driveSubsystemRearRightEncoder);
    driveSubsystemRearRightEncoder.setDistancePerPulse(0.002908882);
    driveSubsystemRearRightEncoder.setPIDSourceParameter(PIDSourceParameter.kDistance);
    driveSubsystemRearRightEncoder.start();
    compressorSubsystemCompressor = new Compressor(1, 1, 1, 1);

    sweeperSubsystemSolenoid = new Solenoid(1, 2);
    LiveWindow.addActuator("Sweeper Subsystem", "Solenoid", sweeperSubsystemSolenoid);

    sweeperSubsystemJaguar = new Jaguar(1, 5);
    LiveWindow.addActuator("Sweeper Subsystem", "Jaguar", (Jaguar) sweeperSubsystemJaguar);

    catcherSubsytemSolenoid = new Solenoid(1, 1);
    LiveWindow.addActuator("Catcher Subsytem", "Solenoid", catcherSubsytemSolenoid);

    ledSubsystemPin0 = new DigitalOutput(1, 4);

    ledSubsystemPin1 = new DigitalOutput(1, 5);

    ledSubsystemPin2 = new DigitalOutput(1, 6);

    ledSubsystemPin3 = new DigitalOutput(1, 7);

    ledSubsystemPin4 = new DigitalOutput(1, 8);

    ledSubsystemPin5 = new DigitalOutput(1, 9);

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    driveSubsystemSteeringGyro = new BetterGyro(1, 1);
    driveSubsystemSteeringGyroTemp = new TempSensor(2);
    driveSubsystemAccelerometer = new ADXL345_I2C(1, ADXL345_I2C.DataFormat_Range.k4G);
}