Package me.nabdev.oxconfig.sampleClasses
Class ConfigurablePhoenixMotorPIDController
java.lang.Object
me.nabdev.oxconfig.sampleClasses.ConfigurablePhoenixMotorPIDController
- All Implemented Interfaces:
ConfigurableClass
A configurable Talon SRX or Victor SPX PID controller.
This class is an example of how to use the ConfigurableClass interface, but
is safe for competition use.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurablePhoenixMotorPIDController(com.ctre.phoenix.motorcontrol.can.BaseMotorController controller, String key) Sets up a Talon SRX PID controller to be autoconfigured.ConfigurablePhoenixMotorPIDController(com.ctre.phoenix.motorcontrol.can.BaseMotorController controller, String key, String prettyName) Sets up a Talon SRX PID controller to be autoconfigured. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Gets the key of the configurable class (e.g.Gets the parameters of the configurable classGets the pretty name of the configurable class (e.g.
-
Constructor Details
-
ConfigurablePhoenixMotorPIDController
public ConfigurablePhoenixMotorPIDController(com.ctre.phoenix.motorcontrol.can.BaseMotorController controller, String key) Sets up a Talon SRX PID controller to be autoconfigured.- Parameters:
controller- The Talon SRX motor controller to be configuredkey- The json key for the controller to be stored in
-
ConfigurablePhoenixMotorPIDController
public ConfigurablePhoenixMotorPIDController(com.ctre.phoenix.motorcontrol.can.BaseMotorController controller, String key, String prettyName) Sets up a Talon SRX PID controller to be autoconfigured.- Parameters:
controller- The Talon SRX motor controller to be configuredkey- The json key for the controller to be stored inprettyName- The display name of this controller
-
-
Method Details
-
getParameters
Description copied from interface:ConfigurableClassGets the parameters of the configurable class- Specified by:
getParametersin interfaceConfigurableClass- Returns:
- The parameters of the configurable class
-
getKey
Description copied from interface:ConfigurableClassGets the key of the configurable class (e.g. "Arm"), must not include commas- Specified by:
getKeyin interfaceConfigurableClass- Returns:
- The key of the configurable class
-
getPrettyName
Description copied from interface:ConfigurableClassGets the pretty name of the configurable class (e.g. "Arm")- Specified by:
getPrettyNamein interfaceConfigurableClass- Returns:
- The pretty name of the configurable class
-