Java 类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), 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);
}
项目:2014-Aerial-Assist    文件: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.
    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), 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);
}
项目:2014    文件: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.
    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), 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
}
项目:BunnyBotPIDv2    文件: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.
    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), 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);
}
项目: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), 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);
}
项目:2014FRCCode    文件: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.
    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), 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);
}
项目:rover    文件: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.
    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), 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);
}
项目:frc-3186    文件: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.
    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), 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);
}
项目: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());
}