当前位置: 首页>>代码示例>>Java>>正文


Java SensorBase类代码示例

本文整理汇总了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();
	}
}
 
开发者ID:Impact2585,项目名称:FRC2015,代码行数:9,代码来源:WheelSystem.java

示例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();
		}
	}
}
 
开发者ID:Impact2585,项目名称:aerbot-champs,代码行数:9,代码来源:MultiMotor.java

示例3: destroy

import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public void destroy() {
    if(speedController instanceof SensorBase){
    	SensorBase motor = (SensorBase) speedController;
    	motor.free();
    }
    solenoid.free();
}
 
开发者ID:Impact2585,项目名称:aerbot-champs,代码行数:8,代码来源:ShooterSystem.java

示例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();
}
 
开发者ID:Impact2585,项目名称:aerbot-champs,代码行数:9,代码来源:IntakeSystem.java

示例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();
		}
	}
}
 
开发者ID:Impact2585,项目名称:Lib2585,代码行数:10,代码来源:MultiMotor.java

示例6: getFrequency

import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
@Override
public double getFrequency() {
	return (SensorBase.kSystemClockTicksPerMicrosecond * 1e3) / DIOJNI.getLoopTiming();
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:5,代码来源:FRCPWM.java

示例7: ToggleInputEvent

import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public ToggleInputEvent(final SensorBase sensor, final boolean toggle) {
    super(sensor);
    this.toggle = toggle;
}
 
开发者ID:CircuitRunners,项目名称:blanket,代码行数:5,代码来源:ToggleInputEvent.java

示例8: InputEvent

import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public InputEvent(final SensorBase source) {
    this.source = source;
}
 
开发者ID:CircuitRunners,项目名称:blanket,代码行数:4,代码来源:InputEvent.java

示例9: NumberInputEvent

import edu.wpi.first.wpilibj.SensorBase; //导入依赖的package包/类
public NumberInputEvent(final SensorBase sensor, final double number) {
    super(sensor);
    this.number = number;
}
 
开发者ID:CircuitRunners,项目名称:blanket,代码行数:5,代码来源:NumberInputEvent.java

示例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;
}
 
开发者ID:CircuitRunners,项目名称:blanket,代码行数:9,代码来源:InputEvent.java

示例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);
}
 
开发者ID:BrianSelle,项目名称:Team3310FRC2014,代码行数:14,代码来源:SPIDevice.java


注:本文中的edu.wpi.first.wpilibj.SensorBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。