-
Notifications
You must be signed in to change notification settings - Fork 0
style: format code with Ktlint #12
base: main
Are you sure you want to change the base?
Conversation
This commit fixes the style issues introduced in a213620 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
Here's the code health analysis summary for commits Analysis Summary
|
This commit fixes the style issues introduced in a213620 according to the output
from Ktlint.
Details: None