|
Analog Gyro .getAngle() function occasionally giving massive random values
We're working in java, and we're running into an issue with our gyro. Occasionally we get large position spikes from the .getAngle() function. Not sure why. We're using the gyro in between threads, could it be an issue with the .getAngle() not being thread safe? I noticed that we don't (I think) get spikes in the main thread that the roborio runs by default, we only get spikes in other threads. It's been really annoying to debug because it only happens like once a minute or so.
I posted to Programming rather than to Java to see if this was an issue not just specific to java. I also can post code if needed, but for the most part it's fairly straight forward code. I was wondering if anyone has seen anything similar, or knows about things like this.
Thanks for any help in advance.
__________________
But why?
|