Skip to content

Commit

Permalink
Added comments, cleaned up some unused variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhsftc committed Oct 28, 2024
1 parent 242990d commit 90dfb4d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public class DetectMotorType extends LinearOpMode {

private static final double INCREMENT = 0.01; // amount to ramp motor each CYCLE_MS cycle
private static final int CYCLE_MS = 25; // period of each cycle
private static final int PAUSE_MS = 1000; // pause between direction switches
private ElapsedTime timer;

// Define class members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit;

/*
* Demonstrates an empty iterative OpMode
* Perform encoder tests on a motor. Implemented as an iterative OpMode.
*/
@TeleOp(name = "Encoder Test", group = "Test")
//@Disabled
Expand Down Expand Up @@ -72,6 +72,7 @@ public void init() {
motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
pidfVelocityCoefficients = motor.getPIDFCoefficients(DcMotor.RunMode.RUN_USING_ENCODER);
pidfPositionCoefficients = motor.getPIDFCoefficients(DcMotor.RunMode.RUN_TO_POSITION);
// These values are recommended as a starting point if you are tuning a PID.
pidfVelocityCoefficients.p = 1.063f;
pidfVelocityCoefficients.i = 1.063f;
pidfVelocityCoefficients.f = 10.63f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;

/*
Iterative opMode to test CR servos. It uses the FTCLib CRServo class.
*/

@TeleOp(name = "Test CR Servo", group = "Test")
//@Disabled
public class TestCRServo extends OpMode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.PwmControl;

/*
An iterative opMode used to test servos. It uses the SimpleServo class from FTCLib.
The behavior you see depends on the specific servo you are using. Read the specs for
your servo and modify the test code to fit.
*/
@TeleOp(name = "Test Servo", group = "Test")
//@Disabled
public class TestServo extends OpMode {
Expand All @@ -21,7 +26,6 @@ public class TestServo extends OpMode {
@Override
public void init() {
// Make the name match your config file and robot.
// servo = hardwareMap.get(ServoImplEx.class, "servo1");
servo = new SimpleServo(hardwareMap, "servo1", 0, 90);
gamepad = new GamepadEx(gamepad1);
showTelemetry();
Expand Down

0 comments on commit 90dfb4d

Please sign in to comment.