Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

YAGSL destroys Pigeon2 mount calibration #333

@ajsirota

Description

@ajsirota

YAGSL factory-resets the IMU at code startup:
https://github.com/BroncBotz3481/YAGSL/blob/4016ee219003baabd6fe0ff481af86314ded9c42/swervelib/SwerveDrive.java#L281

For a Pigeon 2, this involves creating a new configuration object:
https://github.com/BroncBotz3481/YAGSL/blob/4016ee219003baabd6fe0ff481af86314ded9c42/swervelib/imu/Pigeon2Swerve.java#L92-L104

This configuration object includes the default values for all in-flash settings of the IMU, including zeroing the mount calibration.

YAGSL should not destroy the calibration like this, or at least provide the user an opportunity to disable the reset. This would allow teams with IMUs mounted unconventionally to still take advantage of this important feature.

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