From: Eric Sandoval Date: Sun, 19 Feb 2017 22:21:26 +0000 (-0800) Subject: update code X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=c9cdc810505d568ca83e059236c3b66ba486d4c9 update code --- diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index 6388d0a..16b2884 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -58,7 +58,7 @@ public class Robot extends IterativeRobot { public void autonomousInit() { driveTrain.setHighGear(); - double driveP = SmartDashboard.getNumber(driveTrain.DRIVE_D_Val, + double driveP = SmartDashboard.getNumber(driveTrain.DRIVE_P_Val, driveTrain.PID_ERROR); double driveI = SmartDashboard.getNumber(driveTrain.DRIVE_I_Val, driveTrain.PID_ERROR); diff --git a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java index cb8227f..ccefba0 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java +++ b/src/org/usfirst/frc/team3501/robot/commands/driving/DriveDistance.java @@ -17,7 +17,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; */ public class DriveDistance extends Command { private DriveTrain driveTrain = Robot.getDriveTrain(); - private double maxTimeOut = 10; + private double maxTimeOut; private double target; private double zeroAngle; private Preferences prefs; @@ -28,12 +28,13 @@ public class DriveDistance extends Command { public DriveDistance(double distance, double maxTimeOut) { requires(driveTrain); this.target = distance; + this.maxTimeOut = maxTimeOut; driveStraightGyroP = SmartDashboard.getNumber(driveTrain.DRIVE_GYRO_P_Val, driveTrain.PID_ERROR); this.driveController = driveTrain.getDriveController(); this.driveController.setDoneRange(0.5); - this.driveController.setMaxOutput(1.1); + this.driveController.setMaxOutput(1.0); this.driveController.setMinDoneCycles(5); }