Skip to content

Commit

Permalink
Task 5 Completion
Browse files Browse the repository at this point in the history
  • Loading branch information
InfinityJuice committed Oct 12, 2024
1 parent cb8035c commit 909cf4c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/frc/robot/subsystems/Servo.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@ public Servo(){
//TODO: Task 5-Write functions to control the arm. You should be able to set the arm's angle and get the angle
//it is at.
//HINT: Type 'm_armServo.' (without quotes) in a method body to see all of the different methods the servo has.
public void setAngle(double angle) {
//sets angle to this
m_armServo.setAngle(angle);
}

public void adjustAngleBy(double adjustAmount) {
//makes the current angle larger or smaller by adjusting angle by adjustAmount
m_armServo.setAngle(adjustAmount+m_armServo.getAngle());
}
}

0 comments on commit 909cf4c

Please sign in to comment.