diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index cae18c5..0302d54 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -14,6 +14,7 @@ import frc.robot.Utility.Limelight; import frc.robot.Utility.Motor; import frc.robot.Utility.Motor.MotorType; +import frc.robot.commands.ExampleCommand; import frc.robot.commands.Drivetrain.*; import frc.robot.commands.Drivetrain.TrackObject.WhatToTrack; import frc.robot.subsystems.DifferentialDrivetrain; @@ -37,20 +38,6 @@ * (including subsystems, commands, and button mappings) should be declared here. */ public class RobotContainer { - Joystick m_controller = new Joystick(0); - JoystickButton turn = new JoystickButton(m_controller, 1); - - //DifferentialDrivetrain m_drivetrain = new TalonSRX_DifferentialDrivetrain( - // 0.154, - // new WPI_TalonSRX(1), new WPI_TalonSRX(4), - // new WPI_TalonSRX[]{new WPI_TalonSRX(2)}, new WPI_TalonSRX[]{new WPI_TalonSRX(5)} - // ); - - DifferentialDrivetrain m_drivetrain = new DifferentialDrivetrain( - 0.154, - new Motor(1, MotorType.TalonSRX), new Motor(4, MotorType.TalonSRX), - new Motor[]{new Motor(2, MotorType.TalonSRX)}, new Motor[]{new Motor(5, MotorType.TalonSRX)} - ); // The robot's subsystems and commands are defined here... //Subsystems @@ -60,18 +47,7 @@ public class RobotContainer { Shoot m_shoot; /** The container for the robot. Contains subsystems, OI devices, and commands. */ public RobotContainer() { - Gyro.reset(); - Gyro.calibrate(); - Limelight.setPipeline(0); - m_drivetrain.configFeedforward(0.991, 3.27724, 1.04051); - m_drivetrain.configRotationFeedForward(0.0910536461972, 0.00629517415169, 0.0000576713721188); - m_drivetrain.configFeedforwardSided( - 1.00760991292, 3.37832138739, -0.0405742345827, - 1.00702736431, 3.25734393828, -0.0234916065671 - ); - m_drivetrain.setDefaultCommand(new ArcadeDrive(m_drivetrain, m_controller, 2, 270)); - //m_drivetrain.setDefaultCommand(new TankDrive(m_drivetrain, m_controller)); - configureButtonBindings();//0.145 + configureButtonBindings(); } /** @@ -81,8 +57,7 @@ public RobotContainer() { * {@link edu.wpi.first.wpilibj2.command.button.JoystickButton}. */ private void configureButtonBindings() { - turn.whileHeld(new TrackObject(m_drivetrain, WhatToTrack.Ball)); - //turn.whenPressed(new ToRotation(m_drivetrain)); + } @@ -92,7 +67,11 @@ private void configureButtonBindings() { * @return the command to run in autonomous */ public Command getAutonomousCommand() { +<<<<<<< HEAD //An ExampleCommand will run in autonomous return m_shoot; +======= + return new ExampleCommand(); +>>>>>>> template/master } } diff --git a/src/main/java/frc/robot/commands/Drivetrain/ExampleCommand.java b/src/main/java/frc/robot/commands/ExampleCommand.java similarity index 95% rename from src/main/java/frc/robot/commands/Drivetrain/ExampleCommand.java rename to src/main/java/frc/robot/commands/ExampleCommand.java index 11f2eed..22f71af 100644 --- a/src/main/java/frc/robot/commands/Drivetrain/ExampleCommand.java +++ b/src/main/java/frc/robot/commands/ExampleCommand.java @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -package frc.robot.commands.Drivetrain; +package frc.robot.commands; import edu.wpi.first.wpilibj2.command.CommandBase;