Two DRC VPAD Demo

Location

$CAFE_ROOT/system/src/demo/drc/two_drc_vpad

Description

This sample program verifies the VPAD library functionality with two DRCs. You may use it to display any value that is possible to obtain from the library, and you may edit all modifiable values.

To connect a second DRC

  1. Start the System Config Tool.
  2. In the Root Menu, select Wii U GamePad (DRC) Setting, and then press the A Button.
  3. In the Wii U GamePad (DRC) Setting menu, select Multi DRC, and then press the A Button.
  4. With the +Control Pad select ON, and then press the A Button to save the setting.
  5. If the second DRC is not paired, pair it now following the instructions in Pair the DRC.
  6. To soft-launch the demo without shutting the system down, in the Cafe Cygwin shell, type caferun -s.

Display Toggle

Parameters and Input Data Display

GYRO PARAMS Each controller can be used to modify its own parameters using the VPAD library. The following items can be edited: Zero-Point Tolerance, Zero-Point Drift Correction, Attitude Correction, Acceleration Correction. The state of each item is also displayed.
VPAD DEMO MAN Information on input used to control the demo
ACC The VPADStatus structure's acc information, given as a vector expressing the XY dimensions and a vector expressing the ZY dimensions.
GYRO The gyro value in the VPADStatus structure. The angular velocity for each axis is displayed below as pitch, yaw, and roll vectors. Up is positive and down is negative.
ANGLE The angle value in the VPADStatus structure. The following angular data for each axis is displayed using circles for the pitch, yaw, and roll. The counterclockwise direction is positive.
DIR The dir value in the VPADStatus structure. A block is displayed to the side, rotated according to the attitude data.

Touch Point Display

Each touch point is calibrated using the default calibration parameter. If the displayed coordinates have errors, implement the calibration procedure by using the VPADCalcTPCalibrationParam and VPADSetTPCalibrationParam functions.

Orientation Display

For each DRC, a block is displayed that represents its orientation information. This block changes orientation depending on parameter state and attitude data.

Moving the Fulcrum of the Block

This block is rotated based on the attitude data, using the fulcrum as the center point. The position of the fulcrum can be moved forward and back by three levels with the + Button and the - Button on the DRC.

Resetting

Press the X Button to call the VPADSetGyroAngle and VPADSetGyroDirection functions and to reset the angle and attitude data for the DRC.

Parameter Adjustment

The values for each DRC can be edited using the digital buttons for that controller. To move the cursor, press the up and down buttons on the +Control Pad. To turn on or increment the selected digit, press the A Button. To turn off or decrement the selected digit, press the B Button.

Rumble

To start the rumble feature, press the R Button. To make the VPAD rumble for one second, press the R Button once. To stop the rumble feature, press the ZR Button.

Source Code Files

File Name Description
main.h
main.c
Contains the application startup and framework source.
sample.h
sample.c
Form the main body of the application that performs a variety of operations using the controller values. These application files initialize and load a DRC, and contain the source code for the CPU processing and rendering that is performed in every frame.
graphic.h
graphic.c
The collection of subroutines for drawing simple graphics.
gfxutil.h
gfxutil.cpp
Contains the framework source for the DRC.

WARNING:
Two-DRC support is available only for development purposes. Integration with the HOME Menu (HBM) and other system functionality is not supported. The application must render two images for the DRCs using mode GX2_DRC_DOUBLE, as demonstrated in this sample. For more information, see GX2 Display APIs.

The process to set up the two-DRC mode may change in future SDK releases.

Revision History

2014-01-21 Terminology change to HOME Menu.
2013-05-08 Automated cleanup pass.
2013-02-15 Initial version.


CONFIDENTIAL