View Single Post
  #11   Spotlight this post!  
Unread 08-07-2016, 15:54
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 216
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: What is wrong with my Vision to Gyro code?!

Quote:
Originally Posted by Jaci View Post
Are you reading the 125 degrees by eye, or from a print statement? If it's the latter, a code reference for where this statement is would be eternally useful
It is indeed the latter

Code:
def visionTurn(self):

        if self.vision_state == 1:
            self.turnController.setSetpoint(self.desiredAngle)
            self.rotateReady = True
            self.vision_state=2
        elif self.vision_state == 2:
          
            print (self.navx.getYaw())

            if self.turnController.onTarget() or self.cancel.get():
                self.vision_state=3
                self.rotateReady=False
__________________
#Python4Life
Reply With Quote