本文整理汇总了Java中edu.wpi.first.wpilibj.interfaces.Potentiometer类的典型用法代码示例。如果您正苦于以下问题:Java Potentiometer类的具体用法?Java Potentiometer怎么用?Java Potentiometer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Potentiometer类属于edu.wpi.first.wpilibj.interfaces包,在下文中一共展示了Potentiometer类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PotentiometerPidSrc
import edu.wpi.first.wpilibj.interfaces.Potentiometer; //导入依赖的package包/类
/**
* Create a new PotentiometerPidSrc instance
* @param pot a Potentiometer object to measure voltages from
* @param minVolt the minimum measured voltage from the potentiometer at the "small" movement endpoint of the system
* @param maxVolt the maximum measured voltage from the potentiometer at the "large" movement endpoint of the system
* @param minAngle the minimum angle the system can physically rotate to
* @param maxAngle the maximum angle the system can physically rotate to
*/
public PotentiometerPidSrc(final Potentiometer pot,
final float minVolt, final float maxVolt,
final float minAngle, final float maxAngle) {
this.pot = pot;
this.minVolt = minVolt;
this.maxVolt = maxVolt;
this.minAngle = minAngle;
this.maxAngle = maxAngle;
}
示例2: PIDPotentiometer
import edu.wpi.first.wpilibj.interfaces.Potentiometer; //导入依赖的package包/类
/**
* Create a PIDPotentiometer, for use with a 1699 PIDLoop
*
* @param p a potentiometer
*/
public PIDPotentiometer(Potentiometer p) {
this.sens = p;
}
示例3: getSensor
import edu.wpi.first.wpilibj.interfaces.Potentiometer; //导入依赖的package包/类
/**
* Retrieve the original sensor used to construct this PIDSrc
* @return the Potentiometer
*/
public Potentiometer getSensor() {
return pot;
}