From d06ee698388fcf76323a71d424ca1aef15dd4bc8 Mon Sep 17 00:00:00 2001 From: EvanYap Date: Wed, 10 Feb 2016 21:15:04 -0800 Subject: [PATCH] Attempts to create methods for the gyro to work, but testing has failed --- .../usfirst/frc/team3501/robot/FirebotGyro.java | 2 +- src/org/usfirst/frc/team3501/robot/Robot.java | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/FirebotGyro.java b/src/org/usfirst/frc/team3501/robot/FirebotGyro.java index fefa5908..c1d1552d 100644 --- a/src/org/usfirst/frc/team3501/robot/FirebotGyro.java +++ b/src/org/usfirst/frc/team3501/robot/FirebotGyro.java @@ -705,7 +705,7 @@ public class FirebotGyro extends SensorBase * @see ITG3200_RA_GYRO_ZOUT_H */ public short getRotationZ() { - return ReadShortFromRegister(ITG3200_RA_GYRO_ZOUT_H, 2); + return ReadShortFromRegister(ITG3200_RA_GYRO_ZOUT_H, 0); } // PWR_MGM register diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index 63c707ef..c40b9ba6 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -33,11 +33,7 @@ public class Robot extends IterativeRobot { short rawValue; public FirebotGyro gyro; - double initialSpeedNanoseconds; - double finalSpeedNanoseconds; - double initialSpeedSeconds; - double finalSpeedSeconds; - double deltaSpeed; + double degreesIncreased; double degrees; @Override @@ -55,10 +51,10 @@ public class Robot extends IterativeRobot { // and the positions of the defenses from a drop-down menu on the Smart // Dashboard // make the Sendable Choosers - initializeSendableChoosers(); - addPositionChooserOptions(); - addDefensesToAllDefenseSendableChooosers(); - sendSendableChoosersToSmartDashboard(); + // initializeSendableChoosers(); + // addPositionChooserOptions(); + // addDefensesToAllDefenseSendableChooosers(); + // sendSendableChoosersToSmartDashboard(); } @@ -108,12 +104,14 @@ public class Robot extends IterativeRobot { positionFourDefense); SmartDashboard.putData("Position Five Defense Chooser", positionFiveDefense); + SmartDashboard.putData("Position Four Defense Chooser", positionFourDefense); SmartDashboard.putData("Position Five Defense Chooser", positionFiveDefense); shooter = new Shooter(); + } @Override @@ -154,4 +152,5 @@ public class Robot extends IterativeRobot { public void teleopPeriodic() { Scheduler.getInstance().run(); } + } -- 2.30.2