Class WsPhoenixConfig
java.lang.Object
org.wildstang.hardware.roborio.outputs.config.WsPhoenixConfig
- All Implemented Interfaces:
OutputConfig
Contains configurations for Phoenix Talon and Victor motor controllers.
-
Constructor Summary
ConstructorsConstructorDescriptionWsPhoenixConfig(int channel, WsMotorControllers controller) Construct the Phoenix config.WsPhoenixConfig(int channel, WsMotorControllers controller, boolean invert) Construct the Phoenix config.WsPhoenixConfig(int channel, WsMotorControllers controller, boolean invert, double p_default) Construct the Phoenix config. -
Method Summary
-
Constructor Details
-
WsPhoenixConfig
Construct the Phoenix config.- Parameters:
channel- Controller CAN constant.controller- Enumeration representing type of controller.
-
WsPhoenixConfig
Construct the Phoenix config.- Parameters:
channel- Controller CAN constant.controller- Enumeration representing type of controller.invert- True if motor output should be inverted.
-
WsPhoenixConfig
public WsPhoenixConfig(int channel, WsMotorControllers controller, boolean invert, double p_default) Construct the Phoenix config.- Parameters:
channel- Controller CAN constant.controller- Enumeration representing type of controller.invert- True if motor output should be inverted.p_default- Default output value.
-
-
Method Details
-
getChannel
public int getChannel()Returns the hardware port number.- Returns:
- The hardware port number.
-
getDefault
public double getDefault()Returns the default output value.- Returns:
- The default value.
-
getType
Returns true if the motor controller is a Talon.- Returns:
- True if Talon, false if Victor.
-
isInverted
public boolean isInverted()Returns if the controller should be inverted.- Returns:
- True if inverted.
-
toString
Builds a JSON String describing the Phoenix config.
-