Add missing compiler flags and fix warnings (#4889)

This makes the build fail on warnings. It caught two out-of-bounds reads
and a deprecation warning.
This commit is contained in:
Tyler Veness
2023-01-01 08:14:19 -08:00
committed by GitHub
parent 42fc4cb6bc
commit f0fa8205ac
9 changed files with 28 additions and 23 deletions

View File

@@ -19,6 +19,6 @@ class ExampleGlobalMeasurementSensor {
return frc::Pose2d{estimatedRobotPose.X() + units::meter_t{randVec(0)},
estimatedRobotPose.Y() + units::meter_t{randVec(1)},
estimatedRobotPose.Rotation() +
frc::Rotation2d{units::radian_t{randVec(3)}}};
frc::Rotation2d{units::radian_t{randVec(2)}}};
}
};

View File

@@ -51,7 +51,7 @@ class RobotContainer {
OnBoardIO::ChannelMode::INPUT};
// Example button
frc2::Button m_onboardButtonA{
frc2::Trigger m_onboardButtonA{
[this] { return m_onboardIO.GetButtonAPressed(); }};
// Autonomous commands.

View File

@@ -19,6 +19,6 @@ class ExampleGlobalMeasurementSensor {
return frc::Pose2d{estimatedRobotPose.X() + units::meter_t{randVec(0)},
estimatedRobotPose.Y() + units::meter_t{randVec(1)},
estimatedRobotPose.Rotation() +
frc::Rotation2d{units::radian_t{randVec(3)}}};
frc::Rotation2d{units::radian_t{randVec(2)}}};
}
};