Class TurretMotor
java.lang.Object
frc.robot.devices.motor.AbstractMotor
frc.robot.subsystems.turret.devices.TurretMotor
SparkMax-backed turret motor with baked-in limits, gearing, and telemetry.
Inputs are configured in degrees for approachability; this wrapper converts to radians for WPILib math and AdvantageKit logging via
AbstractMotor. Provide the gear ratio as motor rotations per one turret rotation (e.g., 100:1 reduction = 100.0).
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.devices.motor.MotorIO
MotorIO.MotorIOInputs -
Field Summary
Fields inherited from class frc.robot.devices.motor.AbstractMotor
log, motor, name, NOMINAL_VOLTAGE -
Method Summary
Modifier and TypeMethodDescriptionprotected com.revrobotics.spark.config.SparkMaxConfigconfigureMotor(com.revrobotics.spark.config.SparkMaxConfig sparkConfig) Allows subclasses to append motor-specific configuration before the object is applied to hardware.static TurretMotorcreate(MotorConfig config) Creates a turret motor wrapper using values from the turret motor config.Methods inherited from class frc.robot.devices.motor.AbstractMotor
computeMechanismRadiansPerMotorRotation, getPositionRadians, getVelocityRadiansPerSecond, getVoltage, init, isInitialized, setEncoderPosition, setVoltage, stop, updateInputs
-
Method Details
-
configureMotor
protected com.revrobotics.spark.config.SparkMaxConfig configureMotor(com.revrobotics.spark.config.SparkMaxConfig sparkConfig) Description copied from class:AbstractMotorAllows subclasses to append motor-specific configuration before the object is applied to hardware.- Specified by:
configureMotorin classAbstractMotor- Parameters:
sparkConfig- initialSparkMaxConfigwith default voltage compensation- Returns:
- configured
SparkMaxConfigready forSparkMax.configure(com.revrobotics.spark.config.SparkBaseConfig, com.revrobotics.spark.SparkBase.ResetMode, com.revrobotics.spark.SparkBase.PersistMode)