![]() |
No Robot Code
My team is elavuating using RobotPy for next year and is planning on using it for a post season event. We are using RobotPy version 2011.2 and version 29 of the cRIO. The code runs in the net console but the driver station says no robot code.
|
Re: No Robot Code
Quote:
|
Re: No Robot Code
It basically shows the output of the code and tells if there are any errors.
|
Re: No Robot Code
Can you copy and paste the NetConsole output here and your robot.py as well? I suspect what is happening if you don't have any errors is that your code is exiting near-immediately (e.g. your robot.py's run() function returns). There should either be a while 1: loop in either run() or one of the functions it calls (such as the SimpleRobot.StartCompetition() function).
|
Re: No Robot Code
Here's a copy of my robot.py sorry but I can't get the NetConsole output until tomorrow.
[code] import wpilib lstick = wpilib.Joystick(1) ljag = wpilib.CANJaguar(3) rstick = wpilib.Joystick(2) rjag = wpilib.CANJaguar(4) def disabled(): pass def autonomous(): pass def teleop(): dog = wpilib.GetWatchdog() dog.SetEnabled(True) dog.SetExpiration(0.25) while wpilib.IsOperatorControl() and wpilib.IsEnabled(): dog.Feed() checkRestart() def run(): """Main loop""" while 1: if wpilib.IsDisabled(): print("Running disabled()") disabled() while wpilib.IsDisabled(): wpilib.Wait(0.01) elif wpilib.IsAutonomous(): print("Running autonomous()") autonomous() while wpilib.IsAutonomous() and wpilib.IsEnabled(): wpilib.Wait(0.01) else: print("Running teleop()") teleop() while wpilib.IsOperatorControl() and wpilib.IsEnabled(): wpilib.Wait(0.01) [\code] |
Re: No Robot Code
Quote:
|
Re: No Robot Code
^reported, sig spam. Still, its nice to see them ask detailed, relevant, well-worded questions. :D
|
| All times are GMT -5. The time now is 19:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi