本文整理汇总了Java中edu.wpi.first.wpilibj.CANTalon.enableControl方法的典型用法代码示例。如果您正苦于以下问题:Java CANTalon.enableControl方法的具体用法?Java CANTalon.enableControl怎么用?Java CANTalon.enableControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.CANTalon
的用法示例。
在下文中一共展示了CANTalon.enableControl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DrivetrainPID
import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public DrivetrainPID() {
super(RobotMap.DRIVE_TURN_P, RobotMap.DRIVE_TURN_I, RobotMap.DRIVE_TURN_D);
frontLeft = new CANTalon(RobotMap.FRONT_LEFT_MOTOR);
frontRight = new CANTalon(RobotMap.FRONT_RIGHT_MOTOR);
rearLeft = new CANTalon(RobotMap.REAR_LEFT_MOTOR);
rearRight = new CANTalon(RobotMap.REAR_RIGHT_MOTOR);
frontLeft.enableControl();
frontRight.enableControl();
rearLeft.enableControl();
rearRight.enableControl();
oneDrive = new RobotDrive(frontLeft, rearLeft, frontRight, rearRight);
SmartDashboard.putNumber("Front right", 0);
SmartDashboard.putNumber("Front left", 0);
}
示例2: Pitch
import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public Pitch(){
pitch = new CANTalon(RobotMap.TARGETING_PITCH_MOTOR);
pitch.reset();
pitch.enableControl();
encoderMin = pitch.getEncPosition();
encoderMax = encoderMin + RobotMap.ENCODER_RANGE;
SmartDashboard.putNumber("Encoder minimum", encoderMin);
SmartDashboard.putNumber("Encoder maximum", encoderMax);
}
示例3: Yaw
import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public Yaw(){
yaw = new CANTalon(RobotMap.TARGETING_YAW_MOTOR);
yaw.enableControl();
yawZero = yaw.getEncPosition();
yaw.changeControlMode(TalonControlMode.Position);
yaw.setPID(RobotMap.YAW_P, RobotMap.YAW_I, RobotMap.YAW_D);
}
示例4: Drivetrain
import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public Drivetrain() {
frontLeft = new CANTalon(RobotMap.FRONT_LEFT_MOTOR);
frontRight = new CANTalon(RobotMap.FRONT_RIGHT_MOTOR);
rearLeft = new CANTalon(RobotMap.REAR_LEFT_MOTOR);
rearRight = new CANTalon(RobotMap.REAR_RIGHT_MOTOR);
frontLeft.enableControl();
frontRight.enableControl();
rearLeft.enableControl();
rearRight.enableControl();
frontDrive = new RobotDrive(rearLeft, rearRight);
rearDrive = new RobotDrive(rearLeft, rearRight);
}
示例5: YawPID
import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public YawPID() {
super(RobotMap.YAW_VISION_P, RobotMap.YAW_VISION_I, RobotMap.YAW_VISION_D);
yaw = new CANTalon(RobotMap.TARGETING_YAW_MOTOR);
yaw.enableControl();
yawZero = yaw.getEncPosition();
}
示例6: Manipulator
import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public Manipulator() {
manipulator = new CANTalon(RobotMap.MANIPULATOR_MOTOR);
manipulator.enableControl();
}