From a6c9c6278567b8c5ed45c5d06f0483a4b8fd5876 Mon Sep 17 00:00:00 2001 From: EvanYap Date: Wed, 10 Feb 2016 21:29:33 -0800 Subject: [PATCH] Refactor name of FirebotGyro class to GyroClass since another team mentor created it --- .../frc/team3501/robot/{FirebotGyro.java => GyroClass.java} | 6 +++--- src/org/usfirst/frc/team3501/robot/Robot.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/org/usfirst/frc/team3501/robot/{FirebotGyro.java => GyroClass.java} (99%) diff --git a/src/org/usfirst/frc/team3501/robot/FirebotGyro.java b/src/org/usfirst/frc/team3501/robot/GyroClass.java similarity index 99% rename from src/org/usfirst/frc/team3501/robot/FirebotGyro.java rename to src/org/usfirst/frc/team3501/robot/GyroClass.java index c1d1552d..70edc98c 100644 --- a/src/org/usfirst/frc/team3501/robot/FirebotGyro.java +++ b/src/org/usfirst/frc/team3501/robot/GyroClass.java @@ -49,7 +49,7 @@ import edu.wpi.first.wpilibj.tables.ITable; * at: https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/ITG3200 * */ -public class FirebotGyro extends SensorBase +public class GyroClass extends SensorBase implements PIDSource, LiveWindowSendable { int devAddr; byte buffer[] = new byte[7]; @@ -63,7 +63,7 @@ public class FirebotGyro extends SensorBase * * @see ITG3200_DEFAULT_ADDRESS */ - public FirebotGyro(I2C.Port port) { + public GyroClass(I2C.Port port) { devAddr = ITG3200_DEFAULT_ADDRESS; m_i2c = new I2C(port, devAddr); @@ -83,7 +83,7 @@ public class FirebotGyro extends SensorBase * @see ITG3200_ADDRESS_AD0_LOW * @see ITG3200_ADDRESS_AD0_HIGH */ - public FirebotGyro(I2C.Port port, byte address) { + public GyroClass(I2C.Port port, byte address) { devAddr = address; m_i2c = new I2C(port, address); diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index c40b9ba6..8d69370e 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -31,7 +31,7 @@ public class Robot extends IterativeRobot { // Gyro stuff private final static double NANOSECONDS_PER_SECOND = 1000000000; short rawValue; - public FirebotGyro gyro; + public GyroClass gyro; double degreesIncreased; double degrees; @@ -39,7 +39,7 @@ public class Robot extends IterativeRobot { @Override public void robotInit() { // driveTrain = new DriveTrain(); - gyro = new FirebotGyro(I2C.Port.kOnboard, (byte) 0x68); + gyro = new GyroClass(I2C.Port.kOnboard, (byte) 0x68); // oi = new OI(); shooter = new Shooter(); -- 2.30.2