From: EvanYap Date: Thu, 11 Feb 2016 05:15:04 +0000 (-0800) Subject: Attempts to create methods for the gyro to work, but testing has failed X-Git-Url: http://challenge-bot.com/repos/?a=commitdiff_plain;ds=sidebyside;h=d06ee698388fcf76323a71d424ca1aef15dd4bc8;p=3501%2Fstronghold-2016 Attempts to create methods for the gyro to work, but testing has failed --- 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(); } + }