Added ServoExtender sample.

This commit is contained in:
Titan Robotics Club
2025-05-05 00:19:30 -07:00
parent 68fbe37eda
commit 7c20f1d1f3
4 changed files with 241 additions and 1 deletions

View File

@ -37,6 +37,7 @@ import teamcode.subsystems.Intake;
import teamcode.subsystems.LEDIndicator;
import teamcode.subsystems.RobotBase;
import teamcode.subsystems.RumbleIndicator;
import teamcode.subsystems.ServoExtender;
import teamcode.subsystems.ServoWrist;
import teamcode.subsystems.Shooter;
import teamcode.subsystems.Turret;
@ -53,7 +54,6 @@ import trclib.subsystem.TrcIntake;
import trclib.subsystem.TrcServoClaw;
import trclib.subsystem.TrcShooter;
import trclib.subsystem.TrcSubsystem;
import trclib.timer.TrcTimer;
/**
* This class creates the robot object that consists of sensors, indicators, drive base and all the subsystems.
@ -88,6 +88,7 @@ public class Robot
public TrcServoClaw claw;
public TrcServo servoWrist;
public DiffyServoWrist diffyServoWrist;
public ServoExtender servoExtender;
// Autotasks.
/**
@ -180,6 +181,11 @@ public class Robot
{
diffyServoWrist = new DiffyServoWrist();
}
if (RobotParams.Preferences.useServoExtender)
{
servoExtender = new ServoExtender();
}
// Zero calibrate all subsystems only in Auto or if TeleOp is run standalone without prior Auto.
// There is no reason to zero calibrate again if Auto was run right before TeleOp.
if (runMode == TrcRobot.RunMode.AUTO_MODE || FtcAuto.autoChoices.alliance == null)