Package com.studica.frc

## Class TitanQuad

- java.lang.Object
- - com.studica.frc.TitanQuad

    public class TitanQuad
    extends java.lang.Object

Titan class testing java documentation.

### Constructor Summary

Constructors
`TitanQuad​(int deviceID, int motor, int frequency)` Constuctor for Titan class

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clearFaults​(int motor)` clear faults
`void` `configureMotor​(int motor)` Configures the specified motor.
`void` `disableMotor​(int motor)` Disables the specified motor.
`boolean` `enableSoftLimit​(int motor)` enable soft limits
`double` `getCurrent​(int motor)` Gets the current of the specified motor.
`int` `getFaults​(int motor)` get faults
`java.lang.String` `getFirmwareVersion()` Gets the current firmware version of the Titan.
`int` `getFrequency()` Gets the current frequency of the Titan.
`java.lang.String` `getHardwareVersion()` Gets the current hardware version of the Titan.
`int` `getID()` Gets the current device ID of the Titan.
`double` `getLimitSwitch​(int motor, boolean direction)` Gets limit switch (description)
`double` `getSerialNumber​(int motor)` get serial number
`void` `setCurrentLimit​(int motor)` Sets the current limit for specified motor
`void` `setMotorSpeed​(int motor, double speed)` Sets the speed of the specified motor

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

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

### Constructor Detail

#### TitanQuad

    public TitanQuad​(int deviceID,
                     int motor,
                     int frequency)

Constuctor for Titan class

Parameters:
  `deviceID` - - Initialize the device ID
  `motor` - - Configures each motor
  `frequency` - - Defines the Titan's frequency

### Method Detail

#### getID

    public int getID()

Gets the current device ID of the Titan.

Returns:
  Device ID of the Titan.

#### getFrequency

    public int getFrequency()

Gets the current frequency of the Titan.

Returns:
  Frequency of the Titan.

#### getFirmwareVersion

    public java.lang.String getFirmwareVersion()

Gets the current firmware version of the Titan.

Returns:
  Firmware version of the TItan in string format.

#### getHardwareVersion

    public java.lang.String getHardwareVersion()

Gets the current hardware version of the Titan.

Returns:
  Hardware version of the Titan in string format.

#### configureMotor

    public void configureMotor​(int motor)

Configures the specified motor.

Parameters:
  `motor` - - The motor to configure.

#### disableMotor

    public void disableMotor​(int motor)

Disables the specified motor.

Parameters:
  `motor` - - The motor to disable.

#### getCurrent

    public double getCurrent​(int motor)

Gets the current of the specified motor.

Parameters:
  `motor` - - The motor to retrieve its current.
Returns:
  The current of the specified motor.

#### setMotorSpeed

    public void setMotorSpeed​(int motor,
                              double speed)

Sets the speed of the specified motor

Parameters:
  `motor` - - The motor to control
  `speed` - - The speed to control the motor

#### setCurrentLimit

    public void setCurrentLimit​(int motor)

Sets the current limit for specified motor

Parameters:
  `motor` - - The motor to set current limit to.

#### getLimitSwitch

    public double getLimitSwitch​(int motor,
                                 boolean direction)

Gets limit switch (description)

Parameters:
  `motor` - - description
  `direction` - - forward or reverse
Returns:
  limit switch

#### getFaults

    public int getFaults​(int motor)

get faults

Parameters:
  `motor` - - description
Returns:
  faults

#### clearFaults

    public void clearFaults​(int motor)

clear faults

Parameters:
  `motor` - - description

#### enableSoftLimit

    public boolean enableSoftLimit​(int motor)

enable soft limits

Parameters:
  `motor` - - decription
Returns:
  enable or disabled

#### getSerialNumber

    public double getSerialNumber​(int motor)

get serial number

Parameters:
  `motor` - - description
Returns:
  serial number