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


Java AnalogGyro.setSensitivity方法代码示例

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

示例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;
	}
}
 
开发者ID:MTHSRoboticsClub,项目名称:FRC-2017,代码行数:13,代码来源:GyroSensor.java

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

示例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
}
 
开发者ID:alpal23,项目名称:2017TestBench,代码行数:22,代码来源:RobotMap.java


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