Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d1efde9
Created branch and created a new class SorterControls
gatorgrad96 Dec 9, 2025
3bb03b2
Refactor SorterControls for improved position handling
melloCoding Dec 9, 2025
a83b901
Add validation for sorter position in moveSorterToPos
melloCoding Dec 11, 2025
24294fd
Refactor controls and add sorter functionality
melloCoding Dec 11, 2025
ef9eea0
Add flipper servo and enhance launch controls
melloCoding Dec 15, 2025
04345f3
Refactor launch control and add loop delay
melloCoding Dec 15, 2025
2418ca8
Remove deprecated launch motor control call
melloCoding Dec 15, 2025
531990b
Refactor SorterControls and update motor settings
melloCoding Jan 6, 2026
6e6fd56
Update TeleOpMain.java
gatorgrad96 Jan 7, 2026
4b727ba
sharbell's "interesting" changes
gatorgrad96 Jan 9, 2026
a19b934
Positions for sorter
gatorgrad96 Jan 13, 2026
6fd8078
Improve launcher and flipper control logic
melloCoding Jan 13, 2026
7fcd6d3
added a new QuickAutoBlue
gatorgrad96 Jan 13, 2026
42cef7b
quick auto red
gatorgrad96 Jan 15, 2026
abbb491
set up for limelight
gatorgrad96 Jan 15, 2026
4ebac40
limelight
gatorgrad96 Jan 16, 2026
49c06b6
still working on it, might need update sdk for limelight
gatorgrad96 Jan 18, 2026
300e62b
very small changes
gatorgrad96 Jan 18, 2026
0a1cd39
I FIXED IT
gatorgrad96 Jan 18, 2026
5a5b7c8
working on limelight auto testing now
gatorgrad96 Jan 18, 2026
f7847d9
jacob fixed
gatorgrad96 Jan 20, 2026
c44cab8
Remove RampControls and add LimelightControls utility
melloCoding Jan 20, 2026
ac53e08
Refactor and document Limelight and Sorter controls
melloCoding Jan 20, 2026
ef625ed
Add ballColors enum to SorterControls
melloCoding Jan 20, 2026
8b825f0
updates limelight auto blue to actually have auto
gatorgrad96 Jan 22, 2026
8413d2e
Added move to specific color
melloCoding Jan 22, 2026
f5c0067
Merge branch 'ballSorting' of https://github.com/cscsRobotics/13233DE…
gatorgrad96 Jan 22, 2026
46fc8d0
Refactor MotorConstructor field comments
melloCoding Jan 22, 2026
e0f6573
Preserve last scanned tag in LimelightControls
melloCoding Jan 22, 2026
cea764c
Track current sorter position with new enum
melloCoding Jan 22, 2026
e50195e
Update TeleOpMain.java
melloCoding Jan 22, 2026
4985149
turnign
gatorgrad96 Jan 22, 2026
c9c47f1
auto
gatorgrad96 Jan 22, 2026
1efe84f
test
gatorgrad96 Jan 23, 2026
1061bc7
testing something
gatorgrad96 Jan 23, 2026
949b565
Update LimeLightAutoBlueTEST.java
gatorgrad96 Jan 24, 2026
d505f28
Update LimeLightAutoBlueTEST.java
gatorgrad96 Jan 24, 2026
5e89cf9
Merge branch 'ballSorting' of https://github.com/cscsRobotics/13233DE…
gatorgrad96 Jan 26, 2026
442b698
Add detailed sorter state telemetry and fix visibility
melloCoding Jan 26, 2026
474fbfb
Add IntakeControls utility class
melloCoding Jan 26, 2026
25b64fc
auto fix
gatorgrad96 Jan 26, 2026
586d762
Merge branch 'ballSorting' of https://github.com/cscsRobotics/13233DE…
gatorgrad96 Jan 26, 2026
daa14df
Update TeleOp controls and streamline launch logic
melloCoding Jan 27, 2026
65f221c
Refactor sorter control logic with helper method
melloCoding Jan 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ are permitted (subject to the limitations in the disclaimer below) provided that
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.firstinspires.ftc.robotcontroller.external.samples;

