Skip to content

Commit

Permalink
Add definition for VPADGetGyroZeroDriftMode and VPADSetGyroZeroDriftMode
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 authored and exjam committed Sep 21, 2020
1 parent 23b5418 commit 6eb7090
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions include/vpad/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,22 @@ typedef enum VPADReadError
typedef enum VPADLcdMode
{
//! Display is in standby and will turn back on if any buttons are pressed.
VPAD_LCD_STANDBY = 0,
VPAD_LCD_STANDBY = 0,
//! Display is completely off and will remain so until explicitly changed.
VPAD_LCD_OFF = 1,
VPAD_LCD_OFF = 1,
//! Display is on as normal.
VPAD_LCD_ON = 0xFF,
VPAD_LCD_ON = 0xFF,
} VPADLcdMode;

//! Gyro zero drift mode.
typedef enum VPADGyroZeroDriftMode
{
VPAD_GYRO_ZERODRIFT_LOOSE = 0,
VPAD_GYRO_ZERODRIFT_STANDARD,
VPAD_GYRO_ZERODRIFT_TIGHT,
VPAD_GYRO_ZERODRIFT_NONE
} VPADGyroZeroDriftMode;

//! 2D vector.
struct VPADVec2D
{
Expand Down Expand Up @@ -543,6 +552,10 @@ VPADSetRStickClampThreshold(VPADChan chan,
int32_t max,
int32_t min);

void
VPADGetGyroZeroDriftMode(VPADChan chan,
VPADGyroZeroDriftMode *mode);

void
VPADGetLStickClampThreshold(VPADChan chan,
int32_t *max,
Expand Down Expand Up @@ -616,6 +629,10 @@ VPADSetGyroMagnification(VPADChan chan,
float yaw,
float roll);

void
VPADSetGyroZeroDriftMode(VPADChan chan,
VPADGyroZeroDriftMode mode);

void
VPADEnableGyroZeroPlay(VPADChan chan);

Expand Down Expand Up @@ -660,6 +677,16 @@ VPADInitGyroDirReviseParam(VPADChan chan);
void
VPADInitGyroAccReviseParam(VPADChan chan);

/**
* Initializes the zero drift mode on the desired Gamepad.
*
* \note
* Retail Wii U systems have a single Gamepad on \link VPADChan::VPAD_CHAN_0
* VPAD_CHAN_0. \endlink
*
* \param chan
* The channel of the Gamepad to initialize.
*/
void
VPADInitGyroZeroDriftMode(VPADChan chan);

Expand Down

0 comments on commit 6eb7090

Please sign in to comment.