Skip to content

Commit

Permalink
fix: use logger template instead of string concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
Octol1ttle committed Oct 1, 2024
1 parent 6ddea55 commit 4212c4b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ public static RollContext.ConfiguresRotation fixNaN(String name) {
return (rotationInstant, context) -> {
if (Double.isNaN(rotationInstant.pitch())) {
rotationInstant = RotationInstant.of(0, rotationInstant.yaw(), rotationInstant.roll());
DoABarrelRoll.LOGGER.warn("NaN found in pitch for " + name + ", setting to 0 as fallback");
DoABarrelRoll.LOGGER.warn("NaN found in pitch for {}, setting to 0 as fallback", name);
}
if (Double.isNaN(rotationInstant.yaw())) {
rotationInstant = RotationInstant.of(rotationInstant.pitch(), 0, rotationInstant.roll());
DoABarrelRoll.LOGGER.warn("NaN found in yaw for " + name + ", setting to 0 as fallback");
DoABarrelRoll.LOGGER.warn("NaN found in yaw for {}, setting to 0 as fallback", name);
}
if (Double.isNaN(rotationInstant.roll())) {
rotationInstant = RotationInstant.of(rotationInstant.pitch(), rotationInstant.yaw(), 0);
DoABarrelRoll.LOGGER.warn("NaN found in roll for " + name + ", setting to 0 as fallback");
DoABarrelRoll.LOGGER.warn("NaN found in roll for {}, setting to 0 as fallback", name);
}
return rotationInstant;
};
Expand Down

0 comments on commit 4212c4b

Please sign in to comment.