Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,7 @@ public void teleopInit() {

/** This function is called periodically during operator control. */
@Override
public void teleopPeriodic() {
SmartDashboard.putNumber(("joysticklefty"), m_robotContainer.commandxboxcontroller.getLeftY());
SmartDashboard.putNumber(("joystickleftx"), m_robotContainer.commandxboxcontroller.getLeftX());
SmartDashboard.putNumber(("joystickrighty"), m_robotContainer.commandxboxcontroller.getRightY());
SmartDashboard.putNumber(("joystickrightx"), m_robotContainer.commandxboxcontroller.getRightX());
}
public void teleopPeriodic() {}

@Override
public void testInit() {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public class RobotContainer {
// The robot's subsystems and commands are defined here...
private final Drivetrain drivetrain = new Drivetrain();
public final CommandXboxController commandxboxcontroller = new CommandXboxController(0);
private final CommandXboxController commandxboxdrivecontroller = new CommandXboxController(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this variable name doesn't follow standards. It should be commandXbodDriveController to adhere to our naming standards!


private final double MAX_SPEED_METERS_PER_SECOND = 4.0;
/*added array bc the code did not repeat the action when it was set to null.
Expand All @@ -39,8 +39,8 @@ public RobotContainer() {
private void setUpDefaultCommands() {
drivetrain.setDefaultCommand(Commands.run(
() ->{
drivetrain.setLeftSpeed(MetersPerSecond.of(commandxboxcontroller.getLeftY() * MAX_SPEED_METERS_PER_SECOND));
drivetrain.setRightSpeed(MetersPerSecond.of(commandxboxcontroller.getRightY() * MAX_SPEED_METERS_PER_SECOND));
drivetrain.setLeftSpeed(MetersPerSecond.of(commandxboxdrivecontroller.getLeftY() * MAX_SPEED_METERS_PER_SECOND));
drivetrain.setRightSpeed(MetersPerSecond.of(commandxboxdrivecontroller.getRightY() * MAX_SPEED_METERS_PER_SECOND));
//drivetrain.setLeftSpeed(MetersPerSecond.of(MAX_SPEED_METERS_PER_SECOND));
//drivetrain.setRightSpeed(MetersPerSecond.of(MAX_SPEED_METERS_PER_SECOND));
System.out.println("yay we did it");
Expand All @@ -53,8 +53,8 @@ private void setUpDefaultCommands() {
}

private void setUpDriverButtonBindings() {
commandxboxcontroller.a().whileTrue(Commands.run(() -> System.out.println("yay we did it")));
commandxboxcontroller.b().whileTrue(Commands.run(() -> System.out.println("yay we did it")));
commandxboxdrivecontroller.a().whileTrue(Commands.run(() -> System.out.println("yay we did it")));
commandxboxdrivecontroller.b().whileTrue(Commands.run(() -> System.out.println("yay we did it")));
}


Expand Down