Skip to content
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

Closed
wants to merge 5 commits into from
Closed

A #2

wants to merge 5 commits into from

Conversation

MustacheNinja23
Copy link
Contributor

No description provided.

MustacheNinja23 and others added 3 commits October 21, 2024 16:44
This commit fixes the style issues introduced in 972faab according to the output
from Ktlint.

Details: #2

// 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

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

deepsource-io bot commented Oct 22, 2024

Here's the code health analysis summary for commits 1c29919..9be744c. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Kotlin LogoKotlin❌ Failure
❗ 2 occurences introduced
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Contributor

@TheGamer1002 TheGamer1002 left a 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
Copy link
Contributor

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

TheGamer1002 and others added 2 commits October 22, 2024 16:28
This commit fixes the style issues introduced in 6c4c746 according to the output
from Ktlint.

Details: #2
@@ -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

This expression contains a magic number. Consider defining it to a well named constant.

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

This expression contains a magic number. Consider defining it to a well named constant.
}

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

This expression contains a magic number. Consider defining it to a well named constant.
}

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

This expression contains a magic number. Consider defining it to a well named constant.

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

This expression contains a magic number. Consider defining it to a well named constant.
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

This expression contains a magic number. Consider defining it to a well named constant.
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

This expression contains a magic number. Consider defining it to a well named constant.
TheGamer1002 pushed a commit that referenced this pull request Oct 25, 2024
This commit fixes the style issues introduced in 972faab according to the output
from Ktlint.

Details: #2
TheGamer1002 pushed a commit that referenced this pull request Oct 25, 2024
This commit fixes the style issues introduced in 6c4c746 according to the output
from Ktlint.

Details: #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants