當前位置: 首頁>>代碼示例>>Java>>正文


Java DoubleSolenoid.set方法代碼示例

本文整理匯總了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);
	
}
 
開發者ID:wjaneal,項目名稱:liastem,代碼行數:9,代碼來源:Pneumatics.java

示例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);

}
 
開發者ID:FRC-Team-3140,項目名稱:FRC-2016,代碼行數:12,代碼來源:Pneumatics.java

示例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";
}
 
開發者ID:team3882,項目名稱:2017-Robot,代碼行數:76,代碼來源:Robot.java

示例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);
}
 
開發者ID:cyborgs3335,項目名稱:STEAMworks,代碼行數:5,代碼來源:Gate.java

示例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);
}
 
開發者ID:cyborgs3335,項目名稱:STEAMworks,代碼行數:5,代碼來源:Flapper.java

示例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);
}
 
開發者ID:cyborgs3335,項目名稱:STEAMworks,代碼行數:7,代碼來源:Dumper.java


注:本文中的edu.wpi.first.wpilibj.DoubleSolenoid.set方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。