View Single Post
  #2   Spotlight this post!  
Unread 11-01-2008, 18:02
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
Re: SetPWM and our IR controls

Whoa there! You should (under most circumstances) NEVER have a loop in the robot code! Especially an infinite one. The only place that should have an infinite loop is in the main method. What you should do is remove the infinite while loop in this function and put a call to this inside the Process_Data_From_Master_uP in user_routines.c between the calls to the Getdata and Putdata functions. After doing that, you should be able to debug your code.

And you don't need the continue statements there...

Wait, if you are using EasyC (and it seems that you are), then the call to this function should be placed wherever the data processing function is (once again, without an infinite while loop inside this function).
__________________
Old stuff:

FRC 2007 Strategy Solver. Version: 2.55. Progress: done.

Last edited by ham90mack : 11-01-2008 at 18:06. Reason: add a few comments