Skip to content

Commit

Permalink
style: format code with Ktlint
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 972faab according to the output
from Ktlint.

Details: #2
  • Loading branch information
deepsource-autofix[bot] authored Oct 22, 2024
1 parent 972faab commit 2841b95
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/java/frc/robot/RobotContainer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class RobotContainer {
/* Setting up bindings for necessary control of the swerve drive platform */
private val joystick = CommandXboxController(0)
var drivetrain: CommandSwerveDrivetrain = TunerConstants.DriveTrain // drivetrain
val camera : VisionSubsystem = VisionSubsystem()
val camera: VisionSubsystem = VisionSubsystem()

// Slew Rate Limiters to limit acceleration of joystick inputs
private val xLimiter = SlewRateLimiter(2.0)
Expand Down Expand Up @@ -71,25 +71,24 @@ class RobotContainer {
.withRotationalRate(-joystick.rightX * MaxAngularRate)
} // Drive counterclockwise with negative X (left)


joystick.a().whileTrue(drivetrain.applyRequest { brake })
joystick.b().whileTrue(drivetrain
.applyRequest { point.withModuleDirection(Rotation2d(-joystick.leftY, -joystick.leftX)) })
joystick.b().whileTrue(
drivetrain
.applyRequest { point.withModuleDirection(Rotation2d(-joystick.leftY, -joystick.leftX)) },
)

// reset the field-centric heading on left bumper press
joystick.leftBumper().onTrue(drivetrain.runOnce { drivetrain.seedFieldRelative() })

//face robot toward closest note
joystick.rightBumper().onTrue(drivetrain.applyRequest { point.withModuleDirection(camera.getNearestRotation())})
// face robot toward closest note
joystick.rightBumper().onTrue(drivetrain.applyRequest { point.withModuleDirection(camera.getNearestRotation()) })

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style. Warning

Line detected that is longer than the defined maximum line length in the code style.

if (Utils.isSimulation()) {
drivetrain.seedFieldRelative(Pose2d(Translation2d(), Rotation2d.fromDegrees(90.0)))
}
drivetrain.registerTelemetry { state: SwerveDrivetrain.SwerveDriveState -> logger.telemeterize(state) }
}



init {
configureBindings()
}
Expand Down

0 comments on commit 2841b95

Please sign in to comment.