3#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
5#pragma warning (disable : 4250)
13namespace motorcontrol{
42 std::string
toString(std::string prependString) {
251#ifndef __FRC_ROBORIO__
374#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
static std::string toString(FeedbackDevice value)
Gets the string representation of selected feedback device.
Definition: FeedbackDevice.h:260
Interface for motor controllers.
Definition: IMotorController.h:35
static std::string toString(LimitSwitchSource value)
Definition: LimitSwitchType.h:110
Collection of simulation commands available to a VictorSPX motor controller.
Definition: VictorSPXSimCollection.h:26
Base motor controller features for all CTRE CAN motor controllers.
Definition: BaseMotorController.h:578
Util class to help with VictorSPX configs.
Definition: VictorSPX.h:177
static bool ReverseLimitSwitchDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:201
static bool ReverseLimitSwitchSourceDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:188
static bool ForwardLimitSwitchDeviceIDDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:189
static bool Diff1TermDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:196
static bool Sum1TermDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:194
static bool ForwardLimitSwitchNormalDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:191
static bool ForwardLimitSwitchDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:198
static bool Diff0TermDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:195
static bool ForwardLimitSwitchSourceDifferent(const VictorSPXConfiguration &settings)
Determine if specified value is different from default.
Definition: VictorSPX.h:187
static bool ReverseLimitSwitchDeviceIDDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:190
static bool Sum0TermDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:193
static bool ReverseLimitSwitchNormalDifferent(const VictorSPXConfiguration &settings)
Definition: VictorSPX.h:192
VEX Victor SPX Motor Controller when used on CAN Bus.
Definition: VictorSPX.h:227
virtual ctre::phoenix::ErrorCode ConfigAllSettings(const VictorSPXConfiguration &allConfigs, int timeoutMs=50)
Configures all persistent settings.
VictorSPX(VictorSPX const &)=delete
virtual void GetAllConfigs(VictorSPXConfiguration &allConfigs, int timeoutMs=50)
Gets all persistant settings.
void Set(ctre::phoenix::motorcontrol::VictorSPXControlMode mode, double value)
Sets the appropriate output on the motor controller, depending on the mode.
VictorSPX(int deviceNumber)
Constructor.
virtual void Set(ctre::phoenix::motorcontrol::ControlMode mode, double value)
Sets the appropriate output on the talon, depending on the mode.
virtual ~VictorSPX()
Definition: VictorSPX.h:260
ctre::phoenix::motorcontrol::VictorSPXSimCollection & GetSimCollection()
void Set(ctre::phoenix::motorcontrol::VictorSPXControlMode mode, double demand0, ctre::phoenix::motorcontrol::DemandType demand1Type, double demand1)
VictorSPX(int deviceNumber, std::string const &canbus)
Constructor so non-FRC platforms can specify a CAN 2.0 socketcan bus.
virtual void Set(ctre::phoenix::motorcontrol::ControlMode mode, double demand0, ctre::phoenix::motorcontrol::DemandType demand1Type, double demand1)
VictorSPX & operator=(VictorSPX const &)=delete
void GetPIDConfigs(VictorSPXPIDSetConfiguration &pid, int pidIdx=0, int timeoutMs=50)
Gets all PID set persistant settings.
ControlMode
Choose the control mode for a motor controller.
Definition: ControlMode.h:11
DemandType
How to interpret a demand value.
Definition: DemandType.h:10
@ None
Same as SetInverted(false)
LimitSwitchNormal
Choose whether the limit switch is normally open or normally closed.
Definition: LimitSwitchType.h:62
@ LimitSwitchNormal_NormallyOpen
Limit Switch is tripped when the circuit is closed.
Definition: LimitSwitchType.h:67
RemoteFeedbackDevice
Choose the remote feedback device for a motor controller.
Definition: FeedbackDevice.h:179
RemoteLimitSwitchSource
Remote Limit switch source enum.
Definition: LimitSwitchType.h:35
@ RemoteLimitSwitchSource_Deactivated
Don't use a limit switch.
Definition: LimitSwitchType.h:55
VictorSPXControlMode
Choose the control mode for a Victor SPX.
Definition: ControlMode.h:156
ErrorCode
Definition: ErrorCode.h:13
namespace ctre
Definition: paramEnum.h:5
bool enableOptimizations
Enable optimizations for ConfigAll (defaults true)
Definition: CustomParamConfiguration.h:23
Configurables available to base motor controllers.
Definition: BaseMotorController.h:276
std::string toString()
Definition: BaseMotorController.h:474
Base set of configurables related to PID.
Definition: BaseMotorController.h:50
double selectedFeedbackCoefficient
Feedback coefficient of selected sensor.
Definition: BaseMotorController.h:55
std::string toString()
Definition: BaseMotorController.h:65
Configurables available to VictorSPX.
Definition: VictorSPX.h:71
int reverseLimitSwitchDeviceID
Reverse limit switch device ID.
Definition: VictorSPX.h:103
VictorSPXPIDSetConfiguration auxiliaryPID
Auxiliary PID configuration.
Definition: VictorSPX.h:79
std::string toString(std::string prependString)
Definition: VictorSPX.h:155
LimitSwitchNormal forwardLimitSwitchNormal
Forward limit switch normally open/closed.
Definition: VictorSPX.h:107
VictorSPXPIDSetConfiguration primaryPID
Primary PID configuration.
Definition: VictorSPX.h:75
RemoteFeedbackDevice diff0Term
Feedback Device for Diff 0 Term.
Definition: VictorSPX.h:123
RemoteFeedbackDevice diff1Term
Feedback Device for Diff 1 Term.
Definition: VictorSPX.h:127
LimitSwitchNormal reverseLimitSwitchNormal
Reverse limit switch normally open/closed.
Definition: VictorSPX.h:111
int forwardLimitSwitchDeviceID
Forward limit switch device ID.
Definition: VictorSPX.h:97
RemoteLimitSwitchSource reverseLimitSwitchSource
Reverse Limit Switch Source.
Definition: VictorSPX.h:91
RemoteFeedbackDevice sum0Term
Feedback Device for Sum 0 Term.
Definition: VictorSPX.h:115
RemoteFeedbackDevice sum1Term
Feedback Device for Sum 1 Term.
Definition: VictorSPX.h:119
VictorSPXConfiguration()
Definition: VictorSPX.h:129
std::string toString()
Definition: VictorSPX.h:146
RemoteLimitSwitchSource forwardLimitSwitchSource
Forward Limit Switch Source.
Definition: VictorSPX.h:85
Util class to help with VictorSPX's PID configs.
Definition: VictorSPX.h:53
static bool SelectedFeedbackCoefficientDifferent(const VictorSPXPIDSetConfiguration &settings)
Definition: VictorSPX.h:64
static bool SelectedFeedbackSensorDifferent(const VictorSPXPIDSetConfiguration &settings)
Determine if specified value is different from default.
Definition: VictorSPX.h:63
Configurables available to VictorSPX's PID.
Definition: VictorSPX.h:19
std::string toString()
Definition: VictorSPX.h:33
VictorSPXPIDSetConfiguration()
Definition: VictorSPX.h:25
std::string toString(std::string prependString)
Definition: VictorSPX.h:42
RemoteFeedbackDevice selectedFeedbackSensor
Feedback device for a particular PID loop.
Definition: VictorSPX.h:23