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)` Constructor for Titan Motor Controller
`TitanQuad​(int deviceID, int frequency)` Constructor for Titan Motor Controller

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clearFaults​(int motor)` clear faults
`void` `disableMotor​(int motor)` Disables the specified motor
`boolean` `enableSoftLimit​(int motor)` enable soft limits
`double` `getCurrent​(int motor)` Grabs the specified motors current pull
`int` `getFaults​(int motor)` get faults
`java.lang.String` `getFirmwareVersion()` Gets the firmware version
`int` `getFrequency()` Gets the frequency that the motor internal PWM is operating at
`java.lang.String` `getHardwareVersion()` Gets the hardware and hardware version
`int` `getID()` Gets the device id
`double` `getLimitSwitch​(int motor, boolean direction)` Gets limit switch (description)
`java.lang.String` `getSerialNumber()` Serial Number is required for any support requesets
`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 frequency)

Constructor for Titan Motor Controller

Allows for a custom frequency to be set

Parameters:
  `deviceID` - Device id for the controller
  `frequency` - Frequency internal motor pwm operates at, range 0 - 20kHz

#### TitanQuad

    public TitanQuad​(int deviceID)

Constructor for Titan Motor Controller

Parameters:
  `deviceID` - Device id for the controller

### Method Detail

#### getID

    public int getID()

Gets the device id

Returns:
  the device id

#### getFrequency

    public int getFrequency()

Gets the frequency that the motor internal PWM is operating at

Returns:
  frequency in Hz

#### getFirmwareVersion

    public java.lang.String getFirmwareVersion()

Gets the firmware version

Returns:
  a string with the firmware version

#### getHardwareVersion

    public java.lang.String getHardwareVersion()

Gets the hardware and hardware version

Returns:
  a string with hardware type and version number

#### disableMotor

    public void disableMotor​(int motor)

Disables the specified motor

Parameters:
  `motor` - motor to be disabled

#### getCurrent

    public double getCurrent​(int motor)

Grabs the specified motors current pull

Parameters:
  `motor` - motor to be checked
Returns:
  current in amps

#### 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 java.lang.String getSerialNumber()

Serial Number is required for any support requesets

Returns:
  Serial Number