LiveWindow

class wpilib.LiveWindow[source]

Bases: object

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

classmethod add(sendable)[source]

Add a component to the LiveWindow.

Parameters:sendable – component to add
classmethod addActuator(subsystem, name, component)[source]

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.

Deprecated since version 2018.0.0: Use Sendable.setName() instead.

classmethod addActuatorChannel(moduleType, channel, component)[source]

Add Actuator to LiveWindow. The components are shown with the module type, slot and channel like this: Servo[0,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

Deprecated since version 2018.0.0: Use SendableBase.setName() instead.

classmethod addActuatorModuleChannel(moduleType, moduleNumber, channel, component)[source]

Add Actuator to LiveWindow. The components are shown with the module type, slot and channel like this: Servo[0,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

Deprecated since version 2018.0.0: Use SendableBase.setName() instead.

classmethod addChild(parent, child)[source]

Add a child component to a component.

Parameters:
  • parent – parent component
  • child – child component
classmethod addSensor(subsystem, name, component)[source]

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.

Deprecated since version 2018.0.0: Use Sendable.setName() instead.

classmethod addSensorChannel(moduleType, channel, component)[source]

Add Sensor to LiveWindow. The components are shown with the type and channel like this: Gyro[0] 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

Deprecated since version 2018.0.0: Use SendableBase.setName() instead.

components = {}
classmethod disableAllTelemetry()[source]

Disable ALL telemetry

classmethod disableTelemetry(sendable)[source]

Disable telemetry for a single component.

Parameters:sendable – component
classmethod enableTelemetry(sendable)[source]

Enable telemetry for a single component.

Parameters:sendable – component
classmethod enabledEntry()[source]
classmethod isEnabled()[source]
liveWindowEnabled = False
classmethod liveWindowTable()[source]
mutex = <unlocked _thread.RLock object owner=0 count=0>
classmethod remove(sendable)[source]

Remove a component from the LiveWindow.

@param sendable component to remove

classmethod run()[source]

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

Deprecated since version 2018.0.0: No longer required

classmethod setEnabled(enabled)[source]

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.

startLiveWindow = False
classmethod statusTable()[source]
telemetryEnabled = True
classmethod updateValues()[source]