00001
00002 #ifndef INCLUDED_WiiMoteInfo_h
00003 #define INCLUDED_WiiMoteInfo_h
00004
00005 #include <cmath>
00006 #include <stdlib.h>
00007 #include "CommonInfo.h"
00008 using namespace RobotInfo;
00009
00010
00011 #if defined(TGT_WIIMOTE)
00012 # define TGT_HAS_LEDS 2
00013 #endif
00014
00015
00016 namespace WiiMoteInfo {
00017
00018
00019
00020
00021
00022 extern const char* const TargetName;
00023
00024 const unsigned int FrameTime=15;
00025 const unsigned int NumFrames=1;
00026 const unsigned int SoundBufferTime=32;
00027
00028
00029 const unsigned NumWheels = 0;
00030
00031 const unsigned JointsPerArm = 0;
00032 const unsigned NumArms = 0;
00033 const unsigned NumArmJoints = 0;
00034
00035 const unsigned JointsPerLeg = 0;
00036 const unsigned NumLegs = 0;
00037 const unsigned NumLegJoints = 0;
00038 const unsigned NumHeadJoints = 0;
00039 const unsigned NumTailJoints = 0;
00040 const unsigned NumMouthJoints = 0;
00041 const unsigned NumEarJoints = 0;
00042 const unsigned NumButtons = 11;
00043 const unsigned NumSensors = 3;
00044 const unsigned NumLEDs = 4;
00045 const unsigned NumFacePanelLEDs = 0;
00046
00047 const unsigned NumPIDJoints = NumWheels;
00048 const unsigned NumOutputs = NumWheels + NumLEDs;
00049 const unsigned NumReferenceFrames = NumOutputs + 1 + NumArms;
00050
00051
00052 const float CameraHorizFOV=0;
00053 const float CameraVertFOV=0;
00054 const float CameraFOV=0;
00055 const unsigned int CameraResolutionX=0;
00056 const unsigned int CameraResolutionY=0;
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 const unsigned PIDJointOffset = 0;
00069 const unsigned WheelOffset = PIDJointOffset;
00070
00071 const unsigned LEDOffset = WheelOffset+NumWheels;
00072
00073 const unsigned MODE_OFFSET = LEDOffset + NumLEDs;
00074 const unsigned DEMO_OFFSET = MODE_OFFSET+1;
00075
00076 const unsigned BaseFrameOffset = NumOutputs;
00077
00078 enum WheelOffset_t { };
00079
00080
00081
00082 enum LEDOffset_t {
00083 LED0_Offset=LEDOffset,
00084 LED1_Offset,
00085 LED2_Offset,
00086 LED3_Offset
00087 };
00088
00089 typedef unsigned int LEDBitMask_t;
00090
00091 const LEDBitMask_t FaceLEDMask = 0;
00092
00093 const LEDBitMask_t AllLEDMask = (LEDBitMask_t)~0;
00094
00095
00096 enum InterfaceMode_t {
00097 };
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 enum ButtonOffset_t {
00113 BUTTON_2,
00114 BUTTON_1,
00115 BUTTON_B,
00116 BUTTON_A,
00117 BUTTON_MINUS,
00118 BUTTON_HOME,
00119 BUTTON_LEFT,
00120 BUTTON_RIGHT,
00121 BUTTON_DOWN,
00122 BUTTON_UP,
00123 BUTTON_PLUS
00124 };
00125
00126
00127 const char* const buttonNames[NumButtons+1] =
00128 { "button 2",
00129 "button 1",
00130 "button B",
00131 "button A",
00132 "button minus",
00133 "button home",
00134 "button left",
00135 "button right",
00136 "button down",
00137 "button up",
00138 "button pus",
00139 NULL
00140 };
00141
00142
00143
00144 enum SensorOffset_t {
00145 X_OFFSET,
00146 Y_OFFSET,
00147 Z_OFFSET
00148 };
00149
00150 enum IRComm_t {
00151 IR_X,
00152 IR_Y
00153 };
00154
00155
00156
00157
00158
00159
00160 const char* const sensorNames[NumSensors+1] = {
00161 "x",
00162 "y",
00163 "z",
00164 NULL
00165 };
00166
00167
00168
00169
00170
00171 const char* const outputNames[NumReferenceFrames+1] = {
00172 "LED 0",
00173 "LED 1",
00174 "LED 2",
00175 "LED 3",
00176 "BaseFrame",
00177 NULL
00178 };
00179
00180
00181 extern const Capabilities capabilities;
00182
00183
00184 const float DefaultPIDs[NumPIDJoints+1][3] = {
00185 {0,0,0}
00186 };
00187
00188
00189 const float MaxOutputSpeed[NumOutputs] = {
00190 0, 0, 0, 0
00191 };
00192
00193
00194 const float outputRanges[NumOutputs][2] =
00195 {
00196 { -1 , 1 },
00197 { -1 , 1 },
00198 { -1 , 1 },
00199 { -1 , 1 },
00200 };
00201
00202
00203
00204 const float mechanicalLimits[NumOutputs][2] =
00205 {
00206 { -1 , 1 },
00207 { -1 , 1 },
00208 { -1 , 1 },
00209 { -1 , 1 },
00210 };
00211
00212 }
00213
00214
00215
00216
00217
00218
00219 #endif