mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Remove functions and classes deprecated for 2018 season (#1059)
This commit is contained in:
committed by
Peter Johnson
parent
eeb1025ac7
commit
9e45373a74
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-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. */
|
||||
@@ -84,90 +84,6 @@ public class LiveWindow {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The run method is called repeatedly to keep the values refreshed on the screen in test mode.
|
||||
* @deprecated No longer required
|
||||
*/
|
||||
@Deprecated
|
||||
public static void run() {
|
||||
updateValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Sensor associated with the subsystem and with 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 LiveWindowSendable component that represents a sensor.
|
||||
* @deprecated Use {@link Sendable#setName(String, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static synchronized void addSensor(String subsystem, String name, Sendable component) {
|
||||
add(component);
|
||||
component.setName(subsystem, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Sensor to LiveWindow. The components are shown with the type and channel like this: Gyro[1]
|
||||
* for a gyro object connected to the first analog channel.
|
||||
*
|
||||
* @param moduleType A string indicating the type of the module used in the naming (above)
|
||||
* @param channel The channel number the device is connected to
|
||||
* @param component A reference to the object being added
|
||||
* @deprecated Use {@link edu.wpi.first.wpilibj.SendableBase#setName(String, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addSensor(String moduleType, int channel, Sendable component) {
|
||||
add(component);
|
||||
component.setName("Ungrouped", moduleType + "[" + channel + "]");
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an Actuator associated with the subsystem and with 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 LiveWindowSendable component that represents a actuator.
|
||||
* @deprecated Use {@link Sendable#setName(String, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static synchronized void addActuator(String subsystem, String name, Sendable component) {
|
||||
add(component);
|
||||
component.setName(subsystem, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Actuator to LiveWindow. The components are shown with the module type, slot and channel
|
||||
* like this: Servo[1,2] for a servo object connected to the first digital module and PWM port 2.
|
||||
*
|
||||
* @param moduleType A string that defines the module name in the label for the value
|
||||
* @param channel The channel number the device is plugged into (usually PWM)
|
||||
* @param component The reference to the object being added
|
||||
* @deprecated Use {@link edu.wpi.first.wpilibj.SendableBase#setName(String, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addActuator(String moduleType, int channel, Sendable component) {
|
||||
add(component);
|
||||
component.setName("Ungrouped", moduleType + "[" + channel + "]");
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Actuator to LiveWindow. The components are shown with the module type, slot and channel
|
||||
* like this: Servo[1,2] for a servo object connected to the first digital module and PWM port 2.
|
||||
*
|
||||
* @param moduleType A string that defines the module name in the label for the value
|
||||
* @param moduleNumber The number of the particular module type
|
||||
* @param channel The channel number the device is plugged into (usually PWM)
|
||||
* @param component The reference to the object being added
|
||||
* @deprecated Use {@link edu.wpi.first.wpilibj.SendableBase#setName(String, int, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addActuator(String moduleType, int moduleNumber, int channel,
|
||||
Sendable component) {
|
||||
add(component);
|
||||
component.setName("Ungrouped", moduleType + "[" + moduleNumber + "," + channel + "]");
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a component to the LiveWindow.
|
||||
*
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package edu.wpi.first.wpilibj.livewindow;
|
||||
|
||||
import edu.wpi.first.wpilibj.Sendable;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableBuilder;
|
||||
|
||||
/**
|
||||
* Live Window Sendable is a special type of object sendable to the live window.
|
||||
* @deprecated Use Sendable directly instead
|
||||
*/
|
||||
@Deprecated
|
||||
public interface LiveWindowSendable extends Sendable {
|
||||
/**
|
||||
* Update the table for this sendable object with the latest values.
|
||||
*/
|
||||
void updateTable();
|
||||
|
||||
/**
|
||||
* Start having this sendable object automatically respond to value changes reflect the value on
|
||||
* the table.
|
||||
*/
|
||||
void startLiveWindowMode();
|
||||
|
||||
/**
|
||||
* Stop having this sendable object automatically respond to value changes.
|
||||
*/
|
||||
void stopLiveWindowMode();
|
||||
|
||||
@Override
|
||||
default String getName() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
default void setName(String name) {
|
||||
}
|
||||
|
||||
@Override
|
||||
default String getSubsystem() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
default void setSubsystem(String subsystem) {
|
||||
}
|
||||
|
||||
@Override
|
||||
default void initSendable(SendableBuilder builder) {
|
||||
builder.setUpdateTable(this::updateTable);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user