View Single Post
  #8   Spotlight this post!  
Unread 21-01-2015, 23:07
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: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: Python: button no attribute to wpilib ?

Quote:
Originally Posted by TimTheGreat View Post
So I ran your code and noticed that the error was wpilib.motorsafety... to fix this, under
Code:
self.robot_drive=wpilib.RobotDrive(self.motor1,self.motor2)
insert
Code:
self.robot_drive.setSafetyEnabled(False)
Also, no need for
Code:
self.teleopPeriodic()
. I think Peter Johnson mentioned this. Wpilib will call it on its own. And keep the while loop in teleop, and add
Code:
wpilib.Timer.delay(.01)
inside the loop.
So that would be why the Driver Station rejects the code? Thanks a bunch and I will try that tomorrow!!