From 7dd3f523459133702dc5b9c9790cfe06d403247c Mon Sep 17 00:00:00 2001 From: RyanW Date: Fri, 11 Oct 2024 23:37:41 -0400 Subject: [PATCH] Task 8 Completion --- src/main/java/frc/robot/commands/ServoCommands.java | 2 ++ src/main/java/frc/robot/subsystems/Rangefinder.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/frc/robot/commands/ServoCommands.java b/src/main/java/frc/robot/commands/ServoCommands.java index c8d603f..ccfbc27 100644 --- a/src/main/java/frc/robot/commands/ServoCommands.java +++ b/src/main/java/frc/robot/commands/ServoCommands.java @@ -26,6 +26,8 @@ public class ServoCommands { public static Command servoAdjustAngleCommand(double adjustAmount) { return new RunCommand( () -> hiIhopeThisWorks.adjustAngleBy(adjustAmount) + //() -> frc.robot.subsystems.Servo.m_armServo.adjustAngleBy(5) + //note to self: if hiIhopeThisWorks doesn't work, then do ^^^ and change m_armServo to public ); } diff --git a/src/main/java/frc/robot/subsystems/Rangefinder.java b/src/main/java/frc/robot/subsystems/Rangefinder.java index e0344ca..3289776 100644 --- a/src/main/java/frc/robot/subsystems/Rangefinder.java +++ b/src/main/java/frc/robot/subsystems/Rangefinder.java @@ -11,4 +11,7 @@ public Rangefinder(){ } //TODO: Task 8-Write a method to get the distance returned by the sensor in inches. //HINT: Type 'm_rangefinder.' (without quotes) in a method body to see all of the different methods the rangefinder has. + public double findRange() { + return(m_rangefinder.getDistanceInches()); + } }