Skip to content

Commit

Permalink
Merge remote-tracking branch 'template/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
stebb1976 committed Mar 6, 2021
2 parents 73a1a25 + 9c4be62 commit 3981b1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
35 changes: 7 additions & 28 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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();
}

/**
Expand All @@ -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));

}


Expand All @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3981b1c

Please sign in to comment.