REVLib - C++
|
#include <CANSparkMax.h>
Inherits rev::CANSparkBase.
Friends | |
class | SparkMaxAlternateEncoder |
|
explicit |
Create a new object to control a SPARK MAX motor Controller
deviceID | The device ID. |
type | The motor type connected to the controller. Brushless motor wires must be connected to their matching colors, and the hall sensor must be plugged in. Brushed motors must be connected to the Red and Black terminals only. |
|
explicit |
Create a new object to control a SPARK MAX motor Controller
deviceID | The device ID. |
type | The motor type connected to the controller. Brushless motor wires must be connected to their matching colors, and the hall sensor must be plugged in. Brushed motors must be connected to the Red and Black terminals only. |
|
overridedefault |
Closes the SPARK MAX Controller
|
virtual |
Returns an object for interfacing with the encoder connected to the encoder pins or front port of the SPARK MAX.
For a SPARK MAX in brushless mode, it is assumed that the default encoder type is hall effect and the counts per revolution is 42.
Implements rev::CANSparkBase.
SparkMaxAlternateEncoder CANSparkMax::GetAlternateEncoder | ( | int | countsPerRev | ) |
Returns an object for interfacing with a quadrature encoder connected to the alternate encoder mode data port pins. These are defined as:
Pin 4 (Forward Limit Switch): Index Pin 6 (Multi-function): Encoder A Pin 8 (Reverse Limit Switch): Encoder B
This call will disable support for the limit switch inputs.
SparkMaxAlternateEncoder CANSparkMax::GetAlternateEncoder | ( | SparkMaxAlternateEncoder::Type | encoderType, |
int | countsPerRev | ||
) |
Returns an object for interfacing with a quadrature encoder connected to the alternate encoder mode data port pins. These are defined as:
Pin 4 (Forward Limit Switch): Index Pin 6 (Multi-function): Encoder A Pin 8 (Reverse Limit Switch): Encoder B
This call will disable support for the limit switch inputs.
SparkMaxAlternateEncoder CANSparkMax::GetAlternateEncoder | ( | CANEncoder::AlternateEncoderType | encoderType, |
int | countsPerRev | ||
) |
Returns an object for interfacing with a quadrature encoder connected to the alternate encoder mode data port pins. These are defined as:
Pin 4 (Forward Limit Switch): Index Pin 6 (Multi-function): Encoder A Pin 8 (Reverse Limit Switch): Encoder B
This call will disable support for the limit switch inputs.
|
virtual |
Returns an object for interfacing with the encoder connected to the encoder pins or front port of the SPARK MAX or the motor interface of the SPARK Flex.
For a SPARK MAX in brushless mode, it is assumed that the default encoder type is hall effect and the counts per revolution is 42.
For a SPARK Flex in brushless mode, it is assumed that the default encoder type is quadrature and the counts per revolution is 7168.
Implements rev::CANSparkBase.
SparkRelativeEncoder CANSparkBase::GetEncoder | ( | SparkRelativeEncoder::Type | encoderType, |
int | countsPerRev | ||
) |
Returns an object for interfacing with the encoder connected to the encoder pins or front port of the SPARK MAX or the motor interface of the SPARK Flex.
SparkRelativeEncoder CANSparkBase::GetEncoder | ( | SparkMaxRelativeEncoder::Type | encoderType, |
int | countsPerRev | ||
) |
Returns an object for interfacing with the encoder connected to the encoder pins or front port of the SPARK MAX or the motor interface of the SPARK Flex.
SparkRelativeEncoder CANSparkBase::GetEncoder | ( | CANEncoder::EncoderType | encoderType, |
int | countsPerRev | ||
) |
Returns an object for interfacing with the encoder connected to the encoder pins or front port of the SPARK MAX or the motor interface of the SPARK Flex.
|
friend |