Package com.studica.frc

## Class TitanQuad

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

All Implemented Interfaces:
  `edu.wpi.first.wpilibj.PIDOutput`, `edu.wpi.first.wpilibj.SpeedController`

    public class TitanQuad
    extends java.lang.Object
    implements edu.wpi.first.wpilibj.SpeedController

Motor controller features for Studica Titan Quad motor controllers

### Constructor Summary

Constructors
`TitanQuad​(int deviceID, int motor)` Constructor for Titan Quad Motor Controller
`TitanQuad​(int deviceID, int frequency, int motor)` Constructor for Titan Quad Motor Controller

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clearFaults​(int motor)` clear faults
`void` `disable()`
`boolean` `enableSoftLimit​(int motor)` enable soft limits
`double` `get()`
`double` `getControllerTemp()` Gets the controller temp
`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
`boolean` `getInverted()`
`double` `getLimitSwitch​(int motor, boolean direction)` Gets limit switch (description)
`double` `getRPM()` Gets motor's round per minute
`java.lang.String` `getSerialNumber()` Serial Number is required for any support requesets
`void` `pidWrite​(double output)`
`void` `set​(double speed)` Sets the output of the Titan Quad as a percentage from -1.0 to 1.0.
`void` `setCurrentLimit​(int motor)` Sets the current limit for specified motor
`void` `setInverted​(boolean isInverted)` Inverts the output of the motor controller,
`void` `stopMotor()`

### 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.SpeedController

`setVoltage`

### Constructor Detail

#### TitanQuad

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

Constructor for Titan Quad 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
  `motor` - The motor to initialize

#### TitanQuad

    public TitanQuad​(int deviceID,
                     int motor)

Constructor for Titan Quad Motor Controller

Parameters:
  `deviceID` - Device id for the controller
  `motor` - THe motor to initialize

### Method Detail

#### getID

    public int getID()

Gets the device id

Returns:
  the device id

#### set

    public void set​(double speed)

Sets the output of the Titan Quad as a percentage from -1.0 to 1.0.

Specified by:
  `set` in interface `edu.wpi.first.wpilibj.SpeedController`
Parameters:
  `speed` - Percentage value between -1.0 to 1.0, 0.0 meaning stopped.

#### setInverted

    public void setInverted​(boolean isInverted)

Inverts the output of the motor controller,

Specified by:
  `setInverted` in interface `edu.wpi.first.wpilibj.SpeedController`
Parameters:
  `isInverted` - - The invert state to be set.

#### getInverted

    public boolean getInverted()

Specified by:
  `getInverted` in interface `edu.wpi.first.wpilibj.SpeedController`

#### 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

#### getCurrent

    public double getCurrent​(int motor)

Grabs the specified motors current pull

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

#### getControllerTemp

    public double getControllerTemp()

Gets the controller temp

Returns:
  controller temp value

#### 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

#### getRPM

    public double getRPM()

Gets motor's round per minute

Returns:
  Round per minute

#### 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

#### pidWrite

    public void pidWrite​(double output)

Specified by:
  `pidWrite` in interface `edu.wpi.first.wpilibj.PIDOutput`

#### get

    public double get()

Specified by:
  `get` in interface `edu.wpi.first.wpilibj.SpeedController`

#### disable

    public void disable()

Specified by:
  `disable` in interface `edu.wpi.first.wpilibj.SpeedController`

#### stopMotor

    public void stopMotor()

Specified by:
  `stopMotor` in interface `edu.wpi.first.wpilibj.SpeedController`