View Single Post
  #7   Spotlight this post!  
Unread 23-01-2012, 17:46
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Help Needed with some Simple Programming

You can put the macros in a separate file (e.g. macros.h) and then include it in your C++ file. For example:
Code:
In MyRobot.cpp:
#include "macros.h"
 
class MyRobot: public SimpleRobot
{
}
Or you can put the macros directly in your MyRobot.cpp file replacing the #include line.
And what do you mean when you said it's not working? Did it give you compile error or you have no error compiling and the code is downloading and running but it doesn't give you the deadband effect?

You don't have to use macros. You can expand them directly inline to your GetX(), GetY() calls but it would be a lot of typing and high risk of typos.
__________________
Reply With Quote