本文整理汇总了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;
}
开发者ID:FRC3161,项目名称:Iapetus2014,代码行数:18,代码来源:PotentiometerPidSrc.java
示例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;
}
开发者ID:FIRST-Team-1699,项目名称:2017-code,代码行数:9,代码来源:PIDPotentiometer.java
示例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;
}
开发者ID:FRC3161,项目名称:Iapetus2014,代码行数:8,代码来源:PotentiometerPidSrc.java
注:本文中的edu.wpi.first.wpilibj.interfaces.Potentiometer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论