mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
clang-tidy: modernize-use-override (NFC)
Add NOLINT to CommandTestBase due to gmock not adding "override" keyword, which causes warnings on clang.
This commit is contained in:
@@ -63,9 +63,11 @@ class Robot : public frc::TimedRobot {
|
||||
frc::sim::EncoderSim m_encoderSim{m_encoder};
|
||||
|
||||
public:
|
||||
void RobotInit() { m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse); }
|
||||
void RobotInit() override {
|
||||
m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse);
|
||||
}
|
||||
|
||||
void SimulationPeriodic() {
|
||||
void SimulationPeriodic() override {
|
||||
// In this method, we update our simulation of what our arm is doing
|
||||
// First, we set our "inputs" (voltages)
|
||||
m_armSim.SetInput(frc::MakeMatrix<1, 1>(
|
||||
@@ -82,7 +84,7 @@ class Robot : public frc::TimedRobot {
|
||||
frc::sim::BatterySim::Calculate({m_armSim.GetCurrentDraw()}));
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
if (m_joystick.GetTrigger()) {
|
||||
// Here, we run PID control like normal, with a constant setpoint of 30in.
|
||||
double pidOutput =
|
||||
@@ -94,7 +96,7 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
}
|
||||
|
||||
void DisabledInit() {
|
||||
void DisabledInit() override {
|
||||
// This just makes sure that our simulation code knows that the motor's off.
|
||||
m_motor.Set(0.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user