mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +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,163 +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;
|
||||
|
||||
import edu.wpi.first.hal.PowerJNI;
|
||||
|
||||
/**
|
||||
* Old Controller PR class.
|
||||
* @deprecated Use RobotController class instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final class ControllerPower {
|
||||
/**
|
||||
* Get the input voltage to the robot controller.
|
||||
*
|
||||
* @return The controller input voltage value in Volts
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getInputVoltage() {
|
||||
return PowerJNI.getVinVoltage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the input current to the robot controller.
|
||||
*
|
||||
* @return The controller input current value in Amps
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getInputCurrent() {
|
||||
return PowerJNI.getVinCurrent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the voltage of the 3.3V rail.
|
||||
*
|
||||
* @return The controller 3.3V rail voltage value in Volts
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getVoltage3V3() {
|
||||
return PowerJNI.getUserVoltage3V3();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current output of the 3.3V rail.
|
||||
*
|
||||
* @return The controller 3.3V rail output current value in Volts
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getCurrent3V3() {
|
||||
return PowerJNI.getUserCurrent3V3();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the enabled state of the 3.3V rail. The rail may be disabled due to a controller brownout,
|
||||
* a short circuit on the rail, or controller over-voltage.
|
||||
*
|
||||
* @return The controller 3.3V rail enabled value
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean getEnabled3V3() {
|
||||
return PowerJNI.getUserActive3V3();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of the total current faults on the 3.3V rail since the controller has booted.
|
||||
*
|
||||
* @return The number of faults
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getFaultCount3V3() {
|
||||
return PowerJNI.getUserCurrentFaults3V3();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the voltage of the 5V rail.
|
||||
*
|
||||
* @return The controller 5V rail voltage value in Volts
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getVoltage5V() {
|
||||
return PowerJNI.getUserVoltage5V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current output of the 5V rail.
|
||||
*
|
||||
* @return The controller 5V rail output current value in Amps
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getCurrent5V() {
|
||||
return PowerJNI.getUserCurrent5V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the enabled state of the 5V rail. The rail may be disabled due to a controller brownout, a
|
||||
* short circuit on the rail, or controller over-voltage.
|
||||
*
|
||||
* @return The controller 5V rail enabled value
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean getEnabled5V() {
|
||||
return PowerJNI.getUserActive5V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of the total current faults on the 5V rail since the controller has booted.
|
||||
*
|
||||
* @return The number of faults
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getFaultCount5V() {
|
||||
return PowerJNI.getUserCurrentFaults5V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the voltage of the 6V rail.
|
||||
*
|
||||
* @return The controller 6V rail voltage value in Volts
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getVoltage6V() {
|
||||
return PowerJNI.getUserVoltage6V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current output of the 6V rail.
|
||||
*
|
||||
* @return The controller 6V rail output current value in Amps
|
||||
*/
|
||||
@Deprecated
|
||||
public static double getCurrent6V() {
|
||||
return PowerJNI.getUserCurrent6V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the enabled state of the 6V rail. The rail may be disabled due to a controller brownout, a
|
||||
* short circuit on the rail, or controller over-voltage.
|
||||
*
|
||||
* @return The controller 6V rail enabled value
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean getEnabled6V() {
|
||||
return PowerJNI.getUserActive6V();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of the total current faults on the 6V rail since the controller has booted.
|
||||
*
|
||||
* @return The number of faults
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getFaultCount6V() {
|
||||
return PowerJNI.getUserCurrentFaults6V();
|
||||
}
|
||||
|
||||
private ControllerPower() {
|
||||
}
|
||||
}
|
||||
@@ -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. */
|
||||
@@ -17,7 +17,6 @@ import edu.wpi.first.hal.AllianceStationID;
|
||||
import edu.wpi.first.hal.ControlWord;
|
||||
import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.hal.MatchInfoData;
|
||||
import edu.wpi.first.hal.PowerJNI;
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
@@ -696,29 +695,6 @@ public class DriverStation {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the FPGA outputs are enabled. The outputs may be disabled if
|
||||
* the robot is disabled or e-stopped, the watchdog has expired, or if the roboRIO browns out.
|
||||
*
|
||||
* @return True if the FPGA outputs are enabled.
|
||||
* @deprecated Use RobotController.isSysActive()
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isSysActive() {
|
||||
return HAL.getSystemActive();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the system is browned out.
|
||||
*
|
||||
* @return True if the system is browned out
|
||||
* @deprecated Use RobotController.isBrownedOut()
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isBrownedOut() {
|
||||
return HAL.getBrownedOut();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the game specific message.
|
||||
*
|
||||
@@ -917,17 +893,6 @@ public class DriverStation {
|
||||
return HAL.getMatchTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the battery voltage.
|
||||
*
|
||||
* @return The battery voltage in Volts.
|
||||
* @deprecated Use RobotController.getBatteryVoltage
|
||||
*/
|
||||
@Deprecated
|
||||
public double getBatteryVoltage() {
|
||||
return PowerJNI.getVinVoltage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Only to be used to tell the Driver Station what code you claim to be executing for diagnostic
|
||||
* purposes only.
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-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;
|
||||
|
||||
/**
|
||||
* Gamepad Interface.
|
||||
*
|
||||
* @deprecated Inherit directly from GenericHID instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class GamepadBase extends GenericHID {
|
||||
public GamepadBase(int port) {
|
||||
super(port);
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract double getRawAxis(int axis);
|
||||
|
||||
/**
|
||||
* Is the bumper pressed.
|
||||
*
|
||||
* @param hand which hand
|
||||
* @return true if the bumper is pressed
|
||||
*/
|
||||
public abstract boolean getBumper(Hand hand);
|
||||
|
||||
/**
|
||||
* Is the bumper pressed.
|
||||
*
|
||||
* @return true if the bumper is pressed
|
||||
*/
|
||||
public boolean getBumper() {
|
||||
return getBumper(Hand.kRight);
|
||||
}
|
||||
|
||||
public abstract boolean getStickButton(Hand hand);
|
||||
|
||||
public boolean getStickButton() {
|
||||
return getStickButton(Hand.kRight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract boolean getRawButton(int button);
|
||||
|
||||
@Override
|
||||
public abstract int getPOV(int pov);
|
||||
|
||||
@Override
|
||||
public abstract int getPOVCount();
|
||||
|
||||
@Override
|
||||
public abstract HIDType getType();
|
||||
|
||||
@Override
|
||||
public abstract String getName();
|
||||
|
||||
@Override
|
||||
public abstract void setOutput(int outputNumber, boolean value);
|
||||
|
||||
@Override
|
||||
public abstract void setOutputs(int value);
|
||||
|
||||
@Override
|
||||
public abstract void setRumble(RumbleType type, double value);
|
||||
}
|
||||
@@ -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. */
|
||||
@@ -156,18 +156,6 @@ public class Joystick extends GenericHID {
|
||||
m_axes[Axis.kTwist.value] = (byte) channel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the channel associated with a specified axis.
|
||||
*
|
||||
* @deprecated Use the more specific axis channel setter functions.
|
||||
* @param axis The axis to set the channel for.
|
||||
* @param channel The channel to set the axis to.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setAxisChannel(AxisType axis, int channel) {
|
||||
m_axes[axis.value] = (byte) channel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channel currently associated with the X axis.
|
||||
*
|
||||
@@ -213,18 +201,6 @@ public class Joystick extends GenericHID {
|
||||
return m_axes[Axis.kThrottle.value];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channel currently associated with the specified axis.
|
||||
*
|
||||
* @deprecated Use the more specific axis channel getter functions.
|
||||
* @param axis The axis to look up the channel for.
|
||||
* @return The channel for the axis.
|
||||
*/
|
||||
@Deprecated
|
||||
public int getAxisChannel(AxisType axis) {
|
||||
return m_axes[axis.value];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the X value of the joystick. This depends on the mapping of the joystick connected to the
|
||||
* current port.
|
||||
@@ -278,34 +254,6 @@ public class Joystick extends GenericHID {
|
||||
return getRawAxis(m_axes[Axis.kThrottle.value]);
|
||||
}
|
||||
|
||||
/**
|
||||
* For the current joystick, return the axis determined by the argument.
|
||||
*
|
||||
* <p>This is for cases where the joystick axis is returned programmatically, otherwise one of the
|
||||
* previous functions would be preferable (for example getX()).
|
||||
*
|
||||
* @deprecated Use the more specific axis getter functions.
|
||||
* @param axis The axis to read.
|
||||
* @return The value of the axis.
|
||||
*/
|
||||
@Deprecated
|
||||
public double getAxis(final AxisType axis) {
|
||||
switch (axis) {
|
||||
case kX:
|
||||
return getX();
|
||||
case kY:
|
||||
return getY();
|
||||
case kZ:
|
||||
return getZ();
|
||||
case kTwist:
|
||||
return getTwist();
|
||||
case kThrottle:
|
||||
return getThrottle();
|
||||
default:
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the state of the trigger on the joystick.
|
||||
*
|
||||
@@ -360,20 +308,6 @@ public class Joystick extends GenericHID {
|
||||
return getRawButtonReleased(Button.kTop.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get buttons based on an enumerated type.
|
||||
*
|
||||
* <p>The button type will be looked up in the list of buttons and then read.
|
||||
*
|
||||
* @deprecated Use Button enum values instead of ButtonType.
|
||||
* @param button The type of button to read.
|
||||
* @return The state of the button.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean getButton(ButtonType button) {
|
||||
return getRawButton(button.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the magnitude of the direction vector formed by the joystick's current position relative to
|
||||
* its origin.
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-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;
|
||||
|
||||
/**
|
||||
* JoystickBase Interface.
|
||||
*
|
||||
* @deprecated Inherit directly from GenericHID instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class JoystickBase extends GenericHID {
|
||||
public JoystickBase(int port) {
|
||||
super(port);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the z position of the HID.
|
||||
*
|
||||
* @param hand which hand, left or right
|
||||
* @return the z position
|
||||
*/
|
||||
public abstract double getZ(Hand hand);
|
||||
|
||||
public double getZ() {
|
||||
return getZ(Hand.kRight);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the twist value.
|
||||
*
|
||||
* @return the twist value
|
||||
*/
|
||||
public abstract double getTwist();
|
||||
|
||||
/**
|
||||
* Get the throttle.
|
||||
*
|
||||
* @return the throttle value
|
||||
*/
|
||||
public abstract double getThrottle();
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-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;
|
||||
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableBuilder;
|
||||
|
||||
/**
|
||||
* The interface for sendable objects that gives the sendable a default name in the Smart
|
||||
* Dashboard.
|
||||
* @deprecated Use Sendable directly instead
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NamedSendable extends Sendable {
|
||||
/**
|
||||
* The name of the subtable.
|
||||
*
|
||||
* @return the name of the subtable of SmartDashboard that the Sendable object will use.
|
||||
*/
|
||||
@Override
|
||||
String getName();
|
||||
|
||||
@Override
|
||||
default void setName(String name) {
|
||||
}
|
||||
|
||||
@Override
|
||||
default String getSubsystem() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
default void setSubsystem(String subsystem) {
|
||||
}
|
||||
|
||||
@Override
|
||||
default void initSendable(SendableBuilder builder) {
|
||||
}
|
||||
}
|
||||
@@ -1,69 +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;
|
||||
|
||||
import edu.wpi.first.hal.HALUtil;
|
||||
|
||||
/**
|
||||
* Contains global utility functions.
|
||||
* @deprecated Use RobotController class instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final class Utility {
|
||||
private Utility() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the FPGA Version number. For now, expect this to be 2009.
|
||||
*
|
||||
* @return FPGA Version number.
|
||||
* @deprecated Use RobotController.getFPGAVersion()
|
||||
*/
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
@Deprecated
|
||||
int getFPGAVersion() {
|
||||
return HALUtil.getFPGAVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the FPGA Revision number. The format of the revision is 3 numbers. The 12 most
|
||||
* significant bits are the Major Revision. the next 8 bits are the Minor Revision. The 12 least
|
||||
* significant bits are the Build Number.
|
||||
*
|
||||
* @return FPGA Revision number.
|
||||
* @deprecated Use RobotController.getFPGARevision()
|
||||
*/
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
@Deprecated
|
||||
long getFPGARevision() {
|
||||
return (long) HALUtil.getFPGARevision();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the microsecond timer from the FPGA.
|
||||
*
|
||||
* @return The current time in microseconds according to the FPGA.
|
||||
* @deprecated Use RobotController.getFPGATime()
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public static long getFPGATime() {
|
||||
return HALUtil.getFPGATime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the state of the "USER" button on the roboRIO.
|
||||
*
|
||||
* @return true if the button is currently pressed down
|
||||
* @deprecated Use RobotController.getUserButton()
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean getUserButton() {
|
||||
return HALUtil.getFPGAButton();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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. */
|
||||
@@ -17,7 +17,6 @@ import edu.wpi.first.hal.HAL;
|
||||
import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
import edu.wpi.first.wpilibj.NamedSendable;
|
||||
import edu.wpi.first.wpilibj.Sendable;
|
||||
|
||||
/**
|
||||
@@ -85,7 +84,7 @@ public class SmartDashboard {
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps the specified key (where the key is the name of the {@link NamedSendable}
|
||||
* Maps the specified key (where the key is the name of the {@link Sendable}
|
||||
* to the specified value in this table. The value can be retrieved by
|
||||
* calling the get method with a key that is equal to the original key.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user