package org.usfirst.frc.team3501.robot.subsystems;
import org.usfirst.frc.team3501.robot.Constants;
-import org.usfirst.frc.team3501.robot.FirebotGyro;
import org.usfirst.frc.team3501.robot.Lidar;
import edu.wpi.first.wpilibj.AnalogInput;
public AnalogInput channel;
- // Gyro stuff
- private final static double NANOSECONDS_PER_SECOND = 1000000000;
- short rawValue;
- public FirebotGyro gyro;
-
- double initialSpeedNanoseconds;
- double finalSpeedNanoseconds;
- double initialSpeedSeconds;
- double finalSpeedSeconds;
- double deltaSpeed;
- double degrees;
-
public DriveTrain() {
frontLeft = new CANTalon(Constants.DriveTrain.FRONT_LEFT);
frontRight = new CANTalon(Constants.DriveTrain.FRONT_RIGHT);
leftEncoder.setDistancePerPulse(INCHES_PER_PULSE);
rightEncoder.setDistancePerPulse(INCHES_PER_PULSE);
- gyro = new FirebotGyro(I2C.Port.kOnboard, (byte) 0x68);
- gyro.initialize();
}
@Override