Conversation
orira22
left a comment
There was a problem hiding this comment.
Overall good - there are some comments to fix
| public static final Pose2d ZONE_FIVE_LEFT = new Pose2d(); | ||
| public static final Pose2d ZONE_FIVE_RIGHT = new Pose2d(); | ||
| public static final Pose2d ZONE_SIX_LEFT = new Pose2d(); | ||
| public static final Pose2d ZONE_SIX_RIGHT = new Pose2d(); |
There was a problem hiding this comment.
i dont know which are they.
the other ori told me not to bother yet
| public static boolean isAngleBetween(double myAngle, double startAngle, double endAngle) { | ||
| myAngle = (myAngle + 360) % 360; | ||
| startAngle = (startAngle + 360) % 360; | ||
| endAngle = (endAngle + 360) % 360; |
There was a problem hiding this comment.
because the angle returned is between -180 and 180 so if it is negative turn it positive
| else | ||
| { | ||
| return Constants.ZONE_ONE_LEFT; | ||
| } |
There was a problem hiding this comment.
Recommended to turn into ternary operator
There was a problem hiding this comment.
that's the problem this is the ternary function cause you need to check in which zone you are, the function that checks returns bool which can not be converted to a specific zone.
| } | ||
| else | ||
| { | ||
| return Constants.ZONE_THREE_RIGHT; |
There was a problem hiding this comment.
ZONE_LEFT instead of right again
| final CommandPS5Controller driverConntroller = new CommandPS5Controller(0); | ||
|
|
||
| private final SwerveSubsystem drivebase = new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), | ||
| public static final SwerveSubsystem drivebase = new SwerveSubsystem(new File(Filesystem.getDeployDirectory(), |
There was a problem hiding this comment.
Use singletone instead of public static
|
|
||
| // Called once the command ends or is interrupted. | ||
| @Override | ||
| public void end(boolean interrupted) {} |
There was a problem hiding this comment.
Needs to stop the robot at the end
|
|
||
| // Returns true when the command should end. | ||
| @Override | ||
| public boolean isFinished() { |
There was a problem hiding this comment.
Needs to add a condition for stoping in isFinished
BUT no swerve drive singeltone method was found.
I am under the water...

Please help me ...