positionFourDefense, positionFiveDefense;
// Gyro stuff
- public GyroLib gyro;
+ 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;
@Override
public void robotInit() {
- gyro = new GyroLib(I2C.Port.kOnboard, false);
+ // driveTrain = new DriveTrain();
+ gyro = new FirebotGyro(I2C.Port.kOnboard, (byte) 0x68);
+ // oi = new OI();
shooter = new Shooter();
scaler = new Scaler();
defenseArm = new DefenseArm();
intakeArm = new IntakeArm();
+ // Sendable Choosers allows the driver to select the position of the robot
+ // and the positions of the defenses from a drop-down menu on the Smart
+ // Dashboard
+ // make the Sendable Choosers
+ initializeSendableChoosers();
+ addPositionChooserOptions();
+ addDefensesToAllDefenseSendableChooosers();
+ sendSendableChoosersToSmartDashboard();
+
}
private void initializeSendableChoosers() {
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
@Override
public void teleopInit() {
-
- gyro.start();
-
}
@Override
public void teleopPeriodic() {
Scheduler.getInstance().run();
- System.out.println("Degrees: " + gyro.getRotationZ().getAngle());
-
}
-
}