CommandConst.h

Go to the documentation of this file.
00001 /***************************************************************
00002 
00003  Mini Grand Challenge 2010
00004  Pennsylvania State University - Robotics Club
00005  Learn more at www.psurobotics.org
00006  Protected by the GNU General Public License
00007 
00008  This source file is developed and maintained by:
00009  + Anthony Jones adj140@psu.edu
00010  + Jeremy Bridon jbridon@psu.edu
00011 
00012  File: CommandConst.h
00013  Desc: A list of common command definitions and for
00014  hardware pins, timing constants, etc.
00015 
00016 ***************************************************************/
00017 
00018 // Arduino instructions (CMD_NONE is an invalid instruction)
00019 #define CMD_INIT                0       
00020 #define CMD_UNIT                1       
00021 #define CMD_SETSPEED    2       
00022 #define CMD_SETTURN             3       
00023 #define CMD_GETRANGE    4       
00024 #define CMD_GETBEARING  5       
00025 #define CMD_GETSPEED    6       
00026 #define CMD_NONE                7       
00027 
00028 // Arduino return states
00029 #define RET_OK                  0       
00030 #define RET_ERROR               1       
00031 #define RET_VAL                 2       
00032 
00033 // Pins for RC mode
00034 #define RC_PIN         13       
00035 #define SPEED_RC       12       
00036 #define STEER_RC       11       
00037 
00038 // Inclusion guard
00039 #ifndef __COMMANDCONST_H_
00040 #define __COMMANDCONST_H_
00041 
00042 // String formation of the recieved messages
00043 static const char ArduinoInstrStr[7][4] =
00044 {
00045         "!IN", // CMD_INIT
00046         "!UN", // CMD_UNIT
00047         "!SS", // CMD_SETSPEED
00048         "!ST", // CMD_SETTURN
00049         "!GR", // CMD_GETRANGE
00050         "!GB", // CMD_GETBEARING
00051         "!GS", // CMD_GETSPEED
00052 };
00053 
00054 // Values shared between Loop and Hardware
00055 double TargetSpeed;                     
00056 double TargetSteer;                     
00057 
00058 double velocity;                        
00059 double servovelocity;           
00060 double wheelangle;                      
00061 double servowheelangle;         
00062 
00063 // End of inclusion guard
00064 #endif

Generated on Sun Feb 21 00:00:08 2010 for Penn State Robotics Club: Mini Grand Challenge 2010 by  doxygen 1.5.5