Go to Post I'll not deprive you of the practice in reading the manual; you'll need it if you want to be an effective part of an FRC team. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2014, 20:50
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Gyro reset() troubles

As Joe pointed out, the reset() method only zeros the accumulator as you can see in this code from the Gyro class:

Code:
    public void reset() {
        if (m_analog != null) {
            m_analog.resetAccumulator();
        }
    }
I'm not sure why it isn't resetting immediately unless, as was suggested, there is some delay in the hardware. I'd also suggest to try adding a delay after doing the reset to see if it makes a difference.

Let us know if that helps.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2014, 23:50
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 429
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Gyro reset() troubles

Quote:
Originally Posted by BradAMiller View Post
I'm not sure why it isn't resetting immediately unless, as was suggested, there is some delay in the hardware. I'd also suggest to try adding a delay after doing the reset to see if it makes a difference
As I stated in my last post, we had a command executing after the reset method was being called. The command was printing out the current gyro angle. If the gyro didn't zero after the reset call, it never was zeroed.

I don't think this is time related.

And I've never had to wait for the reset method to zero the gyro in the past. We've used this method extensively in the past and have never had a problem with it previously.
__________________
http://team2168.org
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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