当前位置: 首页>>代码示例>>Java>>正文


Java CANTalon.enableControl方法代码示例

本文整理汇总了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);
  }
 
开发者ID:SouthEugeneRoboticsTeam,项目名称:Stronghold-2016,代码行数:17,代码来源:DrivetrainPID.java

示例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);
}
 
开发者ID:SouthEugeneRoboticsTeam,项目名称:Stronghold-2016,代码行数:10,代码来源:Pitch.java

示例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);
}
 
开发者ID:SouthEugeneRoboticsTeam,项目名称:Stronghold-2016,代码行数:9,代码来源:Yaw.java

示例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);
}
 
开发者ID:SouthEugeneRoboticsTeam,项目名称:Stronghold-2016,代码行数:15,代码来源:Drivetrain.java

示例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();
}
 
开发者ID:SouthEugeneRoboticsTeam,项目名称:Stronghold-2016,代码行数:7,代码来源:YawPID.java

示例6: Manipulator

import edu.wpi.first.wpilibj.CANTalon; //导入方法依赖的package包/类
public Manipulator() {
	manipulator = new CANTalon(RobotMap.MANIPULATOR_MOTOR);
	manipulator.enableControl();
}
 
开发者ID:SouthEugeneRoboticsTeam,项目名称:Stronghold-2016,代码行数:5,代码来源:Manipulator.java


注:本文中的edu.wpi.first.wpilibj.CANTalon.enableControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。