[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,37 +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.
package edu.wpi.first.wpilibj.simulation;
import static org.junit.jupiter.api.Assertions.assertEquals;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.wpilibj.Servo;
import org.junit.jupiter.api.Test;
class ServoSimTest {
@Test
void testServo() {
HAL.initialize(500, 0);
try (Servo servo = new Servo(0)) {
ServoSim sim = new ServoSim(servo);
servo.set(0);
assertEquals(0, sim.getPosition());
servo.set(0.354);
assertEquals(0.354, sim.getPosition());
servo.setAngle(10);
assertEquals(10, sim.getAngle());
servo.setAngle(90);
assertEquals(90, sim.getAngle());
servo.setAngle(170);
assertEquals(170, sim.getAngle());
}
}
}