From b630b63ef0f75b33fa3d49a0acc34e2e78c61291 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Fri, 14 Jun 2019 18:52:10 -0700 Subject: [PATCH] Remove functions in LiveWindow deprecated since 2018 (#1716) The Java versions were already accidentally removed in #1059. --- .../main/native/cpp/livewindow/LiveWindow.cpp | 62 +----------- .../include/frc/livewindow/LiveWindow.h | 99 +------------------ 2 files changed, 2 insertions(+), 159 deletions(-) diff --git a/wpilibc/src/main/native/cpp/livewindow/LiveWindow.cpp b/wpilibc/src/main/native/cpp/livewindow/LiveWindow.cpp index 135d044ae5..579516af53 100644 --- a/wpilibc/src/main/native/cpp/livewindow/LiveWindow.cpp +++ b/wpilibc/src/main/native/cpp/livewindow/LiveWindow.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2012-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2012-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -60,66 +60,6 @@ LiveWindow* LiveWindow::GetInstance() { return &instance; } -void LiveWindow::Run() { UpdateValues(); } - -void LiveWindow::AddSensor(const wpi::Twine& subsystem, const wpi::Twine& name, - Sendable* component) { - Add(component); - component->SetName(subsystem, name); -} - -void LiveWindow::AddSensor(const wpi::Twine& subsystem, const wpi::Twine& name, - Sendable& component) { - Add(&component); - component.SetName(subsystem, name); -} - -void LiveWindow::AddSensor(const wpi::Twine& subsystem, const wpi::Twine& name, - std::shared_ptr component) { - Add(component); - component->SetName(subsystem, name); -} - -void LiveWindow::AddActuator(const wpi::Twine& subsystem, - const wpi::Twine& name, Sendable* component) { - Add(component); - component->SetName(subsystem, name); -} - -void LiveWindow::AddActuator(const wpi::Twine& subsystem, - const wpi::Twine& name, Sendable& component) { - Add(&component); - component.SetName(subsystem, name); -} - -void LiveWindow::AddActuator(const wpi::Twine& subsystem, - const wpi::Twine& name, - std::shared_ptr component) { - Add(component); - component->SetName(subsystem, name); -} - -void LiveWindow::AddSensor(const wpi::Twine& type, int channel, - Sendable* component) { - Add(component); - component->SetName("Ungrouped", - type + Twine('[') + Twine(channel) + Twine(']')); -} - -void LiveWindow::AddActuator(const wpi::Twine& type, int channel, - Sendable* component) { - Add(component); - component->SetName("Ungrouped", - type + Twine('[') + Twine(channel) + Twine(']')); -} - -void LiveWindow::AddActuator(const wpi::Twine& type, int module, int channel, - Sendable* component) { - Add(component); - component->SetName("Ungrouped", type + Twine('[') + Twine(module) + - Twine(',') + Twine(channel) + Twine(']')); -} - void LiveWindow::Add(std::shared_ptr sendable) { std::lock_guard lock(m_impl->mutex); auto& comp = m_impl->components[sendable.get()]; diff --git a/wpilibc/src/main/native/include/frc/livewindow/LiveWindow.h b/wpilibc/src/main/native/include/frc/livewindow/LiveWindow.h index 465a4bbb7b..0421105f1d 100644 --- a/wpilibc/src/main/native/include/frc/livewindow/LiveWindow.h +++ b/wpilibc/src/main/native/include/frc/livewindow/LiveWindow.h @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2012-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2012-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -33,103 +33,6 @@ class LiveWindow { */ static LiveWindow* GetInstance(); - WPI_DEPRECATED("no longer required") - void Run(); - - /** - * Add a Sensor associated with the subsystem and call it by the given name. - * - * @param subsystem The subsystem this component is part of. - * @param name The name of this component. - * @param component A Sendable component that represents a sensor. - */ - WPI_DEPRECATED("use Sendable::SetName() instead") - void AddSensor(const wpi::Twine& subsystem, const wpi::Twine& name, - Sendable* component); - - /** - * Add a Sensor associated with the subsystem and call it by the given name. - * - * @param subsystem The subsystem this component is part of. - * @param name The name of this component. - * @param component A Sendable component that represents a sensor. - */ - WPI_DEPRECATED("use Sendable::SetName() instead") - void AddSensor(const wpi::Twine& subsystem, const wpi::Twine& name, - Sendable& component); - - /** - * Add a Sensor associated with the subsystem and call it by the given name. - * - * @param subsystem The subsystem this component is part of. - * @param name The name of this component. - * @param component A Sendable component that represents a sensor. - */ - WPI_DEPRECATED("use Sendable::SetName() instead") - void AddSensor(const wpi::Twine& subsystem, const wpi::Twine& name, - std::shared_ptr component); - - /** - * Add an Actuator associated with the subsystem and call it by the given - * name. - * - * @param subsystem The subsystem this component is part of. - * @param name The name of this component. - * @param component A Sendable component that represents a actuator. - */ - WPI_DEPRECATED("use Sendable::SetName() instead") - void AddActuator(const wpi::Twine& subsystem, const wpi::Twine& name, - Sendable* component); - - /** - * Add an Actuator associated with the subsystem and call it by the given - * name. - * - * @param subsystem The subsystem this component is part of. - * @param name The name of this component. - * @param component A Sendable component that represents a actuator. - */ - WPI_DEPRECATED("use Sendable::SetName() instead") - void AddActuator(const wpi::Twine& subsystem, const wpi::Twine& name, - Sendable& component); - - /** - * Add an Actuator associated with the subsystem and call it by the given - * name. - * - * @param subsystem The subsystem this component is part of. - * @param name The name of this component. - * @param component A Sendable component that represents a actuator. - */ - WPI_DEPRECATED("use Sendable::SetName() instead") - void AddActuator(const wpi::Twine& subsystem, const wpi::Twine& name, - std::shared_ptr component); - - /** - * Meant for internal use in other WPILib classes. - * - * @deprecated Use SendableBase::SetName() instead. - */ - WPI_DEPRECATED("use SensorUtil::SetName() instead") - void AddSensor(const wpi::Twine& type, int channel, Sendable* component); - - /** - * Meant for internal use in other WPILib classes. - * - * @deprecated Use SendableBase::SetName() instead. - */ - WPI_DEPRECATED("use SensorUtil::SetName() instead") - void AddActuator(const wpi::Twine& type, int channel, Sendable* component); - - /** - * Meant for internal use in other WPILib classes. - * - * @deprecated Use SendableBase::SetName() instead. - */ - WPI_DEPRECATED("use SensorUtil::SetName() instead") - void AddActuator(const wpi::Twine& type, int module, int channel, - Sendable* component); - /** * Add a component to the LiveWindow. *