[wpilib] Remove LiveWindow (#7733)

This will be replaced by a different mechanism, but removing it eases
the initial implementation burden of a new Telemetry/Sendable framework.
This commit is contained in:
Peter Johnson
2025-01-25 10:52:19 -08:00
committed by GitHub
parent adbe95e610
commit eee30c49e2
88 changed files with 85 additions and 1356 deletions

View File

@@ -18,7 +18,6 @@ import edu.wpi.first.wpilibj.RobotState;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.event.EventLoop;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior;
import java.io.PrintWriter;
import java.io.StringWriter;
@@ -101,13 +100,7 @@ public final class CommandScheduler implements Sendable, AutoCloseable {
CommandScheduler() {
HAL.report(tResourceType.kResourceType_Command, tInstances.kCommand2_Scheduler);
SendableRegistry.addLW(this, "Scheduler");
LiveWindow.setEnabledListener(
() -> {
disable();
cancelAll();
});
LiveWindow.setDisabledListener(this::enable);
SendableRegistry.add(this, "Scheduler");
}
/**
@@ -123,8 +116,6 @@ public final class CommandScheduler implements Sendable, AutoCloseable {
@Override
public void close() {
SendableRegistry.remove(this);
LiveWindow.setEnabledListener(null);
LiveWindow.setDisabledListener(null);
}
/**

View File

@@ -20,7 +20,7 @@ public abstract class SubsystemBase implements Subsystem, Sendable {
public SubsystemBase() {
String name = this.getClass().getSimpleName();
name = name.substring(name.lastIndexOf('.') + 1);
SendableRegistry.addLW(this, name, name);
SendableRegistry.add(this, name, name);
CommandScheduler.getInstance().registerSubsystem(this);
}
@@ -31,7 +31,7 @@ public abstract class SubsystemBase implements Subsystem, Sendable {
*/
@SuppressWarnings("this-escape")
public SubsystemBase(String name) {
SendableRegistry.addLW(this, name, name);
SendableRegistry.add(this, name, name);
CommandScheduler.getInstance().registerSubsystem(this);
}
@@ -79,7 +79,7 @@ public abstract class SubsystemBase implements Subsystem, Sendable {
* @param child sendable
*/
public void addChild(String name, Sendable child) {
SendableRegistry.addLW(child, getSubsystem(), name);
SendableRegistry.add(child, getSubsystem(), name);
}
@Override