View Single Post
  #32   Spotlight this post!  
Unread 10-01-2011, 03:40
blakeelias's Avatar
blakeelias blakeelias is offline
2011 CT chairman's award
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: New York
Posts: 26
blakeelias is an unknown quantity at this point
Re: RobotPy 2010.beta2

Quote:
Originally Posted by Slix View Post
Waiting for new code would be good. However, if possible, it shouldn't be done in robot.py. I like the fact that run() exists because it lets you see what the code is doing (unlike in C++, where they use a magic macro), but checking for new code seems like it should really be somewhere other than user code (robot.py). It's probably possible to do it outside of user code though.

Joystick button press might work, but how will you know which joystick and button to use? I suppose you could just use joystick 1 button 1. It's unlikely that a team doesn't have a joystick plugged in...
Currently, normal code reloads in RobotPy are handled in robot.py user code by calling the checkRestart() function, which checks joystick 1 button 10 but can be changed. It seems like waiting after a crash could be implemented similarly, without a major change to the underlying framework (not sure how hard that would be). This also makes it easy to remove for competition...wouldn't want to restart the program in the middle of a match!
Reply With Quote