-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Arizona Day 0: Teleoperated Functionality Mainly Completed
- Loading branch information
1 parent
9d98c9c
commit 5aa707f
Showing
13 changed files
with
175 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.team3925.frc2018.commands; | ||
|
||
import com.team3925.frc2018.subsystems.Elevator; | ||
import com.team3925.frc2018.subsystems.Elevator.ElevatorState; | ||
|
||
import edu.wpi.first.wpilibj.command.Command; | ||
import edu.wpi.first.wpilibj.command.CommandGroup; | ||
|
||
public class SetLiftBottom extends CommandGroup { | ||
|
||
public SetLiftBottom() { | ||
|
||
addSequential(new Command() { | ||
|
||
@Override | ||
protected void initialize() { | ||
Elevator.getInstance().setPosition(ElevatorState.BOTTOM); | ||
} | ||
|
||
@Override | ||
protected boolean isFinished() { | ||
return Elevator.getInstance().getElevatorHeightPercentage() > 0.10; | ||
} | ||
}); | ||
|
||
addSequential(new Command() { | ||
|
||
@Override | ||
protected boolean isFinished() { | ||
return Elevator.getInstance().getLimitSwitch(); | ||
} | ||
|
||
@Override | ||
protected void initialize() { | ||
Elevator.getInstance().setRaw(-0.2); | ||
} | ||
|
||
@Override | ||
protected void end() { | ||
Elevator.getInstance().setRaw(0); | ||
Elevator.getInstance().zero(); | ||
} | ||
}); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.team3925.frc2018.commands; | ||
|
||
import com.team3925.frc2018.subsystems.Intake; | ||
|
||
import edu.wpi.first.wpilibj.command.Command; | ||
|
||
public class SetLiftTop extends Command{ | ||
|
||
@Override | ||
protected void initialize() { | ||
Intake.getInstance().setAngle(85); | ||
} | ||
|
||
@Override | ||
protected boolean isFinished() { | ||
return true; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
...018/commands/Center_Left_Switch_Auto.java → .../commands/autos/CenterLeftSwitchAuto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/com/team3925/frc2018/commands/autos/CenterRightSwitchAuto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.team3925.frc2018.commands.autos; | ||
|
||
import com.team3925.frc2018.commands.OpenGrabbers; | ||
import com.team3925.frc2018.commands.RunElevator; | ||
import com.team3925.frc2018.commands.RunIntakeWheels; | ||
import com.team3925.frc2018.commands.ZeroIntake; | ||
import com.team3925.frc2018.subsystems.Elevator.ElevatorState; | ||
import com.team3925.utils.MotionProfileCommand; | ||
|
||
import edu.wpi.first.wpilibj.command.CommandGroup; | ||
import edu.wpi.first.wpilibj.command.WaitCommand; | ||
|
||
public class CenterRightSwitchAuto extends CommandGroup{ | ||
|
||
public CenterRightSwitchAuto() { | ||
addSequential(new ZeroIntake()); | ||
addParallel(new RunElevator(ElevatorState.BOTTOM)); | ||
addParallel(new MotionProfileCommand("CENTER_RIGHTSWITCH")); | ||
addSequential(new WaitCommand(2)); | ||
addSequential(new RunElevator(ElevatorState.SWITCH)); | ||
addSequential(new OpenGrabbers()); | ||
addSequential(new RunIntakeWheels(-0.5)); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.