本文整理汇总了Java中edu.wpi.first.wpilibj.AnalogGyro.setSensitivity方法的典型用法代码示例。如果您正苦于以下问题:Java AnalogGyro.setSensitivity方法的具体用法?Java AnalogGyro.setSensitivity怎么用?Java AnalogGyro.setSensitivity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.AnalogGyro
的用法示例。
在下文中一共展示了AnalogGyro.setSensitivity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DrivetrainSubsystem
import edu.wpi.first.wpilibj.AnalogGyro; //导入方法依赖的package包/类
public DrivetrainSubsystem(){
leftMotor = RobotMap.leftDriveMotor.getController();
rightMotor = RobotMap.rightDriveMotor.getController();
drive = new RobotDrive(leftMotor, rightMotor);
accelerometer = new IntegratedBuiltinAccelerometer(Range.k2G);
leftEncoder = new Encoder(RobotMap.leftEncoder[0], RobotMap.leftEncoder[1]);
rightEncoder = new Encoder(RobotMap.rightEncoder[0], RobotMap.rightEncoder[1]);
leftEncoder.setReverseDirection(true);
rightEncoder.setReverseDirection(true);
driveGyro = new AnalogGyro(RobotMap.driveGyroPort);
driveGyro.reset();
driveGyro.setSensitivity(0.007);
}
示例2: initialize
import edu.wpi.first.wpilibj.AnalogGyro; //导入方法依赖的package包/类
public static void initialize()
{
if (!initialized) {
myGyro = new AnalogGyro(GYRO_CHANNEL);
myGyro.setSensitivity(GYRO_SENSITIVITY);
myGyro.calibrate();
initialized = true;
}
}
示例3: ShooterSubsystem
import edu.wpi.first.wpilibj.AnalogGyro; //导入方法依赖的package包/类
public ShooterSubsystem(){
liftController=RobotMap.liftMotor.getController();
wheelController=RobotMap.wheelMotor.getController();
liftGyro = new AnalogGyro(RobotMap.liftGyroPort);
liftGyro.reset();
liftGyro.setSensitivity(0.007);
limitSwitch = new DigitalInput(RobotMap.limitSwitch);
}
示例4: init
import edu.wpi.first.wpilibj.AnalogGyro; //导入方法依赖的package包/类
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
motorsVictor0 = new VictorSP(0);
LiveWindow.addActuator("Motors", "Victor0", (VictorSP) motorsVictor0);
motorsVictor1 = new VictorSP(1);
LiveWindow.addActuator("Motors", "Victor1", (VictorSP) motorsVictor1);
LiveWindow.addActuator("Motors", "TalonSRX", (CANTalon) motorsCANTalon);
electricalPowerDistributionPanel1 = new PowerDistributionPanel(0);
LiveWindow.addSensor("Electrical", "PowerDistributionPanel 1", electricalPowerDistributionPanel1);
sensorsAnalogGyro1 = new AnalogGyro(0);
LiveWindow.addSensor("Sensors", "AnalogGyro 1", sensorsAnalogGyro1);
sensorsAnalogGyro1.setSensitivity(0.007);
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}