projects
/
3501
/
stronghold-2016
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c72e0a
)
Add testing stuff
cindy/driveTesting
author
Kevin Zhang
<icestormf1@gmail.com>
Tue, 23 Feb 2016 00:29:24 +0000
(16:29 -0800)
committer
Kevin Zhang
<icestormf1@gmail.com>
Tue, 23 Feb 2016 00:29:24 +0000
(16:29 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/Scaler.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/Robot.java
b/src/org/usfirst/frc/team3501/robot/Robot.java
index 19fa056a857c635282ca337eed87d1db08ca4a96..1f86b9bcf71889f6d610a76a737a211a0ce58ea5 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Robot.java
+++ b/
src/org/usfirst/frc/team3501/robot/Robot.java
@@
-8,6
+8,7
@@
import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
import org.usfirst.frc.team3501.robot.subsystems.Scaler;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
import org.usfirst.frc.team3501.robot.subsystems.Scaler;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
@@
-23,10
+24,12
@@
public class Robot extends IterativeRobot {
public static IntakeArm intakeArm;
public static DefenseArm defenseArm;
public static IntakeArm intakeArm;
public static DefenseArm defenseArm;
+ public static Compressor compressor;
+
// Sendable Choosers send a drop down menu to the Smart Dashboard.
SendableChooser positionChooser;
SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
// Sendable Choosers send a drop down menu to the Smart Dashboard.
SendableChooser positionChooser;
SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
- positionFourDefense, positionFiveDefense;
+
positionFourDefense, positionFiveDefense;
@Override
public void robotInit() {
@Override
public void robotInit() {
@@
-41,6
+44,7
@@
public class Robot extends IterativeRobot {
// addPositionChooserOptions();
// addDefensesToAllDefenseSendableChoosers();
// sendSendableChoosersToSmartDashboard();
// addPositionChooserOptions();
// addDefensesToAllDefenseSendableChoosers();
// sendSendableChoosersToSmartDashboard();
+ compressor = new Compressor();
}
}
@@
-121,8
+125,11
@@
public class Robot extends IterativeRobot {
@Override
public void teleopInit() {
@Override
public void teleopInit() {
- Scheduler.getInstance().add(new JoystickDrive());
+ Scheduler.getInstance().add(new JoystickDrive());
+ compressor.start();
+ driveTrain.leftGearPiston.set(Constants.DriveTrain.HIGH_GEAR);
+ driveTrain.rightGearPiston.set(Constants.DriveTrain.HIGH_GEAR);
}
@Override
}
@Override
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
index a7fa8eea4a053d43ea27ced0f196ccbf2735e556..cde94b8f6a103c2d1e8115ada1d10227e3f52410 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
@@
-28,7
+28,7
@@
public class DriveTrain extends PIDSubsystem {
private RobotDrive robotDrive;
private GyroLib gyro;
private RobotDrive robotDrive;
private GyroLib gyro;
- p
rivate
DoubleSolenoid leftGearPiston, rightGearPiston;
+ p
ublic
DoubleSolenoid leftGearPiston, rightGearPiston;
// Drivetrain specific constants that relate to the inches per pulse value for
// the encoders
// Drivetrain specific constants that relate to the inches per pulse value for
// the encoders
@@
-197,10
+197,10
@@
public class DriveTrain extends PIDSubsystem {
/*
* Method is a required method that the PID Subsystem uses to return the
* calculated PID value to the driver
/*
* Method is a required method that the PID Subsystem uses to return the
* calculated PID value to the driver
- *
+ *
* @param Gives the user the output from the PID algorithm that is calculated
* internally
* @param Gives the user the output from the PID algorithm that is calculated
* internally
- *
+ *
* Body: Uses the output, does some filtering and drives the robot
*/
@Override
* Body: Uses the output, does some filtering and drives the robot
*/
@Override
@@
-229,7
+229,7
@@
public class DriveTrain extends PIDSubsystem {
/*
* Checks the drive mode
/*
* Checks the drive mode
- *
+ *
* @return the current state of the robot in each state Average distance from
* both sides of tank drive for Encoder Mode Angle from the gyro in GYRO_MODE
*/
* @return the current state of the robot in each state Average distance from
* both sides of tank drive for Encoder Mode Angle from the gyro in GYRO_MODE
*/
@@
-265,9
+265,9
@@
public class DriveTrain extends PIDSubsystem {
/*
* constrains the distance to within -100 and 100 since we aren't going to
* drive more than 100 inches
/*
* constrains the distance to within -100 and 100 since we aren't going to
* drive more than 100 inches
- *
+ *
* Configure Encoder PID
* Configure Encoder PID
- *
+ *
* Sets the setpoint to the PID subsystem
*/
public void driveDistance(double dist, double maxTimeOut) {
* Sets the setpoint to the PID subsystem
*/
public void driveDistance(double dist, double maxTimeOut) {
@@
-307,10
+307,10
@@
public class DriveTrain extends PIDSubsystem {
/*
* Turning method that should be used repeatedly in a command
/*
* Turning method that should be used repeatedly in a command
- *
+ *
* First constrains the angle to within -360 and 360 since that is as much as
* we need to turn
* First constrains the angle to within -360 and 360 since that is as much as
* we need to turn
- *
+ *
* Configures Gyro PID and sets the setpoint as an angle
*/
public void turnAngle(double angle) {
* Configures Gyro PID and sets the setpoint as an angle
*/
public void turnAngle(double angle) {
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/Scaler.java
b/src/org/usfirst/frc/team3501/robot/subsystems/Scaler.java
index e56e4a81721df4c9d9ea28b2b3a3f555cb6da534..283b1e6c848ad8a0d69d7d19fbc28a8bdfc402ee 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/Scaler.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/Scaler.java
@@
-12,7
+12,7
@@
public class Scaler extends Subsystem {
private CANTalon winch;
public Scaler() {
private CANTalon winch;
public Scaler() {
- scaler = new DoubleSolenoid(Constants.Scaler.FORWARD_CHANNEL,
+ scaler = new DoubleSolenoid(
9,
Constants.Scaler.FORWARD_CHANNEL,
Constants.Scaler.REVERSE_CHANNEL);
winch = new CANTalon(Constants.Scaler.WINCH_MOTOR);
}
Constants.Scaler.REVERSE_CHANNEL);
winch = new CANTalon(Constants.Scaler.WINCH_MOTOR);
}