本文整理匯總了Java中edu.wpi.first.wpilibj.DoubleSolenoid.set方法的典型用法代碼示例。如果您正苦於以下問題:Java DoubleSolenoid.set方法的具體用法?Java DoubleSolenoid.set怎麽用?Java DoubleSolenoid.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類edu.wpi.first.wpilibj.DoubleSolenoid
的用法示例。
在下文中一共展示了DoubleSolenoid.set方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initDefaultCommand
import edu.wpi.first.wpilibj.DoubleSolenoid; //導入方法依賴的package包/類
public void initDefaultCommand() {
// Set the default command for a subsystem here.
//setDefaultCommand(new MySpecialCommand());
testDS=new DoubleSolenoid(1,2);
testDS.set(DoubleSolenoid.Value.kOff);
LiveWindow.addActuator("Pneumatics", "testDS", testDS);
}
示例2: Pneumatics
import edu.wpi.first.wpilibj.DoubleSolenoid; //導入方法依賴的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);
}
示例3: robotInit
import edu.wpi.first.wpilibj.DoubleSolenoid; //導入方法依賴的package包/類
@Override
public void robotInit() {
chooser = new SendableChooser<Integer>();
chooser.addDefault("center red", 1);
chooser.addObject("center blue", 2);
chooser.addObject("boiler red", 3);
chooser.addObject("boiler blue", 4);
chooser.addObject("ret red", 5);
chooser.addObject("ret blue", 6);
chooser.addObject("current test", 7);
SmartDashboard.putData("Auto choices", chooser);
//NETWORK TABLE VARIABLES
table = NetworkTable.getTable("dataTable");
//POWER DIST PANEL
pdp = new PowerDistributionPanel();
//NAVX
navx = new AHRS(SPI.Port.kMXP);
// CONTROLLER
jsLeft = new Joystick(0);
jsRight = new Joystick(1);
xbox = new XboxController(5);
// MOTORS
leftFront = new Talon(pwm5);
leftMid = new Talon(pwm3);
leftBack = new Talon(pwm1);
rightFront = new Talon(pwm4);
rightMid = new Talon(pwm2);
rightBack = new Talon(pwm0);
// ENCODERS
encLeftDrive = new Encoder(0,1);
encRightDrive = new Encoder(2,3);
// COMPRESSOR
compressor = new Compressor();
compressor.start();
//SOLENOIDs
driveChain = new DoubleSolenoid(0,1);
driveChain.set(Value.kReverse);
presser = new DoubleSolenoid(2,3);
presser.set(Value.kReverse);
gearpiston = new DoubleSolenoid(4,5);
gearpiston.set(Value.kReverse);
//CANTALONS
climber = new CANTalon(2);
shooter = new CANTalon(4);
intake = new CANTalon(9);
feeder = new CANTalon(13);
// CAMERA
//DON'T DELETE THE COMMENTED THREAD-IT IS USED FOR CALIBRATION
/*
UsbCamera usbCam = new UsbCamera("mscam", 0);
usbCam.setVideoMode(VideoMode.PixelFormat.kMJPEG, 160, 120, 20);
MjpegServer server1 = new MjpegServer("cam1", 1181);
server1.setSource(usbCam);
*/
UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();
camera.setVideoMode(VideoMode.PixelFormat.kMJPEG, 160, 120, 20);
//SMARTDASBOARD
driveSetting = "LOW START";
gearSetting = "GEAR CLOSE START";
}
示例4: Gate
import edu.wpi.first.wpilibj.DoubleSolenoid; //導入方法依賴的package包/類
public Gate() {
solenoid = new DoubleSolenoid(RobotMap.GATE_FORWARD_CHANNEL, RobotMap.GATE_REVERSE_CHANNEL);
solenoid.set(Value.kReverse);
}
示例5: Flapper
import edu.wpi.first.wpilibj.DoubleSolenoid; //導入方法依賴的package包/類
public Flapper() {
solenoid = new DoubleSolenoid(RobotMap.FLAPPER_FORWARD_CHANNEL, RobotMap.FLAPPER_REVERSE_CHANNEL);
solenoid.set(Value.kReverse);
}
示例6: Dumper
import edu.wpi.first.wpilibj.DoubleSolenoid; //導入方法依賴的package包/類
public Dumper() {
//solenoid = new Solenoid(3);
solenoid = new DoubleSolenoid(2, 3);
state = Value.kForward;
solenoid.set(state);
}