edu.wpi.first.wpilibj.livewindow

## Class LiveWindow

- java.lang.Object
- - edu.wpi.first.wpilibj.livewindow.LiveWindow

-     public class LiveWindow
      extends java.lang.Object

  The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LiveWindow()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addActuator(java.lang.String moduleType, int moduleNumber, int channel, LiveWindowSendable component)` Add Actuator to LiveWindow.
    `static void` | `addActuator(java.lang.String moduleType, int channel, LiveWindowSendable component)` Add Actuator to LiveWindow.
    `static void` | `addActuator(java.lang.String subsystem, java.lang.String name, LiveWindowSendable component)` Add an Actuator associated with the subsystem and with call it by the given name.
    `static void` | `addSensor(java.lang.String moduleType, int channel, LiveWindowSendable component)` Add Sensor to LiveWindow.
    `static void` | `addSensor(java.lang.String subsystem, java.lang.String name, LiveWindowSendable component)` Add a Sensor associated with the subsystem and with call it by the given name.
    `static void` | `run()` The run method is called repeatedly to keep the values refreshed on the screen in test mode.
    `static void` | `setEnabled(boolean enabled)` Set the enabled state of LiveWindow.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LiveWindow

          public LiveWindow()

  - ### Method Detail

    - #### setEnabled

          public static void setEnabled(boolean enabled)

      Set the enabled state of LiveWindow. If it's being enabled, turn off the scheduler and remove all the commands from the queue and enable all the components registered for LiveWindow. If it's being disabled, stop all the registered components and reenable the scheduler. TODO: add code to disable PID loops when enabling LiveWindow. The commands should reenable the PID loops themselves when they get rescheduled. This prevents arms from starting to move around, etc. after a period of adjusting them in LiveWindow mode.

    - #### run

          public static void run()

      The run method is called repeatedly to keep the values refreshed on the screen in test mode.

    - #### addSensor

          public static void addSensor(java.lang.String subsystem,
                                       java.lang.String name,
                                       LiveWindowSendable component)

      Add a Sensor associated with the subsystem and with call it by the given name.
      Parameters:
        `subsystem` - The subsystem this component is part of.
        `name` - The name of this component.
        `component` - A LiveWindowSendable component that represents a sensor.

    - #### addSensor

          public static void addSensor(java.lang.String moduleType,
                                       int channel,
                                       LiveWindowSendable component)

      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.
      Parameters:
        `moduleType` - A string indicating the type of the module used in the naming (above)
        `channel` - The channel number the device is connected to
        `component` - A reference to the object being added

    - #### addActuator

          public static void addActuator(java.lang.String subsystem,
                                         java.lang.String name,
                                         LiveWindowSendable component)

      Add an Actuator associated with the subsystem and with call it by the given name.
      Parameters:
        `subsystem` - The subsystem this component is part of.
        `name` - The name of this component.
        `component` - A LiveWindowSendable component that represents a actuator.

    - #### addActuator

          public static void addActuator(java.lang.String moduleType,
                                         int channel,
                                         LiveWindowSendable component)

      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.
      Parameters:
        `moduleType` - A string that defines the module name in the label for the value
        `channel` - The channel number the device is plugged into (usually PWM)
        `component` - The reference to the object being added

    - #### addActuator

          public static void addActuator(java.lang.String moduleType,
                                         int moduleNumber,
                                         int channel,
                                         LiveWindowSendable component)

      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.
      Parameters:
        `moduleType` - A string that defines the module name in the label for the value
        `moduleNumber` - The number of the particular module type
        `channel` - The channel number the device is plugged into (usually PWM)
        `component` - The reference to the object being added