Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

OFFSEASON: Use of atan2 in SwerveController.getTargetSpeeds taking headingX and headingY arguments #324

Description

@chauser

The use of atan2 in SwerveController.getTargetSpeeds flips the X and Y arguments from normal use which is atan2(y,x). This means that, for example, the look* methods in AbsoluteDriveAdv set values for the headingX and headingY variables that don't make sense in the standard coordinate system of the field. I'm not sure what other code has been affected (perhaps direct control of the heading with a joystick?) or if there is some reason for the swap. But it certainly seems strange.
I'm looking at this in the dev branch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions