-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from team1635/TestingRC
Latest Fallback Code
- Loading branch information
Showing
16 changed files
with
162 additions
and
307 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
46 changes: 46 additions & 0 deletions
46
src/org/usfirst/frc/team1635/robot/commands/BottomOutElevator.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,46 @@ | ||
package org.usfirst.frc.team1635.robot.commands; | ||
|
||
import org.usfirst.frc.team1635.robot.Robot; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import edu.wpi.first.wpilibj.command.Command; | ||
|
||
/** | ||
* | ||
*/ | ||
public class BottomOutElevator extends Command { | ||
boolean isBottomedOut; | ||
|
||
public BottomOutElevator() { | ||
requires(Robot.elevatorSystem); | ||
} | ||
|
||
// Called just before this Command runs the first time | ||
protected void initialize() { | ||
|
||
} | ||
|
||
// Called repeatedly when this Command is scheduled to run | ||
protected void execute() { | ||
isBottomedOut = Robot.elevatorSystem.IsElevatorBottomedOut(); | ||
Robot.elevatorSystem.setElevatorSpeed(-0.5); | ||
|
||
} | ||
|
||
// Make this return true when this Command no longer needs to run execute() | ||
protected boolean isFinished() { | ||
return isBottomedOut; | ||
} | ||
|
||
// Called once after isFinished returns true | ||
protected void end() { | ||
Robot.elevatorSystem.stopElevator(); | ||
|
||
} | ||
|
||
// Called when another command which requires one or more of the same | ||
// subsystems is scheduled to run | ||
protected void interrupted() { | ||
end(); | ||
} | ||
} |
58 changes: 0 additions & 58 deletions
58
src/org/usfirst/frc/team1635/robot/commands/ControlDrive.java
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
src/org/usfirst/frc/team1635/robot/commands/GusGearIntake.java
This file was deleted.
Oops, something went wrong.
76 changes: 0 additions & 76 deletions
76
src/org/usfirst/frc/team1635/robot/commands/ShootBalls.java
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
src/org/usfirst/frc/team1635/robot/control/ControlDrive.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,57 @@ | ||
package org.usfirst.frc.team1635.robot.control; | ||
|
||
//Local Package Imports | ||
import org.usfirst.frc.team1635.robot.Robot; | ||
//------------------------------------------------------------ | ||
// WPILIB Imports | ||
import edu.wpi.first.wpilibj.command.Command; | ||
//------------------------------------------------------------ | ||
|
||
//.---. ,--. .-----. .------. | ||
///_ | / .' / -. \| ___| | ||
//| |. / -. '-' _' || '--. | ||
//| || .-. ' |_ < `---. '. | ||
//| |' \ | |.-. | |.- | | | ||
//| |\ `' / \ `-' /| `-' / | ||
//`---' `----' `----'' `----'' | ||
|
||
/** | ||
* | ||
* @author Bogdan Bradu & Miguel Cruz ( @Acelogic_) | ||
* | ||
*/ | ||
public class ControlDrive extends Command { | ||
|
||
public ControlDrive() { | ||
// Use requires() here to declare subsystem dependencies | ||
requires(Robot.chassisSystem); | ||
|
||
} | ||
|
||
// Called just before this Command runs the first time | ||
protected void initialize() { | ||
} | ||
|
||
// Called repeatedly when this Command is scheduled to run | ||
protected void execute() { | ||
Robot.oi.masterToSecondary(Robot.oi.StartController(), Robot.oi.StartController2()); | ||
Robot.chassisSystem.drive(); | ||
Robot.chassisSystem.log(); | ||
|
||
} | ||
|
||
// Make this return true when this Command no longer needs to run execute() | ||
protected boolean isFinished() { | ||
return false; | ||
} | ||
|
||
// Called once after isFinished returns true | ||
protected void end() { | ||
Robot.chassisSystem.stop(); | ||
} | ||
|
||
// Called when another command which requires one or more of the same | ||
// subsystems is scheduled to run | ||
protected void interrupted() { | ||
} | ||
} |
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.