1313import edu .wpi .first .wpilibj2 .command .Command ;
1414import edu .wpi .first .wpilibj2 .command .button .CommandXboxController ;
1515import edu .wpi .first .wpilibj2 .command .button .RobotModeTriggers ;
16+ import frc .robot .commands .DriveBySpeed ;
1617import frc .robot .commands .WheelSlipTest ;
1718import frc .robot .subsystems .climber .ClimberSubsystem ;
1819import frc .robot .subsystems .drive .DriveConstants ;
20+ import frc .robot .subsystems .drive .DrivePreferences ;
1921import frc .robot .subsystems .drive .DrivetrainSubsystem ;
2022import frc .robot .subsystems .indexer .IndexerSubsystem ;
2123import frc .robot .subsystems .intake .IntakeSubsystem ;
@@ -72,7 +74,8 @@ private void configureSubsystemDefaultCommands() {
7274 * Math .copySign (Math .pow (joystick .getRightX (), 2 ), joystick .getRightX ())
7375 * DriveConstants
7476 .MAX_ANGULAR_SPEED ) // Drive counterclockwise with negative X (left)
75- ));
77+ .withDeadband (DriveConstants .MAX_DRIVE_SPEED * 0.1 )
78+ .withRotationalDeadband (DriveConstants .MAX_ANGULAR_SPEED * 0.1 )));
7679 }
7780
7881 private void configureBindings () {
@@ -94,12 +97,15 @@ private void configureBindings() {
9497 // Run SysId routines when holding back/start and X/Y.
9598 // Note that each routine should be run exactly once in a single log.
9699
97- joystick .x ().onTrue (drivetrain .sysIdSteer ());
98- joystick .y ().onTrue (drivetrain .sysIdTranslation ());
99- joystick .b ().whileTrue (new WheelSlipTest (drivetrain )); // Testing only
100+ // joystick.x().onTrue(drivetrain.sysIdSteer());
101+ // joystick.y().onTrue(drivetrain.sysIdTranslation());
102+ joystick .x ().onTrue (new WheelSlipTest (drivetrain ));
103+ joystick
104+ .y ()
105+ .whileTrue (new DriveBySpeed (drivetrain , DrivePreferences .onemeter_speed )); // Testing only
100106
101107 // Reset the field-centric heading on left bumper press.
102- joystick .leftBumper ().onTrue (drivetrain .runOnce (drivetrain ::seedFieldCentric ));
108+ joystick .start ().onTrue (drivetrain .runOnce (drivetrain ::seedFieldCentric ));
103109
104110 drivetrain .registerTelemetry (logger ::telemeterize );
105111 }
0 commit comments