-
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
style: format code with Ktlint #13
Conversation
This commit fixes the style issues introduced in 050fbb2 according to the output from Ktlint. Details: None
// Log state with SignalLogger class | ||
{ state: SysIdRoutineLog.State -> SignalLogger.writeString("SysIdTranslation_State", state.toString()) }, | ||
null, // Use default ramp rate (1 V/s) | ||
Units.Volts.of(4.0), // Reduce dynamic step voltage to 4 V to prevent brownout |
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
{ volts: Voltage? -> setControl(m_steerCharacterization.withVolts(volts)) }, null, this | ||
) | ||
null, // Use default ramp rate (1 V/s) | ||
Units.Volts.of(7.0), // Use dynamic voltage of 7 V |
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
Mechanism( | ||
{ output: Voltage -> | ||
/* output is actually radians per second, but SysId only supports "volts" */ | ||
setControl(m_rotationCharacterization.withRotationalRate(output.`in`(Units.Volts)))/* also log the requested output for SysId */ | ||
setControl(m_rotationCharacterization.withRotationalRate(output.`in`(Units.Volts))) /* also log the requested output for SysId */ |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style. Warning
) | ||
}, | ||
PPHolonomicDriveController( | ||
PIDConstants(0.5, 0.0, 0.0), // PID constants for translation | ||
PIDConstants(5.0, 0.0, 0.0) // PID constants for rotation | ||
PIDConstants(0.5, 0.0, 0.0), // PID constants for translation |
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
PIDConstants(0.5, 0.0, 0.0), // PID constants for translation | ||
PIDConstants(5.0, 0.0, 0.0) // PID constants for rotation | ||
PIDConstants(0.5, 0.0, 0.0), // PID constants for translation | ||
PIDConstants(5.0, 0.0, 0.0), // PID constants for rotation |
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
Double.MAX_VALUE | ||
) | ||
else estStdDevs.times(1 + (avgDist * avgDist / 30)) | ||
estStdDevs = if (numTags == 1 && avgDist > 4) { |
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
Double.MAX_VALUE, | ||
) | ||
} else { | ||
estStdDevs.times(1 + (avgDist * avgDist / 30)) |
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
Double.MAX_VALUE | ||
) | ||
else estStdDevs.times(1 + (avgDist * avgDist / 30)) | ||
estStdDevs = if (numTags == 1 && avgDist > 4) { |
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
Double.MAX_VALUE, | ||
) | ||
} else { | ||
estStdDevs.times(1 + (avgDist * avgDist / 30)) |
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
Here's the code health analysis summary for commits Analysis Summary
|
This commit fixes the style issues introduced in 050fbb2 according to the output
from Ktlint.
Details: None