wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.03k stars 607 forks source link

[wpilib] Refactor the ADIS IMU classes #6703

Closed Gold856 closed 3 weeks ago

Gold856 commented 1 month ago

Create acquire thread with method reference instead of Runnable class Clean up comments and bad Javadoc (removed useless doc stubs, used single line comments instead of multi-line eveywhere, removed low value comments) Clean up variable declarations (declared and assigned variables when needed instead of declaring upfront and assigning later, made needsFlash a local in Java) Remove unused gyro data variables (mostly average gyro data in Java) Remove and/or inline a bunch of the conversion functions Make toInt in Java take four ints instead of varargs to reduce allocations Remove unnecessary parentheses and casts Use InputModulus or angleModulus and remove custom angle wrapping Use hypotf instead of manual calculation Remove a bunch of warning suppressions as they were either fixed or aren't needed Call reset from calibrate in Java (change not done in C++ because I'm not sure how to do recursive locks) Use array initialization syntax when possible and remove ByteBuffer usage

PeterJohnson commented 4 weeks ago

@juchong would you be willing to review?

Gold856 commented 3 weeks ago

Now located at #6719.