1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>WPADStatus</title> 9</head> 10 11<body> 12 13<h1>WPADStatus</h1> 14 15<H2>Syntax</H2> 16<dl><dd><pre class="construction"> 17#include <revolution/wpad.h> 18#include <revolution/wpadBalance.h> 19 20#define WPAD_DPD_MAX_OBJECTS 4 21#define WPAD_PRESS_UNITS 4 22 23// for Core or BalanceBoard 24#define WPAD_BUTTON_LEFT 0x0001 25#define WPAD_BUTTON_RIGHT 0x0002 26#define WPAD_BUTTON_DOWN 0x0004 27#define WPAD_BUTTON_UP 0x0008 28#define WPAD_BUTTON_PLUS 0x0010 29#define WPAD_BUTTON_2 0x0100 30#define WPAD_BUTTON_1 0x0200 31#define WPAD_BUTTON_B 0x0400 32#define WPAD_BUTTON_A 0x0800 33#define WPAD_BUTTON_MINUS 0x1000 34#define WPAD_BUTTON_HOME 0x8000 35 36// for FreeStyle 37#define WPAD_BUTTON_Z 0x2000 38#define WPAD_BUTTON_C 0x4000 39 40// for ClassicStyle 41#define WPAD_CL_BUTTON_UP 0x0001 42#define WPAD_CL_BUTTON_LEFT 0x0002 43#define WPAD_CL_TRIGGER_ZR 0x0004 44#define WPAD_CL_BUTTON_X 0x0008 45#define WPAD_CL_BUTTON_A 0x0010 46#define WPAD_CL_BUTTON_Y 0x0020 47#define WPAD_CL_BUTTON_B 0x0040 48#define WPAD_CL_TRIGGER_ZL 0x0080 49#define WPAD_CL_RESERVED 0x0100 50#define WPAD_CL_TRIGGER_R 0x0200 51#define WPAD_CL_BUTTON_PLUS 0x0400 52#define WPAD_CL_BUTTON_HOME 0x0800 53#define WPAD_CL_BUTTON_MINUS 0x1000 54#define WPAD_CL_TRIGGER_L 0x2000 55#define WPAD_CL_BUTTON_DOWN 0x4000 56#define WPAD_CL_BUTTON_RIGHT 0x8000 57 58// for compatibility 59#define WPAD_BUTTON_SELECT WPAD_BUTTON_MINUS 60#define WPAD_BUTTON_START WPAD_BUTTON_PLUS 61#define WPAD_BUTTON_SMALL_B WPAD_BUTTON_2 62#define WPAD_BUTTON_SMALL_A WPAD_BUTTON_1 63#define WPAD_BUTTON_Z1 WPAD_BUTTON_Z 64#define WPAD_BUTTON_Z2 WPAD_BUTTON_C 65 66#define WPAD_MPLS_STAT_PLSVLD 0x80 67#define WPAD_MPLS_STAT_EXTVLD 0x40 68#define WPAD_MPLS_STAT_YAWSEL 0x08 69#define WPAD_MPLS_STAT_PITSEL 0x04 70#define WPAD_MPLS_STAT_ROLSEL 0x02 71#define WPAD_MPLS_STAT_ATTACH 0x01 72 73typedef struct DPDObject 74{ 75 s16 x; 76 s16 y; 77 u16 size; 78 u8 traceId; 79} DPDObject; 80 81typedef struct WPADStatus 82{ 83 u16 button; 84 s16 accX; 85 s16 accY; 86 s16 accZ; 87 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 88 u8 dev; 89 s8 err; 90} WPADStatus; 91 92typedef struct WPADFSStatus 93{ 94 u16 button; 95 s16 accX; 96 s16 accY; 97 s16 accZ; 98 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 99 u8 dev; 100 s8 err; 101 s16 fsAccX; 102 s16 fsAccY; 103 s16 fsAccZ; 104 s8 fsStickX; 105 s8 fsStickY; 106} WPADFSStatus; 107 108typedef struct WPADCLStatus 109{ 110 u16 button; 111 s16 accX; 112 s16 accY; 113 s16 accZ; 114 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 115 u8 dev; 116 s8 err; 117 u16 clButton; 118 s16 clLStickX; 119 s16 clLStickY; 120 s16 clRStickX; 121 s16 clRStickY; 122 u8 clTriggerL; 123 u8 clTriggerR; 124} WPADCLStatus; 125 126typedef struct DPDObjEx 127{ 128 s16 range_x1; 129 s16 range_y1; 130 s16 range_x2; 131 s16 range_y2; 132 u16 pixel; 133 s8 radius; 134} DPDObjEx; 135 136typedef struct WPADStatusEx 137{ 138 u16 button; 139 s16 accX; 140 s16 accY; 141 s16 accZ; 142 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 143 u8 dev; 144 s8 err; 145 DPDObjEx exp[WPAD_DPD_MAX_OBJECTS]; 146} WPADStatusEx; 147 148typedef struct WPADBLStatus 149{ 150 u16 button; 151 s16 accX; 152 s16 accY; 153 s16 accZ; 154 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 155 u8 dev; 156 s8 err; 157 u16 press[WPAD_PRESS_UNITS]; 158 s8 temp; 159 u8 battery; 160 161} WPADBLStatus; 162 163typedef struct WPADMPStatus 164{ 165 u16 button; 166 s16 accX; 167 s16 accY; 168 s16 accZ; 169 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 170 171 u8 dev; 172 s8 err; 173 174 union 175 { 176 // for Nunchuk 177 struct 178 { 179 s16 fsAccX; 180 s16 fsAccY; 181 s16 fsAccZ; 182 s8 fsStickX; 183 s8 fsStickY; 184 } fs; 185 186 // for Classic 187 struct 188 { 189 u16 clButton; 190 s16 clLStickX; 191 s16 clLStickY; 192 s16 clRStickX; 193 s16 clRStickY; 194 u8 clTriggerL; 195 u8 clTriggerR; 196 } cl; 197 } ext; 198 199 u8 stat; 200 u8 reserved; 201 202 s16 pitch; 203 s16 yaw; 204 s16 roll; 205 206} WPADMPStatus; 207 208</pre></dd></dl> 209 210<H2>Elements</H2> 211<h3>Common Elements</h3> 212<TABLE class="arguments" border="1" > 213 <TBODY> 214 <tr> 215<TH>button</TH> 216<TD>When a button is pressed, the corresponding bit (<code>WPAD_BUTTON_*</code>) is set to 1.</TD> 217 </tr> 218 <tr> 219<TH>accX</TH> 220<TD>Output of the Motion Sensor's x-component. The resolution is 1024. A value of 0 corresponds to weightlessness (0G). (Outputs in the range of -512 <= <SPAN class="argument">accX</SPAN> < 512.)</TD> 221 </tr> 222 <tr> 223<TH>accY</TH> 224<TD>Output of the Motion Sensor's y-component. The resolution is the same as for <SPAN class="argument">accX</SPAN>.</TD> 225 </tr> 226 <tr> 227<TH>accZ</TH> 228<TD>Output of the Motion Sensor's z-component. The resolution is the same as for <SPAN class="argument">accX</SPAN>.</TD> 229 </tr> 230 <tr> 231<TH>obj[].x</TH> 232<TD>The x-coordinate of the center of mass for the object obtained with the Pointer. The resolution is 1024.</TD> 233 </tr> 234 <tr> 235<TH>obj[].y</TH> 236<TD>The y-coordinate of the center of mass for the object obtained with the Pointer. The resolution is 768.</TD> 237 </tr> 238 <tr> 239<TH>obj[].size</TH> 240<TD>The size of the object obtained with the pointer. The resolution is 128*96.</TD> 241 </tr> 242 <tr> 243<TH>obj[].traceId</TH> 244<TD>The trace ID of the object obtained with the Pointer.</TD> 245 </tr> 246 <tr> 247<TH>dev</TH> 248<TD>The controller type.</TD> 249 </tr> 250 <tr> 251<TH>err</TH> 252<TD>The controller error status.</TD> 253 </tr> 254 </TBODY> 255</TABLE> 256 257<h3>WPADFSStatus Element</h3> 258<TABLE class="arguments" border="1" > 259 <TBODY> 260 <tr> 261<TH>fsAccX</TH> 262<TD>Output of the Nunchuk's motion sensor's x-component. Resolution is 1024. A value of 0 corresponds to weightlessness, or 0G (values are output in the range -512 <= <SPAN class="argument">fsAccX</SPAN> < 512).</TD> 263 </tr> 264 <tr> 265<TH>fsAccY</TH> 266<TD>Output of the Nunchuk's motion sensor's y-component. Resolution is the same as for <SPAN class="argument">fsAccX</SPAN>.</TD> 267 </tr> 268 <tr> 269<TH>fsAccZ</TH> 270<TD>Output of the Nunchuk's motion sensor's z-component. Resolution is the same as for <SPAN class="argument">fsAccX</SPAN>.</TD> 271 </tr> 272 <tr> 273<TH>fsStickX</TH> 274<TD>Translation data for the x-axis of the analog stick on the Nunchuk is received. The resolution is 256 (values are output in the range -128 <= <SPAN class="argument">fsStickX</SPAN> < 128).</TD> 275 </tr> 276 <tr> 277<TH>fsStickY</TH> 278<TD>Translation data for the y-axis of the analog stick on the Nunchuk is received. The resolution is the same as for <SPAN class="argument">fsStickX</SPAN>.</TD> 279 </tr> 280 </TBODY> 281</TABLE> 282 283<h3>WPADCLStatus Element</h3> 284<TABLE class="arguments" border="1" > 285 <TBODY> 286 <tr> 287<TH>clButton</TH> 288<TD>When a Classic Controller button is pressed, the corresponding bit (<code>WPAD_CL_BUTTON_*</code>) is set to 1.</TD> 289 </tr> 290 <tr> 291<TH>clLStickX</TH> 292<TD>Movement data given in terms of the x-axis for the Classic Controller L Stick.(-512 <= (Values are output in the range -512 <= <SPAN class="argument">clLStickX</SPAN> < 512.)</TD> 293 </tr> 294 <tr> 295<TH>clLStickY</TH> 296<TD>Movement data given in terms of the y-axis for the Classic Controller L Stick. The value range is the same as for <SPAN class="argument">clLStickX</SPAN>.</TD> 297 </tr> 298 <tr> 299<TH>clRStickX</TH> 300<TD>Movement data given in terms of the x-axis for the Classic Controller R Stick.(-512 <= (Values are output in the range -512 <= <SPAN class="argument">clRStickX</SPAN> < 512.)</TD> 301 </tr> 302 <tr> 303<TH>clRStickY</TH> 304<TD>Movement data given in terms of the y-axis for the Classic Controller R Stick. The value range is the same as for <SPAN class="argument">clRStickX</SPAN>.</TD> 305 </tr> 306 <tr> 307<TH>clTriggerL</TH> 308<TD>Movement data given in terms of the L Button of the Classic Controller.(0 <= (Values are output in the range 0 <= <SPAN class="argument">clTriggerL</SPAN> < 256.) Zero is always returned, effective from SDK 3.3.</font></TD> 309 </tr> 310 <tr> 311<TH>clTriggerR</TH> 312<TD>Movement data given in terms of the R Button of the Classic Controller. The value range is the same as for <SPAN class="argument">clTriggerL</SPAN>. Zero is always returned, effective from SDK 3.3.</font></TD> 313 </tr> 314 </TBODY> 315</TABLE> 316 317<h3>WPADStatusEx Element</h3> 318<TABLE class="arguments" border="1" > 319 <TBODY> 320 <tr> 321<TH>exp[].range_x1</TH> 322<TD>The top-right coordinate (x-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 1024.</TD> 323 </tr> 324 <tr> 325<TH>exp[].range_y1</TH> 326<TD>The top-right coordinate (y-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 768.</TD> 327 </tr> 328 <tr> 329<TH>exp[].range_x2</TH> 330<TD>The bottom-left coordinate (x-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 1024.</TD> 331 </tr> 332 <tr> 333<TH>exp[].range_y2</TH> 334<TD>The bottom-left coordinate (y-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 768.</TD> 335 </tr> 336 <tr> 337<TH>exp[].pixel</TH> 338<TD>The number of pixels for the object obtained by the pointer. Resolution is 128*96.</TD> 339 </tr> 340 <tr> 341<TH>exp[].radius</TH> 342<TD>The radius of the object obtained by the pointer. Values are calculated based on the size and are output in the range 0 <= <SPAN class="argument">exp[].radius</SPAN> <= 15.</TD> 343 </tr> 344 </TBODY> 345</TABLE> 346 347<h3>WPADBLStatus Element</h3> 348<TABLE class="arguments" border="1" > 349 <TBODY> 350 <tr> 351<TH>press</TH> 352<TD>The value of the sensors in the four corners of the Wii Balance Board.</TD> 353 </tr> 354 <tr> 355<TH>temp</TH> 356<TD>The temperature on the surface of the Wii Balance Board.</TD> 357 </tr> 358 <tr> 359<TH>battery</TH> 360<TD>The remaining battery life for the Wii Balance Board.</TD> 361 </tr> 362 </TBODY> 363</TABLE> 364 365<h3>WPADMPStatus Elements</h3> 366<TABLE class="arguments" border="1" > 367 <TBODY> 368 <tr> 369<TH>ext.fs.fsAccX</TH> 370<TD>Output of the Nunchuk motion sensor's X-component when using Nunchuk/MotionPlus Style. Resolution is 1024. A value of 0 corresponds to weightlessness, or 0 G (values are output in the range -512 <= <SPAN class="argument">fsAccX</SPAN> < 512).</TD> 371 </tr> 372 <tr> 373<TH>ext.fs.fsAccY</TH> 374<TD>Output of the Nunchuk motion sensor's Y-component when using Nunchuk/MotionPlus Style. Resolution is the same as for <SPAN class="argument">fsAccX</SPAN>.</TD> 375 </tr> 376 <tr> 377<TH>ext.fs.fsAccZ</TH> 378<TD>Output of the Nunchuk motion sensor's Z-component when using Nunchuk/MotionPlus Style. Resolution is the same as for <SPAN class="argument">fsAccX</SPAN>.</TD> 379 </tr> 380 <tr> 381<TH>ext.fs.fsStickX</TH> 382<TD>Movement data given in terms of the X-axis for the Nunchuk Control Stick when using Nunchuk/MotionPlus Style. The resolution is 256 (values are output in the range -128 <= <SPAN class="argument">fsStickX</SPAN> < 128).</TD> 383 </tr> 384 <tr> 385<TH>ext.fs.fsStickY</TH> 386<TD>Movement data given in terms of the Y-axis of the Nunchuk Control Stick when using Nunchuk/MotionPlus Style. The resolution is the same as for <SPAN class="argument">fsStickX</SPAN>.</TD> 387 </tr> 388 <tr> 389<TH>ext.cl.clButton</TH> 390<TD>When a Classic Controller button is pressed when using Classic/MotionPlus Style, the corresponding bit (<code>WPAD_CL_BUTTON_*</code>) is set to 1.</TD> 391 </tr> 392 <tr> 393<TH>ext.cl.clLStickX</TH> 394<TD>Movement data about the X-axis of the Classic Controller's analog L Stick when using Classic/MotionPlus Style.(-512 <= (Values are output in the range -512 <= <SPAN class="argument">clLStickX</SPAN> < 512.)</TD> 395 </tr> 396 <tr> 397<TH>ext.cl.clLStickY</TH> 398<TD>Movement data about the Y-axis of the Classic Controller's analog L Stick when using Classic/MotionPlus Style. The value range is the same as for <SPAN class="argument">clLStickX</SPAN>.</TD> 399 </tr> 400 <tr> 401<TH>ext.cl.clRStickX</TH> 402<TD>Movement data about the X-axis of the Classic Controller's R Stick when using Classic/MotionPlus style.(-512 <= (Values are output in the range -512 <= <SPAN class="argument">clRStickX</SPAN> < 512.)</TD> 403 </tr> 404 <tr> 405<TH>ext.cl.clRStickY</TH> 406<TD>Movement data about the Y-axis of the Classic Controller's R Stick when using Classic/MotionPlus style. The value range is the same as for <SPAN class="argument">clRStickX</SPAN>.</TD> 407 </tr> 408 <tr> 409<TH>ext.cl.clTriggerL</TH> 410<TD>Movement data about the L Button of the Classic Controller when using Classic/MotionPlus Style.(0 <= (Values are output in the range 0 <= <SPAN class="argument">clTriggerL</SPAN> < 256.) <font color="red">Zero is always returned, effective from SDK 3.3.</font></TD> 411 </tr> 412 <tr> 413<TH>ext.cl.clTriggerR</TH> 414<TD>Movement data about the R Button of the Classic Controller when using Classic/MotionPlus Style. The value range is the same as for <SPAN class="argument">clTriggerL</SPAN>. <font color="red">Zero is always returned, effective from SDK 3.3.</font></TD> 415 </tr> 416 <tr> 417<TH>stat</TH> 418<TD>Status of the Wii MotionPlus.</TD> 419 </tr> 420 <tr> 421<TH>reserved</TH> 422<TD>Not used.</TD> 423 </tr> 424 <tr> 425<TH>pitch</TH> 426<TD>Wii MotionPlus output around the pitch axis. Resolution is 16368. This value will approach zero when the Wii Remote rotates in the negative direction, and 16384 when it rotates in the positive direction.</TD> 427 </tr> 428 <tr> 429<TH>yaw</TH> 430<TD>Wii MotionPlus output around the yaw axis. Resolution is the same as for <SPAN class="argument">pitch</SPAN>.</TD> 431 </tr> 432 <tr> 433<TH>roll</TH> 434<TD>Wii MotionPlus output in the roll direction. Resolution is the same as for <SPAN class="argument">pitch</SPAN>.</TD> 435 </tr> 436 </TBODY> 437</TABLE> 438 439<h2>Description</h2> 440<p> 441Each structure shows the state of the Wii Remote, external extension controller, and Wii Balance Board, respectively. 442<ul> 443<li>Number of Controllers</li> 444</ul> 445<blockquote> 446The maximum number of Wii Remotes that can connect is defined as the macro constant below. 447<TABLE class="arguments" border="1" > 448<TR> 449<TH>WPAD_MAX_CONTROLLERS</TH> 450<TD>The maximum number of Wii Remotes that can connect.</TD> 451</TR> 452</table> 453</blockquote> 454 455<ul> 456<li>Button Input</li> 457</ul> 458<blockquote> 459Button inputs are defined with the macro constants shown below.<br><br> The Wii Remote is equipped with +Control Pad, A, B, 1, 2, -, +, and HOME digital buttons. 460<TABLE class="arguments" border="1" > 461<TR> 462<TH>WPAD_BUTTON_UP</TH> 463<TD>+Control Pad UP on the Wii Remote is being pressed.</TD> 464</TR> 465<TR> 466<TH>WPAD_BUTTON_DOWN</TH> 467<TD>+Control Pad DOWN on the Wii Remote is being pressed.</TD> 468</TR> 469<TR> 470<TH>WPAD_BUTTON_LEFT</TH> 471<TD>+Control Pad LEFT on the Wii Remote is being pressed.</TD> 472</TR> 473<TR> 474<TH>WPAD_BUTTON_RIGHT</TH> 475<TD>+Control Pad RIGHT on the Wii Remote is being pressed.</TD> 476</TR> 477<TR> 478<TH>WPAD_BUTTON_A</TH> 479<TD>The A Button on the Wii Remote is being pressed.</TD> 480</TR> 481<TR> 482<TH>WPAD_BUTTON_B</TH> 483<TD>The B Button on the Wii Remote is being pressed.</TD> 484</TR> 485<TR> 486<TH>WPAD_BUTTON_1</TH> 487<TD>The 1 Button on the Wii Remote is being pressed.</TD> 488</TR> 489<TR> 490<TH>WPAD_BUTTON_2</TH> 491<TD>The 2 Button on the Wii Remote is being pressed.</TD> 492</TR> 493<TR> 494<TH>WPAD_BUTTON_MINUS</TH> 495<TD>The - Button on the Wii Remote is being pressed.</TD> 496</TR> 497<TR> 498<TH>WPAD_BUTTON_PLUS</TH> 499<TD>The + Button on the Wii Remote is being pressed.</TD> 500</TR> 501<TR> 502<TH>WPAD_BUTTON_HOME</TH> 503<TD>HOME on the Wii Remote is being pressed.</TD> 504</TR> 505</TABLE> 506The Nunchuk has the Z and C Buttons. 507<TABLE class="arguments" border="1" > 508<TR> 509<TH>WPAD_BUTTON_Z</TH> 510<TD>The Z Button on the Nunchuk is being pressed.</TD> 511</TR> 512<TR> 513<TH>WPAD_BUTTON_C</TH> 514<TD>The C Button on the Nunchuk is being pressed.</TD> 515</TR> 516</TABLE> 517The Classic Controller has the +Control Pad and the A, B, X, Y, MINUS, PLUS, HOME, L, R, ZL, and ZR buttons. The button status for the Wii Remote and the Classic Controller can be obtained independently. 518<TABLE class="arguments" border="1" > 519<TR> 520<TH>WPAD_CL_BUTTON_UP</TH> 521<TD>+Control Pad UP on the Classic Controller is being pressed.</TD> 522</TR> 523<TR> 524<TH>WPAD_CL_BUTTON_DOWN</TH> 525<TD>+Control Pad DOWN on the Classic Controller is being pressed.</TD> 526</TR> 527<TR> 528<TH>WPAD_CL_BUTTON_LEFT</TH> 529<TD>+Control Pad LEFT on the Classic Controller is being pressed.</TD> 530</TR> 531<TR> 532<TH>WPAD_CL_BUTTON_RIGHT</TH> 533<TD>+Control Pad RIGHT on the Classic Controller is being pressed.</TD> 534</TR> 535<TR> 536<TH>WPAD_CL_BUTTON_A</TH> 537<TD>The A Button on the Classic Controller is being pressed.</TD> 538</TR> 539<TR> 540<TH>WPAD_CL_BUTTON_B</TH> 541<TD>The B Button on the Classic Controller is being pressed.</TD> 542</TR> 543<TR> 544<TH>WPAD_CL_BUTTON_Y</TH> 545<TD>The Y Button on the Classic Controller is being pressed.</TD> 546</TR> 547<TR> 548<TH>WPAD_CL_BUTTON_X</TH> 549<TD>The X Button on the Classic Controller is being pressed.</TD> 550</TR> 551<TR> 552<TH>WPAD_CL_TRIGGER_L</TH> 553<TD>The L Button on the Classic Controller is being pressed.</TD> 554</TR> 555<TR> 556<TH>WPAD_CL_TRIGGER_R</TH> 557<TD>The R Button on the Classic Controller is being pressed.</TD> 558</TR> 559<TR> 560<TH>WPAD_CL_TRIGGER_ZL</TH> 561<TD>The ZL Button on the Classic Controller is being pressed.</TD> 562</TR> 563<TR> 564<TH>WPAD_CL_TRIGGER_ZR</TH> 565<TD>The ZR Button on the Classic Controller is being pressed.</TD> 566</TR> 567<TR> 568<TH>WPAD_CL_BUTTON_MINUS</TH> 569<TD>The -/SELECT Button on the Classic Controller is being pressed.</TD> 570</TR> 571<TR> 572<TH>WPAD_CL_BUTTON_PLUS</TH> 573<TD>The +/START Button on the Classic Controller is being pressed.</TD> 574</TR> 575<TR> 576<TH>WPAD_CL_BUTTON_HOME</TH> 577<TD>HOME on the Classic Controller is being pressed.</TD> 578</TR> 579</table> 580</blockquote> 581 582<ul> 583<li>Pointer</li> 584</ul> 585<blockquote> 586The pointer specifications are defined by the following macro constants. 587 588<TABLE class="arguments" border="1" > 589<TR> 590<TH>WPAD_DPD_MAX_OBJECTS</TH> 591<TD>The maximum number of objects that the pointer can detect simultaneously.</TD> 592</TR> 593<TR> 594<TH>WPAD_DPD_ANGLE</TH> 595<TD>The pointer view angle (in degrees).</TD> 596</TR> 597<TR> 598<TH>WPAD_DPD_IMG_RESO_WX</TH> 599<TD>Pointer resolution along the x-axis.</TD> 600</TR> 601<TR> 602<TH>WPAD_DPD_IMG_RESO_WY</TH> 603<TD>Pointer resolution along the y-axis.</TD> 604</TR> 605</table> 606 607<p> 608Object data items are stored in the <SPAN class="argument">obj</SPAN> array in the order in which they are detected by the Pointer. The pointer scans the image captured by the sensor internally from top left to bottom right and outputs object data in the order detected. At the same time, trace IDs are assigned in the order in which the objects are detected. 609</p> 610<p> 611The trace IDs help to judge whether previously obtained data is the same as the currently obtained data. Consider a case where objects A (trace ID=0) and B (trace ID=1) are detected as A and B, respectively, by the previous scan, and then they are detected as B and A, respectively, after the pointer is moved. The output order for the current scan is the reverse of the previous one. However, the trace IDs are in the order of B (using the previously assigned trace ID of 1) and A (using the previously assigned trace ID of 0), and the fact that the data is the same is preserved. 612</p> 613</blockquote> 614 615<ul> 616<li>Motion Sensor</li> 617</ul> 618<blockquote> 619The motion sensor specifications are defined by the macro constant below. 620 621<TABLE class="arguments" border="1" > 622<TR> 623<TH>WPAD_ACC_RESO</TH> 624<TD>The motion sensor's resolution.</TD> 625</TR> 626</table> 627</blockquote> 628 629<ul> 630<li>Controller Type</li> 631</ul> 632<blockquote> 633Controller types are defined with the following macro constants. 634 <TABLE class="arguments" border="1" > 635 <TBODY> 636 <TR> 637<TH>WPAD_DEV_NOT_FOUND</TH> 638<TD>Nothing is connected to the specified channel.</TD> 639 </TR> 640 <TR> 641<TH>WPAD_DEV_CORE</TH> 642<TD>Wii Remote.</TD> 643 </TR> 644 <TR> 645<TH>WPAD_DEV_FREESTYLE</TH> 646<TD>Nunchuk Style.</TD> 647 </TR> 648 <TR> 649<TH>WPAD_DEV_CLASSIC</TH> 650<TD>Classic Style.</TD> 651 </TR> 652 <TR> 653<TH>WPAD_DEV_TRAIN</TH> 654<TD>Wii Remote + Master Controller. <font color="red">If the WPADTrn library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD> 655 </TR> 656 <TR> 657<TH>WPAD_DEV_GUITAR</TH> 658<TD>Wii Remote + Guitar Controller. <font color="red">If the WPADGtr library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD> 659 </TR> 660 <TR> 661<TH>WPAD_DEV_DRUM</TH> 662<TD>Wii Remote + Drum Controller. <font color="red">If the <code>WPADDrm</code> library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD> 663 </TR> 664 <TR> 665<TH>WPAD_DEV_TAIKO</TH> 666<TD>Wii Remote + Taiko Drum Controller. <font color="red"> If the <code>WPADTko</code> library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD> 667 </TR> 668 <TR> 669<TH>WPAD_DEV_BALANCE_CHECKER</TH> 670<TD>Wii Balance Board. <font color="red">If the WUD library is not linked, a Wii Balance Board is not connected.</font></TD> 671 </TR> 672 <TR> 673<TH>WPAD_DEV_MPLS</TH> 674<TD>MotionPlus Style.</TD> 675 </TR> 676 <TR> 677<TH>WPAD_DEV_MPLS_FREESTYLE</TH> 678<TD>Nunchuk/MotionPlus Style.</TD> 679 </TR> 680 <TR> 681<TH>WPAD_DEV_MPLS_CLASSIC</TH> 682<TD>Classic/MotionPlus Style. <font color="red">Not supported by Wii MotionPlus PP2.</font></TD> 683 </TR> 684 <TR> 685<TH>WPAD_DEV_MPLS_FUTURE</TH> 686<TD>Status when a device other than a Nunchuk or Classic Controller has been plugged into the Wii MotionPlus while it is operating in extension mode. <font color="red">Not supported by Wii MotionPlus PP2.</font></TD> 687 </TR> 688 <TR> 689<TH>WPAD_DEV_FUTURE</TH> 690<TD>A device that will be supported in the future. The device is legitimate, but this External Extension Controller cannot be used with this title. It can be operated as a Wii Remote.</TD> 691 </TR> 692 <TR> 693<TH>WPAD_DEV_NOT_SUPPORTED</TH> 694<TD>A device that cannot be used. This type is selected when an illegal device is plugged in or device recognition fails due to a poor connection with the external extension controller. It can be operated as a Wii Remote.</TD> 695 </TR> 696 <TR> 697<TH>WPAD_DEV_UNKNOWN</TH> 698<TD>Unknown device. This type is selected during the period between insertion of an External Extension Controller and completion of the recognition process. It can be operated as a Wii Remote.</TD> 699 </TR> 700 </TBODY> 701 </TABLE> 702</blockquote> 703<ul> 704<li>Error Status</li> 705</ul> 706<blockquote> 707Error statuses are defined with the following macro constants. 708 <TABLE class="arguments" border="1" > 709 <TBODY> 710 <tr> 711 <th>WPAD_ERR_NONE</th> 712 <td>Data with the specified data format was received.</td> 713 </tr> 714 <tr> 715 <th>WPAD_ERR_NO_CONTROLLER</th> 716 <td>Data has never been received.</td> 717 </tr> 718 <tr> 719 <th>WPAD_ERR_INVALID</th> 720 <td>The format of incoming data is different from the format specified for the WPAD library. Values other than <SPAN class="argument">err</SPAN> and <SPAN class="argument">dev</SPAN> are undefined.<br>(In this case, the Wii Remote and external extension controller data is invalid.)</td> 721 </tr> 722 <tr> 723<th>WPAD_ERR_CORRUPTED</th> 724<td>An external extension controller, such as the Nunchuk or Classic Controller, is partially inserted into the Wii Remote. Data for the external extension controller is corrupted. (However, Wii Remote data is not corrupted.)</td> 725 </tr> 726 </TBODY> 727 </TABLE> 728</blockquote> 729 730<ul> 731<li>Status of the Wii MotionPlus</li> 732</ul> 733<blockquote> 734The Wii MotionPlus status bits contain information pertaining to: 1) the type of conversion value used for each axis (the low-velocity range conversion value or the overall range conversion value); 2) whether an external extension controller is plugged into the Wii MotionPlus, and; 3) whether the data for the Wii MotionPlus or external extension controller is corrupt. Check the information set in each bit by performing a logical AND comparison with the following macros. 735 <TABLE class="arguments" border="1" > 736 <TBODY> 737 <TR> 738<TH>WPAD_MPLS_STAT_PITSEL</TH> 739<TD>If this value for the pitch axis is zero, <SPAN class="argument">pitch</SPAN> uses the overall conversion value. If nonzero, <SPAN class="argument">pitch</SPAN> uses the low-velocity range conversion value.</TD> 740 </TR> 741 <TR> 742<TH>WPAD_MPLS_STAT_YAWSEL</TH> 743<TD>If this value for the yaw axis is zero, <SPAN class="argument">yaw</SPAN> uses the overall conversion value. If nonzero, <SPAN class="argument">yaw</SPAN> uses the low-velocity range conversion value.</TD> 744 </TR> 745 <TR> 746<TH>WPAD_MPLS_STAT_ROLSEL</TH> 747<TD>If this value for the roll axis is zero, <SPAN class="argument">roll</SPAN> uses the overall conversion value. If nonzero, <SPAN class="argument">roll</SPAN> uses the low-velocity range conversion value.</TD> 748 </TR> 749 <TR> 750<TH>WPAD_MPLS_STAT_ATTACH</TH> 751<TD>If the value is zero, nothing is plugged into the Wii MotionPlus. If nonzero, something is plugged into the Wii MotionPlus.</TD> 752 </TR> 753 <TR> 754<TH>WPAD_MPLS_STAT_PLSVLD</TH> 755<TD>If this value is zero, the Wii MotionPlus data is corrupt. If nonzero, the data is normal.</TD> 756 </TR> 757 <TR> 758<TH>WPAD_MPLS_STAT_EXTVLD</TH> 759<TD>If this value is zero, the external extension controller data is corrupt. If nonzero, the data is normal.</TD> 760 </TR> 761 </TBODY> 762 </TABLE> 763</blockquote> 764 765 766<H2>See Also</H2> 767<p> 768None. <!--<A href="./toc.html" target="contents">WPAD関数</A>--> 769</p> 770 771<H2>Revision History</H2> 772<P> 7732009/06/23 Revised the explanations of <code>clTriggerL, clTriggerR</code> for <code>WPADCLStatus, WPADMPStatus</code>. Deleted information for some specialty controllers.<br>2008/12/26 Added <code>WPAD_DEV_TAIKO</code>.<br>2008/12/19 Added <code>WPAD_DEV_DRUM</code>.<br>2008/12/02 Revised the description of error status.<br>2008/11/26 Revised the description of controller types.<br>2008/09/30 Added the <code>WPADMPStatus</code> structure.<br>2008/04/16 Integrated descriptions for external extension controller structures. Deleted <CODE>WPAD_ERR_BUSY</CODE> from the error status.<br>2008/03/17 Revised the description of <CODE>WPAD_DEV_NOT_SUPPORTED</CODE>.<br>2006/09/22 Added <CODE>WPAD_ERR_CORRUPTED</CODE>.<br>2006/08/15 Changed the description of <CODE>WPAD_ERR_INVALID</CODE>.<br>2006/06/19 Added define, renamed the external extension controller, renamed buttons, and revised the <CODE>WPAD_DEV_DOLPHIN</CODE> explanation.<br>2005/10/27 Changed the acceleration resolution from 2,048 to 1,024. Changed the interface from EXI to SI.<br>2005/09/27 Changed the name to DPD. Deleted the note regarding the <CODE>DPDObject</CODE> member variables <SPAN class="argument">size</SPAN> and <SPAN class="argument">traceID</SPAN>. Changed the DPD description.<br>2005/08/30 Modified the description of button placement and added a note that the member variable of the <CODE>DPDObject</CODE> structure will change.<br>2005/08/01 Initial version. 774</P> 775 776<hr><p>CONFIDENTIAL</p></body> 777</HTML>