[wpilib] Remove Servo Classes (#8270)

SystemCore doesn't directly support Servos. It would be possible to still use a Servo Power Module, but those are fairly rare, and we should probably use a different class for that case, so users don't attempt to hook a servo directly up to systemcore. That will depend on what happens with the rules in 2027.

Rev Servo Hubs are a current working replacement for systemcore users.
This commit is contained in:
Thad House
2025-10-02 22:39:55 -07:00
committed by GitHub
parent c46b54a523
commit e369c721ca
8 changed files with 0 additions and 553 deletions

View File

@@ -1,32 +0,0 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "frc/simulation/ServoSim.h" // NOLINT(build/include_order)
#include <gtest/gtest.h>
#include <hal/HAL.h>
#include "frc/Servo.h"
namespace frc::sim {
TEST(ServoSimTest, TestServo) {
frc::Servo servo{0};
frc::sim::ServoSim sim{servo};
servo.Set(0);
EXPECT_EQ(0, sim.GetPosition());
servo.Set(0.354);
EXPECT_EQ(0.354, sim.GetPosition());
servo.SetAngle(10);
EXPECT_EQ(10, sim.GetAngle());
servo.SetAngle(90);
EXPECT_EQ(90, sim.GetAngle());
servo.SetAngle(170);
EXPECT_EQ(170, sim.GetAngle());
}
} // namespace frc::sim