本文整理汇总了Java中edu.wpi.first.wpilibj.DoubleSolenoid.Value.kForward方法的典型用法代码示例。如果您正苦于以下问题:Java Value.kForward方法的具体用法?Java Value.kForward怎么用?Java Value.kForward使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.DoubleSolenoid.Value
的用法示例。
在下文中一共展示了Value.kForward方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toggleManipulator
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; //导入方法依赖的package包/类
public void toggleManipulator() {
Value solenoidVal = manipulatorSolenoid.get();
if (solenoidVal == Value.kForward) {
manipulatorSolenoid.set(DoubleSolenoid.Value.kReverse);
} else {
manipulatorSolenoid.set(DoubleSolenoid.Value.kForward);
manipulatorMotor.set(0.5);
}
}
示例2: toggleIntakeSolenoid
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; //导入方法依赖的package包/类
public void toggleIntakeSolenoid() {
Value SolenoidVal = Actuator.get();
if (SolenoidVal == Value.kForward) {
lowerRake();
} else {
raiseRake();
}
}
示例3: checkState
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; //导入方法依赖的package包/类
protected void checkState() {
if ( solenoid.get() == Value.kForward ) {
direction = Direction.EXTENDING;
} else if ( solenoid.get() == Value.kReverse ) {
direction = Direction.RETRACTING;
} else {
direction = Direction.STOPPED;
}
}
示例4: FlapperControl
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; //导入方法依赖的package包/类
/**
* constructor
* @param f true = falpperDown;//flase = flapperUP
*/
public FlapperControl(boolean f) {
requires(Robot.flapper);
val = f ? Value.kForward : Value.kReverse;
}
示例5: GateControl
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; //导入方法依赖的package包/类
/**
* Constructor.
* @param f true=gate up, false=gate down
*/
public GateControl(boolean f) {
requires(Robot.gate);
val = f ? Value.kReverse : Value.kForward;
}
示例6: Dumper
import edu.wpi.first.wpilibj.DoubleSolenoid.Value; //导入方法依赖的package包/类
public Dumper() {
//solenoid = new Solenoid(3);
solenoid = new DoubleSolenoid(2, 3);
state = Value.kForward;
solenoid.set(state);
}