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


Java OI类代码示例

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

示例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);
}
 
开发者ID:tglem89,项目名称:2013-code-v2,代码行数:25,代码来源:CommandBase.java

示例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);
}
 
开发者ID:Spartronics4915,项目名称:2014-Aerial-Assist,代码行数:12,代码来源:CommandBase.java

示例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);
}
 
开发者ID:CarmelRobotics,项目名称:aeronautical-facilitation,代码行数:15,代码来源:CommandBase.java

示例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
}
 
开发者ID:iraiders,项目名称:2014Robot-,代码行数:11,代码来源:CommandBase.java

示例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);
}
 
开发者ID:Team3585,项目名称:2014MainCode,代码行数:12,代码来源:CommandBase.java

示例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;        
    }
}
 
开发者ID:Team3585,项目名称:2014MainCode,代码行数:40,代码来源:FireAndWait.java

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

示例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
                );
                
    }
 
开发者ID:Team3585,项目名称:2014MainCode,代码行数:15,代码来源:Chassis.java

示例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);
}
 
开发者ID:Greater-Rochester-Robotics,项目名称:AerialAssist2014,代码行数:12,代码来源:CommandBase.java

示例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);
}
 
开发者ID:frc3946,项目名称:MecanumDrivetrain,代码行数:12,代码来源:CommandBase.java

示例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);
}
 
开发者ID:246overclocked,项目名称:rover,代码行数:12,代码来源:CommandBase.java

示例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);
}
 
开发者ID:DECABotz-3186,项目名称:frc-3186,代码行数:15,代码来源:CommandBase.java

示例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);
}
 
开发者ID:TeamParadise,项目名称:GearsBot,代码行数:15,代码来源:CommandBase.java

示例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);
}
 
开发者ID:FIRST-FRC-Team-4097,项目名称:Robot-Code-2013,代码行数:12,代码来源:CommandBase.java


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