Skip to content

Handle balls 3#25

Open
tnrz135 wants to merge 2 commits intomainfrom
handle-balls-3
Open

Handle balls 3#25
tnrz135 wants to merge 2 commits intomainfrom
handle-balls-3

Conversation

@tnrz135
Copy link
Contributor

@tnrz135 tnrz135 commented Aug 24, 2025

No description provided.

}

private void initAmirButtons() {
//Indexing.getInstance().setDefaultCommand(new HandleBalls());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raz said you shouldnt use comments

import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
import edu.wpi.first.wpilibj2.command.WaitUntilCommand;

public class EjectFromShooter extends ParallelRaceGroup {//todo delete

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shoud not use todo comments.

import edu.wpi.first.wpilibj2.command.ParallelRaceGroup;
import edu.wpi.first.wpilibj2.command.WaitCommand;

public class EjectEnemyBallFromGripper extends ParallelRaceGroup { //todo can be deadline

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo comment again

Comment on lines +41 to +47
float[] color = Color.RGBtoHSB(cs.getRed(), cs.getGreen(), cs.getBlue(), new float[3]);
if (color[0] >= 0.05 && color[0] <= 0.2) {
return DriverStation.Alliance.Red;
} else if (color[0] >= 0.4 && color[0] < 0.6) {
return DriverStation.Alliance.Blue;
} else {
return DriverStation.Alliance.Invalid;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numbers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OI and IOM?

* @return true is our team's ball is in front of the sensor.
*/
public boolean isTeamsBallInSensor() {
DriverStation.Alliance a = instance.getBallColor();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a isnt a good name

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.

3 participants