mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
In the Java implementation, "result" is an instance variable (to avoid needing to perform a memory allocation on each call to getAngle). However, this means that calls to getAngle() from multiple threads can step on each other. Synchronize the method to avoid this issue. Reported by: Jackson Gray (http://www.chiefdelphi.com/forums/showthread.php?threadid=145124) Note this does not synchronize accesses between configuration methods such as calibrate() and accessor methods such as getAngle(). Change-Id: I9ecc962d4fba66f6134fd801cfd607f155b41fe5