Skip to content

Commit 2f32352

Browse files
committed
Update
1 parent 37d8dbe commit 2f32352

File tree

4 files changed

+14
-24
lines changed

4 files changed

+14
-24
lines changed

RobotDemo/src/org/usfirst/frc/team5518/function/DriveTrain.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class DriveTrain extends RobotFunction {
1313

14-
public static final double kDefaultSensitivity = 0.75;
14+
public static final double kDefaultSensitivity = 0.70;
1515

1616
private RobotDrive m_robot;
1717

RobotDemo/src/org/usfirst/frc/team5518/function/PneumaticControl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public void initialize() {
3030
@Override
3131
public void start() {
3232

33-
if (Robot.xOi.getJoystick().getRawAxis(RobotMap.XBOX_LT_AXIS) > 0.5d) { // if left trigger pressed more than halfway
33+
if (Robot.xOi.getJoystick().getRawAxis(RobotMap.XBOX_RT_AXIS) > 0.5d) { // if left trigger pressed more than halfway
3434
// open solenoid valves to make pistons go forward
3535
m_solenoid.set(DoubleSolenoid.Value.kForward);
36-
} else if (Robot.xOi.getJoystick().getRawAxis(RobotMap.XBOX_LT_AXIS) <= 0.5d) { // if left trigger pressed less or equal to halfway
36+
} else if (Robot.xOi.getJoystick().getRawAxis(RobotMap.XBOX_RT_AXIS) <= 0.5d) { // if left trigger pressed less or equal to halfway
3737
// open solenoid values to make pistons go backward
3838
m_solenoid.set(DoubleSolenoid.Value.kReverse);
3939
} else { // otherwise

RobotDemo/src/org/usfirst/frc/team5518/robot/Robot.java

+11-21
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class Robot extends IterativeRobot {
3939
private DriveTrain driveTrain;
4040
private PneumaticControl pneumaticControl;
4141
private SensorTrack sensorTrack;
42-
private VisionTrack visionTrack;
42+
//private VisionTrack visionTrack;
4343

4444
private RobotFunction autonomousCommand;
4545
private SendableChooser autoChooser;
@@ -56,7 +56,7 @@ public void robotInit() {
5656
driveTrain = new DriveTrain("DriveTrain");
5757
pneumaticControl = new PneumaticControl("PneumaticControl");
5858
sensorTrack = new SensorTrack("SensorTrack");
59-
visionTrack = new VisionTrack("VisionTrack");
59+
//visionTrack = new VisionTrack("VisionTrack");
6060

6161
autoChooser = new SendableChooser();
6262
autoChooser.addDefault("Autonomous 1: Push",
@@ -67,15 +67,15 @@ public void robotInit() {
6767
new AutonomousChooser(3));
6868
autoChooser.addObject("Autonomous 4: Pull w/ Hill",
6969
new AutonomousChooser(4));
70-
autoChooser.addObject("Autonomous 0: Do Nothing",
71-
new AutonomousChooser(0));
70+
autoChooser.addObject("Autonomous 5: Do Nothing",
71+
new AutonomousChooser(5));
7272
SmartDashboard.putData("Autonomous Chooser", autoChooser);
7373

7474
armElevator.initialize();
7575
driveTrain.initialize();
7676
pneumaticControl.initialize();
7777
sensorTrack.initialize();
78-
visionTrack.initialize();
78+
//visionTrack.initialize();
7979

8080
driveTrain.setMaxPower(0.8);
8181
driveTrain.setSensitivity(driveTrain.kDefaultSensitivity);
@@ -84,7 +84,7 @@ public void robotInit() {
8484
SmartDashboard.putData(driveTrain);
8585
SmartDashboard.putData(pneumaticControl);
8686
SmartDashboard.putData(sensorTrack);
87-
SmartDashboard.putData(visionTrack);
87+
//SmartDashboard.putData(visionTrack);
8888
SmartDashboard.putData("Autonomous Mode", autoChooser);
8989
SmartDashboard.putData(Scheduler.getInstance());
9090

@@ -95,7 +95,7 @@ public void robotInit() {
9595
* You can use it to reset subsystems before shutting down.
9696
*/
9797
public void disabledInit(){
98-
visionTrack.disabledInit();
98+
//visionTrack.disabledInit();
9999
}
100100

101101
public void disabledPeriodic() {
@@ -108,15 +108,9 @@ public void autonomousInit() {
108108
autonomous_number = ((AutonomousChooser) autoChooser.getSelected()).getNumber();
109109

110110
switch (autonomous_number) {
111-
case 0:
112-
break;
113-
case 1:
114-
case 3:
115-
autonomousSetup(false);
116-
break;
117111
case 2:
118112
case 4:
119-
autonomousSetup(true);
113+
autonomousSetup();
120114
break;
121115
}
122116

@@ -130,8 +124,6 @@ public void autonomousPeriodic() {
130124
double seconds = Timer.getFPGATimestamp();
131125

132126
switch (autonomous_number) {
133-
case 0:
134-
break;
135127
case 1:
136128
autonomousPush(seconds, 2.0);
137129
break;
@@ -158,7 +150,7 @@ public void teleopInit() {
158150
// this line or comment it out.
159151

160152
armElevator.resetEncoder();
161-
visionTrack.telopInit();
153+
//visionTrack.telopInit();
162154

163155
}
164156

@@ -175,7 +167,7 @@ public void teleopPeriodic() {
175167
driveTrain.start();
176168
pneumaticControl.start();
177169
sensorTrack.start();
178-
visionTrack.start();
170+
//visionTrack.start();
179171
output();
180172

181173
}
@@ -199,13 +191,11 @@ private void output() {
199191

200192
}
201193

202-
private void autonomousSetup(boolean extra) {
194+
private void autonomousSetup() {
203195

204-
if (extra) {
205196
armElevator.autoStart();
206197
pneumaticControl.autonomous();
207198
Timer.delay(1.0);
208-
}
209199

210200
}
211201

RobotDemo/sysProps.xml

-2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)