|
Re: What is wrong with my RobotPy code?
There are two issues with your code:
1 - you call teleopPeriodic from robotInit. You shouldn't do this. The IterativeRobot class does this for you.
2 - you have a while loop in teleopPeriodic. You shouldn't do this either. The IterativeRobot class periodically calls this function in a loop. You only need to have a while loop if you're using SampleRobot as a base class (not recommended).
See the documentation on IterativeRobot for more details: http://robotpy.readthedocs.org/en/la...tiveRobot.html
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC
2010 FRC World Champions ( 294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
|