Quote:
|
Originally Posted by Mike Soukup
... From the names of your variables & the way you use them, it looks like those are values that will never change while your code is being executed, ie a constant. If so, there is no need to use a variable to store the values, use a #define instead:
Code:
#define axelWidth .725
#define wheelRadius .105
#define clicksPerRevolution 16
...
|
I, personally, have had problems with #declare in place of const, and only use it for alias, Example:
Code:
//Some constants
const char Varience = 10;
const char True = 255;
const char bLAH = 152;
//Some aliases
#declare Left_OI p1_y
#declare Left_Motor pwm01
#declare DyNoMiTe relay8
As long as you keep it in headers and include them, you should be ok.