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); }
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); }
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); }
/** * */ 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); }
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 }
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); }
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; } }
protected boolean isFinished() { if (mode == NULL_MODE) { return true; } if (OI.forkLift.getMode() == ForkLift.MANUAL) { return true; } return OI.stick2.getRawButton(3); }
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 ); }
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); }
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); }
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); }
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); }
/** * 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); }
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); }
protected void execute() { Chassis.drive.setMaxOutput(.75); Chassis.driveWithJoystick(OI.getStick()); }
public FireAndWait() { requires(OI.forkLift); }
protected void initialize() { mode = DOWN_MODE; OI.forkLift.setMode(ForkLift.AUTOMATIC); }
protected void execute() { OI.goalie.GoalieUp(); }
protected boolean isFinished() { return (OI.goalie.atGoalieUpStop() || !OI.raiseGoalieButton.get()); }
protected void end() { OI.goalie.GoalieStop(); }
protected void execute() { OI.forkLift.liftBall(MOTOR_UP_SPEED); System.out.println("ForkUp"); }
protected boolean isFinished() { return (OI.forkLift.atUpperStop() || !OI.raiseForkLiftButton.get()); // return (!OI.raiseForkLiftButton.get()); }
protected void end() { OI.forkLift.forkLiftStop(); }
protected void execute() { OI.goalie.GoalieDown(); }
protected boolean isFinished() { return (!OI.goalie.atGoalieDownStop() || !OI.lowerGoalieButton.get()); }
protected void execute() { OI.dumper.DumperUp(); System.out.println("DumperUp"); }
protected boolean isFinished() { return (!OI.dumper.AtUpperStop() || !OI.raiseDumperButton.get()); //return (!OI.raiseDumperButton.get()); }
protected void execute() { OI.forkLift.lowerForkLift(MOTOR_DOWN_SPEED); System.out.println("ForkDown"); }
protected boolean isFinished() { return(/*OI.forkLift.atLowerStop() ||*/ !OI.lowerForkLiftButton.get()); }
protected void execute() { OI.dumper.DumperDown(); System.out.println("DumperDown"); }
protected boolean isFinished() { return (!OI.dumper.AtLowerStop() || !OI.lowerDumperButton.get()); //return (!OI.lowerDumperButton.get()); }
protected void end() { OI.dumper.DumperStop(); }
protected void execute() { shooter.setShooterMotor(OI.getAdjustedThrottle()); ScraperBike.debugToTable("Shooter Z", joystick.getZ()); }