Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   5 second delay on gyro resetting? (http://www.chiefdelphi.com/forums/showthread.php?t=114772)

joelg236 08-03-2013 23:33

5 second delay on gyro resetting?
 
Quote:

Originally Posted by thinker&planner (Post 1245334)
Java has a 5-sec delay when it resets the gyro (andymark) which our whole drive system is based off of (orientation to the field)

Is this really true? Can anyone verify this?

Jared Russell 08-03-2013 23:35

Re: 5 second delay on gyro resetting?
 
The constructor for the WPIlib Gyro class calls a blocking init() method that has sleeps of 1 and 5 seconds (~6 seconds total). However, this method is only called upon construction of a Gyro object - NOT when simply calling the reset() method.

The constructor calibrates the gyro, while reset does not change calibration but rather sets the current angle to 0.

joelg236 08-03-2013 23:46

Re: 5 second delay on gyro resetting?
 
That was what I thought. Thanks.


All times are GMT -5. The time now is 11:33.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi