Skip to content

Ball sorting#39

Merged
melloCoding merged 44 commits intomainfrom
ballSorting
Jan 27, 2026
Merged

Ball sorting#39
melloCoding merged 44 commits intomainfrom
ballSorting

Conversation

@melloCoding
Copy link
Member

There is too much but basically the robot works now

gatorgrad96 and others added 30 commits December 9, 2025 10:37
Co-Authored-By: Jeffrey Mello <61124766+melloCoding@users.noreply.github.com>
Changed intake and launch position variables from double to int for motor compatibility. Added methods to move the sorter to specific intake or launch positions using enums, and introduced a unified moveSorterToPos method. Updated enums for clarity and consistency.
Added error handling to throw a RuntimeException if the position argument in moveSorterToPos is not 1, 2, or 3. This ensures only valid positions are accepted for both intake and launch modes.
Removed redundant motor and servo assignments from CommonControls and moved intake control logic to RampControls. Added SorterControls integration to TeleOpMain, including gamepad mappings for sorter positions. Minor cleanup and typo fix in SorterControls.
Introduced a Flipper servo to MotorConstructor and integrated its control in TeleOpMain. Expanded LaunchControls with overloaded setLaunchPower methods to support variable power and controller rumble feedback.
Replaced manual rumble logic with a single call to launch.setLaunchPower, passing additional parameters. Added a 50ms sleep at the end of the loop to address issues with motors not working properly due to a fast loop rate.
Eliminated the old call to launch.setLaunchPower(gamepad1.x) in favor of the updated method with additional parameters. This streamlines launch motor control and avoids redundant code.
SorterControls now receives MotorConstructor instead of HardwareMap, and intake/launch positions have been updated to new values. MotorConstructor initializes Sorter motor direction, zero power behavior, and encoder settings. Power for sorter movements is reduced from 1 to 0.6 for smoother operation. TeleOpMain now displays additional telemetry for the Sorter motor.
flipper update
changes values to correct positions
i have no idea what he did
probably something to do with encoders on launch motors
Changing the positions for the sorter when switched to a 20:1 motor. Also changed X as a value for gamepad1
Added zero power brake behavior to launcher motors for better stopping control. Updated TeleOp logic to add a delay after launch actions and prevent flipper activation while the sorter is busy, improving safety and reliability.
Cycles the turntable, shooting all 3 balls (hopefully) sets the framework for a limelight auto and a quick auto red
added inverted quickauto red
literally the same thing as blue
yes jeffery i know there are multiple HUGE errors
yes its still a buggy mess
need to import limelight sdk but im getting closer to fixing issues
importing libs
well
mostly anyway
cannot resolve fiducial result for some odd reason, i could do it in the other code i put in tho
Deleted RampControls and its related test, refactored main and auto classes to remove RampControls usage. Added LimelightControls utility for AprilTag detection and updated MotorConstructor to include Limelight3A initialization. Updated MockMotorUtil for Limelight3A and removed ramp servo mocks.
Added JavaDoc comments to LimelightControls for improved clarity. Refactored SorterControls to use a configurable motor speed variable instead of hardcoded values, added comments for position variables, and improved code formatting. Removed an unnecessary blank line in LimeLightAutoBlue.
Introduced a new ballColors enum with PURPLE and GREEN values to SorterControls for improved color handling.
yes i know there are 9 errors but it does work i dont know
Replaced verbose Javadoc comments with concise inline comments for class fields in MotorConstructor. This improves readability and maintains essential documentation without excessive verbosity.
Introduced a lastTagScanned field to retain the last valid fiducial ID detected by the Limelight. If no new tag is found, getTagId() now returns the last scanned tag instead of 0. Also added a call to stop the Limelight after processing tags.
Added a sorterPositions enum and a currentSorterPosition field to track the current position of the sorter. Updated setSorterPos to set currentSorterPosition based on the selected mode and position.
melloCoding and others added 14 commits January 22, 2026 15:49
turned
fix
test
Added telemetry output for each sorter slot's current state in TeleOpMain for improved debugging. Made currentSorterStates public in SorterControls to allow external access. Minor formatting adjustments to exception messages.
Introduces IntakeControls for managing intake wheel direction based on controller input. This class uses MotorConstructor to set intake motor power according to forward and reverse button states.
Added detailed control documentation as a comment block. Simplified launch motor power logic to respond directly to button presses. Updated brake control to use the 'b' button. Improved telemetry formatting for better readability.
Replaced repetitive button handling for sorter positions in TeleOpMain with a new simpleSorterPosition method in SorterControls. This improves code readability and maintainability by centralizing the logic for setting sorter positions based on button input.
@melloCoding melloCoding merged commit aa94b1b into main Jan 27, 2026
1 check passed
@melloCoding melloCoding deleted the ballSorting branch January 27, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants