Check before auton if both gears have the same value
authorArunima DIvya <adivya822@student.fuhsd.org>
Thu, 2 Feb 2017 05:07:51 +0000 (21:07 -0800)
committerArunima DIvya <adivya822@student.fuhsd.org>
Fri, 3 Feb 2017 03:26:48 +0000 (19:26 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java

index 908a52dcf0339b44735147d174f069500b873280..db5e469ff3be6a031e0efbfc571c6a9a13727cfd 100644 (file)
@@ -1,9 +1,6 @@
 package org.usfirst.frc.team3501.robot;
 
-<<<<<<< HEAD
-=======
 import org.usfirst.frc.team3501.robot.commands.driving.DriveDistance;
->>>>>>> fix bugs
 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
 import org.usfirst.frc.team3501.robot.subsystems.Intake;
 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
@@ -41,12 +38,15 @@ public class Robot extends IterativeRobot {
     return Intake.getIntake();
   }
 
+  // If the gear values do not match in the left and right piston, then they are
+  // both set to high gear
   @Override
   public void autonomousInit() {
-<<<<<<< HEAD
-=======
     Scheduler.getInstance().add(new DriveDistance(25, 10));
->>>>>>> fix bugs
+    if (driveTrain.getLeftGearPistonValue() != driveTrain
+        .getRightGearPistonValue()) {
+      driveTrain.setHighGear();
+    }
   }
 
   @Override
@@ -57,6 +57,7 @@ public class Robot extends IterativeRobot {
 
   @Override
   public void teleopInit() {
+
   }
 
   @Override