Class SparkMaxMotorControllerOutputConfig
java.lang.Object
xbot.common.injection.electrical_contract.CANMotorControllerOutputConfig
xbot.common.injection.electrical_contract.SparkMaxMotorControllerOutputConfig
Configuration class for Spark Max motor controllers.
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.injection.electrical_contract.CANMotorControllerOutputConfig
CANMotorControllerOutputConfig.InversionType, CANMotorControllerOutputConfig.NeutralMode -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class xbot.common.injection.electrical_contract.CANMotorControllerOutputConfig
inversionType, neutralMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithInversionType(CANMotorControllerOutputConfig.InversionType inversionType) Sets the inversion type for the motor controller.Sets the neutral mode for the motor controller.withSmartCurrentLimit(Current stallCurrent) Sets the smart current limits for Spark motor controllers, using the same current for stall and free.withSmartCurrentLimit(Current stallCurrent, Current freeCurrent, AngularVelocity stallSpeed) Sets the smart current limits for Spark motor controllers.
-
Field Details
-
sparkStallCurrentLimit
-
sparkFreeCurrentLimit
-
sparkStallSpeed
-
-
Constructor Details
-
SparkMaxMotorControllerOutputConfig
public SparkMaxMotorControllerOutputConfig()
-
-
Method Details
-
withInversionType
public SparkMaxMotorControllerOutputConfig withInversionType(CANMotorControllerOutputConfig.InversionType inversionType) Description copied from class:CANMotorControllerOutputConfigSets the inversion type for the motor controller.- Overrides:
withInversionTypein classCANMotorControllerOutputConfig
-
withNeutralMode
public SparkMaxMotorControllerOutputConfig withNeutralMode(CANMotorControllerOutputConfig.NeutralMode neutralMode) Description copied from class:CANMotorControllerOutputConfigSets the neutral mode for the motor controller.- Overrides:
withNeutralModein classCANMotorControllerOutputConfig
-
withSmartCurrentLimit
public SparkMaxMotorControllerOutputConfig withSmartCurrentLimit(Current stallCurrent, Current freeCurrent, AngularVelocity stallSpeed) Sets the smart current limits for Spark motor controllers. RPMs lower than the stallSpeed will be limited to stallCurrent, RPMs higher than the stall speed with have current limits linearly increasing with speed (up to the max free speed of the motor) up to freeCurrent.. -
withSmartCurrentLimit
Sets the smart current limits for Spark motor controllers, using the same current for stall and free. This method sets a fixed current limit over the whole speed range.
-