edu.wpi.first.wpilibj

## Class GyroBase

- java.lang.Object
- - edu.wpi.first.wpilibj.SensorBase
  - - edu.wpi.first.wpilibj.GyroBase

- All Implemented Interfaces:
    Gyro, LiveWindowSendable, PIDSource, Sendable
  Direct Known Subclasses:
    ADXRS450_Gyro, AnalogGyro

      public abstract class GyroBase
      extends SensorBase
      implements Gyro, PIDSource, LiveWindowSendable

  GyroBase is the common base class for Gyro implementations such as AnalogGyro.

- - ### Field Summary

    - ### Fields inherited from class edu.wpi.first.wpilibj.SensorBase

      `kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPCMModules, kPDPChannels, kPDPModules, kPwmChannels, kRelayChannels, kSolenoidChannels, kSystemClockTicksPerMicrosecond`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GyroBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PIDSourceType` | `getPIDSourceType()` Get which parameter of the device you are using as a process control variable.
    `java.lang.String` | `getSmartDashboardType()` The string representation of the named data type that will be used by the smart dashboard for this `Sendable`.
    `void` | `initTable(NetworkTable subtable)` Initializes a table for this `Sendable` object.
    `double` | `pidGet()` Get the output of the gyro for use with PIDControllers.
    `void` | `setPIDSourceType(PIDSourceType pidSource)` Set which parameter of the gyro you are using as a process control variable.
    `void` | `startLiveWindowMode()` Start having this sendable object automatically respond to value changes reflect the value on the table.
    `void` | `stopLiveWindowMode()` Stop having this sendable object automatically respond to value changes.
    `void` | `updateTable()` Update the table for this sendable object with the latest values.

    - ### Methods inherited from class edu.wpi.first.wpilibj.SensorBase

      `checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, free, getDefaultSolenoidModule, setDefaultSolenoidModule`

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

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

    - ### Methods inherited from interface edu.wpi.first.wpilibj.interfaces.Gyro

      `calibrate, free, getAngle, getRate, reset`

- - ### Constructor Detail

    - #### GyroBase

          public GyroBase()

  - ### Method Detail

    - #### setPIDSourceType

          public void setPIDSourceType(PIDSourceType pidSource)

      Set which parameter of the gyro you are using as a process control variable. The Gyro class supports the rate and displacement parameters
      Specified by:
        `setPIDSourceType` in interface `PIDSource`
      Parameters:
        `pidSource` - An enum to select the parameter.

    - #### getPIDSourceType

          public PIDSourceType getPIDSourceType()

      Description copied from interface: `PIDSource`
      Get which parameter of the device you are using as a process control variable.
      Specified by:
        `getPIDSourceType` in interface `PIDSource`
      Returns:
        the currently selected PID source parameter

    - #### pidGet

          public double pidGet()

      Get the output of the gyro for use with PIDControllers. May be the angle or rate depending on the set PIDSourceType
      Specified by:
        `pidGet` in interface `PIDSource`
      Returns:
        the output according to the gyro

    - #### getSmartDashboardType

          public java.lang.String getSmartDashboardType()

      Description copied from interface: `Sendable`
      The string representation of the named data type that will be used by the smart dashboard for this `Sendable`.
      Specified by:
        `getSmartDashboardType` in interface `Sendable`
      Returns:
        The type of this `Sendable`.

    - #### initTable

          public void initTable(NetworkTable subtable)

      Description copied from interface: `Sendable`
      Initializes a table for this `Sendable` object.
      Specified by:
        `initTable` in interface `Sendable`
      Parameters:
        `subtable` - The table to put the values in.

    - #### updateTable

          public void updateTable()

      Description copied from interface: `LiveWindowSendable`
      Update the table for this sendable object with the latest values.
      Specified by:
        `updateTable` in interface `LiveWindowSendable`

    - #### startLiveWindowMode

          public void startLiveWindowMode()

      Description copied from interface: `LiveWindowSendable`
      Start having this sendable object automatically respond to value changes reflect the value on the table.
      Specified by:
        `startLiveWindowMode` in interface `LiveWindowSendable`

    - #### stopLiveWindowMode

          public void stopLiveWindowMode()

      Description copied from interface: `LiveWindowSendable`
      Stop having this sendable object automatically respond to value changes.
      Specified by:
        `stopLiveWindowMode` in interface `LiveWindowSendable`