[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

@@ -13,7 +13,6 @@
#include <frc/RobotBase.h>
#include <frc/RobotState.h>
#include <frc/TimedRobot.h>
#include <frc/livewindow/LiveWindow.h>
#include <hal/FRCUsageReporting.h>
#include <hal/HALBase.h>
#include <networktables/IntegerArrayTopic.h>
@@ -72,19 +71,11 @@ CommandScheduler::CommandScheduler()
}) {
HAL_Report(HALUsageReporting::kResourceType_Command,
HALUsageReporting::kCommand2_Scheduler);
wpi::SendableRegistry::AddLW(this, "Scheduler");
frc::LiveWindow::SetEnabledCallback([this] {
this->Disable();
this->CancelAll();
});
frc::LiveWindow::SetDisabledCallback([this] { this->Enable(); });
wpi::SendableRegistry::Add(this, "Scheduler");
}
CommandScheduler::~CommandScheduler() {
wpi::SendableRegistry::Remove(this);
frc::LiveWindow::SetEnabledCallback(nullptr);
frc::LiveWindow::SetDisabledCallback(nullptr);
std::unique_ptr<Impl>().swap(m_impl);
}

View File

@@ -15,12 +15,12 @@
using namespace frc2;
SubsystemBase::SubsystemBase() {
wpi::SendableRegistry::AddLW(this, GetTypeName(*this));
wpi::SendableRegistry::Add(this, GetTypeName(*this));
CommandScheduler::GetInstance().RegisterSubsystem({this});
}
SubsystemBase::SubsystemBase(std::string_view name) {
wpi::SendableRegistry::AddLW(this, name);
wpi::SendableRegistry::Add(this, name);
CommandScheduler::GetInstance().RegisterSubsystem({this});
}
@@ -71,5 +71,5 @@ void SubsystemBase::SetSubsystem(std::string_view name) {
}
void SubsystemBase::AddChild(std::string name, wpi::Sendable* child) {
wpi::SendableRegistry::AddLW(child, GetSubsystem(), name);
wpi::SendableRegistry::Add(child, GetSubsystem(), name);
}