diff --git a/wpilibcExamples/src/main/cpp/examples/ArmBot/cpp/RobotContainer.cpp b/wpilibcExamples/src/main/cpp/examples/ArmBot/cpp/RobotContainer.cpp index 3e5b98dd9c..74d2f54bb9 100644 --- a/wpilibcExamples/src/main/cpp/examples/ArmBot/cpp/RobotContainer.cpp +++ b/wpilibcExamples/src/main/cpp/examples/ArmBot/cpp/RobotContainer.cpp @@ -51,7 +51,7 @@ void RobotContainer::ConfigureButtonBindings() { // While holding the shoulder button, drive at half speed frc2::JoystickButton(&m_driverController, 6) - .WhenPressed([this] { m_drive.SetMaxOutput(.5); }) + .WhenPressed([this] { m_drive.SetMaxOutput(0.5); }) .WhenReleased([this] { m_drive.SetMaxOutput(1); }); } diff --git a/wpilibcExamples/src/main/cpp/examples/ArmBotOffboard/cpp/RobotContainer.cpp b/wpilibcExamples/src/main/cpp/examples/ArmBotOffboard/cpp/RobotContainer.cpp index 955fe7cbd4..d8ff014a1d 100644 --- a/wpilibcExamples/src/main/cpp/examples/ArmBotOffboard/cpp/RobotContainer.cpp +++ b/wpilibcExamples/src/main/cpp/examples/ArmBotOffboard/cpp/RobotContainer.cpp @@ -38,7 +38,7 @@ void RobotContainer::ConfigureButtonBindings() { // While holding the shoulder button, drive at half speed frc2::JoystickButton(&m_driverController, 6) - .WhenPressed([this] { m_drive.SetMaxOutput(.5); }) + .WhenPressed([this] { m_drive.SetMaxOutput(0.5); }) .WhenReleased([this] { m_drive.SetMaxOutput(1); }); } diff --git a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/Constants.h b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/Constants.h index c2a3047427..8aaa0a8ee8 100644 --- a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/Constants.h +++ b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/Constants.h @@ -48,7 +48,7 @@ constexpr auto kWheelBase = extern const frc::MecanumDriveKinematics kDriveKinematics; constexpr int kEncoderCPR = 1024; -constexpr double kWheelDiameterMeters = .15; +constexpr double kWheelDiameterMeters = 0.15; constexpr double kEncoderDistancePerPulse = // Assumes the encoders are directly mounted on the wheel shafts (kWheelDiameterMeters * wpi::numbers::pi) / diff --git a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/RobotContainer.h b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/RobotContainer.h index 4978662acf..93485e3bb0 100644 --- a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/RobotContainer.h +++ b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/RobotContainer.h @@ -39,7 +39,7 @@ class RobotContainer { // The robot's subsystems DriveSubsystem m_drive; - frc2::InstantCommand m_driveHalfSpeed{[this] { m_drive.SetMaxOutput(.5); }, + frc2::InstantCommand m_driveHalfSpeed{[this] { m_drive.SetMaxOutput(0.5); }, {}}; frc2::InstantCommand m_driveFullSpeed{[this] { m_drive.SetMaxOutput(1); }, {}}; diff --git a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/Constants.h b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/Constants.h index 96d1c25a6b..31789ec99b 100644 --- a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/Constants.h +++ b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/Constants.h @@ -74,7 +74,7 @@ constexpr double kPRearRightVel = 0.5; namespace ModuleConstants { constexpr int kEncoderCPR = 1024; -constexpr double kWheelDiameterMeters = .15; +constexpr double kWheelDiameterMeters = 0.15; constexpr double kDriveEncoderDistancePerPulse = // Assumes the encoders are directly mounted on the wheel shafts (kWheelDiameterMeters * wpi::numbers::pi) / diff --git a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h index 351aeb3ac7..5233f3f60a 100644 --- a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h +++ b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h @@ -89,9 +89,9 @@ class DriveSubsystem : public frc2::SubsystemBase { void ResetOdometry(frc::Pose2d pose); units::meter_t kTrackWidth = - .5_m; // Distance between centers of right and left wheels on robot + 0.5_m; // Distance between centers of right and left wheels on robot units::meter_t kWheelBase = - .7_m; // Distance between centers of front and back wheels on robot + 0.7_m; // Distance between centers of front and back wheels on robot frc::SwerveDriveKinematics<4> kDriveKinematics{ frc::Translation2d(kWheelBase / 2, kTrackWidth / 2),