Class LiveWindow

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

public class LiveWindow
extends Object
The LiveWindow class is the public interface for putting sensors and actuators on the LiveWindow.
  • Method Details

    • setEnabledListener

      public static void setEnabledListener​(Runnable runnable)
    • setDisabledListener

      public static void setDisabledListener​(Runnable runnable)
    • isEnabled

      public static boolean isEnabled()
    • 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.

      Parameters:
      enabled - True to enable LiveWindow.
    • enableTelemetry

      public static void enableTelemetry​(Sendable sendable)
      Enable telemetry for a single component.
      Parameters:
      sendable - component
    • disableTelemetry

      public static void disableTelemetry​(Sendable sendable)
      Disable telemetry for a single component.
      Parameters:
      sendable - component
    • disableAllTelemetry

      public static void disableAllTelemetry()
      Disable ALL telemetry.
    • updateValues

      public static void updateValues()
      Tell all the sensors to update (send) their values.

      Actuators are handled through callbacks on their value changing from the SmartDashboard widgets.