本文整理汇总了Java中edu.wpi.first.wpilibj.SensorBase类的典型用法代码示例。如果您正苦于以下问题:Java SensorBase类的具体用法?Java SensorBase怎么用?Java SensorBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SensorBase类属于edu.wpi.first.wpilibj包,在下文中一共展示了SensorBase类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: destroy
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
@Override
public void destroy() {
drivetrain.free();
if(sidewaysMotor instanceof SensorBase){
SensorBase motor = (SensorBase) sidewaysMotor;
motor.free();
}
}
示例2: free
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public void free() {
for (int i = 0; i < motors.length; i++) {
if (motors[i] instanceof SensorBase) {
SensorBase motor = (SensorBase) motors[i];
motor.free();
}
}
}
示例3: destroy
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public void destroy() {
if(speedController instanceof SensorBase){
SensorBase motor = (SensorBase) speedController;
motor.free();
}
solenoid.free();
}
示例4: destroy
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public void destroy() {
if(motorController instanceof SensorBase){
SensorBase motor = (SensorBase) motorController;
motor.free();
}
intakeLift.free();
intakeLift2.free();
}
示例5: free
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
@Override
public void free() {
for (int i = 0; i < motors.length; i++) {
if (motors[i] instanceof SensorBase) {
SensorBase motor = (SensorBase) motors[i];
motor.free();
}
}
}
示例6: getFrequency
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
@Override
public double getFrequency() {
return (SensorBase.kSystemClockTicksPerMicrosecond * 1e3) / DIOJNI.getLoopTiming();
}
示例7: ToggleInputEvent
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public ToggleInputEvent(final SensorBase sensor, final boolean toggle) {
super(sensor);
this.toggle = toggle;
}
示例8: InputEvent
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public InputEvent(final SensorBase source) {
this.source = source;
}
示例9: NumberInputEvent
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public NumberInputEvent(final SensorBase sensor, final double number) {
super(sensor);
this.number = number;
}
示例10: getSource
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
/**
* Returns the sensor giving an input in this event.
*
* @return The sensor giving an input in this event.
*/
public final SensorBase getSource() {
return source;
}
示例11: initBus
import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
/**
* Initialize SPI bus<br>
* Only call this method once in the program
*
* @param clkChannel The channel of the digital output for the clock signal.
* @param mosiChannel The channel of the digital output for the written data to the slave
* (master-out slave-in).
* @param misoChannel The channel of the digital input for the input data from the slave
* (master-in slave-out).
*/
public static void initBus(final int clkChannel, final int mosiChannel, final int misoChannel) {
initBus(SensorBase.getDefaultDigitalModule(), clkChannel, mosiChannel, misoChannel);
}