Class WsSparkConfig
java.lang.Object
org.wildstang.hardware.roborio.outputs.config.WsSparkConfig
- All Implemented Interfaces:
OutputConfig
Contains configurations for Spark Max/Flex motor controllers.
-
Constructor Summary
ConstructorsConstructorDescriptionWsSparkConfig(int channel, WsMotorControllers controller) Construct the Phoenix config.WsSparkConfig(int channel, WsMotorControllers controller, boolean invert) Construct the Phoenix config.WsSparkConfig(int channel, WsMotorControllers controller, boolean invert, double p_default) Construct the Phoenix config. -
Method Summary
-
Constructor Details
-
WsSparkConfig
Construct the Phoenix config.- Parameters:
channel- Controller CAN constant.controller- Enumeration representing type of controller.
-
WsSparkConfig
Construct the Phoenix config.- Parameters:
channel- Controller CAN constant.controller- Enumeration representing type of controller.invert- True if motor output should be inverted.
-
WsSparkConfig
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.
-
getType
Returns the motor controller type.- Returns:
- The hardware motor controller type.
-
getDefault
public double getDefault()Returns the default output value.- Returns:
- The default value.
-
isInverted
public boolean isInverted()Returns if the controller should be inverted.- Returns:
- True if inverted.
-
toString
Builds a JSON String describing the Spark Max config.
-