SendableBase

class wpilib.SendableBase(addLiveWindow=True)[source]

Bases: wpilib.Sendable

Base class for all sensors. Stores most recent status information as well as containing utility functions for checking channels and error processing.

Creates an instance of the sensor base.

Parameters:addLiveWindow – if true, add this Sendable to LiveWindow
addChild(child)[source]

Add a child component

Parameters:child – child component
free()[source]

Free the resources used by this object.

getName()[source]
getSubsystem()[source]
setName(*args, **kwargs)[source]

Sets the name of this Sendable object.

Arguments can be structured as follows:

  • name
  • subsystem, name
  • moduleType, channel
  • moduleType, moduleNumber, channel
Parameters:
  • name (str) – name
  • subsystem (str) – subsystem name
  • moduleType (str) – A string that defines the module name in the label for the value
  • channel (int) – The channel number the device is plugged into
  • moduleNumber (int) – The number of the particular module type
setSubsystem(subsystem)[source]