import com.qualcomm.hardware.limelightvision.LLResult;
import com.qualcomm.hardware.limelightvision.LLResultTypes;
import com.qualcomm.hardware.limelightvision.LLStatus;
import com.qualcomm.hardware.limelightvision.LLResultTypes;
import com.qualcomm.hardware.limelightvision.Limelight3A;
import com.qualcomm.hardware.limelightvision.LLResult;
import com.qualcomm.hardware.limelightvision.LLResultTypes.FiducialResult; // Try this specific path
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
Expand Down Expand Up @@ -70,7 +70,7 @@ are permitted (subject to the limitations in the disclaimer below) provided that
@Disabled
public class SensorLimelight3A extends LinearOpMode {

private Limelight3A limelight;
public Limelight3A limelight;

@Override
public void runOpMode() throws InterruptedException
Expand Down Expand Up @@ -145,6 +145,7 @@ public void runOpMode() throws InterruptedException
List<LLResultTypes.ColorResult> colorResults = result.getColorResults();
for (LLResultTypes.ColorResult cr : colorResults) {
telemetry.addData("Color", "X: %.2f, Y: %.2f", cr.getTargetXDegrees(), cr.getTargetYDegrees());

}
} else {
telemetry.addData("Limelight", "No data available");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,182 +10,13 @@
* Class the holds common functions and variable for the 13233 DECODE robot
*/
public class CommonControls {
/**
* Front left drive motor
*/
public DcMotor leftFront;
/**
* Front right drive motor
*/
public DcMotor rightFront;
/**
* Back left drive motor
*/
public DcMotor leftBack;
/**
* Right back drive motor
*/
public DcMotor rightBack;
public float launchPower = 1.0f;
/**
* The motor for that controls the ball intake
*/
private DcMotor intake;
/**
* One of the motors used to shoot the balls
*/
private DcMotor Launcher;
/**
* One of the motors used to shoot the balls
*/
private DcMotor Launcher2;
/**
* One of the servos used to carry the balls up the ramp
*/
private CRServo rampServo1;
/**
* One of the servos used to carry the balls up the ramp
*/
private CRServo rampServo2;
private CRServo rampServo3;
private CRServo rampServo4;

/**
* Constructor for the CommonControls class
*
* @param hardwareMap The hardware map for the robot
*/
public CommonControls(HardwareMap hardwareMap) {
// Map main Drive Motors
leftFront = hardwareMap.get(DcMotor.class, "leftFront");
rightFront = hardwareMap.get(DcMotor.class, "rightFront");
leftBack = hardwareMap.get(DcMotor.class, "leftBack");
rightBack = hardwareMap.get(DcMotor.class, "rightBack");

// Map Intake Motor
intake = hardwareMap.get(DcMotor.class, "intake");

// Map the launcher Prototype
Launcher = hardwareMap.dcMotor.get("Launcher");
Launcher2 = hardwareMap.dcMotor.get("Launcher2");
rampServo1 = hardwareMap.crservo.get("rampServo1");
rampServo2 = hardwareMap.crservo.get("rampServo2");
rampServo3 = hardwareMap.crservo.get("rampServo3");
rampServo4 = hardwareMap.crservo.get("rampServo4");
// Set direction of the main drive motors
leftFront.setDirection(DcMotorSimple.Direction.FORWARD);
rightFront.setDirection(DcMotorSimple.Direction.REVERSE);
leftBack.setDirection(DcMotorSimple.Direction.FORWARD);
rightBack.setDirection(DcMotorSimple.Direction.REVERSE);

// Set the direction of the intake motor
intake.setDirection(DcMotorSimple.Direction.REVERSE);
}


// TODO:
// Implement field oriented drive

/**
* Updates all the drive controls based on the current gamepad stick positions
*
* @param controlLeftStickY Left stick Y setting, up/down
* @param controlLeftStickX Left stick X setting, left/right
* @param controlRightStick Right Stick setting, controls left right turn
* @param speedLimiter Trigger setting, controls speed of the robot
*/
public void setDrivePower(float controlLeftStickY, float controlLeftStickX,
float controlRightStick, float speedLimiter) {
// For readability and flexibility for future control input changes
//noinspection UnnecessaryLocalVariable
float forward = controlLeftStickY;
//noinspection UnnecessaryLocalVariable
float strafe = controlLeftStickX;
//noinspection UnnecessaryLocalVariable
float rotate = controlRightStick;
float speed = Math.max(1.0f - speedLimiter, 0.5f);


// Calculate the power for each motor
// Remember the direction of the stick is the opposite of what you would expect
// up is in the negatives and down is in the positives
float frontRightPower = (forward + strafe + rotate) * (speed);
float frontLeftPower = (forward - strafe - rotate) * (speed);
float backRightPower = (forward - strafe + rotate) * (speed);
float backLeftPower = (forward + strafe - rotate) * (speed);

// Set the power for each of the motors
rightFront.setPower(frontRightPower);
leftFront.setPower(frontLeftPower);
rightBack.setPower(backRightPower);
leftBack.setPower(backLeftPower);
}

/**
* Updates just the forward and back movement based on controller stick position
*
* @param controlLeftStickY Left stick Y setting, up/down
*/
public void setDrivePower(float controlLeftStickY) {
setDrivePower(controlLeftStickY, 0.0f, 0.0f, 0.0f);
}


/**
* Sets the power of all of the launch motors depending on the value of launchInput
*
* @param launchInput Button mapped to launch input
*/
void setLaunchPower(boolean launchInput) {
double power = launchInput ? launchPower : 0.0;

// Set the the power value to the motors
Launcher.setPower(power);
Launcher2.setPower(-power);
}

/**
* Controls the spin direction of the intake wheel based on controller buttons
*
* @param intakeForwardInput Button mapped to forward input
* @param intakeReverseInput Button mapped to reverse input
*/
void setIntakeDirection(boolean intakeForwardInput, boolean intakeReverseInput) {
double intakePower = 0;
// ^ is the XOR operator, will return true if only one variable is true
// If intakeForwardInput OR intakeReverseInput is true then this is true, but not
// if both are true, which is why this differs from the || logical or operator
if (intakeForwardInput ^ intakeReverseInput) {
// This uses an inline-if statement which is useful when assigning values to variables
// This says set power = 1 if intakeForwardInput is true, else set it to -1
intakePower = intakeForwardInput ? 1 : -1;
}
rampServo1.setPower(-intakePower);
rampServo2.setPower(intakePower);
rampServo3.setPower(intakePower);
rampServo4.setPower(-intakePower);
intake.setPower(intakePower);
}

void setDriveBrake() {
leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
}

void setDriveFloat() {
leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
}

void setDriveMotorZeroPowerBehavior(boolean input) {
if (input) {
setDriveBrake();
} else {
setDriveFloat();
}
}

}
Loading