Skip to content

Commit

Permalink
move pid
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiebudman committed Mar 3, 2024
1 parent f55615e commit dc69883
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/org/carlmontrobotics/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ public Arm() {
armEncoder.setInverted(ENCODER_INVERTED);

armMotorFollower.follow(armMotorMaster);
armPID1.setP(kP);
armPID1.setI(kI);
armPID1.setD(kD);
armPID2.setP(kP);
armPID2.setI(kI);
armPID2.setD(kD);

//armEncoder1.setZeroOffset(offsetRad);

Expand All @@ -108,12 +114,7 @@ public void periodic() {

//ARM_TELEOP_MAX_GOAL_DIFF_FROM_CURRENT_RAD = SmartDashboard.getNumber("ARM_TELEOP_MAX_GOAL_DIFF_FROM_CURRENT_RAD", ARM_TELEOP_MAX_GOAL_DIFF_FROM_CURRENT_RAD);
// armConstraints = new TrapezoidProfile.Constraints(MAX_FF_VEL , MAX_FF_ACCEL );
armPID1.setP(kP);
armPID1.setI(kI);
armPID1.setD(kD);
armPID2.setP(kP);
armPID2.setI(kI);
armPID2.setD(kD);


//smart dahsboard stuff
//SmartDashboard.putBoolean("ArmPIDAtSetpoint", armPID1.atSetpoint());
Expand Down

0 comments on commit dc69883

Please sign in to comment.