This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
Java Units library memory warning #29
agasser
started this conversation in
General Technical
Replies: 1 comment 2 replies
-
This came to mind as I was trying out the units library. My teleop drive command uses three Today, my X supplier looks like this:
This creates an instance of If I update my
This implementation using the units library requires creation of a Is the new implementation cause for concern? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Although I don't disagree with the idea of mutable versions of the measures classes, I question the wording in the documentation. It recommends against creating new instances of the objects on every robot iteration. This warning doesn't exist for other classes that we create on every period; such as
ChassisSpeeds
,Translation2d
,Rotation2d
, and even boxing likeDouble
. Does this warning really belong in the documentation?Beta Was this translation helpful? Give feedback.
All reactions