本文整理汇总了Java中edu.wpi.first.wpilibj.templates.OI类的典型用法代码示例。如果您正苦于以下问题:Java OI类的具体用法?Java OI怎么用?Java OI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OI类属于edu.wpi.first.wpilibj.templates包,在下文中一共展示了OI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
LogDebugger.log("init command for command base.");
oi = new OI();
SmartDashboard.putData(theDrive);
SmartDashboard.putData(theAccelerometer);
SmartDashboard.putData(theBling);
SmartDashboard.putData(theFlinger);
SmartDashboard.putData(theLifter);
SmartDashboard.putData(thePizzaBox);
SmartDashboard.putData(theScooperCollector);
SmartDashboard.putData(theShifter);
SmartDashboard.putData(thePizzaBoxTilt);
// Show what command your subsystem is running on the SmartDashboard
//SmartDashboard.putData(exampleSubsystem);
}
示例2: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
driveTrain = new DriveTrain();
shooter = new Shooter();
vision = new Vision();
pitch = new Pitch();
trigger = new Trigger();
loader1 = new Loader1();
loader2 = new Loader2();
//leave oi at the bottom and apart from the other initialized things
//if it is initialized before the subsytems, it throws some null pointer exceptions
//those are not fun
//please leave it here
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(exampleSubsystem);
}
示例3: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(exampleSubsystem);
}
示例4: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
/**
*
*/
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(exampleSubsystem);
}
示例5: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
}
示例6: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
// SmartDashboard.putData(exampleSubsystem);
}
示例7: execute
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
protected void execute() {
System.out.println("LS:"+OI.forkLift.hitByBall());
if (OI.forkLift.getMode() == ForkLift.MANUAL)
return;
switch(mode){
case DOWN_MODE:
if(OI.forkLift.atLowerStop()){
OI.forkLift.forkLiftStop();
mode = WAIT_MODE;
} else {
OI.forkLift.lowerForkLift(MOTOR_SPEED_DOWN);
}
break;
case WAIT_MODE:
if(OI.forkLift.hitByBall()) {
mode = UP_MODE;
}
break;
case UP_MODE:
if(OI.forkLift.atUpperStop())
{
OI.forkLift.forkLiftStop();
mode = NULL_MODE;
OI.forkLift.setMode(ForkLift.MANUAL);
}
else {
OI.forkLift.liftBall(MOTOR_SPEED_UP);
}
break;
}
}
示例8: isFinished
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
protected boolean isFinished() {
if (mode == NULL_MODE) {
return true;
}
if (OI.forkLift.getMode() == ForkLift.MANUAL) {
return true;
}
return OI.stick2.getRawButton(3);
}
示例9: driveWithJoystick
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void driveWithJoystick(Joystick driveStick) {
// drive.mecanumDrive_Polar(
// driveStick.getZ(),
// driveStick.getX(),
// driveStick.getY()
// );
drive.mecanumDrive_Cartesian(
OI.joyThresh.getX(),
OI.joyThresh.getZ(),
OI.joyThresh.getY(),
0
);
}
示例10: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(gearShift);
}
示例11: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(driveTrain);
}
示例12: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(drivetrain);
}
示例13: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(driveTrain);
//SmartDashboard.putData(compressorSystem);
SmartDashboard.putData(shooterFireControl);
SmartDashboard.putData(speedBoost);
}
示例14: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
/**
* Call this command to properly finish initializing the CommandBase.
* This call is automatically included in the default template.
*/
public static void init() {
oi = new OI();
// Optional: Logs the currently running command for each subsystem in
// the SmartDashboard. This can be useful for debugging.
SmartDashboard.putData(drivetrain);
SmartDashboard.putData(elevator);
SmartDashboard.putData(wrist);
SmartDashboard.putData(claw);
}
示例15: init
import edu.wpi.first.wpilibj.templates.OI; //导入依赖的package包/类
public static void init() {
// This MUST be here. If the OI creates Commands (which it very likely
// will), constructing it during the construction of CommandBase (from
// which commands extend), subsystems are not guaranteed to be
// yet. Thus, their requires() statements may grab null pointers. Bad
// news. Don't move it.
oi = new OI();
// Show what command your subsystem is running on the SmartDashboard
SmartDashboard.putData(drive);
}