當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。