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


Java Compressor.setClosedLoopControl方法代码示例

本文整理汇总了Java中edu.wpi.first.wpilibj.Compressor.setClosedLoopControl方法的典型用法代码示例。如果您正苦于以下问题:Java Compressor.setClosedLoopControl方法的具体用法?Java Compressor.setClosedLoopControl怎么用?Java Compressor.setClosedLoopControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.wpi.first.wpilibj.Compressor的用法示例。


在下文中一共展示了Compressor.setClosedLoopControl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: robotInit

import edu.wpi.first.wpilibj.Compressor; //导入方法依赖的package包/类
@Override
public void robotInit() {
	logger = LoggerFactory.getLogger(Robot.class);
	logger.info("Initializing Robot");
	drivetrain = new DriveTrain();
	driveEncoders = new DriveEncoders(RobotMap.leftEncoderA,RobotMap.leftEncoderB,RobotMap.rightEncoderA, RobotMap.rightEncoderB,
			RobotMap.encoderMaxPeriod, RobotMap.encoderMinRate, RobotMap.encoderDPP,RobotMap.encoderReverseDirection,RobotMap.encoderSamplesToAvg);
	ultrasonic = new Ultrasonic(RobotMap.valueToInches,RobotMap.ultrasonicPort);
	gyro = new Gyro();
	vision = new Vision();
	gds = new GDS();
	pickup = new Pickup();
	flywheel = new Flywheel();
	meter = new Meter();
	winch = new Winch();
	winchPush = new WinchPush();
	fieldTimer = new FieldTimer();
	oi = new OI();

	chooser = new SendableChooser<>();
	endTimer = new StartEndTimer();
	stopTimers = new StopEndTimer();

	vision.setUpCamera();
	SmartDashboard.putData(drivetrain);
	chooser.addDefault("None", noAuto);
	chooser.addObject("Forward Drive", forwardAuto);
	chooser.addObject("Center Gear Blue", centerGearAuto);
	chooser.addObject("Left Gear", leftGearAuto);
	chooser.addObject("Right Gear", rightGearAuto);
	chooser.addObject("Boiler Red", boilerAuto);
	chooser.addObject("Center Gear Only",centerGearOnlyAuto);
	chooser.addObject("Boiler Blue", boilerAutoBlue);
	chooser.addObject("Center Gear Red", centerGearRed);
	SmartDashboard.putData("Auto choices", chooser);
	Compressor c = new Compressor(10);
	c.setClosedLoopControl(true);
	gyro.calibrate();
	winchPush.setLock(false);
}
 
开发者ID:mr-glt,项目名称:FRC-2017-Command,代码行数:41,代码来源:Robot.java

示例2: Pneumatics

import edu.wpi.first.wpilibj.Compressor; //导入方法依赖的package包/类
/**
 * Creates a new Pneumatics subsystem.
 */
public Pneumatics() {
  logger.info("Initialize");
  if (Robot.deviceFinder.isPcmAvailable(RobotMap.PCM_CAN_ID)) {
    compressor = new Compressor(RobotMap.PCM_CAN_ID);
    compressor.setClosedLoopControl(true);
  }
}
 
开发者ID:ligerbots,项目名称:Steamworks2017Robot,代码行数:11,代码来源:Pneumatics.java

示例3: Pneumatics

import edu.wpi.first.wpilibj.Compressor; //导入方法依赖的package包/类
/**
 * Constructor
 */
private Pneumatics() {
	shifter = new DoubleSolenoid(1, SHIFTER_EXT, SHIFTER_RET);
	comp = new Compressor(1);
	comp.setClosedLoopControl(true);
	shifter.set(DoubleSolenoid.Value.kForward);
	shifter.set(DoubleSolenoid.Value.kOff);

}
 
开发者ID:FRC-Team-3140,项目名称:FRC-2016,代码行数:12,代码来源:Pneumatics.java

示例4: initialize

import edu.wpi.first.wpilibj.Compressor; //导入方法依赖的package包/类
@Override
public void initialize() {
	m_compressor = new Compressor();
	m_compressor.setClosedLoopControl(true);
	m_solenoid = new DoubleSolenoid(RobotMap.SOLENOID_PCM_PORT1,
			RobotMap.SOLENOID_PCM_PORT2);
}
 
开发者ID:TechnoWolves5518,项目名称:2015RobotCode,代码行数:8,代码来源:PneumaticControl.java


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