View Single Post
  #72   Spotlight this post!  
Unread 11-05-2008, 14:16
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Silly Programming screw ups (funny)

Quote:
Originally Posted by tdlrali View Post
Yeah, same here. Our terminal can display almost any input and output of the RC, so when they tell me that I need to fix something, I just show them that the input is not correct or that the output is correct.
I did that as well. I basically created a bunch of preprocessor macros containing prints throughout my code, i.e.

Code:
#ifdef DEBUG_THIS
printf("The value of this is: %d\r", this);
#endif
I then created a file called Debug.h containing commented out #defines. Whever I wanted to check a specific system on the robot, I just uncommented the #define that correlated to the system I wanted to check.

This strategy helped us constantly, and even let us track down a loose wire connected to the compressor's pressure switch (even though when electrical blamed me I told them that I hadn't touched compressor code since before we shipped ).
__________________