From: EvanYap Date: Sat, 4 Feb 2017 21:52:07 +0000 (-0800) Subject: set up get numbers for smart dashboard X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=0de29669b106e8bed9e276e691f018e6e2046849 set up get numbers for smart dashboard --- diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index 0afd166..e0f075b 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -44,10 +44,8 @@ public class Robot extends IterativeRobot { public void autonomousInit() { driveTrain.setHighGear(); + SmartDashboard.putNumber(Constants.DriveTrain.P_Val, -1); SmartDashboard.putNumber(Constants.DriveTrain.I_Val, -1); - - SmartDashboard.putNumber("P", -1); - SmartDashboard.putNumber(Constants.DriveTrain.D_Val, -1); } @@ -56,8 +54,10 @@ public class Robot extends IterativeRobot { public void autonomousPeriodic() { Scheduler.getInstance().run(); - DriveTrain.getDriveTrain().getDriveController().setConstants(p, i, d); - + double P = SmartDashboard.getNumber(Constants.DriveTrain.P_Val, -1); + double I = SmartDashboard.getNumber(Constants.DriveTrain.I_Val, -1); + double D = SmartDashboard.getNumber(Constants.DriveTrain.D_Val, -1); + DriveTrain.getDriveTrain().getDriveController().setConstants(P, I, D); } @Override