From 0de29669b106e8bed9e276e691f018e6e2046849 Mon Sep 17 00:00:00 2001 From: EvanYap Date: Sat, 4 Feb 2017 13:52:07 -0800 Subject: [PATCH] set up get numbers for smart dashboard --- src/org/usfirst/frc/team3501/robot/Robot.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 2.30.2