View Single Post
  #35   Spotlight this post!  
Unread 10-01-2011, 04:11
Slix Slix is offline
Registered User
AKA: Peter Kowalczyk
FRC #2115 (NightMares)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Mundelein, IL
Posts: 31
Slix is an unknown quantity at this point
Re: RobotPy 2010.beta2

Quote:
Originally Posted by blakeelias View Post
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!
Does wpilib still work if the code is not in StartCompetition()?

If so, that could work! Something like this (if done away from user code in boot.py) http://pastebin.com/iqZjYni0

Though, that requires that the user have a CheckRestart function.

EDIT: Also need a wait in that snippet in the loop so that it doesn't take up all the cpu.

Last edited by Slix : 10-01-2011 at 04:19. Reason: Edit
Reply With Quote