File tree Expand file tree Collapse file tree
src/main/java/frc/robot/subsystems/arm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,10 +20,11 @@ public class ArmIOReal implements ArmIO {
2020 TalonFX pivotMotor ;
2121 TalonFXConfiguration pivotMotorConfig ;
2222
23+ PositionVoltage pivotPositionControl = new PositionVoltage (0 );
24+
2325 CANcoder armEncoder ;
2426 CANcoderConfiguration armEncoderConfig ;
2527
26- PositionVoltage pivotPositionControl = new PositionVoltage (0 );
2728
2829 // Intake/Outtake motors & configurations
2930 TalonFX intakeMotor ;
@@ -32,10 +33,13 @@ public class ArmIOReal implements ArmIO {
3233 public ArmIOReal () {
3334 // Set up the arm encoder (records the arm position)
3435 armEncoder = new CANcoder (ARM_ENCODER_ID );
36+
3537 armEncoderConfig = new CANcoderConfiguration ();
3638 armEncoderConfig .withMagnetSensor (
3739 new MagnetSensorConfigs ().withSensorDirection (SensorDirectionValue .CounterClockwise_Positive ));
3840
41+ armEncoder .getConfigurator ().apply (armEncoderConfig );
42+
3943 // Set up arm pivot motor.
4044 pivotMotor = new TalonFX (ARM_PIVOT_ID );
4145
You can’t perform that action at this time.
0 commit comments