From 6eb7090ee94d26614be6f04a60bda693e8e6eb1b Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Mon, 7 Sep 2020 15:42:55 -0400 Subject: [PATCH] Add definition for VPADGetGyroZeroDriftMode and VPADSetGyroZeroDriftMode --- include/vpad/input.h | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/include/vpad/input.h b/include/vpad/input.h index 9bdbd1b..ae9fd42 100644 --- a/include/vpad/input.h +++ b/include/vpad/input.h @@ -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 { @@ -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, @@ -616,6 +629,10 @@ VPADSetGyroMagnification(VPADChan chan, float yaw, float roll); +void +VPADSetGyroZeroDriftMode(VPADChan chan, + VPADGyroZeroDriftMode mode); + void VPADEnableGyroZeroPlay(VPADChan chan); @@ -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);