微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

edu.wpi.first.wpilibj.templates.OI的实例源码

项目:RKellyBot    文件CommandBase.java   
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);
}
项目:2013-code-v2    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014-Aerial-Assist    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:aeronautical-facilitation    文件CommandBase.java   
/**
 *
 */
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014Robot-    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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
}
项目:BunnyBotPIDv2    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014MainCode    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014MainCode    文件FireAndWait.java   
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;        
    }
}
项目:2014MainCode    文件FireAndWait.java   
protected boolean isFinished() {
    if (mode == NULL_MODE) {
        return true;
    }
    if (OI.forkLift.getMode() == ForkLift.MANUAL) {
        return true;
    }
    return OI.stick2.getRawButton(3);
}
项目:2014MainCode    文件Chassis.java   
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
                );

    }
项目:AerialAssist2014    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014FRCCode    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:MecanumDrivetrain    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:rover    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:bainbridgefirst    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:frc-3186    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:GearsBot    文件CommandBase.java   
/**
 * 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);
}
项目:Robot-Code-2013    文件CommandBase.java   
public static void init() {
    // This MUST be here. If the OI creates Commands (which it very likely
    // will),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);
}
项目:2014MainCode    文件DriveWithJoystick.java   
protected void execute() {
    Chassis.drive.setMaxOutput(.75);
    Chassis.driveWithJoystick(OI.getStick());
}
项目:2014MainCode    文件FireAndWait.java   
public FireAndWait() {
    requires(OI.forkLift);
}
项目:2014MainCode    文件FireAndWait.java   
protected void initialize() {
    mode = DOWN_MODE;
    OI.forkLift.setMode(ForkLift.AUTOMATIC);
}
项目:2014MainCode    文件GoalieUp.java   
protected void execute() {
    OI.goalie.GoalieUp();
}
项目:2014MainCode    文件GoalieUp.java   
protected boolean isFinished() {
    return (OI.goalie.atGoalieUpStop() || !OI.raiseGoalieButton.get());
}
项目:2014MainCode    文件GoalieUp.java   
protected void end() {
    OI.goalie.GoalieStop();
}
项目:2014MainCode    文件RaiseForkLift.java   
protected void execute() {
   OI.forkLift.liftBall(MOTOR_UP_SPEED);
   System.out.println("ForkUp");
}
项目:2014MainCode    文件RaiseForkLift.java   
protected boolean isFinished() {
     return (OI.forkLift.atUpperStop() || !OI.raiseForkLiftButton.get());
//     return (!OI.raiseForkLiftButton.get());
 }
项目:2014MainCode    文件RaiseForkLift.java   
protected void end() {
    OI.forkLift.forkLiftStop();
}
项目:2014MainCode    文件GoalieDown.java   
protected void execute() {
    OI.goalie.GoalieDown();
}
项目:2014MainCode    文件GoalieDown.java   
protected boolean isFinished() {
    return (!OI.goalie.atGoalieDownStop() || !OI.lowerGoalieButton.get());
}
项目:2014MainCode    文件GoalieDown.java   
protected void end() {
    OI.goalie.GoalieStop();
}
项目:2014MainCode    文件LiftDumper.java   
protected void execute() {
    OI.dumper.DumperUp();
    System.out.println("DumperUp");
}
项目:2014MainCode    文件LiftDumper.java   
protected boolean isFinished() {
    return (!OI.dumper.AtUpperStop() || !OI.raiseDumperButton.get());
    //return (!OI.raiseDumperButton.get());
}
项目:2014MainCode    文件LowerForkLift.java   
protected void execute() {
    OI.forkLift.lowerForkLift(MOTOR_DOWN_SPEED);
    System.out.println("ForkDown");
}
项目:2014MainCode    文件LowerForkLift.java   
protected boolean isFinished() {
    return(/*OI.forkLift.atLowerStop() ||*/ !OI.lowerForkLiftButton.get());
}
项目:2014MainCode    文件LowerForkLift.java   
protected void end() {
    OI.forkLift.forkLiftStop();
}
项目:2014MainCode    文件LowerDumper.java   
protected void execute() {
    OI.dumper.DumperDown();
    System.out.println("DumperDown");
}
项目:2014MainCode    文件LowerDumper.java   
protected boolean isFinished() {
    return (!OI.dumper.AtLowerStop() || !OI.lowerDumperButton.get());
    //return (!OI.lowerDumperButton.get());
}
项目:2014MainCode    文件LowerDumper.java   
protected void end() {
    OI.dumper.DumperStop();
}
项目:ScraperBike2013    文件Shoot.java   
protected void execute() {
    shooter.setShooterMotor(OI.getAdjustedThrottle());
    ScraperBike.debugToTable("Shooter Z",joystick.getZ());
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。