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
9 changes: 0 additions & 9 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,6 @@ 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());
}

@Override
public void testInit() {
// Cancels all running commands at the start of test mode.
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 drivecontroller = new CommandXboxController(0);

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(drivecontroller.getLeftY() * MAX_SPEED_METERS_PER_SECOND));
drivetrain.setRightSpeed(MetersPerSecond.of(drivecontroller.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")));
drivecontroller.a().whileTrue(Commands.run(() -> System.out.println("yay we did it")));
drivecontroller.b().whileTrue(Commands.run(() -> System.out.println("yay we did it")));
}


Expand Down