-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A #2
A #2
Conversation
|
||
// 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()) }) |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style. Warning
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to build lmao
@@ -0,0 +1,25 @@ | |||
package frc.robot.subsystems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package frc.robot.subsystems.vision
@@ -44,8 +44,8 @@ | |||
.withCurrentLimits( | |||
CurrentLimitsConfigs() // Swerve azimuth does not require much torque output, so we can set a relatively low | |||
// stator current limit to help avoid brownouts without impacting performance. | |||
.withStatorCurrentLimit(60.0) | |||
.withStatorCurrentLimitEnable(true) | |||
.withStatorCurrentLimit(60.0) // TODO originally 60 |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning generated
|
||
init { | ||
// Initialize the arm subsystem | ||
motor = TalonFX(31) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
} | ||
|
||
fun extend(i: Double) { | ||
motor.set(-0.4 * i) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
} | ||
|
||
fun retract(i: Double) { | ||
motor.set(0.4 * i) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
|
||
fun getCommand(joystickTriggerValue: () -> Double): Command { | ||
return run { | ||
if (joystickTriggerValue.invoke() > 0.1) { |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
return run { | ||
if (joystickTriggerValue.invoke() > 0.1) { | ||
extend(joystickTriggerValue.invoke()) | ||
} else if (joystickTriggerValue.invoke() < -0.1) { |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
countWithoutMeasurement++ | ||
} | ||
|
||
if (countWithoutMeasurement > 25) { // method called every 20 ms, |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning
No description provided.